commit 523d939ef98fd712632d93a5a2b588e477a7565e Author: Linus Torvalds Date: Sun Jul 24 12:23:50 2016 -0700 Linux 4.7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 68093c43f352e4ad36cf1324bbdbd7c723a24dbc Merge: 107df03 930c532 Author: Linus Torvalds Date: Sun Jul 24 10:00:31 2016 +0900 Merge tag 'ceph-for-4.7-rc8' of git://github.com/ceph/ceph-client Pull ceph fix from Ilya Dryomov: "A fix for a long-standing bug in the incremental osdmap handling code that caused misdirected requests, tagged for stable" The tag is signed with a brand new key - Sage is on vacation and I didn't anticipate this" * tag 'ceph-for-4.7-rc8' of git://github.com/ceph/ceph-client: libceph: apply new_state before new_up_client on incrementals commit 107df03203bb66de56e2caec3bde6d22b55480c5 Merge: 88083e9 f8e7718 Author: Linus Torvalds Date: Sat Jul 23 15:44:31 2016 +0900 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix memory leak in nftables, from Liping Zhang. 2) Need to check result of vlan_insert_tag() in batman-adv otherwise we risk NULL skb derefs, from Sven Eckelmann. 3) Check for dev_alloc_skb() failures in cfg80211, from Gregory Greenman. 4) Handle properly when we have ppp_unregister_channel() happening in parallel with ppp_connect_channel(), from WANG Cong. 5) Fix DCCP deadlock, from Eric Dumazet. 6) Bail out properly in UDP if sk_filter() truncates the packet to be smaller than even the space that the protocol headers need. From Michal Kubecek. 7) Similarly for rose, dccp, and sctp, from Willem de Bruijn. 8) Make TCP challenge ACKs less predictable, from Eric Dumazet. 9) Fix infinite loop in bgmac_dma_tx_add() from Florian Fainelli. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (65 commits) packet: propagate sock_cmsg_send() error net/mlx5e: Fix del vxlan port command buffer memset packet: fix second argument of sock_tx_timestamp() net: switchdev: change ageing_time type to clock_t Update maintainer for EHEA driver. net/mlx4_en: Add resilience in low memory systems net/mlx4_en: Move filters cleanup to a proper location sctp: load transport header after sk_filter net/sched/sch_htb: clamp xstats tokens to fit into 32-bit int net: cavium: liquidio: Avoid dma_unmap_single on uninitialized ndata net: nb8800: Fix SKB leak in nb8800_receive() et131x: Fix logical vs bitwise check in et131x_tx_timeout() vlan: use a valid default mtu value for vlan over macsec net: bgmac: Fix infinite loop in bgmac_dma_tx_add() mlxsw: spectrum: Prevent invalid ingress buffer mapping mlxsw: spectrum: Prevent overwrite of DCB capability fields mlxsw: spectrum: Don't emit errors when PFC is disabled mlxsw: spectrum: Indicate support for autonegotiation mlxsw: spectrum: Force link training according to admin state r8152: add MODULE_VERSION ... commit 88083e9845612826dfd44a5215647b4f6567317c Merge: b1386ce cfc9fde Author: Linus Torvalds Date: Sat Jul 23 14:25:02 2016 +0900 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "This contains a fix for a potential crash/corruption issue and another where the suid/sgid bits weren't cleared on write" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: verify upper dentry in ovl_remove_and_whiteout() ovl: Copy up underlying inode's ->i_mode to overlay inode ovl: handle ATTR_KILL* commit b1386cedda177b10fac009ca8d3681034f15b5b3 Merge: d15ae81 368301f Author: Linus Torvalds Date: Sat Jul 23 12:54:20 2016 +0900 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "Five fixes" * emailed patches from Andrew Morton : pps: do not crash when failed to register tools/vm/slabinfo: fix an unintentional printf testing/radix-tree: fix a macro expansion bug radix-tree: fix radix_tree_iter_retry() for tagged iterators. mm: memcontrol: fix cgroup creation failure after many small jobs commit d15ae814ccb0df179e93d64c4642e7f58ee8398b Merge: 3f2625d cad7d8d Author: Linus Torvalds Date: Sat Jul 23 12:51:52 2016 +0900 Merge tag 'drm-fixes-for-v4.7-rc8-intel-kbl' of git://people.freedesktop.org/~airlied/linux Pull intel kabylake drm fixes from Dave Airlie: "As mentioned Intel has gathered all the Kabylake fixes from -next, which we've enabled in 4.7 for the first time, these are pretty much limited in scope to only affects kabylake, which is hw that isn't shipping yet. So I'm mostly okay with it going in now. If we don't land this, it might be a good idea to disable kabylake support in 4.7 before we ship" * tag 'drm-fixes-for-v4.7-rc8-intel-kbl' of git://people.freedesktop.org/~airlied/linux: (28 commits) drm/i915/kbl: Introduce the first official DMC for Kabylake. drm/i915: Introduce Kabypoint PCH for Kabylake H/DT. drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate drm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidance drm/i195/fbc: Add WaFbcNukeOnHostModify drm/i915/gen9: Add WaFbcWakeMemOn drm/i915/gen9: Add WaFbcTurnOffFbcWatermark drm/i915/kbl: Add WaClearSlmSpaceAtContextSwitch drm/i915/gen9: Add WaEnableChickenDCPR drm/i915/kbl: Add WaDisableSbeCacheDispatchPortSharing drm/i915/kbl: Add WaDisableGafsUnitClkGating drm/i915/kbl: Add WaForGAMHang drm/i915: Add WaInsertDummyPushConstP for bxt and kbl drm/i915/kbl: Add WaDisableDynamicCreditSharing drm/i915/kbl: Add WaDisableGamClockGating drm/i915/gen9: Enable must set chicken bits in config0 reg drm/i915/kbl: Add WaDisableLSQCROPERFforOCL drm/i915/kbl: Add WaDisableSDEUnitClockGating drm/i915/kbl: Add WaDisableFenceDestinationToSLM for A0 drm/i915/kbl: Add WaEnableGapsTsvCreditFix ... commit 3f2625d7055c31e64471270c2eb79d77f988845a Merge: 2321884 84ade45 Author: Linus Torvalds Date: Sat Jul 23 12:46:42 2016 +0900 Merge tag 'drm-fixes-for-v4.7-rc8-intel' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "Two i915 regression fixes. Intel have submitted some Kabylake fixes I'll send separately, since this is the first kernel with kabylake support and they don't go much outside that area I think they should be fine" * tag 'drm-fixes-for-v4.7-rc8-intel' of git://people.freedesktop.org/~airlied/linux: drm/i915: add missing condition for committing planes on crtc drm/i915: Treat eDP as always connected, again commit 23218843d92b77c99375609eb43e6e6b3d7f68c3 Merge: 7825e0c 6bd80f3 Author: Linus Torvalds Date: Sat Jul 23 12:39:08 2016 +0900 Merge tag 'm68k-for-v4.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k upddates from Geert Uytterhoeven: - assorted spelling fixes - defconfig updates * tag 'm68k-for-v4.8-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/defconfig: Update defconfigs for v4.7-rc2 m68k: Assorted spelling fixes commit 7825e0c42943e16535ece82f3787b6b94a6c1652 Merge: 48d4ca5 5eb4953 Author: Linus Torvalds Date: Sat Jul 23 12:32:50 2016 +0900 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "A handful of fixes before final release: Marvell Armada: - One to fix a typo in the devicetree specifying memory ranges for the crypto engine - Two to deal with marking PCI and device-memory as strongly ordered to avoid hardware deadlocks, in particular when enabling above crypto driver. - Compile fix for PM Allwinner: - DT clock fixes to deal with u-boot-enabled framebuffer (simplefb). - Make R8 (C.H.I.P. SoC) inherit system compatibility from A13 to make clocks register proper. Tegra: - Fix SD card voltage setting on the Tegra3 Beaver dev board Misc: - Two maintainers updates for STM32 and STi platforms" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: tegra: beaver: Allow SD card voltage to be changed MAINTAINERS: update STi maintainer list MAINTAINERS: update STM32 maintainers list ARM: mvebu: compile pm code conditionally ARM: dts: sun7i: Fix pll3x2 and pll7x2 not having a parent clock ARM: dts: sunxi: Add pll3 to simplefb nodes clocks lists ARM: dts: armada-38x: fix MBUS_ID for crypto SRAM on Armada 385 Linksys ARM: mvebu: map PCI I/O regions strongly ordered ARM: mvebu: fix HW I/O coherency related deadlocks ARM: sunxi/dt: make the CHIP inherit from allwinner,sun5i-a13 commit 48d4ca5639507b8c37e3bd5711e70aedb05dee2c Merge: 897473f 87dcdeb Author: Linus Torvalds Date: Sat Jul 23 12:20:55 2016 +0900 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 sporadic build failure in the qat driver as well as a memory corruption bug in rsa-pkcs1pad" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: rsa-pkcs1pad - fix rsa-pkcs1pad request struct crypto: qat - make qat_asym_algs.o depend on asn1 headers commit 897473fc040fd69e9a4a6da2ac62a4724a4a8619 Merge: 3aa536d acddc72 Author: Linus Torvalds Date: Sat Jul 23 12:15:48 2016 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull key handling fixes from James Morris: "Quoting David Howells: Here are three miscellaneous fixes: (1) Fix a panic in some debugging code in PKCS#7. This can only happen by explicitly inserting a #define DEBUG into the code. (2) Fix the calculation of the digest length in the PE file parser. This causes a failure where there should be a success. (3) Fix the case where an X.509 cert can be added as an asymmetric key to a trusted keyring with no trust restriction if no AKID is supplied. Bugs (1) and (2) aren't particularly problematic, but (3) allows a security check to be bypassed. Happily, this is a recent regression and never made it into a released kernel" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: KEYS: Fix for erroneous trust of incorrectly signed X.509 certs pefile: Fix the failure of calculation for digest PKCS#7: Fix panic when referring to the empty AKID when DEBUG defined commit 3aa536d9aafc2806dd3439114e25b253086312a9 Merge: f1894d8 e9003c9 Author: Linus Torvalds Date: Sat Jul 23 12:10:48 2016 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "A few more fixes for the input subsystem: - restore naming for tsc2005 touchscreens as some userspace match on it - fix out of bound access in legacy keyboard driver - fixup in RMI4 driver Everything is tagged for stable as well" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: tsc200x - report proper input_dev name tty/vt/keyboard: fix OOB access in do_compute_shiftstate() Input: synaptics-rmi4 - fix maximum size check for F12 control register 8 commit f1894d838f4bce37297f04b7ed7aac1e6ed7717a Merge: ee62f09 a722559 Author: Linus Torvalds Date: Sat Jul 23 12:07:37 2016 +0900 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Dan Williams: "This contains a regression fix for a problem that was introduced in v4.7-rc6. In 4.7-rc1 we introduced auto-probing for the ACPI DSM (device- specific-method) format that the platform firmware implements for nvdimm devices. We initially fixed a regression in probing the QEMU DSM implementation by making acpi_check_dsm() tolerant of the way QEMU reports the "0 DSMs supported" condition. However, that broke HPE platforms since that tolerance caused the driver to mistakenly match the 1-zero-byte response those platforms give to "unknown" commands. Instead, we simply make the driver tolerant of not finding any supported DSMs. This has been tested to work with both QEMU and HPE platforms. This commit has appeared in a -next release with no reported issues" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nfit: make DIMM DSMs optional commit ee62f09bda631151a55e2b2543acba5a38eef186 Merge: 62cd69d 0bfb85c Author: Linus Torvalds Date: Sat Jul 23 12:03:21 2016 +0900 Merge tag 'gpio-v4.7-6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fix from Linus Walleij: "Compile problem fix for Tegra, Sorry to send this in the last minute but Ingo says this build failure is very prominent so I'm not going to wait for v4.7 before sending it. It is a case of COMPILE_TEST causing more problems than it solves and I'm already swearing about me shooting myself in the foot with that gun :(" * tag 'gpio-v4.7-6' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: tegra: don't auto-enable for COMPILE_TEST commit 62cd69d5b0cde8aaea2d2a8f828be65196bf1ada Merge: a933f80 f96423f4 Author: Linus Torvalds Date: Sat Jul 23 11:55:20 2016 +0900 Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk fixes from Michael Turquette: "Fix a bug in the at91 clk driver, two compile time warnings in sunxi clk drivers, and one bug in a sunxi clk driver introduced in the 4.7 merge window" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: at91: fix clk_programmable_set_parent() clk: sunxi: remove unused variable clk: sunxi: display: Add per-clock flags clk: sunxi: tcon-ch1: Do not return a negative error in get_parent commit a933f80d948e85aa2ac2724a6167d509339fc6b9 Merge: ea4b3cf 1488a1e Author: Linus Torvalds Date: Sat Jul 23 11:46:59 2016 +0900 Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fix from Tejun Heo: "Another fallout from max_sectors bump a couple years ago. The lite-on optical drive times out on large requests" * 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata: LITE-ON CX1-JB256-HP needs lower max_sectors commit ea4b3cfa6a328ee87286ea3d4c18929898f76a95 Merge: b6cbeca b3802db Author: Linus Torvalds Date: Sat Jul 23 11:43:17 2016 +0900 Merge tag 'mmc-v4.7-rc7' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fixes from Ulf Hansson: "Here are a few late mmc fixes intended for v4.7 final. MMC core: - Fix eMMC packed command header endianness - Fix free of uninitialized buffer for mmc ioctl MMC host: - pxamci: Fix potential oops in ->probe()" * tag 'mmc-v4.7-rc7' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: pxamci: fix potential oops mmc: block: fix packed command header endianness mmc: block: fix free of uninitialized 'idata->buf' commit b6cbecaebd45374f6ecf7de574d0f027d1690836 Merge: ff8d6fa 76df529 Author: Linus Torvalds Date: Sat Jul 23 11:28:06 2016 +0900 Merge tag 'sound-4.7-fix2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "No surprise, just a few small fixes: a couple of changes are seen in the core part, and both of them are rather for unusual error paths. The rest are the regular HD-audio fixes and one USB-audio regression fix" * tag 'sound-4.7-fix2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: usb-audio: Fix quirks code is not called ALSA: hda: add AMD Stoney PCI ID with proper driver caps ALSA: hda - fix use-after-free after module unload ALSA: pcm: Free chmap at PCM free callback, too ALSA: ctl: Stop notification after disconnection ALSA: hda/realtek - add new pin definition in alc225 pin quirk table commit ff8d6facda455c129357e891e31dd0aa21a96ed0 Merge: 47ef4ad 32f0c4a Author: Linus Torvalds Date: Sat Jul 23 11:22:37 2016 +0900 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull NVMe fix from Jens Axboe: "Late addition here, it's basically a revert of a patch that was added in this merge window, but has proven to cause problems. This is swapping out the RCU based namespace protection with a good old mutex instead" * 'for-linus' of git://git.kernel.dk/linux-block: nvme: Remove RCU namespace protection commit 368301f2fe4b07e5fb71dba3cc566bc59eb6705f Author: Jiri Slaby Date: Wed Jul 20 15:45:08 2016 -0700 pps: do not crash when failed to register With this command sequence: modprobe plip modprobe pps_parport rmmod pps_parport the partport_pps modules causes this crash: BUG: unable to handle kernel NULL pointer dereference at (null) IP: parport_detach+0x1d/0x60 [pps_parport] Oops: 0000 [#1] SMP ... Call Trace: parport_unregister_driver+0x65/0xc0 [parport] SyS_delete_module+0x187/0x210 The sequence that builds up to this is: 1) plip is loaded and takes the parport device for exclusive use: plip0: Parallel port at 0x378, using IRQ 7. 2) pps_parport then fails to grab the device: pps_parport: parallel port PPS client parport0: cannot grant exclusive access for device pps_parport pps_parport: couldn't register with parport0 3) rmmod of pps_parport is then killed because it tries to access pardev->name, but pardev (taken from port->cad) is NULL. So add a check for NULL in the test there too. Link: http://lkml.kernel.org/r/20160714115245.12651-1-jslaby@suse.cz Signed-off-by: Jiri Slaby Acked-by: Rodolfo Giometti Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds drivers/pps/clients/pps_parport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d6a4d64812bb12dda53704943b61a7496d02098 Author: Dan Carpenter Date: Wed Jul 20 15:45:05 2016 -0700 tools/vm/slabinfo: fix an unintentional printf The curly braces are missing here so we print stuff unintentionally. Fixes: 9da4714a2d44 ('slub: slabinfo update for cmpxchg handling') Link: http://lkml.kernel.org/r/20160715211243.GE19522@mwanda Signed-off-by: Dan Carpenter Acked-by: Christoph Lameter Cc: Sergey Senozhatsky Cc: Colin Ian King Cc: Laura Abbott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/slabinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b301aac5ad67079710a1a7c7b15bf62cddd63295 Author: Dan Carpenter Date: Wed Jul 20 15:45:03 2016 -0700 testing/radix-tree: fix a macro expansion bug There are no parentheses around this macro and it causes a problem when we do: index = rand() % THRASH_SIZE; Link: http://lkml.kernel.org/r/20160715210953.GC19522@mwanda Signed-off-by: Dan Carpenter Acked-by: Ross Zwisler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/radix-tree/tag_check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3cb9185c67304b2a7ea9be73e7d13df6fb2793a1 Author: Andrey Ryabinin Date: Wed Jul 20 15:45:00 2016 -0700 radix-tree: fix radix_tree_iter_retry() for tagged iterators. radix_tree_iter_retry() resets slot to NULL, but it doesn't reset tags. Then NULL slot and non-zero iter.tags passed to radix_tree_next_slot() leading to crash: RIP: radix_tree_next_slot include/linux/radix-tree.h:473 find_get_pages_tag+0x334/0x930 mm/filemap.c:1452 .... Call Trace: pagevec_lookup_tag+0x3a/0x80 mm/swap.c:960 mpage_prepare_extent_to_map+0x321/0xa90 fs/ext4/inode.c:2516 ext4_writepages+0x10be/0x2b20 fs/ext4/inode.c:2736 do_writepages+0x97/0x100 mm/page-writeback.c:2364 __filemap_fdatawrite_range+0x248/0x2e0 mm/filemap.c:300 filemap_write_and_wait_range+0x121/0x1b0 mm/filemap.c:490 ext4_sync_file+0x34d/0xdb0 fs/ext4/fsync.c:115 vfs_fsync_range+0x10a/0x250 fs/sync.c:195 vfs_fsync fs/sync.c:209 do_fsync+0x42/0x70 fs/sync.c:219 SYSC_fdatasync fs/sync.c:232 SyS_fdatasync+0x19/0x20 fs/sync.c:230 entry_SYSCALL_64_fastpath+0x23/0xc1 arch/x86/entry/entry_64.S:207 We must reset iterator's tags to bail out from radix_tree_next_slot() and go to the slow-path in radix_tree_next_chunk(). Fixes: 46437f9a554f ("radix-tree: fix race in gang lookup") Link: http://lkml.kernel.org/r/1468495196-10604-1-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin Reported-by: Dmitry Vyukov Acked-by: Konstantin Khlebnikov Cc: Matthew Wilcox Cc: Hugh Dickins Cc: Ross Zwisler Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/radix-tree.h | 1 + 1 file changed, 1 insertion(+) commit 73f576c04b9410ed19660f74f97521bee6e1c546 Author: Johannes Weiner Date: Wed Jul 20 15:44:57 2016 -0700 mm: memcontrol: fix cgroup creation failure after many small jobs The memory controller has quite a bit of state that usually outlives the cgroup and pins its CSS until said state disappears. At the same time it imposes a 16-bit limit on the CSS ID space to economically store IDs in the wild. Consequently, when we use cgroups to contain frequent but small and short-lived jobs that leave behind some page cache, we quickly run into the 64k limitations of outstanding CSSs. Creating a new cgroup fails with -ENOSPC while there are only a few, or even no user-visible cgroups in existence. Although pinning CSSs past cgroup removal is common, there are only two instances that actually need an ID after a cgroup is deleted: cache shadow entries and swapout records. Cache shadow entries reference the ID weakly and can deal with the CSS having disappeared when it's looked up later. They pose no hurdle. Swap-out records do need to pin the css to hierarchically attribute swapins after the cgroup has been deleted; though the only pages that remain swapped out after offlining are tmpfs/shmem pages. And those references are under the user's control, so they are manageable. This patch introduces a private 16-bit memcg ID and switches swap and cache shadow entries over to using that. This ID can then be recycled after offlining when the CSS remains pinned only by objects that don't specifically need it. This script demonstrates the problem by faulting one cache page in a new cgroup and deleting it again: set -e mkdir -p pages for x in `seq 128000`; do [ $((x % 1000)) -eq 0 ] && echo $x mkdir /cgroup/foo echo $$ >/cgroup/foo/cgroup.procs echo trex >pages/$x echo $$ >/cgroup/cgroup.procs rmdir /cgroup/foo done When run on an unpatched kernel, we eventually run out of possible IDs even though there are no visible cgroups: [root@ham ~]# ./cssidstress.sh [...] 65000 mkdir: cannot create directory '/cgroup/foo': No space left on device After this patch, the IDs get released upon cgroup destruction and the cache and css objects get released once memory reclaim kicks in. [hannes@cmpxchg.org: init the IDR] Link: http://lkml.kernel.org/r/20160621154601.GA22431@cmpxchg.org Fixes: b2052564e66d ("mm: memcontrol: continue cache reclaim from offlined groups") Link: http://lkml.kernel.org/r/20160617162516.GD19084@cmpxchg.org Signed-off-by: Johannes Weiner Reported-by: John Garcia Reviewed-by: Vladimir Davydov Acked-by: Tejun Heo Cc: Nikolay Borisov Cc: [3.19+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/memcontrol.h | 25 ++++++-------- mm/memcontrol.c | 82 ++++++++++++++++++++++++++++++++++++++++++---- mm/slab_common.c | 4 +-- 3 files changed, 87 insertions(+), 24 deletions(-) commit 0bfb85c6ba620c39c0e5124851a1bea0f5a56e05 Author: Arnd Bergmann Date: Wed Jul 6 14:54:03 2016 +0200 gpio: tegra: don't auto-enable for COMPILE_TEST I stumbled over a build error with COMPILE_TEST and CONFIG_OF disabled: drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_probe': drivers/gpio/gpio-tegra.c:603:9: error: 'struct gpio_chip' has no member named 'of_node' The problem is that the newly added GPIO_TEGRA Kconfig symbol does not have a dependency on CONFIG_OF. However, there is another problem here as the driver gets enabled unconditionally whenever COMPILE_TEST is set. This fixes both problems, by making the symbol user-visible when COMPILE_TEST is set and default-enabled for ARCH_TEGRA=y. As a side-effect, it is now possible to compile-test a Tegra kernel with GPIO support disabled, which is harmless. Signed-off-by: Arnd Bergmann Fixes: 4dd4dd1d2120 ("gpio: tegra: Allow compile test") Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 930c532869774ebf8af9efe9484c597f896a7d46 Author: Ilya Dryomov Date: Tue Jul 19 03:50:28 2016 +0200 libceph: apply new_state before new_up_client on incrementals Currently, osd_weight and osd_state fields are updated in the encoding order. This is wrong, because an incremental map may look like e.g. new_up_client: { osd=6, addr=... } # set osd_state and addr new_state: { osd=6, xorstate=EXISTS } # clear osd_state Suppose osd6's current osd_state is EXISTS (i.e. osd6 is down). After applying new_up_client, osd_state is changed to EXISTS | UP. Carrying on with the new_state update, we flip EXISTS and leave osd6 in a weird "!EXISTS but UP" state. A non-existent OSD is considered down by the mapping code 2087 for (i = 0; i < pg->pg_temp.len; i++) { 2088 if (ceph_osd_is_down(osdmap, pg->pg_temp.osds[i])) { 2089 if (ceph_can_shift_osds(pi)) 2090 continue; 2091 2092 temp->osds[temp->size++] = CRUSH_ITEM_NONE; and so requests get directed to the second OSD in the set instead of the first, resulting in OSD-side errors like: [WRN] : client.4239 192.168.122.21:0/2444980242 misdirected client.4239.1:2827 pg 2.5df899f2 to osd.4 not [1,4,6] in e680/680 and hung rbds on the client: [ 493.566367] rbd: rbd0: write 400000 at 11cc00000 (0) [ 493.566805] rbd: rbd0: result -6 xferred 400000 [ 493.567011] blk_update_request: I/O error, dev rbd0, sector 9330688 The fix is to decouple application from the decoding and: - apply new_weight first - apply new_state before new_up_client - twiddle osd_state flags if marking in - clear out some of the state if osd is destroyed Fixes: http://tracker.ceph.com/issues/14901 Cc: stable@vger.kernel.org # 3.15+: 6dd74e44dc1d: libceph: set 'exists' flag for newly up osd Cc: stable@vger.kernel.org # 3.15+ Signed-off-by: Ilya Dryomov Reviewed-by: Josh Durgin net/ceph/osdmap.c | 156 +++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 113 insertions(+), 43 deletions(-) commit 87dcdebd6beb54f183ae874664ba47bf071ebf95 Author: Herbert Xu Date: Fri Jul 22 17:58:21 2016 +0800 crypto: rsa-pkcs1pad - fix rsa-pkcs1pad request struct To allow for child request context the struct akcipher_request child_req needs to be at the end of the structure. Cc: stable@vger.kernel.org Signed-off-by: Tadeusz Struk Signed-off-by: Herbert Xu crypto/rsa-pkcs1pad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfc9fde0b07c3b44b570057c5f93dda59dca1c94 Author: Maxim Patlasov Date: Thu Jul 21 18:24:26 2016 -0700 ovl: verify upper dentry in ovl_remove_and_whiteout() The upper dentry may become stale before we call ovl_lock_rename_workdir. For example, someone could (mistakenly or maliciously) manually unlink(2) it directly from upperdir. To ensure it is not stale, let's lookup it after ovl_lock_rename_workdir and and check if it matches the upper dentry. Essentially, it is the same problem and similar solution as in commit 11f3710417d0 ("ovl: verify upper dentry before unlink and rename"). Signed-off-by: Maxim Patlasov Signed-off-by: Miklos Szeredi Cc: fs/overlayfs/dir.c | 54 ++++++++++++++++++++++++------------------------------ 1 file changed, 24 insertions(+), 30 deletions(-) commit f8e7718cc0445587fe8530fc2d240d9aac2c9072 Author: Soheil Hassas Yeganeh Date: Wed Jul 20 18:01:18 2016 -0400 packet: propagate sock_cmsg_send() error sock_cmsg_send() can return different error codes and not only -EINVAL, and we should properly propagate them. Fixes: c14ac9451c34 ("sock: enable timestamping using control messages") Signed-off-by: Soheil Hassas Yeganeh Cc: Willem de Bruijn Signed-off-by: David S. Miller net/packet/af_packet.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 81dc0365cfa7bc7c08a0e44d9ee04964df782e19 Author: Jan Stancek Date: Thu Jun 30 12:23:51 2016 +0200 crypto: qat - make qat_asym_algs.o depend on asn1 headers Parallel build can sporadically fail because asn1 headers may not be built yet by the time qat_asym_algs.o is compiled: drivers/crypto/qat/qat_common/qat_asym_algs.c:55:32: fatal error: qat_rsapubkey-asn1.h: No such file or directory #include "qat_rsapubkey-asn1.h" Cc: stable@vger.kernel.org Signed-off-by: Jan Stancek Signed-off-by: Herbert Xu drivers/crypto/qat/qat_common/Makefile | 1 + 1 file changed, 1 insertion(+) commit e9003c9cfaa17d26991688268b04244adb67ee2b Author: Michael Welling Date: Wed Jul 20 10:02:07 2016 -0700 Input: tsc200x - report proper input_dev name Passes input_id struct to the common probe function for the tsc200x drivers instead of just the bustype. This allows for the use of the product variable to set the input_dev->name variable according to the type of touchscreen used. Note that when we introduced support for TSC2004 we started calling everything TSC200X, so let's keep this quirk. Signed-off-by: Michael Welling Cc: stable@vger.kernel.org Acked-by: Pavel Machek Acked-by: Pali Rohár Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/tsc2004.c | 7 ++++++- drivers/input/touchscreen/tsc2005.c | 7 ++++++- drivers/input/touchscreen/tsc200x-core.c | 15 ++++++++++++--- drivers/input/touchscreen/tsc200x-core.h | 2 +- 4 files changed, 25 insertions(+), 6 deletions(-) commit 510cccb5b0c8868a2b302a0ab524da7912da648b Author: Dmitry Torokhov Date: Mon Jun 27 14:12:34 2016 -0700 tty/vt/keyboard: fix OOB access in do_compute_shiftstate() The size of individual keymap in drivers/tty/vt/keyboard.c is NR_KEYS, which is currently 256, whereas number of keys/buttons in input device (and therefor in key_down) is much larger - KEY_CNT - 768, and that can cause out-of-bound access when we do sym = U(key_maps[0][k]); with large 'k'. To fix it we should not attempt iterating beyond smaller of NR_KEYS and KEY_CNT. Also while at it let's switch to for_each_set_bit() instead of open-coding it. Reported-by: Sasha Levin Reviewed-by: Guenter Roeck Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/tty/vt/keyboard.c | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) commit 882b0f2fba83374149f0a5869d95aa8b44dad31e Author: Saeed Mahameed Date: Thu Jul 21 00:39:53 2016 +0300 net/mlx5e: Fix del vxlan port command buffer memset memset the command buffers rather than the pointers to them. Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit edbe77462302ec0b11a90244de13f9012118c538 Author: Yoshihiro Shimoda Date: Tue Jul 19 14:40:51 2016 +0900 packet: fix second argument of sock_tx_timestamp() This patch fixes an issue that a syscall (e.g. sendto syscall) cannot work correctly. Since the sendto syscall doesn't have msg_control buffer, the sock_tx_timestamp() in packet_snd() cannot work correctly because the socks.tsflags is set to 0. So, this patch sets the socks.tsflags to sk->sk_tsflags as default. Fixes: c14ac9451c34 ("sock: enable timestamping using control messages") Reported-by: Kazuya Mizuguchi Reported-by: Keita Kobayashi Signed-off-by: Yoshihiro Shimoda Acked-by: Soheil Hassas Yeganeh Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/packet/af_packet.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e4add7b6beaff4061693d0632bc1dcb306edba10 Author: Andrew Duggan Date: Tue Jul 19 17:53:59 2016 -0700 Input: synaptics-rmi4 - fix maximum size check for F12 control register 8 According to the RMI4 spec the maximum size of F12 control register 8 is 15 bytes. The current code incorrectly reports an error if control 8 is greater then 14. Making sensors with a control register 8 with 15 bytes unusable. Signed-off-by: Andrew Duggan Reported-by: Chris Healy Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_f12.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit eabfdda93477f6ee5e153f560560e9cb1c617fd7 Author: Vivien Didelot Date: Mon Jul 18 15:02:06 2016 -0400 net: switchdev: change ageing_time type to clock_t The switchdev value for the SWITCHDEV_ATTR_ID_BRIDGE_AGEING_TIME attribute is a clock_t and requires to use helpers such as clock_t_to_jiffies() to convert to milliseconds. Change ageing_time type from u32 to clock_t to make it explicit. Fixes: f55ac58ae64c ("switchdev: add bridge ageing_time attribute") Signed-off-by: Vivien Didelot Signed-off-by: David S. Miller include/net/switchdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97b041971e1c70da077fcfa7a50b362e22cd241e Author: Douglas Miller Date: Mon Jul 18 12:28:45 2016 -0500 Update maintainer for EHEA driver. Since Thadeu left IBM, EHEA has gone mostly unmaintained, since his email address doesn't work anymore. I'm stepping up to help maintain this driver upstream. I'm adding Thadeu's personal e-mail address in Cc, hoping that we can get his ack. CC: Thadeu Lima de Souza Cascardo Signed-off-by: Douglas Miller Acked-by: Thadeu Lima de Souza Cascardo Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ec6df777b5e76398e8f1fbbe7cd21e78890c71a Merge: c74bfbd ec25bc0 Author: David S. Miller Date: Tue Jul 19 16:44:12 2016 -0700 Merge branch 'mlx4-fixes' Tariq Toukan says: ==================== Safe flow for mlx4_en configuration change This patchset improves the mlx4_en driver resiliency, especially on systems with low memory. Upon a configuration change that requires the allocation of new resources, we first try to allocate, prior to destroying the current ones. Once it is successfully done, we release the old resources and attach the new ones. Otherwise, we stay with a functioning interface having the same old configuration. This improvement became of greater significance after removing the use of vmap. ==================== Signed-off-by: David S. Miller commit ec25bc04ed8e12947738468cbe2191f1529f9e39 Author: Eugenia Emantayev Date: Mon Jul 18 18:35:12 2016 +0300 net/mlx4_en: Add resilience in low memory systems This patch fixes the lost of Ethernet port on low memory system, when driver frees its resources and fails to allocate new resources. Issue could happen while changing number of channels, rings size or changing the timestamp configuration. This fix is necessary because of removing vmap use in the code. When vmap was in use driver could allocate non-contiguous memory and make it contiguous with vmap. Now it could fail to allocate a large chunk of contiguous memory and lose the port. Current code tries to allocate new resources and then upon success frees the old resources. Fixes: 73898db04301 ('net/mlx4: Avoid wrong virtual mappings') Signed-off-by: Eugenia Emantayev Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 54 +++++++----- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 106 +++++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 9 +- 3 files changed, 132 insertions(+), 37 deletions(-) commit 30f56e3ced0f4966e8a84ece1acceccbbb73d365 Author: Eugenia Emantayev Date: Mon Jul 18 18:35:11 2016 +0300 net/mlx4_en: Move filters cleanup to a proper location Filters cleanup should be done once before destroying net device, since filters list is contained in the private data. Fixes: 1eb8c695bda9 ('net/mlx4_en: Add accelerated RFS support') Signed-off-by: Eugenia Emantayev Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 ++++ drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) commit a72255983f12f31f0c8d8275fb1a781546cfacb7 Author: Dan Williams Date: Tue Jul 19 12:32:39 2016 -0700 nfit: make DIMM DSMs optional Commit 4995734e973a "acpi, nfit: fix acpi_check_dsm() vs zero functions implemented" attempted to fix a QEMU regression by supporting its usage of a zero-mask as a valid response to a DSM-family probe request. However, this behavior breaks HP platforms that return a zero-mask by default causing the probe to misidentify the DSM-family. Instead, the QEMU regression can be fixed by simply not requiring the DSM family to be identified. This effectively reverts commit 4995734e973a, and removes the DSM requirement from the init path. Cc: "Rafael J. Wysocki" Cc: Xiao Guangrong Cc: Linda Knippers Fixes: 4995734e973a ("acpi, nfit: fix acpi_check_dsm() vs zero functions implemented") Reported-by: Jerry Hoemann Tested-by: Jerry Hoemann Signed-off-by: Dan Williams drivers/acpi/nfit.c | 11 ++++++----- drivers/acpi/utils.c | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-) commit cad7d8d9041c00142f91585b2bf0b2673cb152ef Merge: 84ade45 a4a027a Author: Dave Airlie Date: Tue Jul 19 18:00:15 2016 +1000 Merge tag 'topic/kbl-4.7-fixes-2016-07-18' of git://anongit.freedesktop.org/drm-intel into drm-fixes As promised here's the pile of kbl cherry-picks assembled by Mika&Rodrigo. It's a bit much, but all well-contained to kbl code and been tested for a while in drm-intel-next. Still separate in case too much, but in that case I think we'd need to disable kbl by default again (which would be annoying too) in 4.7. * tag 'topic/kbl-4.7-fixes-2016-07-18' of git://anongit.freedesktop.org/drm-intel: (28 commits) drm/i915/kbl: Introduce the first official DMC for Kabylake. drm/i915: Introduce Kabypoint PCH for Kabylake H/DT. drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate drm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidance drm/i195/fbc: Add WaFbcNukeOnHostModify drm/i915/gen9: Add WaFbcWakeMemOn drm/i915/gen9: Add WaFbcTurnOffFbcWatermark drm/i915/kbl: Add WaClearSlmSpaceAtContextSwitch drm/i915/gen9: Add WaEnableChickenDCPR drm/i915/kbl: Add WaDisableSbeCacheDispatchPortSharing drm/i915/kbl: Add WaDisableGafsUnitClkGating drm/i915/kbl: Add WaForGAMHang drm/i915: Add WaInsertDummyPushConstP for bxt and kbl drm/i915/kbl: Add WaDisableDynamicCreditSharing drm/i915/kbl: Add WaDisableGamClockGating drm/i915/gen9: Enable must set chicken bits in config0 reg drm/i915/kbl: Add WaDisableLSQCROPERFforOCL drm/i915/kbl: Add WaDisableSDEUnitClockGating drm/i915/kbl: Add WaDisableFenceDestinationToSLM for A0 drm/i915/kbl: Add WaEnableGapsTsvCreditFix ... commit 6bd80f372371a7b3f5ff13e4e8a560066299c001 Author: Geert Uytterhoeven Date: Mon Jun 6 09:43:00 2016 +0200 m68k/defconfig: Update defconfigs for v4.7-rc2 Signed-off-by: Geert Uytterhoeven arch/m68k/configs/amiga_defconfig | 4 ++++ arch/m68k/configs/apollo_defconfig | 4 ++++ arch/m68k/configs/atari_defconfig | 4 ++++ arch/m68k/configs/bvme6000_defconfig | 4 ++++ arch/m68k/configs/hp300_defconfig | 4 ++++ arch/m68k/configs/mac_defconfig | 4 ++++ arch/m68k/configs/multi_defconfig | 4 ++++ arch/m68k/configs/mvme147_defconfig | 4 ++++ arch/m68k/configs/mvme16x_defconfig | 4 ++++ arch/m68k/configs/q40_defconfig | 4 ++++ arch/m68k/configs/sun3_defconfig | 4 ++++ arch/m68k/configs/sun3x_defconfig | 4 ++++ 12 files changed, 48 insertions(+) commit 84ade45e056f2e292f07c54446c176d0112d9574 Merge: 47ef4ad ed2eebb Author: Dave Airlie Date: Tue Jul 19 16:09:20 2016 +1000 Merge tag 'drm-intel-fixes-2016-07-18' of git://anongit.freedesktop.org/drm-intel into drm-fixes Two more regression fixes for 4.7. * tag 'drm-intel-fixes-2016-07-18' of git://anongit.freedesktop.org/drm-intel: drm/i915: add missing condition for committing planes on crtc drm/i915: Treat eDP as always connected, again commit c74bfbdba0e8d056e4ba579a666b5cdb8ec3cd35 Author: Willem de Bruijn Date: Sat Jul 16 17:33:15 2016 -0400 sctp: load transport header after sk_filter Do not cache pointers into the skb linear segment across sk_filter. The function call can trigger pskb_expand_head. Signed-off-by: Willem de Bruijn Acked-by: Daniel Borkmann Acked-by: Marcelo Ricardo Leitner Signed-off-by: David S. Miller net/sctp/input.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0564bf0afae443deeb16f36e2c39fefff89d05f2 Author: Konstantin Khlebnikov Date: Sat Jul 16 17:08:56 2016 +0300 net/sched/sch_htb: clamp xstats tokens to fit into 32-bit int In kernel HTB keeps tokens in signed 64-bit in nanoseconds. In netlink protocol these values are converted into pshed ticks (64ns for now) and truncated to 32-bit. In struct tc_htb_xstats fields "tokens" and "ctokens" are declared as unsigned 32-bit but they could be negative thus tool 'tc' prints them as signed. Big values loose higher bits and/or become negative. This patch clamps tokens in xstat into range from INT_MIN to INT_MAX. In this way it's easier to understand what's going on here. Signed-off-by: Konstantin Khlebnikov Signed-off-by: David S. Miller net/sched/sch_htb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f96423f483b1a7854270335b319e8d1cdd6f3585 Author: Boris Brezillon Date: Mon Jul 18 09:49:12 2016 +0200 clk: at91: fix clk_programmable_set_parent() Since commit 1bdf02326b71e ("clk: at91: make use of syscon/regmap internally"), clk_programmable_set_parent() is always selecting the first parent (AKA slow_clk), no matter what's passed in the 'index' parameter. Fix that by initializing the pckr variable to the index value. Signed-off-by: Boris Brezillon Reported-by: Hans Verkuil Fixes: 1bdf02326b71e ("clk: at91: make use of syscon/regmap internally") Cc: Signed-off-by: Michael Turquette Link: lkml.kernel.org/r/1468828152-18389-1-git-send-email-boris.brezillon@free-electrons.com drivers/clk/at91/clk-programmable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1488a1e3828d60d74c9b802a05e24c0487babe4e Author: Tejun Heo Date: Mon Jul 18 18:40:00 2016 -0400 libata: LITE-ON CX1-JB256-HP needs lower max_sectors Since 34b48db66e08 ("block: remove artifical max_hw_sectors cap"), max_sectors is no longer limited to BLK_DEF_MAX_SECTORS and LITE-ON CX1-JB256-HP keeps timing out with higher max_sectors. Revert it to the previous value. Signed-off-by: Tejun Heo Reported-by: dgerasimov@gmail.com Link: https://bugzilla.kernel.org/show_bug.cgi?id=121671 Cc: stable@vger.kernel.org # v3.19+ Fixes: 34b48db66e08 ("block: remove artifical max_hw_sectors cap") Signed-off-by: Tejun Heo drivers/ata/libata-core.c | 6 ++++++ 1 file changed, 6 insertions(+) commit a4a027a860ff58df8df0796d730397a3b30dbc9a Author: Rodrigo Vivi Date: Tue Apr 26 14:59:51 2016 -0700 drm/i915/kbl: Introduce the first official DMC for Kabylake. Version 1.01. This firmware is made for Kabylake platform so it doesn't need the stepping workaround that we had before. v2: Rebased on top of latest nightly with min version required change. v3: With right CSR_VERSION (Patrik). Cc: Christophe Prigent Cc: Patrik Jakobsson Reviewed-by: Ben Widawsky (v1) Signed-off-by: Rodrigo Vivi Reviewed-by: Patrik Jakobsson Link: http://patchwork.freedesktop.org/patch/msgid/1461707991-15336-1-git-send-email-rodrigo.vivi@intel.com (cherry picked from commit 4922d4919596219864686be1e70dcd92c685ec9f) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_csr.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit ed2eebbd61af8d378ca39ad7aef7017f29eed6f3 Author: Lionel Landwerlin Date: Wed May 25 14:30:41 2016 +0100 drm/i915: add missing condition for committing planes on crtc The i915 driver checks for color management properties changes as part of a plane update. Therefore a color management update must imply a plane update, otherwise we never update the transformation matrixes and degamma/gamma LUTs. v2: add comment about moving the commit of color management registers to an async worker v3: Commit color management register right after vblank v4: Move back color management commit condition together with planes commit v5: Trigger color management commit through the planes commit (Daniel) v6: Make plane change update more readable Fixes: 20a34e78f0d7 (drm/i915: Update color management during vblank evasion.) Cc: Maarten Lankhorst Cc: Ville Syrjälä Cc: Daniel Vetter Cc: drm-intel-fixes@lists.freedesktop.org Signed-off-by: Lionel Landwerlin References: https://lkml.org/lkml/2016/7/14/614 Reviewed-and-tested-by: Mario Kleiner Link: http://patchwork.freedesktop.org/patch/msgid/1464183041-8478-1-git-send-email-lionel.g.landwerlin@intel.com (cherry picked from commit e7852a4b3a4fb6f6c18fdaff934580aa8521599a) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 6 ++++++ 1 file changed, 6 insertions(+) commit c71d4d58981bed3366769ef5cf1f20e588fe16d0 Author: Ville Syrjälä Date: Mon Jul 18 13:15:14 2016 +0300 drm/i915: Treat eDP as always connected, again eDP should be treated as connected even if doesn't have an EDID. In that case we'll use the timings from the VBT. That used to be the case until commit f21a21983ef1 ("drm/i915: Splitting intel_dp_detect") broke things by considering even eDP disconnected if we fail to get an EDID for it. Fix things up again by treating eDP as always connected. Cc: Shubhangi Shrivastava Cc: Nathan D Ciobanu Cc: Sivakumar Thulasimani Cc: Ander Conselvan de Oliveira Cc: Larry Finger Reported-by: Larry Finger Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96675 Cc: drm-intel-fixes@lists.freedesktop.org Fixes: f21a21983ef1 ("drm/i915: Splitting intel_dp_detect") Signed-off-by: Ville Syrjälä Tested-by: Larry Finger Link: http://patchwork.freedesktop.org/patch/msgid/1468836914-16537-1-git-send-email-ville.syrjala@linux.intel.com (cherry picked from commit 1b7f2c8b0773d5ccbef43ef38a13ad33136c9679) Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76df52969711ae3725a98f26fbbc6a349803dcbf Author: Kazuki Oikawa Date: Mon Jul 18 01:16:15 2016 +0900 ALSA: usb-audio: Fix quirks code is not called snd_usb_{set_interface,ctl_msg}_quirk checks chip->usb_id to need calling a quirks code. But existed code path that not calling dev_set_drvdata in usb_audio_probe. Fixes: 79289e24194a ("ALSA: usb-audio: Refer to chip->usb_id for quirks and MIDI creation") Signed-off-by: Kazuki Oikawa Cc: # v4.6+ Reviewed-by: Takashi Sakamoto Tested-by: Takashi Sakamoto Signed-off-by: Takashi Iwai sound/usb/card.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3802db5eb72d2a96f4aa4ff0abb937033df2acf Author: Robert Jarzmik Date: Thu Jul 14 17:05:50 2016 +0200 mmc: pxamci: fix potential oops As reported by Dan in his report in [1], there is a potential NULL pointer derefence if these conditions are met : - there is no platform_data provided, ie. host->pdata = NULL Fix this by only using the platform data ro_invert when a gpio for read-only is provided by the platform data. This doesn't appear yet as every pxa board provides a platform_data, and calls pxa_set_mci_info() with a non NULL pointer. [1] [bug report] mmc: pxamci: fix card detect with slot-gpio API. The commit fd546ee6a7dc ("mmc: pxamci: fix card detect with slot-gpio API") from Sep 26, 2015, leads to the following static checker warning: drivers/mmc/host/pxamci.c:809 pxamci_probe() warn: variable dereferenced before check 'host->pdata' (see line 798) Fixes: fd546ee6a7dc ("mmc: pxamci: fix card detect with slot-gpio API") Reported-by: Dan Carpenter Signed-off-by: Robert Jarzmik Signed-off-by: Ulf Hansson drivers/mmc/host/pxamci.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit f68381a70bb2b26c31b13fdaf67c778f92fd32b4 Author: Taras Kondratiuk Date: Wed Jul 13 22:05:38 2016 +0000 mmc: block: fix packed command header endianness The code that fills packed command header assumes that CPU runs in little-endian mode. Hence the header is malformed in big-endian mode and causes MMC data transfer errors: [ 563.200828] mmcblk0: error -110 transferring data, sector 2048, nr 8, cmd response 0x900, card status 0xc40 [ 563.219647] mmcblk0: packed cmd failed, nr 2, sectors 16, failure index: -1 Convert header data to LE. Signed-off-by: Taras Kondratiuk Fixes: ce39f9d17c14 ("mmc: support packed write command for eMMC4.5 devices") Cc: Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit bfe5b1b1e013f7b1c0fd2ac3b3c8c380114b3fb9 Author: Ville Viinikka Date: Fri Jul 8 18:27:02 2016 +0300 mmc: block: fix free of uninitialized 'idata->buf' Set 'idata->buf' to NULL so that it never gets returned without initialization. This fixes a bug where mmc_blk_ioctl_cmd() would free both 'idata' and 'idata->buf' but 'idata->buf' was returned uninitialized. Fixes: 1ff8950c0433 ("mmc: block: change to use kmalloc when copy data from userspace") Signed-off-by: Ville Viinikka Cc: Signed-off-by: Ulf Hansson drivers/mmc/card/block.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit acddc72015e5bc8f640b02d38b36afd7841c9c14 Author: Mat Martineau Date: Mon Jul 18 00:10:55 2016 +0100 KEYS: Fix for erroneous trust of incorrectly signed X.509 certs Arbitrary X.509 certificates without authority key identifiers (AKIs) can be added to "trusted" keyrings, including IMA or EVM certs loaded from the filesystem. Signature verification is currently bypassed for certs without AKIs. Trusted keys were recently refactored, and this bug is not present in 4.6. restrict_link_by_signature should return -ENOKEY (no matching parent certificate found) if the certificate being evaluated has no AKIs, instead of bypassing signature checks and returning 0 (new certificate accepted). Reported-by: Petko Manolov Signed-off-by: Mat Martineau Signed-off-by: David Howells Signed-off-by: James Morris crypto/asymmetric_keys/restrict.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d128471a14775cd11abd81c09b2a086997ab3150 Author: Lans Zhang Date: Mon Jul 18 00:10:47 2016 +0100 pefile: Fix the failure of calculation for digest Commit e68503bd68 forgot to set digest_len and thus cause the following error reported by kexec when launching a crash kernel: kexec_file_load failed: Bad message Fixes: e68503bd68 (KEYS: Generalise system_verify_data() to provide access to internal content) Signed-off-by: Lans Zhang Tested-by: Dave Young Signed-off-by: David Howells Cc: Baoquan He Cc: Vivek Goyal cc: kexec@lists.infradead.org cc: linux-crypto@vger.kernel.org Signed-off-by: James Morris crypto/asymmetric_keys/mscode_parser.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a46e667887448da10e26e46442bda01d1f311aaf Author: Lans Zhang Date: Mon Jul 18 00:10:39 2016 +0100 PKCS#7: Fix panic when referring to the empty AKID when DEBUG defined This fix resolves the following kernel panic if an empty or missing AuthorityKeyIdentifier is encountered and DEBUG is defined in pkcs7_verify.c. [ 459.041989] PKEY: <==public_key_verify_signature() = 0 [ 459.041993] PKCS7: Verified signature 1 [ 459.041995] PKCS7: ==> pkcs7_verify_sig_chain() [ 459.041999] PKCS7: verify Sample DB Certificate for SCP: 01 [ 459.042002] PKCS7: - issuer Sample KEK Certificate for SCP [ 459.042014] BUG: unable to handle kernel NULL pointer dereference at (null) [ 459.042135] IP: [] pkcs7_verify+0x72c/0x7f0 [ 459.042217] PGD 739e6067 PUD 77719067 PMD 0 [ 459.042286] Oops: 0000 [#1] PREEMPT SMP [ 459.042328] Modules linked in: [ 459.042368] CPU: 0 PID: 474 Comm: kexec Not tainted 4.7.0-rc7-WR8.0.0.0_standard+ #18 [ 459.042462] Hardware name: To be filled by O.E.M. To be filled by O.E.M./Aptio CRB, BIOS 5.6.5 10/09/2014 [ 459.042586] task: ffff880073a50000 ti: ffff8800738e8000 task.ti: ffff8800738e8000 [ 459.042675] RIP: 0010:[] [] pkcs7_verify+0x72c/0x7f0 [ 459.042784] RSP: 0018:ffff8800738ebd58 EFLAGS: 00010246 [ 459.042845] RAX: 0000000000000000 RBX: ffff880076b7da80 RCX: 0000000000000006 [ 459.042929] RDX: 0000000000000001 RSI: ffffffff81c85001 RDI: ffffffff81ca00a9 [ 459.043014] RBP: ffff8800738ebd98 R08: 0000000000000400 R09: ffff8800788a304c [ 459.043098] R10: 0000000000000000 R11: 00000000000060ca R12: ffff8800769a2bc0 [ 459.043182] R13: ffff880077358300 R14: 0000000000000000 R15: ffff8800769a2dc0 [ 459.043268] FS: 00007f24cc741700(0000) GS:ffff880074e00000(0000) knlGS:0000000000000000 [ 459.043365] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 459.043431] CR2: 0000000000000000 CR3: 0000000073a36000 CR4: 00000000001006f0 [ 459.043514] Stack: [ 459.043530] 0000000000000000 ffffffbf00000020 31ffffff813e68b0 0000000000000002 [ 459.043644] ffff8800769a2bc0 0000000000000000 00000000007197b8 0000000000000002 [ 459.043756] ffff8800738ebdd8 ffffffff81153fb1 0000000000000000 0000000000000000 [ 459.043869] Call Trace: [ 459.043898] [] verify_pkcs7_signature+0x61/0x140 [ 459.043974] [] verify_pefile_signature+0x2cb/0x830 [ 459.044052] [] ? verify_pefile_signature+0x830/0x830 [ 459.044134] [] bzImage64_verify_sig+0x15/0x20 [ 459.046332] [] arch_kexec_kernel_verify_sig+0x29/0x40 [ 459.048552] [] SyS_kexec_file_load+0x1f4/0x6c0 [ 459.050768] [] ? __do_page_fault+0x1b6/0x550 [ 459.052996] [] entry_SYSCALL_64_fastpath+0x17/0x93 [ 459.055242] Code: e8 0a d6 ff ff 85 c0 0f 88 7a fb ff ff 4d 39 fd 4d 89 7d 08 74 45 4d 89 fd e9 14 fe ff ff 4d 8b 76 08 31 c0 48 c7 c7 a9 00 ca 81 <41> 0f b7 36 49 8d 56 02 e8 d0 91 d6 ff 4d 8b 3c 24 4d 85 ff 0f [ 459.060535] RIP [] pkcs7_verify+0x72c/0x7f0 [ 459.063040] RSP [ 459.065456] CR2: 0000000000000000 [ 459.075998] ---[ end trace c15f0e897cda28dc ]--- Signed-off-by: Lans Zhang Signed-off-by: David Howells Cc: Dave Young Cc: Baoquan He Cc: Vivek Goyal cc: linux-crypto@vger.kernel.org cc: kexec@lists.infradead.org Signed-off-by: James Morris crypto/asymmetric_keys/pkcs7_verify.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8e6ce7ebeb34f0992f56de078c3744fb383657fa Author: Florian Fainelli Date: Fri Jul 15 16:42:16 2016 -0700 net: cavium: liquidio: Avoid dma_unmap_single on uninitialized ndata The label lio_xmit_failed is used 3 times through liquidio_xmit() but it always makes a call to dma_unmap_single() using potentially uninitialized variables from "ndata" variable. Out of the 3 gotos, 2 run after ndata has been initialized, and had a prior dma_map_single() call. Fix this by adding a new error label: lio_xmit_dma_failed which does this dma_unmap_single() and then processed with the lio_xmit_failed fallthrough. Fixes: f21fb3ed364bb ("Add support of Cavium Liquidio ethernet adapters") Reported-by: coverity (CID 1309740) Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/cavium/liquidio/lio_main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit ea6ff112b095dce2060c304195904d859c3e2625 Author: Florian Fainelli Date: Fri Jul 15 16:41:16 2016 -0700 net: nb8800: Fix SKB leak in nb8800_receive() In case nb8800_receive() fails to allocate a fragment, we would leak the SKB freshly allocated and just return, instead, free it. Reported-by: coverity (CID 1341750) Signed-off-by: Florian Fainelli Acked-by: Mans Rullgard Signed-off-by: David S. Miller drivers/net/ethernet/aurora/nb8800.c | 1 + 1 file changed, 1 insertion(+) commit de702da7a823ab0c4a1e53ed79a2695f0d453855 Author: Florian Fainelli Date: Fri Jul 15 16:40:22 2016 -0700 et131x: Fix logical vs bitwise check in et131x_tx_timeout() We should be using a logical check here instead of a bitwise operation to check if the device is closed already in et131x_tx_timeout(). Reported-by: coverity (CID 146498) Fixes: 38df6492eb511 ("et131x: Add PCIe gigabit ethernet driver et131x to drivers/net") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/agere/et131x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18d3df3eab23796d7f852f9c6bb60962b8372ced Author: Paolo Abeni Date: Thu Jul 14 18:00:10 2016 +0200 vlan: use a valid default mtu value for vlan over macsec macsec can't cope with mtu frames which need vlan tag insertion, and vlan device set the default mtu equal to the underlying dev's one. By default vlan over macsec devices use invalid mtu, dropping all the large packets. This patch adds a netif helper to check if an upper vlan device needs mtu reduction. The helper is used during vlan devices initialization to set a valid default and during mtu updating to forbid invalid, too bit, mtu values. The helper currently only check if the lower dev is a macsec device, if we get more users, we need to update only the helper (possibly reserving an additional IFF bit). Signed-off-by: Paolo Abeni Signed-off-by: David S. Miller include/linux/netdevice.h | 7 +++++++ net/8021q/vlan_dev.c | 10 ++++++---- net/8021q/vlan_netlink.c | 7 +++++-- 3 files changed, 18 insertions(+), 6 deletions(-) commit 47ef4ad2684d380dd6d596140fb79395115c3950 Merge: 6315170 7ce9ea7 Author: Linus Torvalds Date: Sat Jul 16 09:53:34 2016 +0900 Merge tag 'for-linus-20160715' of git://git.infradead.org/linux-mtd Pull MTD fix from Brian Norris: "Late MTD fix for v4.7: One regression in the Device Tree handling for OMAP NAND handling of the ELM node. TI migrated to using the property name "ti,elm-id", but forgot to keep compatibility with the old "elm_id" property. Also, might as well send out this MAINTAINERS fixup now" * tag 'for-linus-20160715' of git://git.infradead.org/linux-mtd: mtd: nand: omap2: Add check for old elm binding MAINTAINERS: Add file patterns for mtd device tree bindings commit e86663c475d384ab5f46cb5637e9b7ad08c5c505 Author: Florian Fainelli Date: Fri Jul 15 15:42:52 2016 -0700 net: bgmac: Fix infinite loop in bgmac_dma_tx_add() Nothing is decrementing the index "i" while we are cleaning up the fragments we could not successful transmit. Fixes: 9cde94506eacf ("bgmac: implement scatter/gather support") Reported-by: coverity (CID 1352048) Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 631517032f261f6fd35d11321cd2ba695573f2ed Merge: 8dcf5a8 6a5029e Author: Linus Torvalds Date: Sat Jul 16 07:04:12 2016 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: "A few last-minute updates for the input subsystem" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ts4800-ts - add missing of_node_put after calling of_parse_phandle Input: synaptics-rmi4 - use of_get_child_by_name() to fix refcount Revert "Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE" Input: xpad - validate USB endpoint count during probe Input: add SW_PEN_INSERTED define commit f57ec1889f5e830e93723d1262fd9c73703d531d Merge: dd79cf7 11719a5 Author: David S. Miller Date: Fri Jul 15 14:49:51 2016 -0700 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: Couple of fixes Couple of fixes for mlxsw driver from Ido. ==================== Signed-off-by: David S. Miller commit 11719a58bdf7724c463db54ea2abcec54a87b69c Author: Ido Schimmel Date: Fri Jul 15 11:15:02 2016 +0200 mlxsw: spectrum: Prevent invalid ingress buffer mapping Packets entering the switch are mapped to a Switch Priority (SP) according to their PCP value (untagged frames are mapped to SP 0). The packets are classified to a priority group (PG) buffer in the port's headroom according to their SP. The switch maintains another mapping (SP to IEEE priority), which is used to generate PFC frames for lossless PGs. This mapping is initialized to IEEE = SP % 8. Therefore, when mapping SP 'x' to PG 'y' we create a situation in which an IEEE priority is mapped to two different PGs: IEEE 'x' ---> SP 'x' ---> PG 'y' IEEE 'x' ---> SP 'x + 8' ---> PG '0' (default) Which is invalid, as a flow can use only one PG buffer. Fix this by mapping both SP 'x' and 'x + 8' to the same PG buffer. Fixes: 8e8dfe9fdf06 ("mlxsw: spectrum: Add IEEE 802.1Qaz ETS support") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/reg.h | 17 ++++++++++++++++- drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 2 +- drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 3 ++- 3 files changed, 19 insertions(+), 3 deletions(-) commit 28f5275e4aab97680c8243ec26e202e44c99e5bf Author: Ido Schimmel Date: Fri Jul 15 11:15:01 2016 +0200 mlxsw: spectrum: Prevent overwrite of DCB capability fields The number of supported traffic classes that can have ETS and PFC simultaneously enabled is not subject to user configuration, so make sure we always initialize them to the correct values following a set operation. Fixes: 8e8dfe9fdf06 ("mlxsw: spectrum: Add IEEE 802.1Qaz ETS support") Fixes: d81a6bdb87ce ("mlxsw: spectrum: Add IEEE 802.1Qbb PFC support") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 2 ++ 1 file changed, 2 insertions(+) commit 7347180dcaed9c5582732f9372ac940b9b1a907d Author: Ido Schimmel Date: Fri Jul 15 11:15:00 2016 +0200 mlxsw: spectrum: Don't emit errors when PFC is disabled We can't have PAUSE frames and PFC both enabled on the same port, but the fact that ieee_setpfc() was called doesn't necessarily mean PFC is enabled. Only emit errors when PAUSE frames and PFC are enabled simultaneously. Fixes: d81a6bdb87ce ("mlxsw: spectrum: Add IEEE 802.1Qbb PFC support") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c3f1576810affced47684e04a08c1ffa845144c9 Author: Ido Schimmel Date: Fri Jul 15 11:14:59 2016 +0200 mlxsw: spectrum: Indicate support for autonegotiation The device supports link autonegotiation, so let the user know about it by indicating support via ethtool ops. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6277d46b10a0b35c83656f085cf8e32ded6fdd60 Author: Ido Schimmel Date: Fri Jul 15 11:14:58 2016 +0200 mlxsw: spectrum: Force link training according to admin state When setting a new speed we need to disable and enable the port for the changes to take effect. We currently only do that if the operational state of the port is up. However, setting a new speed following link training failure will require us to explicitly set the port down and then up. Instead, disable and enable the port based on its administrative state. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) commit 8dcf5a80dd186ae1a19357e5a32f198bee107723 Merge: 3e0a396 d945b5e Author: Linus Torvalds Date: Sat Jul 16 06:36:55 2016 +0900 Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq Pull workqueue fix from Tejun Heo: "The optimization for setting unbound worker affinity masks collided with recent scheduler changes triggering warning messages. This late pull request fixes the bug by removing the optimization" * 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: workqueue: Fix setting affinity of unbound worker threads commit 3e0a396546450536679ae4d3bd70290ce0b0c79c Author: Jann Horn Date: Fri Sep 11 21:39:33 2015 +0200 xfs: fix type confusion in xfs_ioc_swapext Without this check, the following XFS_I invocations would return bad pointers when used on non-XFS inodes (perhaps pointers into preceding allocator chunks). This could be used by an attacker to trick xfs_swap_extents into performing locking operations on attacker-chosen structures in kernel memory, potentially leading to code execution in the kernel. (I have not investigated how likely this is to be usable for an attack in practice.) Signed-off-by: Jann Horn Cc: Andy Lutomirski Cc: Dave Chinner Signed-off-by: Linus Torvalds fs/xfs/xfs_ioctl.c | 6 ++++++ 1 file changed, 6 insertions(+) commit dd79cf7dd10028d00f99d332d5a0d04734908282 Merge: c961e87 7f6c553 Author: David S. Miller Date: Fri Jul 15 14:27:44 2016 -0700 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2016-07-14 This series contains fixes to i40e and ixgbe. Alex fixes issues found in i40e_rx_checksum() which was broken, where the checksum was being returned valid when it was not. Kiran fixes a bug which was found when we abruptly remove a cable which caused a panic. Set the VSI broadcast promiscuous mode during VSI add sequence and prevents adding MAC filter if specified MAC address is broadcast. Paolo Abeni fixes a bug by returning the actual work done, capped to weight - 1, since the core doesn't allow to return the full budget when the driver modifies the NAPI status. Guilherme Piccoli fixes an issue where the q_vector initialization routine sets the affinity _mask of a q_vector based on v_idx value. This means a loop iterates on v_idx, which is an incremental value, and the cpumask is created based on this value. This is a problem in systems with multiple logical CPUs per core (like in SMT scenarios). Changed the way q_vector's affinity_mask is created to resolve the issue. ==================== Signed-off-by: David S. Miller commit c961e877cff4b669788900a7e12386f67efbe2d3 Author: Grant Grundler Date: Thu Jul 14 11:27:16 2016 -0700 r8152: add MODULE_VERSION ethtool -i provides a driver version that is hard coded. Export the same value via "modinfo". Signed-off-by: Grant Grundler Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 1 + 1 file changed, 1 insertion(+) commit 083ae308280d13d187512b9babe3454342a7987e Author: Jason Baron Date: Thu Jul 14 11:38:40 2016 -0400 tcp: enable per-socket rate limiting of all 'challenge acks' The per-socket rate limit for 'challenge acks' was introduced in the context of limiting ack loops: commit f2b2c582e824 ("tcp: mitigate ACK loops for connections as tcp_sock") And I think it can be extended to rate limit all 'challenge acks' on a per-socket basis. Since we have the global tcp_challenge_ack_limit, this patch allows for tcp_challenge_ack_limit to be set to a large value and effectively rely on the per-socket limit, or set tcp_challenge_ack_limit to a lower value and still prevents a single connections from consuming the entire challenge ack quota. It further moves in the direction of eliminating the global limit at some point, as Eric Dumazet has suggested. This a follow-up to: Subject: tcp: make challenge acks less predictable Cc: Eric Dumazet Cc: David S. Miller Cc: Neal Cardwell Cc: Yuchung Cheng Cc: Yue Cao Signed-off-by: Jason Baron Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) commit aa93d1fee85c890a34f2510a310e55ee76a27848 Author: James Patrick-Evans Date: Fri Jul 15 16:40:45 2016 +0100 media: fix airspy usb probe error path Fix a memory leak on probe error of the airspy usb device driver. The problem is triggered when more than 64 usb devices register with v4l2 of type VFL_TYPE_SDR or VFL_TYPE_SUBDEV. The memory leak is caused by the probe function of the airspy driver mishandeling errors and not freeing the corresponding control structures when an error occours registering the device to v4l2 core. A badusb device can emulate 64 of these devices, and then through continual emulated connect/disconnect of the 65th device, cause the kernel to run out of RAM and crash the kernel, thus causing a local DOS vulnerability. Fixes CVE-2016-5400 Signed-off-by: James Patrick-Evans Reviewed-by: Kees Cook Cc: stable@vger.kernel.org # 3.17+ Signed-off-by: Linus Torvalds drivers/media/usb/airspy/airspy.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0ba169ac3600ae4032ee14b4192e6bf5d67723f5 Author: Tony Luck Date: Thu Jul 14 15:38:43 2016 -0700 EDAC, sb_edac: Fix Knights Landing In commit 2c1ea4c700af ("EDAC, sb_edac: Use cpu family/model in driver detection") I broke Knights Landing because I failed to notice that it called a wrapper macro "sbridge_get_all_devices_knl" instead of "sbridge_get_all_devices" like all the other types. Now that we include the processor type in the pci_id_table structure we can skip the wrappers and just have the sbridge_get_all_devices() check the type to decide whether to allow duplicate devices and controllers to have registers spread across buses. Fixes: 2c1ea4c700af ("EDAC, sb_edac: Use cpu family/model in driver detection") Tested-by: Lukasz Odzioba Acked-by: Aristeu Rozanski Signed-off-by: Tony Luck Signed-off-by: Linus Torvalds drivers/edac/sb_edac.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) commit 6a5029e66404462a3322dba8e35615bd09332081 Author: Peter Chen Date: Fri Jul 15 09:32:54 2016 -0700 Input: ts4800-ts - add missing of_node_put after calling of_parse_phandle of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Signed-off-by: Peter Chen Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/ts4800-ts.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit bc7135b9a430520448590ffeb1ff54c0b4dfd8d5 Author: Rodrigo Vivi Date: Fri Jul 1 17:07:12 2016 -0700 drm/i915: Introduce Kabypoint PCH for Kabylake H/DT. Some Kabylake SKUs are going to use Kabypoint PCH. It is mainly for Halo and DT ones. >From our specs it doesn't seem that KBP brings any change on the display south engine. So let's consider this as a continuation of SunrisePoint, i.e., SPT+. Since it is easy to get confused by a letter change: KBL = Kabylake - CPU/GPU codename. KBP = Kabypoint - PCH codename. Signed-off-by: Rodrigo Vivi Reviewed-by: Ander Conselvan de Oliveira Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96826 Link: http://patchwork.freedesktop.org/patch/msgid/1467418032-15167-1-git-send-email-rodrigo.vivi@intel.com Signed-off-by: Rodrigo Vivi (cherry picked from commit 22dea0be50b2eb0bafd3c82e1fb080113e0c889e) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.c | 4 ++++ drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/i915_irq.c | 4 ++-- drivers/gpu/drm/i915/intel_panel.c | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) commit 12be73a0f13ad5a044346d564804b4058426d4c2 Author: Tim Gore Date: Mon Jun 13 12:15:01 2016 +0100 drm/i915/gen9: implement WaConextSwitchWithConcurrentTLBInvalidate This patch enables a workaround for a mid thread preemption issue where a hardware timing problem can prevent the context restore from happening, leading to a hang. v2: move to gen9_init_workarounds (Arun) v3: move to start of gen9_init_workarounds (Arun) Signed-off-by: Tim Gore Reviewed-by: Arun Siluvery Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1465816501-25557-1-git-send-email-tim.gore@intel.com (cherry picked from commit a8ab5ed5e1bf856eceaab5579236de6f92822b9f) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 4 ++++ drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++ 2 files changed, 7 insertions(+) commit a89bd7beb1791ad5ed634989b14c764114a68e53 Author: Mika Kuoppala Date: Tue Jun 7 17:19:19 2016 +0300 drm/i915/gen9: Add WaFbcHighMemBwCorruptionAvoidance Add this fbc related workaround for all gen9 Cc: Ville Syrjälä Signed-off-by: Mika Kuoppala Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-28-git-send-email-mika.kuoppala@intel.com (cherry picked from commit d1b4eefdea6d63aa15321f539feec298d8aefdc1) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 2 files changed, 5 insertions(+) commit c584e2d38fb84513944feeb25072dd8b17a6d3b6 Author: Mika Kuoppala Date: Tue Jun 7 17:19:18 2016 +0300 drm/i195/fbc: Add WaFbcNukeOnHostModify Bspec states that we need to set nuke on modify all to prevent screen corruption with fbc on skl and kbl. v2: proper workaround name References: HSD#2227109, HSDES#1404569388 Cc: Ville Syrjälä Signed-off-by: Mika Kuoppala Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-27-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 031cd8c85aefad31e7af91eba7bc4735a6dfcc79) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 5b889896be07cb12f0401dc2cfdec6eb6413c774 Author: Mika Kuoppala Date: Tue Jun 7 17:19:17 2016 +0300 drm/i915/gen9: Add WaFbcWakeMemOn Set bit 8 in 0x43224 to prevent screen corruption and system hangs on high memory bandwidth conditions. The same wa also suggest setting bit 31 on ARB_CTL. According to another workaround we gain better idle power savings when FBC is enabled. v2: use correct workaround name v3: split out overlapping wa for corruption avoidance (Ville) References: HSD#2137218, HSD#2227171, HSD#2136579, BSID#883 Cc: Paulo Zanoni Cc: Ville Syrjälä Signed-off-by: Mika Kuoppala Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-26-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 303d4ea522e8672a1b62d968a5b6764929adc292) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit f20b1ba04e917be9cadd3171a99568a1badb8b1b Author: Mika Kuoppala Date: Tue Jun 7 17:19:16 2016 +0300 drm/i915/gen9: Add WaFbcTurnOffFbcWatermark According to bspec this prevents screen corruption when fbc is used. v2: This workaround has a name, use it (Ville) v3: remove bogus gen check on ilk/vlv wm path (Ville) References: HSD#2135555, HSD#2137270, BSID#562 Cc: Paulo Zanoni Cc: Ville Syrjälä Signed-off-by: Mika Kuoppala Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-25-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 0f78dee6f06a9399d4bdf79575094cc761b872ac) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 1 file changed, 4 insertions(+) commit 703d1282d513617d9561760309e9acd902c723a7 Author: Mika Kuoppala Date: Tue Jun 7 17:19:15 2016 +0300 drm/i915/kbl: Add WaClearSlmSpaceAtContextSwitch This workaround for bdw and chv, is also needed for kbl A0. References: HSD#1911519, BSID#569 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-24-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 066d462888514af727008a450f4078b1a23d5cbe) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 0e51c0bdc0e6503c9c1cf2c41b2f1ae4e9cf9a8b Author: Mika Kuoppala Date: Tue Jun 7 17:19:13 2016 +0300 drm/i915/gen9: Add WaEnableChickenDCPR Workaround for display underrun issues with Y & Yf Tiling. Set this on all gen9 as stated by bspec. v2: proper workaround name References: HSD#2136383, BSID#857 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-22-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 590e8ff04bc0182dce97228e5e352d6413d80456) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 4 ++++ 2 files changed, 7 insertions(+) commit 0a3e3f047b13c04cd69bdb5a242330566259fa48 Author: Mika Kuoppala Date: Tue Jun 7 17:19:12 2016 +0300 drm/i915/kbl: Add WaDisableSbeCacheDispatchPortSharing This is needed for all kbl revision. v2: Don't add revid checks to generic gen9 init (Arun) References: HSD#2135593 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-21-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 954337aa96a31f6d4baf1e40ac219fbb1b1d92f4) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++++ 1 file changed, 5 insertions(+) commit 3af5f1137c8b5981c754e47d2c233bc3013d2d00 Author: Mika Kuoppala Date: Tue Jun 7 17:19:11 2016 +0300 drm/i915/kbl: Add WaDisableGafsUnitClkGating We need to disable clock gating in this unit to work around hardware issue causing possible corruption/hang. v2: name the bit (Ville) v3: leave the fix enabled for 2227050 and set correct bit (Matthew) v4: Split out the skl part in separate commit for easier backport References: HSD#2227156, HSD#2227050 Cc: Ville Syrjälä Cc: Matthew Auld Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-20-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 4de5d7ccbccc88d2f7b1bcdc2180196ded7db8b8) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++ 1 file changed, 3 insertions(+) commit a725e1dc4e16a34e3de79b0a6db2ef608fecae4c Author: Mika Kuoppala Date: Tue Jun 7 17:19:10 2016 +0300 drm/i915/kbl: Add WaForGAMHang Add this workaround for A0 and B0 revisions References: HSD#2226935 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-19-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 0b2d0934edceff9905b1202d0e7e91f1b6228485) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_lrc.c | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) commit 7b9005cd45f34f5c87fd2e28f4e56b348af4ddc5 Author: Mika Kuoppala Date: Tue Jun 7 17:19:07 2016 +0300 drm/i915: Add WaInsertDummyPushConstP for bxt and kbl Add this workaround for both bxt and kbl up to until rev B0. References: HSD#2136703 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-16-git-send-email-mika.kuoppala@intel.com (cherry picked from commit ad2bdb44b19529ba992bd0b7667e91b14fe9a9ee) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 10 ++++++++++ 2 files changed, 11 insertions(+) commit b90420467232529a4448364d8bd860fc0176d3b6 Author: Mika Kuoppala Date: Tue Jun 7 17:19:06 2016 +0300 drm/i915/kbl: Add WaDisableDynamicCreditSharing Bspec states that we need to turn off dynamic credit sharing on kbl revid a0 and b0. This happens by writing bit 28 on 0x4ab8. References: HSD#2225601, HSD#2226938, HSD#2225763 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-15-git-send-email-mika.kuoppala@intel.com (cherry picked from commit c0b730d572ea00d427f6112b17982c6b9d5e97bb) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++++ 2 files changed, 8 insertions(+) commit 4ac4199434ac1d847e02c61a6e9d1cb35bb91b0e Author: Mika Kuoppala Date: Tue Jun 7 17:19:05 2016 +0300 drm/i915/kbl: Add WaDisableGamClockGating According to bspec we need to disable gam unit clock gating on on kbl revids A0 and B0. References: HSD#2226858, HSD#1944358 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-14-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 8aeb7f624fbf8a68a9c67f831d4158a0f80ea920) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 5 +++++ 2 files changed, 6 insertions(+) commit 11b283412e165abf1ad19c1ba4bdde399944b600 Author: Mika Kuoppala Date: Tue Jun 7 17:19:04 2016 +0300 drm/i915/gen9: Enable must set chicken bits in config0 reg The bspec states that these must be set in CONFIG0 for all gen9. v2: rebase v3: fix spacing (Matthew) References: HSD#2134995 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-13-git-send-email-mika.kuoppala@intel.com (cherry picked from commit b033bb6d5d3a0e51d56b3ba929a8db4e18da0892) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 3 +++ drivers/gpu/drm/i915/intel_pm.c | 24 ++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) commit 738fa1b3123f9a3b4374b4156ad54a2b64273f51 Author: Mika Kuoppala Date: Tue Jun 7 17:19:03 2016 +0300 drm/i915/kbl: Add WaDisableLSQCROPERFforOCL Extend the scope of this workaround, already used in skl, to also take effect in kbl. v2: Fix KBL_REVID_E0 (Matthew) References: HSD#2132677 Cc: Matthew Auld Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-12-git-send-email-mika.kuoppala@intel.com (cherry picked from commit fe90581987cd5fadd2942f59f8511bcb39fdec34) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 3 +++ drivers/gpu/drm/i915/intel_lrc.c | 6 ++++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 13 +++++++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) commit 9146f308d5916e20c53afe3ee0bd4dbd562a0ef9 Author: Mika Kuoppala Date: Tue Jun 7 17:19:01 2016 +0300 drm/i915/kbl: Add WaDisableSDEUnitClockGating Add this workaround until upto kbl revid B0. References: HSD#1802092 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-10-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 9498dba7b4ffe40a1e2b23d7718b77e49841248f) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_pm.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 3d042d4633d7b180e08abead7bd7de0bb194b256 Author: Mika Kuoppala Date: Tue Jun 7 17:19:00 2016 +0300 drm/i915/kbl: Add WaDisableFenceDestinationToSLM for A0 Add this workaround for kbl revid A0 only. v2: rebase v3: carve out a non related workaround (Chris) References: HSD#1911714 Cc: Chris Wilson Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-9-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 8401d42fd5adf709281e1700194805f393b49573) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++++ 1 file changed, 5 insertions(+) commit 791645098219ad3fd505db89d953a16275a8c89b Author: Mika Kuoppala Date: Tue Jun 7 17:18:59 2016 +0300 drm/i915/kbl: Add WaEnableGapsTsvCreditFix We need this crucial workaround from skl also to all kbl revisions. Lack of it was causing system hangs on skl enabling so this is a must have. v2: Don't add revid checks to gen9 init workarounds (Arun) References: HSD#2126660 Cc: Arun Siluvery Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-8-git-send-email-mika.kuoppala@intel.com (cherry picked from commit e587f6cb0af140f3c0ea794d8616eb9a29969983) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++++ 1 file changed, 5 insertions(+) commit 60f452e6147bcbe7d38cd2368cf5c7c1c27a4d38 Author: Mika Kuoppala Date: Tue Jun 7 17:18:58 2016 +0300 drm/i915: Mimic skl with WaForceEnableNonCoherent Past evidence with system hangs and hsds tie WaForceEnableNonCoherent and WaDisableHDCInvalidation to WaForceContextSaveRestoreNonCoherent. Documentation states that WaForceContextSaveRestoreNonCoherent would not be needed on skl past E0 but evidence proved otherwise. See commit <510650e8b2ab> ("drm/i915/skl: Fix spurious gpu hang with gt3/gt4 revs"). In this scope consider kbl to be skl with a bigger revision than E0 so play it safe and bind these two workarounds to the WaForceContextSaveRestoreNonCoherent, and apply to all gen9. v2: fix comment (Matthew) References: HSD#2134449, HSD#2131413 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-7-git-send-email-mika.kuoppala@intel.com (cherry picked from commit bbaefe72a00c93c6ec12e029019681e3f7d7de7a) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_ringbuffer.c | 37 +++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 16 deletions(-) commit 6fd72492b382cb59beee97c7d5767f6e260620bd Author: Mika Kuoppala Date: Tue Jun 7 17:18:57 2016 +0300 drm/i915/gen9: Always apply WaForceContextSaveRestoreNonCoherent The revision id range for this workaround has changed. So apply it to all revids on all gen9. References: HSD#2134449 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-6-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 5b0e3659296cc4a1484e60640ef10780194a195b) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_ringbuffer.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) commit 89b54515d35789297611b9deca904da49a377800 Author: Mika Kuoppala Date: Tue Jun 7 17:18:56 2016 +0300 drm/i915/kbl: Add WaSkipStolenMemoryFirstPage for A0 We need this for kbl a0 boards. Note that this should be also for bxt A0 but we omit that on purpose as bxt A0's are out of fashion already. References: HSD#1912158, HSD#4393097 Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-5-git-send-email-mika.kuoppala@intel.com (cherry picked from commit 6e4f10c33a8bd0df4412bc31c0f11930e0228123) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_gem_stolen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit a1d97ca5b2998d137da4f4673edae472d23742e5 Author: Mika Kuoppala Date: Tue Jun 7 17:18:55 2016 +0300 drm/i915/kbl: Add REVID macro Add REVID macro for kbl to limit wa applicability to particular revision range. Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-4-git-send-email-mika.kuoppala@intel.com (cherry picked from commit c033a37cd42c1b5492d95bfbc8c0891088e04b57) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_drv.h | 6 ++++++ 1 file changed, 6 insertions(+) commit 68370e0ab1636efce7b7e8254430c1ec321564bc Author: Mika Kuoppala Date: Tue Jun 7 17:18:54 2016 +0300 drm/i915/kbl: Init gen9 workarounds Kabylake is part of gen9 family so init the generic gen9 workarounds for it. v2: rebase Signed-off-by: Mika Kuoppala Reviewed-by: Matthew Auld Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-3-git-send-email-mika.kuoppala@intel.com (cherry picked from commit e5f81d65ac5a04020d790caf63b2324730ba0277) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/intel_ringbuffer.c | 48 ++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 16 deletions(-) commit c000456c8c642c6474cd7b94344ff1c39e91c575 Author: Mika Kuoppala Date: Tue Jun 7 17:18:53 2016 +0300 drm/i915/skl: Add WaDisableGafsUnitClkGating We need to disable clock gating in this unit to work around hardware issue causing possible corruption/hang. v2: name the bit (Ville) v3: leave the fix enabled for 2227050 and set correct bit (Matthew) References: HSD#2227156, HSD#2227050 Cc: Ville Syrjälä Cc: Matthew Auld Reviewed-by: Matthew Auld Signed-off-by: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1465309159-30531-2-git-send-email-mika.kuoppala@intel.com (cherry picked from commit eee8efb02a0f9284d85e6b3688f944ca765d7ad3) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 3 +++ 2 files changed, 4 insertions(+) commit f98edb2b6f6baffe0d2be66ebe761b51486c6a40 Author: arun.siluvery@linux.intel.com Date: Mon Jun 6 09:52:49 2016 +0100 drm/i915/gen9: Add WaVFEStateAfterPipeControlwithMediaStateClear Kernel only need to add a register to HW whitelist, required for a preemption related issue. Reference: HSD#2131039 Reviewed-by: Jeff McGee Signed-off-by: Arun Siluvery Signed-off-by: Tvrtko Ursulin Link: http://patchwork.freedesktop.org/patch/msgid/1465203169-16591-1-git-send-email-arun.siluvery@linux.intel.com (cherry picked from commit 6bb6285582e0cf9b3a8440e0e714aae5f66d9ce2) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_ringbuffer.c | 5 +++++ 2 files changed, 6 insertions(+) commit da0a0acaf8881c4fb960064d6cf6e7df2fd0f8b5 Author: Daniel Vetter Date: Thu May 19 09:14:20 2016 +0200 drm/i915/psr: Implement PSR2 w/a for gen9 Found this while browsing Bspec. Looks like it applies to both skl and kbl. v2: Also for bxt (Art). Cc: Rodrigo Vivi Cc: Sonika Jindal Cc: Durgadoss R Cc: "Pandiyan, Dhinakaran" Cc: "Runyan, Arthur J" Reviewed-by: Sonika Jindal Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1463642060-30728-1-git-send-email-daniel.vetter@ffwll.ch (cherry picked from commit dc00b6a07c2206e7b7dbcbeff856049264c40faa) Signed-off-by: Mika Kuoppala drivers/gpu/drm/i915/i915_reg.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) commit fa3a9f5744a92c0d7856d4e326c8d920d1d31116 Merge: 0a9cb48 9babed6 Author: Linus Torvalds Date: Fri Jul 15 16:00:18 2016 +0900 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "20 fixes" * emailed patches from Andrew Morton : m32r: fix build warning about putc mm: workingset: printk missing log level, use pr_info() mm: thp: refix false positive BUG in page_move_anon_rmap() mm: rmap: call page_check_address() with sync enabled to avoid racy check mm: thp: move pmd check inside ptl for freeze_page() vmlinux.lds: account for destructor sections gcov: add support for gcc version >= 6 mm, meminit: ensure node is online before checking whether pages are uninitialised mm, meminit: always return a valid node from early_pfn_to_nid kasan/quarantine: fix bugs on qlist_move_cache() uapi: export lirc.h header madvise_free, thp: fix madvise_free_huge_pmd return value after splitting Revert "scripts/gdb: add documentation example for radix tree" Revert "scripts/gdb: add a Radix Tree Parser" scripts/gdb: Perform path expansion to lx-symbol's arguments scripts/gdb: add constants.py to .gitignore scripts/gdb: rebuild constants.py on dependancy change scripts/gdb: silence 'nothing to do' message kasan: add newline to messages mm, compaction: prevent VM_BUG_ON when terminating freeing scanner commit 0a9cb4815b91378bc7e8a7cda781ee50325bdd54 Merge: 1a86f94 8e0e7ae Author: Linus Torvalds Date: Fri Jul 15 15:42:22 2016 +0900 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "Round three of 4.7 rc fixes: - two fixes for hfi1 - two fixes for i40iw - one omission correction in the port table counter arrays" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: i40iw: Enable remote access rights for stag allocation i40iw: do not print unitialized variables in error message IB core: Add port_xmit_wait counter IB/hfi1: Fix sleep inside atomic issue in init_asic_data IB/hfi1: Correct issues with sc5 computation commit 7f6c553902bfa1c4e3f6cfa955c5ea036c7fe8e4 Author: Guilherme G. Piccoli Date: Mon Jun 27 12:16:43 2016 -0300 i40e: use valid online CPU on q_vector initialization Currently, the q_vector initialization routine sets the affinity_mask of a q_vector based on v_idx value. Meaning a loop iterates on v_idx, which is an incremental value, and the cpumask is created based on this value. This is a problem in systems with multiple logical CPUs per core (like in SMT scenarios). If we disable some logical CPUs, by turning SMT off for example, we will end up with a sparse cpu_online_mask, i.e., only the first CPU in a core is online, and incremental filling in q_vector cpumask might lead to multiple offline CPUs being assigned to q_vectors. Example: if we have a system with 8 cores each one containing 8 logical CPUs (SMT == 8 in this case), we have 64 CPUs in total. But if SMT is disabled, only the 1st CPU in each core remains online, so the cpu_online_mask in this case would have only 8 bits set, in a sparse way. In general case, when SMT is off the cpu_online_mask has only C bits set: 0, 1*N, 2*N, ..., C*(N-1) where C == # of cores; N == # of logical CPUs per core. In our example, only bits 0, 8, 16, 24, 32, 40, 48, 56 would be set. This patch changes the way q_vector's affinity_mask is created: it iterates on v_idx, but consumes the CPU index from the cpu_online_mask instead of just using the v_idx incremental value. No functional changes were introduced. Signed-off-by: Guilherme G Piccoli Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) commit 1a86f944c7f2b22a81f9a1e6a890be0db5d2444a Merge: 1f027f6 22ebf00 Author: Linus Torvalds Date: Fri Jul 15 15:39:03 2016 +0900 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: "Four driver bugfixes for the I2C subsystem" * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mux: reg: wrong condition checked for of_address_to_resource return value i2c: tegra: Correct error path in probe i2c: remove __init from i2c_register_board_info() i2c: qup: Fix wrong value of index variable commit 4b732cd4bb6006ad7fd4d5cdba27fcb751cdf4b7 Author: Paolo Abeni Date: Wed Jun 15 15:37:59 2016 +0200 ixgbe: napi_poll must return the work done Currently the function ixgbe_poll() returns 0 when it clean completely the rx rings, but this foul budget accounting in core code. Fix this returning the actual work done, capped to weight - 1, since the core doesn't allow to return the full budget when the driver modifies the napi status Signed-off-by: Paolo Abeni Reviewed-by: Venkatesh Srinivas 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 f6bd09625ba66446821d55c61891bea9e2cdc5b3 Author: Kiran Patil Date: Mon Jun 20 09:10:34 2016 -0700 i40e: enable VSI broadcast promiscuous mode instead of adding broadcast filter This patch sets VSI broadcast promiscuous mode during VSI add sequence and prevents adding MAC filter if specified MAC address is broadcast. Change-ID: Ia62251fca095bc449d0497fc44bec3a5a0136773 Signed-off-by: Kiran Patil Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_main.c | 32 ++++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) commit 858296c8784bf98450765cbc6b1bc2e44175cc01 Author: Alexander Duyck Date: Tue Jun 14 15:45:42 2016 -0700 i40e/i40evf: Fix i40e_rx_checksum There are a couple of issues I found in i40e_rx_checksum while doing some recent testing. As a result I have found the Rx checksum logic is pretty much broken and returning that the checksum is valid for tunnels in cases where it is not. First the inner types are not the correct values to use to test for if a tunnel is present or not. In addition the inner protocol types are not a bitmask as such performing an OR of the values doesn't make sense. I have instead changed the code so that the inner protocol types are used to determine if we report CHECKSUM_UNNECESSARY or not. For anything that does not end in UDP, TCP, or SCTP it doesn't make much sense to report a checksum offload since it won't contain a checksum anyway. This leaves us with the need to set the csum_level based on some value. For that purpose I am using the tunnel_type field. If the tunnel type is GRENAT or greater then this means we have a GRE or UDP tunnel with an inner header. In the case of GRE or UDP we will have a possible checksum present so for this reason it should be safe to set the csum_level to 1 to indicate that we are reporting the state of the inner header. Signed-off-by: Alexander Duyck Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/i40e/i40e_txrx.c | 30 +++++++++++++++------------ drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 30 +++++++++++++++------------ 2 files changed, 34 insertions(+), 26 deletions(-) commit 1f027f691ebae1ac79e50938d151e549e9f284f1 Merge: 24ee9a8 d2e1204 Author: Linus Torvalds Date: Fri Jul 15 15:16:13 2016 +0900 Merge tag 'drm-fixes-for-v4.7-rc8-vmware' of git://people.freedesktop.org/~airlied/linux Pull drm vmware fixes from Dave Airlie: "These are some fixes for the vmware graphics driver, that fix some black screen issues on at least Ubuntu 16.04, I think VMware would like to get these in so stable can pick them up ASAP" * tag 'drm-fixes-for-v4.7-rc8-vmware' of git://people.freedesktop.org/~airlied/linux: drm/vmwgfx: Fix error paths when mapping framebuffer drm/vmwgfx: Fix corner case screen target management drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set drm/vmwgfx: Check pin count before attempting to move a buffer drm/ttm: Make ttm_bo_mem_compat available drm/vmwgfx: Add an option to change assumed FB bpp drm/vmwgfx: Work around mode set failure in 2D VMs drm/vmwgfx: Add a check to handle host message failure commit 24ee9a8326e37ae149f7d8160af3f162d65f05dc Merge: d83a4c1 71404e8 Author: Linus Torvalds Date: Fri Jul 15 15:13:06 2016 +0900 Merge tag 'drm-fixes-for-v4.7-rc8' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "These are just some i915 and amdgpu fixes that shows up, the amdgpu ones are polaris fixes, and the i915 one is a major regression fix" * tag 'drm-fixes-for-v4.7-rc8' of git://people.freedesktop.org/~airlied/linux: drm/amdgpu: fix power distribution issue for Polaris10 XT drm/amdgpu: Add a missing register to Polaris golden setting drm/i915: Ignore panel type from OpRegion on SKL drm/i915: Update ifdeffery for mutex->owner commit d83a4c116c4e723840bf9efc47c33ea40c70691b Merge: f97d104 d60585c Author: Linus Torvalds Date: Fri Jul 15 15:02:49 2016 +0900 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fix from Ingo Molnar: "Fix a CPU hotplug related corruption of the load average that got introduced in this merge window" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Correct off by one bug in load migration calculation commit 9babed6a66b5577628d9e76e5a6cb6104d7ddd4c Author: Sudip Mukherjee Date: Thu Jul 14 12:07:43 2016 -0700 m32r: fix build warning about putc We were getting build warning: arch/m32r/boot/compressed/m32r_sio.c:11:13: warning: conflicting types for built-in function 'putc' Here putc is used as a static function so lets just rename it to avoid the conflict with the builtin putc. Link: http://lkml.kernel.org/r/1466977046-24724-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/boot/compressed/m32r_sio.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit d3d36c4b5c5fbdd68542be73ffd53eb210fbf7cf Author: Anton Blanchard Date: Thu Jul 14 12:07:41 2016 -0700 mm: workingset: printk missing log level, use pr_info() Commit 612e44939c3c ("mm: workingset: eviction buckets for bigmem/lowbit machines") added a printk without a log level. Quieten it by using pr_info(). Link: http://lkml.kernel.org/r/1466982072-29836-2-git-send-email-anton@ozlabs.org Signed-off-by: Anton Blanchard Acked-by: Johannes Weiner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/workingset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5a49973d7143ebbabd76e1dcd69ee42e349bb7b9 Author: Hugh Dickins Date: Thu Jul 14 12:07:38 2016 -0700 mm: thp: refix false positive BUG in page_move_anon_rmap() The VM_BUG_ON_PAGE in page_move_anon_rmap() is more trouble than it's worth: the syzkaller fuzzer hit it again. It's still wrong for some THP cases, because linear_page_index() was never intended to apply to addresses before the start of a vma. That's easily fixed with a signed long cast inside linear_page_index(); and Dmitry has tested such a patch, to verify the false positive. But why extend linear_page_index() just for this case? when the avoidance in page_move_anon_rmap() has already grown ugly, and there's no reason for the check at all (nothing else there is using address or index). Remove address arg from page_move_anon_rmap(), remove VM_BUG_ON_PAGE, remove CONFIG_DEBUG_VM PageTransHuge adjustment. And one more thing: should the compound_head(page) be done inside or outside page_move_anon_rmap()? It's usually pushed down to the lowest level nowadays (and mm/memory.c shows no other explicit use of it), so I think it's better done in page_move_anon_rmap() than by caller. Fixes: 0798d3c022dc ("mm: thp: avoid false positive VM_BUG_ON_PAGE in page_move_anon_rmap()") Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1607120444540.12528@eggly.anvils Signed-off-by: Hugh Dickins Reported-by: Dmitry Vyukov Acked-by: Kirill A. Shutemov Cc: Mika Westerberg Cc: Andrea Arcangeli Cc: Rik van Riel Cc: [4.5+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/rmap.h | 2 +- mm/hugetlb.c | 2 +- mm/memory.c | 3 +-- mm/rmap.c | 9 +++------ 4 files changed, 6 insertions(+), 10 deletions(-) commit 55bda43bb26d2c11eeedac742eff87a8ac34c106 Author: Naoya Horiguchi Date: Thu Jul 14 12:07:35 2016 -0700 mm: rmap: call page_check_address() with sync enabled to avoid racy check The previous patch addresses the race between split_huge_pmd_address() and someone changing the pmd. The fix is only for splitting of normal thp (i.e. pmd-mapped thp,) and for splitting of pte-mapped thp there still is the similar race. For splitting pte-mapped thp, the pte's conversion is done by try_to_unmap_one(TTU_MIGRATION). This function checks page_check_address() to get the target pte, but it can return NULL under some race, leading to VM_BUG_ON() in freeze_page(). Fortunately, page_check_address() already has an argument to decide whether we do a quick/racy check or not, so let's flip it when called from freeze_page(). Link: http://lkml.kernel.org/r/1466990929-7452-2-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/rmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 33f4751e99601b7bfd1d66aedabd3ee9140922de Author: Naoya Horiguchi Date: Thu Jul 14 12:07:32 2016 -0700 mm: thp: move pmd check inside ptl for freeze_page() I found a race condition triggering VM_BUG_ON() in freeze_page(), when running a testcase with 3 processes: - process 1: keep writing thp, - process 2: keep clearing soft-dirty bits from virtual address of process 1 - process 3: call migratepages for process 1, The kernel message is like this: kernel BUG at /src/linux-dev/mm/huge_memory.c:3096! invalid opcode: 0000 [#1] SMP Modules linked in: cfg80211 rfkill crc32c_intel ppdev serio_raw pcspkr virtio_balloon virtio_console parport_pc parport pvpanic acpi_cpufreq tpm_tis tpm i2c_piix4 virtio_blk virtio_net ata_generic pata_acpi floppy virtio_pci virtio_ring virtio CPU: 0 PID: 28863 Comm: migratepages Not tainted 4.6.0-v4.6-160602-0827-+ #2 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 task: ffff880037320000 ti: ffff88007cdd0000 task.ti: ffff88007cdd0000 RIP: 0010:[] [] split_huge_page_to_list+0x496/0x590 RSP: 0018:ffff88007cdd3b70 EFLAGS: 00010202 RAX: 0000000000000001 RBX: ffff88007c7b88c0 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000700000200 RDI: ffffea0003188000 RBP: ffff88007cdd3bb8 R08: 0000000000000001 R09: 00003ffffffff000 R10: ffff880000000000 R11: ffffc000001fffff R12: ffffea0003188000 R13: ffffea0003188000 R14: 0000000000000000 R15: 0400000000000080 FS: 00007f8ec241d740(0000) GS:ffff88007dc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f8ec1f3ed20 CR3: 000000003707b000 CR4: 00000000000006f0 Call Trace: ? list_del+0xd/0x30 queue_pages_pte_range+0x4d1/0x590 __walk_page_range+0x204/0x4e0 walk_page_range+0x71/0xf0 queue_pages_range+0x75/0x90 ? queue_pages_hugetlb+0x190/0x190 ? new_node_page+0xc0/0xc0 ? change_prot_numa+0x40/0x40 migrate_to_node+0x71/0xd0 do_migrate_pages+0x1c3/0x210 SyS_migrate_pages+0x261/0x290 entry_SYSCALL_64_fastpath+0x1a/0xa4 Code: e8 b0 87 fb ff 0f 0b 48 c7 c6 30 32 9f 81 e8 a2 87 fb ff 0f 0b 48 c7 c6 b8 46 9f 81 e8 94 87 fb ff 0f 0b 85 c0 0f 84 3e fd ff ff <0f> 0b 85 c0 0f 85 a6 00 00 00 48 8b 75 c0 4c 89 f7 41 be f0 ff RIP split_huge_page_to_list+0x496/0x590 I'm not sure of the full scenario of the reproduction, but my debug showed that split_huge_pmd_address(freeze=true) returned without running main code of pmd splitting because pmd_present(*pmd) in precheck somehow returned 0. If this happens, the subsequent try_to_unmap() fails and returns non-zero (because page_mapcount() still > 0), and finally VM_BUG_ON() fires. This patch tries to fix it by prechecking pmd state inside ptl. Link: http://lkml.kernel.org/r/1466990929-7452-1-git-send-email-n-horiguchi@ah.jp.nec.com Signed-off-by: Naoya Horiguchi Signed-off-by: Kirill A. Shutemov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/huge_mm.h | 4 ++-- mm/huge_memory.c | 31 ++++++++++++------------------- 2 files changed, 14 insertions(+), 21 deletions(-) commit e41f501d391265ff568f3e49d6128cc30856a36f Author: Dmitry Vyukov Date: Thu Jul 14 12:07:29 2016 -0700 vmlinux.lds: account for destructor sections If CONFIG_KASAN is enabled and gcc is configured with --disable-initfini-array and/or gold linker is used, gcc emits .ctors/.dtors and .text.startup/.text.exit sections instead of .init_array/.fini_array. .dtors section is not explicitly accounted in the linker script and messes vvar/percpu layout. We want: ffffffff822bfd80 D _edata ffffffff822c0000 D __vvar_beginning_hack ffffffff822c0000 A __vvar_page ffffffff822c0080 0000000000000098 D vsyscall_gtod_data ffffffff822c1000 A __init_begin ffffffff822c1000 D init_per_cpu__irq_stack_union ffffffff822c1000 A __per_cpu_load ffffffff822d3000 D init_per_cpu__gdt_page We got: ffffffff8279a600 D _edata ffffffff8279b000 A __vvar_page ffffffff8279c000 A __init_begin ffffffff8279c000 D init_per_cpu__irq_stack_union ffffffff8279c000 A __per_cpu_load ffffffff8279e000 D __vvar_beginning_hack ffffffff8279e080 0000000000000098 D vsyscall_gtod_data ffffffff827ae000 D init_per_cpu__gdt_page This happens because __vvar_page and .vvar get different addresses in arch/x86/kernel/vmlinux.lds.S: . = ALIGN(PAGE_SIZE); __vvar_page = .; .vvar : AT(ADDR(.vvar) - LOAD_OFFSET) { /* work around gold bug 13023 */ __vvar_beginning_hack = .; Discard .dtors/.fini_array/.text.exit, since we don't call dtors. Merge .text.startup into init text. Link: http://lkml.kernel.org/r/1467386363-120030-1-git-send-email-dvyukov@google.com Signed-off-by: Dmitry Vyukov Reviewed-by: Andrey Ryabinin Cc: [4.0+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/asm-generic/vmlinux.lds.h | 4 ++++ 1 file changed, 4 insertions(+) commit d02038f972538b93011d78c068f44514fbde0a8c Author: Florian Meier Date: Thu Jul 14 12:07:26 2016 -0700 gcov: add support for gcc version >= 6 Link: http://lkml.kernel.org/r/20160701130914.GA23225@styxhp Signed-off-by: Florian Meier Reviewed-by: Peter Oberparleiter Tested-by: Peter Oberparleiter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/gcov/gcc_4_7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef70b6f41cda6270165a6f27b2548ed31cfa3cb2 Author: Mel Gorman Date: Thu Jul 14 12:07:23 2016 -0700 mm, meminit: ensure node is online before checking whether pages are uninitialised early_page_uninitialised looks up an arbitrary PFN. While a machine without node 0 will boot with "mm, page_alloc: Always return a valid node from early_pfn_to_nid", it works because it assumes that nodes are always in PFN order. This is not guaranteed so this patch adds robustness by always checking if the node being checked is online. Link: http://lkml.kernel.org/r/1468008031-3848-4-git-send-email-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: David Rientjes Cc: [4.2+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e4568d3803852d00effd41dcdd489e726b998879 Author: Mel Gorman Date: Thu Jul 14 12:07:20 2016 -0700 mm, meminit: always return a valid node from early_pfn_to_nid early_pfn_to_nid can return node 0 if a PFN is invalid on machines that has no node 0. A machine with only node 1 was observed to crash with the following message: BUG: unable to handle kernel paging request at 000000000002a3c8 PGD 0 Modules linked in: Hardware name: Supermicro H8DSP-8/H8DSP-8, BIOS 080011 06/30/2006 task: ffffffff81c0d500 ti: ffffffff81c00000 task.ti: ffffffff81c00000 RIP: reserve_bootmem_region+0x6a/0xef CR2: 000000000002a3c8 CR3: 0000000001c06000 CR4: 00000000000006b0 Call Trace: free_all_bootmem+0x4b/0x12a mem_init+0x70/0xa3 start_kernel+0x25b/0x49b The problem is that early_page_uninitialised uses the early_pfn_to_nid helper which returns node 0 for invalid PFNs. No caller of early_pfn_to_nid cares except early_page_uninitialised. This patch has early_pfn_to_nid always return a valid node. Link: http://lkml.kernel.org/r/1468008031-3848-3-git-send-email-mgorman@techsingularity.net Signed-off-by: Mel Gorman Acked-by: David Rientjes Cc: [4.2+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ab686d8c8303069e80300663b3be6201a8697fb Author: Joonsoo Kim Date: Thu Jul 14 12:07:17 2016 -0700 kasan/quarantine: fix bugs on qlist_move_cache() There are two bugs on qlist_move_cache(). One is that qlist's tail isn't set properly. curr->next can be NULL since it is singly linked list and NULL value on tail is invalid if there is one item on qlist. Another one is that if cache is matched, qlist_put() is called and it will set curr->next to NULL. It would cause to stop the loop prematurely. These problems come from complicated implementation so I'd like to re-implement it completely. Implementation in this patch is really simple. Iterate all qlist_nodes and put them to appropriate list. Unfortunately, I got this bug sometime ago and lose oops message. But, the bug looks trivial and no need to attach oops. Fixes: 55834c59098d ("mm: kasan: initial memory quarantine implementation") Link: http://lkml.kernel.org/r/1467766348-22419-1-git-send-email-iamjoonsoo.kim@lge.com Signed-off-by: Joonsoo Kim Reviewed-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Acked-by: Alexander Potapenko Cc: Kuthonuzo Luruo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/quarantine.c | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) commit 12cb22bb8ae9aff9d72a9c0a234f26d641b20eb6 Author: Mauro Carvalho Chehab Date: Thu Jul 14 12:07:15 2016 -0700 uapi: export lirc.h header This header contains the userspace API for lirc. This is a fixup for commit b7be755733dc ("[media] bz#75751: Move internal header file lirc.h to uapi/"). It moved the header to the right place, but it forgot to add it at Kbuild. So, despite being at uapi, it is not copied to the right place. Fixes: b7be755733dc44c72 ("[media] bz#75751: Move internal header file lirc.h to uapi/") Link: http://lkml.kernel.org/r/320c765d32bfc82c582e336d52ffe1026c73c644.1468439021.git.mchehab@s-opensource.com Signed-off-by: Mauro Carvalho Chehab Cc: Alec Leamas Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/uapi/linux/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 9818b8cde6221fe7a52aad816425f67d4439b14e Author: Huang Ying Date: Thu Jul 14 12:07:12 2016 -0700 madvise_free, thp: fix madvise_free_huge_pmd return value after splitting madvise_free_huge_pmd should return 0 if the fallback PTE operations are required. In madvise_free_huge_pmd, if part pages of THP are discarded, the THP will be split and fallback PTE operations should be used if splitting succeeds. But the original code will make fallback PTE operations skipped, after splitting succeeds. Fix that via make madvise_free_huge_pmd return 0 after splitting successfully, so that the fallback PTE operations will be done. Link: http://lkml.kernel.org/r/1467135452-16688-1-git-send-email-ying.huang@intel.com Signed-off-by: "Huang, Ying" Acked-by: Minchan Kim Cc: "Kirill A. Shutemov" Cc: Vlastimil Babka Cc: Jerome Marchand Cc: Andrea Arcangeli Cc: Ebru Akagunduz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/huge_memory.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit ef722fd4a7592ddbfa42bcb3ad8a5caa598589b3 Author: Kieran Bingham Date: Thu Jul 14 12:07:09 2016 -0700 Revert "scripts/gdb: add documentation example for radix tree" This reverts commit 9b5580359a84 ("scripts/gdb: add documentation example for radix tree") The python implementation of radix tree was merged at the same time as a refactoring of the radix tree implementation and doesn't work. The feature is being reverted, thus we revert the documentation as well. Link: http://lkml.kernel.org/r/1467127337-11135-7-git-send-email-kieran@bingham.xyz Signed-off-by: Kieran Bingham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Documentation/gdb-kernel-debugging.txt | 21 --------------------- 1 file changed, 21 deletions(-) commit b447e02548a3304c47b78b5e2d75a4312a8f17e1 Author: Kieran Bingham Date: Thu Jul 14 12:07:06 2016 -0700 Revert "scripts/gdb: add a Radix Tree Parser" This reverts commit e127a73d41ac ("scripts/gdb: add a Radix Tree Parser") The python implementation of radix-tree was merged at the same time as the radix-tree system was heavily reworked from commit e9256efcc8e3 ("radix-tree: introduce radix_tree_empty") to 3bcadd6fa6c4 ("radix-tree: free up the bottom bit of exceptional entries for reuse") and no longer functions, but also prevents other gdb scripts from loading. This functionality has not yet hit a release, so simply remove it for now Link: http://lkml.kernel.org/r/1467127337-11135-6-git-send-email-kieran@bingham.xyz Signed-off-by: Kieran Bingham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/constants.py.in | 7 --- scripts/gdb/linux/radixtree.py | 97 --------------------------------------- scripts/gdb/vmlinux-gdb.py | 1 - 3 files changed, 105 deletions(-) commit 552ab2a3eaa4338fa5b33aa4c07ea2c542ddcea5 Author: Nikolay Borisov Date: Thu Jul 14 12:07:04 2016 -0700 scripts/gdb: Perform path expansion to lx-symbol's arguments Python doesn't do automatic expansion of paths. In case one passes path of the from ~/foo/bar the gdb scripts won't automatically expand that and as a result the symbols files won't be loaded. Fix this by explicitly expanding all paths which begin with "~" Link: http://lkml.kernel.org/r/1467127337-11135-5-git-send-email-kieran@bingham.xyz Signed-off-by: Nikolay Borisov Signed-off-by: Kieran Bingham Reviewed-by: Jan Kiszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/symbols.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e2aa2f8face230e284f6d344c6a4ee6f53e60207 Author: Omar Sandoval Date: Thu Jul 14 12:07:01 2016 -0700 scripts/gdb: add constants.py to .gitignore Since scripts/gdb/linux/constants.py is autogenerated, this should have been added to .gitignore when it was introduced. Fixes: f197d75fcad1 ("scripts/gdb: provide linux constants") Link: http://lkml.kernel.org/r/1467127337-11135-4-git-send-email-kieran@bingham.xyz Signed-off-by: Omar Sandoval Signed-off-by: Kieran Bingham Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/.gitignore | 1 + 1 file changed, 1 insertion(+) commit 834a35296ab0a850e22cda1059e4c05b091c4ad9 Author: Kieran Bingham Date: Thu Jul 14 12:06:58 2016 -0700 scripts/gdb: rebuild constants.py on dependancy change The autogenerated constants.py file was only being built on the initial call, and if the constants.py.in file changed. As we are utilising the CPP hooks, we can successfully use the call if_changed_dep rules to determine when to rebuild the file based on it's inclusions. Link: http://lkml.kernel.org/r/1467127337-11135-3-git-send-email-kieran@bingham.xyz Signed-off-by: Kieran Bingham Reported-by: Jan Kiszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit abb035b48270b226356552486c6de2b1652bdb90 Author: Kieran Bingham Date: Thu Jul 14 12:06:55 2016 -0700 scripts/gdb: silence 'nothing to do' message The constants.py generation, involves a rule to link into the main makefile. This rule has no command and generates a spurious warning message in the build logs when CONFIG_SCRIPTS_GDB is enabled. Fix simply by giving a no-op action Link: http://lkml.kernel.org/r/1467127337-11135-2-git-send-email-kieran@bingham.xyz Signed-off-by: Kieran Bingham Reported-by: Jan Kiszka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds scripts/gdb/linux/Makefile | 1 + 1 file changed, 1 insertion(+) commit 2ba78056acfe8d63a29565f91dae4678ed6b81ca Author: Dmitry Vyukov Date: Thu Jul 14 12:06:53 2016 -0700 kasan: add newline to messages Currently GPF messages with KASAN look as follows: kasan: GPF could be caused by NULL-ptr deref or user memory accessgeneral protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN Add newlines. Link: http://lkml.kernel.org/r/1467294357-98002-1-git-send-email-dvyukov@google.com Signed-off-by: Dmitry Vyukov Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/mm/kasan_init_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a46cbf3bc53b6a93fb84a5ffb288c354fa807954 Author: David Rientjes Date: Thu Jul 14 12:06:50 2016 -0700 mm, compaction: prevent VM_BUG_ON when terminating freeing scanner It's possible to isolate some freepages in a pageblock and then fail split_free_page() due to the low watermark check. In this case, we hit VM_BUG_ON() because the freeing scanner terminated early without a contended lock or enough freepages. This should never have been a VM_BUG_ON() since it's not a fatal condition. It should have been a VM_WARN_ON() at best, or even handled gracefully. Regardless, we need to terminate anytime the full pageblock scan was not done. The logic belongs in isolate_freepages_block(), so handle its state gracefully by terminating the pageblock loop and making a note to restart at the same pageblock next time since it was not possible to complete the scan this time. [rientjes@google.com: don't rescan pages in a pageblock] Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1607111244150.83138@chino.kir.corp.google.com Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1606291436300.145590@chino.kir.corp.google.com Signed-off-by: David Rientjes Reported-by: Minchan Kim Tested-by: Minchan Kim Cc: Joonsoo Kim Cc: Hugh Dickins Cc: Mel Gorman Cc: Vlastimil Babka Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) commit d2e1204f896b17bda1922f6320d3b442367302fc Merge: 71404e8 58541f7 Author: Dave Airlie Date: Fri Jul 15 13:51:55 2016 +1000 Merge branch 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux into drm-fixes A bunch of vmwgfx fixes that fix a black screen issue on latest distros/hw combos. * 'drm-vmwgfx-fixes' of git://people.freedesktop.org/~syeh/repos_linux: drm/vmwgfx: Fix error paths when mapping framebuffer drm/vmwgfx: Fix corner case screen target management drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set drm/vmwgfx: Check pin count before attempting to move a buffer drm/ttm: Make ttm_bo_mem_compat available drm/vmwgfx: Add an option to change assumed FB bpp drm/vmwgfx: Work around mode set failure in 2D VMs drm/vmwgfx: Add a check to handle host message failure commit 71404e8a88fa4a94b3833ccc853c322fd33336d7 Merge: da03189 aeddda0 Author: Dave Airlie Date: Fri Jul 15 09:19:14 2016 +1000 Merge tag 'drm-intel-fixes-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-fixes I've also realized that a pile of hang fixes for kbl landed in next, and no one thought of backporting it to 4.7 - kbl has lost prelim_hw_support tagging in 4.7-rc1 already. Mika is prepping a topic branch for those, will send you a separate pull request since it's quite a bit (but should be all well restricted to kbl code, so similar to polaris in amdgpu). * tag 'drm-intel-fixes-2016-07-14' of git://anongit.freedesktop.org/drm-intel: drm/i915: Ignore panel type from OpRegion on SKL drm/i915: Update ifdeffery for mutex->owner commit 005db31d5f5f7c31cfdc43505d77eb3ca5cf8ec6 Author: Beniamino Galvani Date: Wed Jul 13 18:25:08 2016 +0200 bonding: set carrier off for devices created through netlink Commit e826eafa65c6 ("bonding: Call netif_carrier_off after register_netdevice") moved netif_carrier_off() from bond_init() to bond_create(), but the latter is called only for initial default devices and ones created through sysfs: $ modprobe bonding $ echo +bond1 > /sys/class/net/bonding_masters $ ip link add bond2 type bond $ grep "MII Status" /proc/net/bonding/* /proc/net/bonding/bond0:MII Status: down /proc/net/bonding/bond1:MII Status: down /proc/net/bonding/bond2:MII Status: up Ensure that carrier is initially off also for devices created through netlink. Signed-off-by: Beniamino Galvani Signed-off-by: David S. Miller drivers/net/bonding/bond_netlink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit da031899f54ad5313e0c3f56967bfde026a512b2 Merge: f97d104 eeade25 Author: Dave Airlie Date: Fri Jul 15 09:17:39 2016 +1000 Merge branch 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Two more polaris fixes. * 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux: drm/amdgpu: fix power distribution issue for Polaris10 XT drm/amdgpu: Add a missing register to Polaris golden setting commit eeade25ad029cb1f31f27f8e0ddc9bb9c22b5537 Author: Ken Wang Date: Mon Jul 11 13:33:40 2016 +0800 drm/amdgpu: fix power distribution issue for Polaris10 XT Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 15 +++++++++++++++ drivers/gpu/drm/amd/amdgpu/atombios_i2c.h | 2 ++ drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +++++ 3 files changed, 22 insertions(+) commit 795c2109c287123dfc3bc987d20daef32d77e4d1 Author: Ken Wang Date: Thu Jul 7 09:56:53 2016 +0800 drm/amdgpu: Add a missing register to Polaris golden setting Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 ++ 1 file changed, 2 insertions(+) commit 9624516db0f3ffcbd1ba1007775d068f54049773 Author: Andrew Duggan Date: Thu Jul 14 09:35:44 2016 -0700 Input: synaptics-rmi4 - use of_get_child_by_name() to fix refcount Calling of_find_node_by_name() assumes that the caller has incremented the refcount of the of_node being passed in. Currently, the caller is not incrementing the refcount of the of_node which results in the node being prematurely freed when of_find_node_by_name() calls of_node_put() on it. Instead use of_get_child_by_name() which does not call put on the of_node. Signed-off-by: Andrew Duggan Signed-off-by: Dmitry Torokhov drivers/input/rmi4/rmi_bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e9161bfe0482f26efeaf584d5fd69398c69313c Author: Dmitry Torokhov Date: Thu Jul 14 09:33:41 2016 -0700 Revert "Input: wacom_w8001 - drop use of ABS_MT_TOOL_TYPE" This reverts commit 5f7e5445a2de848c66d2d80ba5479197e8287c33 because removal of input_mt_report_slot_state() means we no longer generate tracking IDs for the reported contacts. Cc: stable@vger.kernel.org Acked-by: Peter Hutterer Acked-by: Ping Cheng drivers/input/touchscreen/wacom_w8001.c | 3 +++ 1 file changed, 3 insertions(+) commit 7ce9ea7e6b35a652034486133174d4e17055cef5 Author: Teresa Remmet Date: Tue Jul 5 11:32:30 2016 +0200 mtd: nand: omap2: Add check for old elm binding commit c9711ec5250b ("mtd: nand: omap: Clean up device tree support") removes the check for the old elm phandle binding. Add it again to keep backward compatibility. Fixes: commit c9711ec5250b ("mtd: nand: omap: Clean up device tree support") Signed-off-by: Teresa Remmet Signed-off-by: Brian Norris drivers/mtd/nand/omap2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 32f0c4afb4363e31dad49202f1554ba591d649f2 Author: Keith Busch Date: Wed Jul 13 11:45:02 2016 -0600 nvme: Remove RCU namespace protection We can't sleep with RCU read lock held, but we need to do potentially blocking stuff to namespace queues when iterating the list. This patch removes the RCU locking and holds a mutex instead. To prevent deadlocks, this patch removes holding the mutex during namespace scanning and removal. The unlocked namespace scanning is made safe by holding a reference to the namespace being scanned. List iteration that does IO has to be unlocked to allow error recovery. The caller must ensure the list can not be manipulated during such an event, so this patch adds a comment explaining this requirement to the only function that iterates an unlocked list. All callers currently meet this requirement, so no further changes required. List iterations that do not do IO can safely use the lock since it couldn't block recovery from missing forced IO completions. Reported-by: Ming Lin [fixes 0bf77e9 nvme: switch to RCU freeing the namespace] Signed-off-by: Keith Busch Signed-off-by: Jens Axboe drivers/nvme/host/core.c | 74 +++++++++++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 35 deletions(-) commit aeddda06c1a704bb97c8a7bfe7a472120193bd56 Author: Ville Syrjälä Date: Tue Jul 12 15:00:37 2016 +0300 drm/i915: Ignore panel type from OpRegion on SKL Dell XPS 13 9350 apparently doesn't like it when we use the panel type from OpRegion. The OpRegion panel type (0) tells us to use use low vswing for eDP, whereas the VBT panel type (2) tells us to use normal vswing. The problem is that low vswing results in some display flickers. Since no one seems to know how this stuff is supposed to be handled, let's just ignore the OpRegion panel type on SKL for now. v2: Print the panel type correctly in the debug output Reported-by: James Bottomley Cc: James Bottomley Cc: drm-intel-fixes@lists.freedesktop.org References: https://lists.freedesktop.org/archives/intel-gfx/2016-June/098826.html Fixes: a05628195a0d ("drm/i915: Get panel_type from OpRegion panel details") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1468324837-29237-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Tested-by: James Bottomley Signed-off-by: Ville Syrjälä (cherry picked from commit bb10d4ec3be4b069bfb61c60ca4f708f58f440f1) [danvet: Fix up cherry-pick conflict with an s/dev_priv/dev/.] Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_opregion.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b19240062722c39fa92c99f04cbfd93034625123 Author: Chris Wilson Date: Mon Jul 11 14:46:17 2016 +0100 drm/i915: Update ifdeffery for mutex->owner In commit 7608a43d8f2e ("locking/mutexes: Use MUTEX_SPIN_ON_OWNER when appropriate") the owner field in the mutex was updated from being dependent upon CONFIG_SMP to using optimistic spin. Update our peek function to suite. Fixes:7608a43d8f2e ("locking/mutexes: Use MUTEX_SPIN_ON_OWNER...") Reported-by: Hong Liu Signed-off-by: Chris Wilson Link: http://patchwork.freedesktop.org/patch/msgid/1468244777-4888-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Matthew Auld (cherry picked from commit 4f074a5393431a7d2cc0de7fcfe2f61d24854628) Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/i915_gem_shrinker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f97d10454e4da2aceb44dfa7c59bb43ba9f50199 Merge: a7bf89a eb01950 2c13ce8 Author: Linus Torvalds Date: Thu Jul 14 05:44:47 2016 +0900 Merge branches 'perf-urgent-for-linus' and 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf and timer fixes from Ingo Molnar: "A fix for a posix CPU timers bug, and a perf printk message fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86: Fix bogus kernel printk, again * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: posix_cpu_timer: Exit early when process has been reaped commit a7bf89a1b14c6ebae233275e704587146fbaa5c1 Merge: 2cc499b abb2baf Author: Linus Torvalds Date: Thu Jul 14 05:33:38 2016 +0900 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "This contains three commits to fix memory corruption bugs with certain Apple AirPort cards, plus a fix for a X86_BUG() ID definitions collision bug in asm/cpufeatures.h" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/quirks: Add early quirk to reset Apple AirPort card x86/quirks: Reintroduce scanning of secondary buses x86/quirks: Apply nvidia_bugs quirk only on root bus x86/cpu: Fix duplicated X86_BUG(9) macro commit 2cc499b398c7bbcbf415017cd9588e699e04cd64 Merge: cf875cc a7c73414 Author: Linus Torvalds Date: Thu Jul 14 05:10:28 2016 +0900 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core fixes from Ingo Molnar: "Fix an objtool false positive plus an UP kernel memory corruption bug on certain configs" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: cpu/hotplug: Keep enough storage space if SMP=n to avoid array out of bounds scribble objtool: Fix STACK_FRAME_NON_STANDARD macro checking for function symbols commit 790e5ef59fead625858919da20b3db0242db0d8d Merge: 22cb99f 4f0c40d9 Author: David S. Miller Date: Wed Jul 13 11:53:41 2016 -0700 Merge branch 'sk_filter-trim-limit' Willem de Bruijn says: ==================== limit sk_filter trim to payload Sockets can apply a filter to incoming packets to drop or trim them. Fix two codepaths that call skb_pull/__skb_pull after sk_filter without checking for packet length. Reading beyond skb->tail after trimming happens in more codepaths, but safety of reading in the linear segment is based on minimum allocation size (MAX_HEADER, GRO_MAX_HEAD, ..). ==================== Signed-off-by: David S. Miller commit 4f0c40d94461cfd23893a17335b2ab78ecb333c8 Author: Willem de Bruijn Date: Tue Jul 12 18:18:57 2016 -0400 dccp: limit sk_filter trim to payload Dccp verifies packet integrity, including length, at initial rcv in dccp_invalid_packet, later pulls headers in dccp_enqueue_skb. A call to sk_filter in-between can cause __skb_pull to wrap skb->len. skb_copy_datagram_msg interprets this as a negative value, so (correctly) fails with EFAULT. The negative length is reported in ioctl SIOCINQ or possibly in a DCCP_WARN in dccp_close. Introduce an sk_receive_skb variant that caps how small a filter program can trim packets, and call this in dccp with the header length. Excessively trimmed packets are now processed normally and queued for reception as 0B payloads. Fixes: 7c657876b63c ("[DCCP]: Initial implementation") Signed-off-by: Willem de Bruijn Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/sock.h | 8 +++++++- net/core/sock.c | 7 ++++--- net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 2 +- 4 files changed, 13 insertions(+), 6 deletions(-) commit f4979fcea7fd36d8e2f556abef86f80e0d5af1ba Author: Willem de Bruijn Date: Tue Jul 12 18:18:56 2016 -0400 rose: limit sk_filter trim to payload Sockets can have a filter program attached that drops or trims incoming packets based on the filter program return value. Rose requires data packets to have at least ROSE_MIN_LEN bytes. It verifies this on arrival in rose_route_frame and unconditionally pulls the bytes in rose_recvmsg. The filter can trim packets to below this value in-between, causing pull to fail, leaving the partial header at the time of skb_copy_datagram_msg. Place a lower bound on the size to which sk_filter may trim packets by introducing sk_filter_trim_cap and call this for rose packets. Signed-off-by: Willem de Bruijn Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/filter.h | 6 +++++- net/core/filter.c | 10 +++++----- net/rose/rose_in.c | 3 ++- 3 files changed, 12 insertions(+), 7 deletions(-) commit 22cb99fb76fb56b38f59770fbf22be03bb796d8d Merge: ea43f86 c3b7c5c Author: David S. Miller Date: Wed Jul 13 11:38:17 2016 -0700 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== mlx5 tx timeout watchdog fixes This patch set provides two trivial fixes for the tx timeout series lately applied into net 4.7. From Daniel, detect stuck queues due to BQL From Mohamad, fix tx timeout watchdog false alarm Hopefully those two fixes will make it to -stable, assuming 3947ca185999 ('net/mlx5e: Implement ndo_tx_timeout callback') was also backported to -stable. ==================== Signed-off-by: David S. Miller commit c3b7c5c9504348e0c22fa47629c419d82c963bc2 Author: Mohamad Haj Yahia Date: Wed Jul 13 00:07:00 2016 +0300 net/mlx5e: start/stop all tx queues upon open/close netdev Start all tx queues (including inactive ones) when opening the netdev. Stop all tx queues (including inactive ones) when closing the netdev. This is a workaround for the tx timeout watchdog false alarm issue in which the netdev watchdog is polling all the tx queues which may include inactive queues and thus once lowering the real tx queues number (ethtool -L) it will generate tx timeout watchdog false alarms. Fixes: 3947ca185999 ('net/mlx5e: Implement ndo_tx_timeout callback') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 2c1ccc993707ecb0830ef0aebb7c8061f7704aa3 Author: Daniel Jurgens Date: Wed Jul 13 00:06:59 2016 +0300 net/mlx5e: Fix TX Timeout to detect queues stuck on BQL Change netif_tx_queue_stopped to netif_xmit_stopped. This will show when queues are stopped due to byte queue limits. Fixes: 3947ca185999 ('net/mlx5e: Implement ndo_tx_timeout callback') Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d60585c5766e9620d5d83e2b25dc042c7bdada2c Author: Thomas Gleixner Date: Tue Jul 12 18:33:56 2016 +0200 sched/core: Correct off by one bug in load migration calculation The move of calc_load_migrate() from CPU_DEAD to CPU_DYING did not take into account that the function is now called from a thread running on the outgoing CPU. As a result a cpu unplug leakes a load of 1 into the global load accounting mechanism. Fix it by adjusting for the currently running thread which calls calc_load_migrate(). Reported-by: Anton Blanchard Signed-off-by: Thomas Gleixner Acked-by: Peter Zijlstra Cc: Linus Torvalds Cc: Michael Ellerman Cc: Vaidyanathan Srinivasan Cc: rt@linutronix.de Cc: shreyas@linux.vnet.ibm.com Fixes: e9cd8fa4fcfd: ("sched/migration: Move calc_load_migrate() into CPU_DYING") Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1607121744350.4083@nanos Signed-off-by: Ingo Molnar kernel/sched/core.c | 6 ++++-- kernel/sched/loadavg.c | 8 ++++---- kernel/sched/sched.h | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) commit cf875cc1dc6cb43cec754e92092579a51d2ad095 Merge: f1b5e4f 6519c3d Author: Linus Torvalds Date: Wed Jul 13 19:51:49 2016 +0900 Merge tag 'media/v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: "Two regression fixes: - a regression when handling VIDIOC_CROPCAP at the media core; - a regression at adv7604 that was ignoring pad number in subdev ops" * tag 'media/v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] adv7604: Don't ignore pad number in subdev DV timings pad operations [media] v4l2-ioctl: fix stupid mistake in cropcap condition commit a7c734140aa36413944eef0f8c660e0e2256357d Author: Thomas Gleixner Date: Tue Jul 12 21:59:23 2016 +0200 cpu/hotplug: Keep enough storage space if SMP=n to avoid array out of bounds scribble Xiaolong Ye reported lock debug warnings triggered by the following commit: 8de4a0066106 ("perf/x86: Convert the core to the hotplug state machine") The bug is the following: the cpuhp_bp_states[] array is cut short when CONFIG_SMP=n, but the dynamically registered callbacks are stored nevertheless and happily scribble outside of the array bounds... We need to store them in case that the state is unregistered so we can invoke the teardown function. That's independent of CONFIG_SMP. Make sure the array is large enough. Reported-by: kernel test robot Signed-off-by: Thomas Gleixner Cc: Adam Borowski Cc: Alexander Shishkin Cc: Anna-Maria Gleixner Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Jiri Olsa Cc: Kan Liang Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Sebastian Andrzej Siewior Cc: Stephane Eranian Cc: Vince Weaver Cc: lkp@01.org Cc: stable@vger.kernel.org Cc: tipbuild@zytor.com Fixes: cff7d378d3fd "cpu/hotplug: Convert to a state machine for the control processor" Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1607122144560.4083@nanos Signed-off-by: Ingo Molnar kernel/cpu.c | 2 ++ 1 file changed, 2 insertions(+) commit ea43f860d984b00c3e3fa02049412ce94ce9ed5e Merge: 136ab0d ee6c21b Author: David S. Miller Date: Tue Jul 12 23:13:01 2016 -0700 Merge branch 'ethoc-fixes' Florian Fainelli says: ==================== net: ethoc: Error path and transmit fixes This patch series contains two patches for the ethoc driver while testing on a TS-7300 board where ethoc is provided by an on-board FPGA. First patch was cooked after chasing crashes with invalid resources passed to the driver. Second patch was cooked after seeing that an interface configured with IP 192.168.2.2 was sending ARP packets for 192.168.0.0, no wonder why it could not work. I don't have access to any other platform using an ethoc interface so it could be good to some testing on Xtensa for instance. Changes in v3: - corrected the error path if skb_put_padto() fails, thanks to Max for spotting this! Changes in v2: - fixed the first commit message ==================== Signed-off-by: David S. Miller commit ee6c21b9c11ad96318160f9a504a3fac2114ddca Author: Florian Fainelli Date: Tue Jul 12 16:04:36 2016 -0700 net: ethoc: Correctly pad short packets Even though the hardware can be doing zero padding, we want the SKB to be going out on the wire with the appropriate size. This fixes packet truncations observed with e.g: ARP packets. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/ethoc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 386512d18b268c6182903239f9f3390f03ce4c7b Author: Florian Fainelli Date: Tue Jul 12 16:04:35 2016 -0700 net: ethoc: Fix early error paths In case any operation fails before we can successfully go the point where we would register a MDIO bus, we would be going to an error label which involves unregistering then freeing this yet to be created MDIO bus. Update all error paths to go to label free which is the only one valid until either the clock is enabled, or the MDIO bus is allocated and registered. This fixes kernel oops observed while trying to dereference the MDIO bus structure which is not yet allocated. Fixes: a1702857724f ("net: Add support for the OpenCores 10/100 Mbps Ethernet MAC.") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/ethoc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit f1b5e4fac164ff43b189d996e4f05f95cc57b984 Merge: 63bab22 d0420d2 Author: Linus Torvalds Date: Wed Jul 13 06:37:03 2016 +0900 Merge tag 'acpi-urgent-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "One ACPI EC driver regression fix (code ordering) and three reverts of ACPICA commits, one that introduced a problem and two unsuccessful attempted fixes on top of it. Specifics: - Fix a recent regression in the ACPI EC driver introduced by a fix of another problem that uncovered a latent code ordering issue in the driver (Lv Zheng). - Revert a recent ACPICA commit that attempted to address a lock ordering issue introduced by a previous fix, but caused Dell Precision 5510 to fail to boot, revert that previous fix too and finally revert the commit that caused the original problem (a deadlock in the ACPICA code) to happen (Rafael Wysocki)" * tag 'acpi-urgent-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis" Revert "ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading" Revert "ACPICA: Namespace: Fix namespace/interpreter lock ordering" ACPI / EC: Fix code ordering issue in ec_remove_handlers() commit 136ab0d0e10f29bdac3ee04bd0e9661073e15c80 Author: Noam Camus Date: Tue Jul 12 16:01:11 2016 +0300 net: nps_enet: Fix PCS reset During commit b54b8c2d6e3c ("net: ezchip: adapt driver to little endian architecture") adapting to little endian architecture, zeroing of controller was left out. Signed-off-by: Elad Kanfi Signed-off-by: David S. Miller drivers/net/ethernet/ezchip/nps_enet.c | 1 + 1 file changed, 1 insertion(+) commit d0420d20bacd1eef9f75a769ad48befd383ad190 Merge: 00c611d fa5b4a5 Author: Rafael J. Wysocki Date: Tue Jul 12 22:03:14 2016 +0200 Merge branches 'acpica-fixes' and 'acpi-ec-fixes' * acpica-fixes: Revert "ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis" Revert "ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading" Revert "ACPICA: Namespace: Fix namespace/interpreter lock ordering" * acpi-ec-fixes: ACPI / EC: Fix code ordering issue in ec_remove_handlers() commit 63bab2203d54529ff1a7181b0575b58a9f3575cd Merge: 08d27eb 43160ff Author: Linus Torvalds Date: Wed Jul 13 04:22:16 2016 +0900 Merge tag 'qcom-smd-list-voltage' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "Fix qcom-smd list voltage issues for msm8974 This commit looks like a cleanup but in fact by causing the core to go down some simplified code paths for noop regulators it avoids a boot time crash for msm8974 platforms which was introduced in v4.7. It has been in -next for a while, the issues in mainline for these platforms weren't flagged up to me until yesterday (I think it took some time to figure out what was going wrong)" * tag 'qcom-smd-list-voltage' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: qcom_smd: Remove list_voltage callback for rpm_smps_ldo_ops_fixed commit 92a03eb01277d710a97bcc07602aea083ba3fffd Merge: ce9a4f3 590b52e Author: David S. Miller Date: Tue Jul 12 10:21:27 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains Netfilter/IPVS fixes for your net tree. they are: 1) Fix leak in the error path of nft_expr_init(), from Liping Zhang. 2) Tracing from nf_tables cannot be disabled, also from Zhang. 3) Fix an integer overflow on 32bit archs when setting the number of hashtable buckets, from Florian Westphal. 4) Fix configuration of ipvs sync in backup mode with IPv6 address, from Quentin Armitage via Simon Horman. 5) Fix incorrect timeout calculation in nft_ct NFT_CT_EXPIRATION, from Florian Westphal. 6) Skip clash resolution in conntrack insertion races if NAT is in place. ==================== Signed-off-by: David S. Miller commit 8e0e7aedadb877d91a6e66611464165c969bc0a9 Author: Shiraz Saleem Date: Mon Jun 27 16:52:14 2016 -0500 i40iw: Enable remote access rights for stag allocation Fix to enable remote access rights when allocating stag. Fixes: b7aee855d3b9 ("RDMA/i40iw: Add base memory management extensions") Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 + 1 file changed, 1 insertion(+) commit b0548cff99ba927730d4f0c306b98cb6b6aa7cf7 Author: Nicolas Iooss Date: Sat Jun 25 17:55:07 2016 +0200 i40iw: do not print unitialized variables in error message i40iw_create_cqp() printed the contents of variables maj_err and min_err in an error message before they could be initialized (by calling dev->cqp_ops->cqp_create). Signed-off-by: Nicolas Iooss Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c5a81d11d756bfa2b7215463b5908006871bd4fa Author: Christoph Lameter Date: Fri Jul 8 10:27:42 2016 -0500 IB core: Add port_xmit_wait counter Add the missing port_xmit_wait counter. This counter is displayed through some tools like perfquery but is not available via sysfs. For the PORT_PMA_ATTR macro the _counter field is set to zero allowing us to specify the offset directly like with PORT_PMA_ATTR_EXT See also the earlier work in 2008 by Vladimir Skolovsky https://www.mail-archive.com/general@lists.openfabrics.org/msg20313.html Signed-off-by: Vladimir Sokolvsky Signed-off-by: Christoph Lameter Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 4 ++++ 1 file changed, 4 insertions(+) commit 98f179a5eaf77eaac49df3d0c217c6eaaba8c0db Author: Tadeusz Struk Date: Wed Jul 6 17:14:47 2016 -0400 IB/hfi1: Fix sleep inside atomic issue in init_asic_data The critical section should protect only the list traversal and dd->asic_data modification, not the memory allocation. The fix pulls the allocation out of the critical section. Reviewed-by: Dennis Dalessandro Reviewed-by: Sebastian Sanchez Reviewed-by: Dean Luick Signed-off-by: Tadeusz Struk Signed-off-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 896ce45da2c2f4abc508d443fdecde7de0b3fa7e Author: Mike Marciniszyn Date: Fri Jul 1 15:57:02 2016 -0700 IB/hfi1: Correct issues with sc5 computation There are several computatations of the sc in the ud receive routine. Besides the code duplication, all are wrong when the sc is greater than 15. In that case the code incorrectly or's a 1 into the computed sc instead of 1 shifted left by 4. Fix precomputed sc5 by using an already implemented routine hdr2sc() and deleting flawed duplicated code. Cc: Stable # 4.6+ Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/ud.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit 590b52e10d410e1439ae86be9fe19d75fdab628b Author: Pablo Neira Ayuso Date: Mon Jul 11 17:28:54 2016 +0200 netfilter: conntrack: skip clash resolution if nat is in place The clash resolution is not easy to apply if the NAT table is registered. Even if no NAT rules are installed, the nul-binding ensures that a unique tuple is used, thus, the packet that loses race gets a different source port number, as described by: http://marc.info/?l=netfilter-devel&m=146818011604484&w=2 Clash resolution with NAT is also problematic if addresses/port range ports are used since the conntrack that wins race may describe a different mangling that we may have earlier applied to the packet via nf_nat_setup_info(). Fixes: 71d8c47fc653 ("netfilter: conntrack: introduce clash resolution on insertion race") Signed-off-by: Pablo Neira Ayuso Tested-by: Marc Dionne net/netfilter/nf_conntrack_core.c | 1 + 1 file changed, 1 insertion(+) commit d716fb03f76411fc7e138692e33b749cada5c094 Author: Awais Belal Date: Tue Jul 12 15:21:28 2016 +0500 ALSA: hda: add AMD Stoney PCI ID with proper driver caps This allows the device to correctly show up as ATI HDMI rather than a generic one and allows the driver to use the available caps. Signed-off-by: Awais Belal Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+) commit 08d27eb2066622cd659b91d877d0406ebd651225 Merge: 92d21ac 6d4e56c Author: Linus Torvalds Date: Tue Jul 12 16:49:01 2016 +0900 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: posix_acl: de-union a_refcount and a_rcu nfs_atomic_open(): prevent parallel nfs_lookup() on a negative hashed Use the right predicate in ->atomic_open() instances commit ce9a4f316d1240158063c54ddea1628926cb4553 Merge: 34ee32c 1fc07f3 Author: David S. Miller Date: Mon Jul 11 22:42:13 2016 -0700 Merge branch 'tipc-fixes' Jon Maloy says: ==================== tipc: three small fixes Fixes for some broadcast link problems that may occur in large systems. ==================== Signed-off-by: David S. Miller commit 1fc07f3e1541cc49cc159beb3fdefc5013570eda Author: Jon Paul Maloy Date: Mon Jul 11 16:08:37 2016 -0400 tipc: reset all unicast links when broadcast send link fails In test situations with many nodes and a heavily stressed system we have observed that the transmission broadcast link may fail due to an excessive number of retransmissions of the same packet. In such situations we need to reset all unicast links to all peers, in order to reset and re-synchronize the broadcast link. In this commit, we add a new function tipc_bearer_reset_all() to be used in such situations. The function scans across all bearers and resets all their pertaining links. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/bearer.c | 15 +++++++++++++++ net/tipc/bearer.h | 1 + net/tipc/node.c | 15 +++++++++++---- 3 files changed, 27 insertions(+), 4 deletions(-) commit a71eb720355c28eaeb2de0c4d960247c69bb2c6f Author: Jon Paul Maloy Date: Mon Jul 11 16:08:36 2016 -0400 tipc: ensure correct broadcast send buffer release when peer is lost After a new receiver peer has been added to the broadcast transmission link, we allow immediate transmission of new broadcast packets, trusting that the new peer will not accept the packets until it has received the previously sent unicast broadcast initialiation message. In the same way, the sender must not accept any acknowledges until it has itself received the broadcast initialization from the peer, as well as confirmation of the reception of its own initialization message. Furthermore, when a receiver peer goes down, the sender has to produce the missing acknowledges from the lost peer locally, in order ensure correct release of the buffers that were expected to be acknowledged by the said peer. In a highly stressed system we have observed that contact with a peer may come up and be lost before the above mentioned broadcast initial- ization and confirmation have been received. This leads to the locally produced acknowledges being rejected, and the non-acknowledged buffers to linger in the broadcast link transmission queue until it fills up and the link goes into permanent congestion. In this commit, we remedy this by temporarily setting the corresponding broadcast receive link state to ESTABLISHED and the 'bc_peer_is_up' state to true before we issue the local acknowledges. This ensures that those acknowledges will always be accepted. The mentioned state values are restored immediately afterwards when the link is reset. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 2 ++ 1 file changed, 2 insertions(+) commit 2d18ac4ba7454a4260473e68be7e485ae71e7948 Author: Jon Paul Maloy Date: Mon Jul 11 16:08:35 2016 -0400 tipc: extend broadcast link initialization criteria At first contact between two nodes, an endpoint might sometimes have time to send out a LINK_PROTOCOL/STATE packet before it has received the broadcast initialization packet from the peer, i.e., before it has received a valid broadcast packet number to add to the 'bc_ack' field of the protocol message. This means that the peer endpoint will receive a protocol packet with an invalid broadcast acknowledge value of 0. Under unlucky circumstances this may lead to the original, already received acknowledge value being overwritten, so that the whole broadcast link goes stale after a while. We fix this by delaying the setting of the link field 'bc_peer_is_up' until we know that the peer really has received our own broadcast initialization message. The latter is always sent out as the first unicast message on a link, and always with seqeunce number 1. Because of this, we only need to look for a non-zero unicast acknowledge value in the arriving STATE messages, and once that is confirmed we know we are safe and can set the mentioned field. Before this moment, we must ignore all broadcast acknowledges from the peer. Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/link.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 34ee32c9a5696247be405bb0c21f3d1fc6cb5729 Author: Mario Limonciello Date: Mon Jul 11 19:58:04 2016 -0500 r8152: Add support for setting pass through MAC address on RTL8153-AD The RTL8153-AD supports a persistent system specific MAC address. This means a device plugged into two different systems with host side support will show different (but persistent) MAC addresses. This information for the system's persistent MAC address is burned in when the system HW is built and available under \_SB.AMAC in the DSDT at runtime. This technology is currently implemented in the Dell TB15 and WD15 Type-C docks. More information is available here: http://www.dell.com/support/article/us/en/04/SLN301147 Signed-off-by: Mario Limonciello Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 76 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) commit 779f1edec664a7b32b71f7b4702e085a08d60592 Author: Soheil Hassas Yeganeh Date: Mon Jul 11 16:51:26 2016 -0400 sock: ignore SCM_RIGHTS and SCM_CREDENTIALS in __sock_cmsg_send Sergei Trofimovich reported that pulse audio sends SCM_CREDENTIALS as a control message to TCP. Since __sock_cmsg_send does not support SCM_RIGHTS and SCM_CREDENTIALS, it returns an error and hence breaks pulse audio over TCP. SCM_RIGHTS and SCM_CREDENTIALS are sent on the SOL_SOCKET layer but they semantically belong to SOL_UNIX. Since all cmsg-processing functions including sock_cmsg_send ignore control messages of other layers, it is best to ignore SCM_RIGHTS and SCM_CREDENTIALS for consistency (and also for fixing pulse audio over TCP). Fixes: c14ac9451c34 ("sock: enable timestamping using control messages") Signed-off-by: Soheil Hassas Yeganeh Reported-by: Sergei Trofimovich Tested-by: Sergei Trofimovich Cc: Eric Dumazet Cc: Willem de Bruijn Signed-off-by: David S. Miller net/core/sock.c | 4 ++++ 1 file changed, 4 insertions(+) commit 80610229ef7b26615dbb6cb6e873709a60bacc9f Author: Julian Anastasov Date: Sun Jul 10 21:11:55 2016 +0300 ipv4: reject RTNH_F_DEAD and RTNH_F_LINKDOWN from user space Vegard Nossum is reporting for a crash in fib_dump_info when nh_dev = NULL and fib_nhs == 1: Pid: 50, comm: netlink.exe Not tainted 4.7.0-rc5+ RIP: 0033:[<00000000602b3d18>] RSP: 0000000062623890 EFLAGS: 00010202 RAX: 0000000000000000 RBX: 000000006261b800 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000024 RDI: 000000006245ba00 RBP: 00000000626238f0 R08: 000000000000029c R09: 0000000000000000 R10: 0000000062468038 R11: 000000006245ba00 R12: 000000006245ba00 R13: 00000000625f96c0 R14: 00000000601e16f0 R15: 0000000000000000 Kernel panic - not syncing: Kernel mode fault at addr 0x2e0, ip 0x602b3d18 CPU: 0 PID: 50 Comm: netlink.exe Not tainted 4.7.0-rc5+ #581 Stack: 626238f0 960226a02 00000400 000000fe 62623910 600afca7 62623970 62623a48 62468038 00000018 00000000 00000000 Call Trace: [<602b3e93>] rtmsg_fib+0xd3/0x190 [<602b6680>] fib_table_insert+0x260/0x500 [<602b0e5d>] inet_rtm_newroute+0x4d/0x60 [<60250def>] rtnetlink_rcv_msg+0x8f/0x270 [<60267079>] netlink_rcv_skb+0xc9/0xe0 [<60250d4b>] rtnetlink_rcv+0x3b/0x50 [<60265400>] netlink_unicast+0x1a0/0x2c0 [<60265e47>] netlink_sendmsg+0x3f7/0x470 [<6021dc9a>] sock_sendmsg+0x3a/0x90 [<6021e0d0>] ___sys_sendmsg+0x300/0x360 [<6021fa64>] __sys_sendmsg+0x54/0xa0 [<6021fac0>] SyS_sendmsg+0x10/0x20 [<6001ea68>] handle_syscall+0x88/0x90 [<600295fd>] userspace+0x3fd/0x500 [<6001ac55>] fork_handler+0x85/0x90 $ addr2line -e vmlinux -i 0x602b3d18 include/linux/inetdevice.h:222 net/ipv4/fib_semantics.c:1264 Problem happens when RTNH_F_LINKDOWN is provided from user space when creating routes that do not use the flag, catched with netlink fuzzer. Currently, the kernel allows user space to set both flags to nh_flags and fib_flags but this is not intentional, the assumption was that they are not set. Fix this by rejecting both flags with EINVAL. Reported-by: Vegard Nossum Fixes: 0eeb075fad73 ("net: ipv4 sysctl option to ignore routes when nexthop link is down") Signed-off-by: Julian Anastasov Cc: Andy Gospodarek Cc: Dinesh Dutt Cc: Scott Feldman Reviewed-by: Andy Gospodarek Signed-off-by: David S. Miller net/ipv4/fib_semantics.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 75ff39ccc1bd5d3c455b6822ab09e533c551f758 Author: Eric Dumazet Date: Sun Jul 10 10:04:02 2016 +0200 tcp: make challenge acks less predictable Yue Cao claims that current host rate limiting of challenge ACKS (RFC 5961) could leak enough information to allow a patient attacker to hijack TCP sessions. He will soon provide details in an academic paper. This patch increases the default limit from 100 to 1000, and adds some randomization so that the attacker can no longer hijack sessions without spending a considerable amount of probes. Based on initial analysis and patch from Linus. Note that we also have per socket rate limiting, so it is tempting to remove the host limit in the future. v2: randomize the count of challenge acks per second, not the period. Fixes: 282f23c6ee34 ("tcp: implement RFC 5961 3.2") Reported-by: Yue Cao Signed-off-by: Eric Dumazet Suggested-by: Linus Torvalds Cc: Yuchung Cheng Cc: Neal Cardwell Acked-by: Neal Cardwell Acked-by: Yuchung Cheng Signed-off-by: David S. Miller net/ipv4/tcp_input.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit a612769774a30e4fc143c4cb6395c12573415660 Author: Michal Kubeček Date: Fri Jul 8 17:52:33 2016 +0200 udp: prevent bugcheck if filter truncates packet too much If socket filter truncates an udp packet below the length of UDP header in udpv6_queue_rcv_skb() or udp_queue_rcv_skb(), it will trigger a BUG_ON in skb_pull_rcsum(). This BUG_ON (and therefore a system crash if kernel is configured that way) can be easily enforced by an unprivileged user which was reported as CVE-2016-6162. For a reproducer, see http://seclists.org/oss-sec/2016/q3/8 Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") Reported-by: Marco Grassi Signed-off-by: Michal Kubecek Acked-by: Eric Dumazet Acked-by: Willem de Bruijn Signed-off-by: David S. Miller net/ipv4/udp.c | 2 ++ net/ipv6/udp.c | 2 ++ 2 files changed, 4 insertions(+) commit f3ea3119ad75dde0ba3e8da4653dbd5a189688e5 Author: Colin Ian King Date: Fri Jul 8 16:42:48 2016 +0100 bnxt_en: initialize rc to zero to avoid returning garbage rc is not initialized so it can contain garbage if it is not set by the call to bnxt_read_sfp_module_eeprom_info. Ensure garbage is not returned by initializing rc to 0. Signed-off-by: Colin Ian King Acked-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 7d32eb8781a0eccf8ab7bf33877014c7637ad271 Merge: 95556a8 d1fe176 Author: David S. Miller Date: Mon Jul 11 12:28:44 2016 -0700 Merge tag 'batadv-net-for-davem-20160708' of git://git.open-mesh.org/linux-merge Simon Wunderlich says: ==================== Here are a couple batman-adv bugfix patches, all by Sven Eckelmann: - Fix possible NULL pointer dereference for vlan_insert_tag (two patches) - Fix reference handling in some features, which may lead to reference leaks or invalid memory access (four patches) - Fix speedy join: DHCP packets handled by the gateway feature should be sent with 4-address unicast instead of 3-address unicast to make speedy join work. This fixes/speeds up DHCP assignment for clients which join a mesh for the first time. (one patch) ==================== Signed-off-by: David S. Miller commit ab58d8cc870ef3f0771c197700441936898d1f1d Author: Peter Wu Date: Mon Jul 11 19:51:06 2016 +0200 ALSA: hda - fix use-after-free after module unload register_vga_switcheroo() sets the PM ops from the hda structure which is freed later in azx_free. Make sure that these ops are cleared. Caught by KASAN, initially noticed due to a general protection fault. Fixes: 246efa4a072f ("snd/hda: add runtime suspend/resume on optimus support (v4)") Signed-off-by: Peter Wu Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 6d4e56ce977864b0fcd28c61555060e6010aa89b Author: Jeff Layton Date: Mon Jul 11 09:10:06 2016 -0400 posix_acl: de-union a_refcount and a_rcu Currently the two are unioned together, but I don't think that's safe. It looks like get_cached_acl could race with the last put in posix_acl_release. get_cached_acl calls atomic_inc_not_zero on a_refcount, but that field could have already been clobbered by call_rcu, and may no longer be zero. Fix this by de-unioning the two fields. Fixes: b8a7a3a66747 (posix_acl: Inode acl caching fixes) Signed-off-by: Jeff Layton Signed-off-by: Al Viro include/linux/posix_acl.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2c13ce8f6b2f6fd9ba2f9261b1939fc0f62d1307 Author: Alexey Dobriyan Date: Fri Jul 8 01:39:11 2016 +0300 posix_cpu_timer: Exit early when process has been reaped Variable "now" seems to be genuinely used unintialized if branch if (CPUCLOCK_PERTHREAD(timer->it_clock)) { is not taken and branch if (unlikely(sighand == NULL)) { is taken. In this case the process has been reaped and the timer is marked as disarmed anyway. So none of the postprocessing of the sample is required. Return right away. Signed-off-by: Alexey Dobriyan Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160707223911.GA26483@p183.telecom.by Signed-off-by: Thomas Gleixner kernel/time/posix-cpu-timers.c | 1 + 1 file changed, 1 insertion(+) commit 00c611def8748a0a1cf1d31842e49b42dfdb3de1 Author: Rafael J. Wysocki Date: Mon Jul 11 16:21:08 2016 +0200 Revert "ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis" Revert commit 3d4b7ae96d81 (ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis) that enabled the execution of module-level AML after loading each table (rather than after all AML tables have been loaded), but overlooked locking issues resulting from that change. Fixes: 3d4b7ae96d81 (ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis) Reported-by: Mika Westerberg Signed-off-by: Rafael J. Wysocki include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ffd8d61845c90cea87bc3efa58ddff1b14dea8f2 Author: Rafael J. Wysocki Date: Mon Jul 11 16:18:18 2016 +0200 Revert "ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading" Revert commit 2f38b1b16d92 (ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading) that attempted to fix a deadlock issue introduced by a previous commit, but it led to a lock ordering inconsistency that caused further problems to appear. Fixes: 2f38b1b16d92 (ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading) Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exconfig.c | 2 -- drivers/acpi/acpica/nsparse.c | 9 ++------- 2 files changed, 2 insertions(+), 9 deletions(-) commit e8807e4470e6b4230b24c537d7179a945f0f7c40 Author: Rafael J. Wysocki Date: Sun Jul 10 23:34:01 2016 +0200 Revert "ACPICA: Namespace: Fix namespace/interpreter lock ordering" Revert commit 45209046c47b (ACPICA: Namespace: Fix namespace/interpreter lock ordering) that renders Dell Precision 5510 with the latest (1.2.10) BIOS applied unable to boot. Fixes: 45209046c47b (ACPICA: Namespace: Fix namespace/interpreter lock ordering) Link: https://bugzilla.kernel.org/show_bug.cgi?id=121701 Reported-by: Greg White Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsload.c | 7 +------ drivers/acpi/acpica/nsparse.c | 9 +++++++-- 2 files changed, 8 insertions(+), 8 deletions(-) commit 4edfa9d0bf9ee9c34ee58b80ea1f146677497de9 Merge: c8607e0 3777ed6 Author: Pablo Neira Ayuso Date: Mon Jul 11 11:55:16 2016 +0200 Merge tag 'ipvs-fixes2-for-v4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/ipvs Simon Horman says: ==================== Second Round of IPVS Fixes for v4.7 The fix from Quentin Armitage allows the backup sync daemon to be bound to a link-local mcast IPv6 address as is already the case for IPv4. ==================== Signed-off-by: Pablo Neira Ayuso commit 92d21ac74a9e3c09b0b01c764e530657e4c85c49 Author: Linus Torvalds Date: Sun Jul 10 20:24:59 2016 -0700 Linux 4.7-rc7 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f556567036cb7f89aabe2f0954b08566b4efb53 Author: Hugh Dickins Date: Sun Jul 10 16:46:32 2016 -0700 tmpfs: fix regression hang in fallocate undo The well-spotted fallocate undo fix is good in most cases, but not when fallocate failed on the very first page. index 0 then passes lend -1 to shmem_undo_range(), and that has two bad effects: (a) that it will undo every fallocation throughout the file, unrestricted by the current range; but more importantly (b) it can cause the undo to hang, because lend -1 is treated as truncation, which makes it keep on retrying until every page has gone, but those already fully instantiated will never go away. Big thank you to xfstests generic/269 which demonstrates this. Fixes: b9b4bb26af01 ("tmpfs: don't undo fallocate past its last page") Cc: stable@vger.kernel.org Signed-off-by: Hugh Dickins Signed-off-by: Linus Torvalds mm/shmem.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit abb2bafd295fe962bbadc329dbfb2146457283ac Author: Lukas Wunner Date: Sun Jun 12 12:31:53 2016 +0200 x86/quirks: Add early quirk to reset Apple AirPort card The EFI firmware on Macs contains a full-fledged network stack for downloading OS X images from osrecovery.apple.com. Unfortunately on Macs introduced 2011 and 2012, EFI brings up the Broadcom 4331 wireless card on every boot and leaves it enabled even after ExitBootServices has been called. The card continues to assert its IRQ line, causing spurious interrupts if the IRQ is shared. It also corrupts memory by DMAing received packets, allowing for remote code execution over the air. This only stops when a driver is loaded for the wireless card, which may be never if the driver is not installed or blacklisted. The issue seems to be constrained to the Broadcom 4331. Chris Milsted has verified that the newer Broadcom 4360 built into the MacBookPro11,3 (2013/2014) does not exhibit this behaviour. The chances that Apple will ever supply a firmware fix for the older machines appear to be zero. The solution is to reset the card on boot by writing to a reset bit in its mmio space. This must be done as an early quirk and not as a plain vanilla PCI quirk to successfully combat memory corruption by DMAed packets: Matthew Garrett found out in 2012 that the packets are written to EfiBootServicesData memory (http://mjg59.dreamwidth.org/11235.html). This type of memory is made available to the page allocator by efi_free_boot_services(). Plain vanilla PCI quirks run much later, in subsys initcall level. In-between a time window would be open for memory corruption. Random crashes occurring in this time window and attributed to DMAed packets have indeed been observed in the wild by Chris Bainbridge. When Matthew Garrett analyzed the memory corruption issue in 2012, he sought to fix it with a grub quirk which transitions the card to D3hot: http://git.savannah.gnu.org/cgit/grub.git/commit/?id=9d34bb85da56 This approach does not help users with other bootloaders and while it may prevent DMAed packets, it does not cure the spurious interrupts emanating from the card. Unfortunately the card's mmio space is inaccessible in D3hot, so to reset it, we have to undo the effect of Matthew's grub patch and transition the card back to D0. Note that the quirk takes a few shortcuts to reduce the amount of code: The size of BAR 0 and the location of the PM capability is identical on all affected machines and therefore hardcoded. Only the address of BAR 0 differs between models. Also, it is assumed that the BCMA core currently mapped is the 802.11 core. The EFI driver seems to always take care of this. Michael Büsch, Bjorn Helgaas and Matt Fleming contributed feedback towards finding the best solution to this problem. The following should be a comprehensive list of affected models: iMac13,1 2012 21.5" [Root Port 00:1c.3 = 8086:1e16] iMac13,2 2012 27" [Root Port 00:1c.3 = 8086:1e16] Macmini5,1 2011 i5 2.3 GHz [Root Port 00:1c.1 = 8086:1c12] Macmini5,2 2011 i5 2.5 GHz [Root Port 00:1c.1 = 8086:1c12] Macmini5,3 2011 i7 2.0 GHz [Root Port 00:1c.1 = 8086:1c12] Macmini6,1 2012 i5 2.5 GHz [Root Port 00:1c.1 = 8086:1e12] Macmini6,2 2012 i7 2.3 GHz [Root Port 00:1c.1 = 8086:1e12] MacBookPro8,1 2011 13" [Root Port 00:1c.1 = 8086:1c12] MacBookPro8,2 2011 15" [Root Port 00:1c.1 = 8086:1c12] MacBookPro8,3 2011 17" [Root Port 00:1c.1 = 8086:1c12] MacBookPro9,1 2012 15" [Root Port 00:1c.1 = 8086:1e12] MacBookPro9,2 2012 13" [Root Port 00:1c.1 = 8086:1e12] MacBookPro10,1 2012 15" [Root Port 00:1c.1 = 8086:1e12] MacBookPro10,2 2012 13" [Root Port 00:1c.1 = 8086:1e12] For posterity, spurious interrupts caused by the Broadcom 4331 wireless card resulted in splats like this (stacktrace omitted): irq 17: nobody cared (try booting with the "irqpoll" option) handlers: [] pcie_isr [] sdhci_irq [sdhci] threaded [] sdhci_thread_irq [sdhci] [] azx_interrupt [snd_hda_codec] Disabling IRQ #17 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=79301 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111781 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=728916 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=895951#c16 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1009819 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1098621 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1149632#c5 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1279130 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1332732 Tested-by: Konstantin Simanov # [MacBookPro8,1] Tested-by: Lukas Wunner # [MacBookPro9,1] Tested-by: Bryan Paradis # [MacBookPro9,2] Tested-by: Andrew Worsley # [MacBookPro10,1] Tested-by: Chris Bainbridge # [MacBookPro10,2] Signed-off-by: Lukas Wunner Acked-by: Rafał Miłecki Acked-by: Matt Fleming Cc: Andy Lutomirski Cc: Bjorn Helgaas Cc: Borislav Petkov Cc: Brian Gerst Cc: Chris Milsted Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Matthew Garrett Cc: Michael Buesch Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yinghai Lu Cc: b43-dev@lists.infradead.org Cc: linux-pci@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: stable@vger.kernel.org Cc: stable@vger.kernel.org # 123456789abc: x86/quirks: Apply nvidia_bugs quirk only on root bus Cc: stable@vger.kernel.org # 123456789abc: x86/quirks: Reintroduce scanning of secondary buses Link: http://lkml.kernel.org/r/48d0972ac82a53d460e5fce77a07b2560db95203.1465690253.git.lukas@wunner.de [ Did minor readability edits. ] Signed-off-by: Ingo Molnar arch/x86/kernel/early-quirks.c | 64 ++++++++++++++++++++++++++++++++++++++++++ drivers/bcma/bcma_private.h | 2 -- include/linux/bcma/bcma.h | 1 + 3 files changed, 65 insertions(+), 2 deletions(-) commit 850c321027c2e31d0afc71588974719a4b565550 Author: Lukas Wunner Date: Sun Jun 12 12:31:53 2016 +0200 x86/quirks: Reintroduce scanning of secondary buses We used to scan secondary buses until the following commit that was applied in 2009: 8659c406ade3 ("x86: only scan the root bus in early PCI quirks") which commit constrained early quirks to the root bus only. Its motivation was to prevent application of the nvidia_bugs quirk on secondary buses. We're about to add a quirk to reset the Broadcom 4331 wireless card on 2011/2012 Macs, which is located on a secondary bus behind a PCIe root port. To facilitate that, reintroduce scanning of secondary buses. The commit message of 8659c406ade3 notes that scanning only the root bus "saves quite some unnecessary scanning work". The algorithm used prior to 8659c406ade3 was particularly time consuming because it scanned buses 0 to 31 brute force. To avoid lengthening boot time, employ a recursive strategy which only scans buses that are actually reachable from the root bus. Yinghai Lu pointed out that the secondary bus number read from a bridge's config space may be invalid, in particular a value of 0 would cause an infinite loop. The PCI core goes beyond that and recurses to a child bus only if its bus number is greater than the parent bus number (see pci_scan_bridge()). Since the root bus is numbered 0, this implies that secondary buses may not be 0. Do the same on early scanning. If this algorithm is found to significantly impact boot time or cause infinite loops on broken hardware, it would be possible to limit its recursion depth: The Broadcom 4331 quirk applies at depth 1, all others at depth 0, so the bus need not be scanned deeper than that for now. An alternative approach would be to revert to scanning only the root bus, and apply the Broadcom 4331 quirk to the root ports 8086:1c12, 8086:1e12 and 8086:1e16. Apple always positioned the card behind either of these three ports. The quirk would then check presence of the card in slot 0 below the root port and do its deed. Signed-off-by: Lukas Wunner Cc: Andy Lutomirski Cc: Bjorn Helgaas 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: Yinghai Lu Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/f0daa70dac1a9b2483abdb31887173eb6ab77bdf.1465690253.git.lukas@wunner.de Signed-off-by: Ingo Molnar arch/x86/kernel/early-quirks.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 447d29d1d3aed839e74c2401ef63387780ac51ed Author: Lukas Wunner Date: Sun Jun 12 12:31:53 2016 +0200 x86/quirks: Apply nvidia_bugs quirk only on root bus Since the following commit: 8659c406ade3 ("x86: only scan the root bus in early PCI quirks") ... early quirks are only applied to devices on the root bus. The motivation was to prevent application of the nvidia_bugs quirk on secondary buses. We're about to reintroduce scanning of secondary buses for a quirk to reset the Broadcom 4331 wireless card on 2011/2012 Macs. To prevent regressions, open code the requirement to apply nvidia_bugs only on the root bus. Signed-off-by: Lukas Wunner Cc: Andy Lutomirski Cc: Bjorn Helgaas 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: Yinghai Lu Link: http://lkml.kernel.org/r/4d5477c1d76b2f0387a780f2142bbcdd9fee869b.1465690253.git.lukas@wunner.de Signed-off-by: Ingo Molnar arch/x86/kernel/early-quirks.c | 7 +++++++ 1 file changed, 7 insertions(+) commit eb019503569c8c701f1e9c70e848d99c6680839b Author: Vegard Nossum Date: Sun Jul 10 19:14:01 2016 +0200 perf/x86: Fix bogus kernel printk, again This showed up as "6Failed to access..." here. Signed-off-by: Vegard Nossum Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Chen Yucong Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 1b74dde7c47c ("x86/cpu: Convert printk(KERN_ ...) to pr_(...)") Link: http://lkml.kernel.org/r/1468170841-17045-1-git-send-email-vegard.nossum@oracle.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 617a8d6bc19edd075e8111c6770f79cae75be51f Merge: ee40fb2 88d02a2 Author: Linus Torvalds Date: Sun Jul 10 09:13:02 2016 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fix from Ralf Baechle: "Another week with just a single 4.7 fix. This fixes a possible 'loss' of the huge page bit from pmd on permission change" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: Fix page table corruption on THP permission changes. commit 0ea5ad869c85ac604f3e022bf2c5bef54838433b Author: Josh Poimboeuf Date: Wed Jun 15 15:45:58 2016 -0500 objtool: Fix STACK_FRAME_NON_STANDARD macro checking for function symbols Mathieu Desnoyers reported that the STACK_FRAME_NON_STANDARD macro wasn't working with the lttng_filter_interpret_bytecode() function in the lttng-modules code. Usually the relocation created by STACK_FRAME_NON_STANDARD creates a reference to a section symbol like this: Offset Type Value Addend Name 000000000000000000 X86_64_64 000000000000000000 +3136 .text But in this case it created a reference to a function symbol: Offset Type Value Addend Name 000000000000000000 X86_64_64 0x00000000000003a0 +0 lttng_filter_interpret_bytecode To be honest I have no idea what causes gcc to decide to do one over the other. But both are valid ELF, so add support for the function symbol. Reported-by: Mathieu Desnoyers Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: lttng-dev@lists.lttng.org Link: http://lkml.kernel.org/r/9cee42843bc6d94e990a152e4e0319cfdf6756ef.1466023450.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar tools/objtool/builtin-check.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 95556a883834122c616bbeb942654d745ceb9712 Author: Eric Dumazet Date: Fri Jul 8 11:03:57 2016 +0200 dccp: avoid deadlock in dccp_v4_ctl_send_reset In the prep work I did before enabling BH while handling socket backlog, I missed two points in DCCP : 1) dccp_v4_ctl_send_reset() uses bh_lock_sock(), assuming BH were blocked. It is not anymore always true. 2) dccp_v4_route_skb() was using __IP_INC_STATS() instead of IP_INC_STATS() A similar fix was done for TCP, in commit 47dcc20a39d0 ("ipv4: tcp: ip_send_unicast_reply() is not BH safe") Fixes: 7309f8821fd6 ("dccp: do not assume DCCP code is non preemptible") Fixes: 5413d1babe8f ("net: do not block BH while processing socket backlog") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Signed-off-by: David S. Miller net/dccp/ipv4.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 03addc2bcebd953e74c52f0664629032fd9767e9 Merge: 5b58d83 65dc689 Author: David S. Miller Date: Sat Jul 9 17:42:18 2016 -0400 Merge branch 'ibmvnic-fixes' Thomas Falcon says: ==================== ibmvnic driver bugfixes and improvements Miscellaneous fixes and improvements on the ibmvnic driver. ==================== Signed-off-by: David S. Miller commit 65dc689182ec5117896d876cc03405ac51427314 Author: Thomas Falcon Date: Wed Jul 6 15:35:18 2016 -0500 ibmvnic: Fix passive VNIC server login process In some cases, if there is no VNIC server available during the driver probe, the driver should wait until it receives an initialization request from the VNIC Server to start the login process. Recent testing has show that this is incorrectly handled in the current driver. The proposed solution handles this initialization request by scheduling a task in the shared workqueue that completes the login process and registers the net device. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 61 ++++++++++++++++++++++++++++++++++++-- drivers/net/ethernet/ibm/ibmvnic.h | 2 ++ 2 files changed, 61 insertions(+), 2 deletions(-) commit ea22d51a7831b062978fcf07c3c5ac7ecbb6cbeb Author: Thomas Falcon Date: Wed Jul 6 15:35:17 2016 -0500 ibmvnic: simplify and improve driver probe function This patch creates a function that handles sub-CRQ IRQ creation separately from sub-CRQ initialization. Another function is then needed to release sub-CRQ resources prior to sub-CRQ IRQ creation. These additions allow the driver probe function to be simplified, specifically during the VNIC Server login process. A timeout is also included while waiting for completion of the login process in case the VNIC Server is not available or some other error occurs. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 159 ++++++++++++++++++++++++------------- 1 file changed, 103 insertions(+), 56 deletions(-) commit 88eb98a0178219e1d6e9037b71d293f19b89eef2 Author: Thomas Falcon Date: Wed Jul 6 15:35:16 2016 -0500 ibmvnic: dispose irq mappings IRQ mappings were not being properly disposed when releasing sub-CRQ's. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 2 ++ 1 file changed, 2 insertions(+) commit b8efb894e672bd0080126c68a076ddcacfcbc0ef Author: Thomas Falcon Date: Wed Jul 6 15:35:15 2016 -0500 ibmvnic: properly start and stop tx queues Since ibmvnic uses multiple tx queues, start and stop all queues when opening and closing devices. Signed-off-by: Thomas Falcon Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 8709ed4d4b0eab04561c1ec9e6ea50fd1e3897ff Author: Dave Hansen Date: Fri Jun 17 17:15:03 2016 -0700 x86/cpu: Fix duplicated X86_BUG(9) macro cpufeatures.h currently defines X86_BUG(9) twice on 32-bit: #define X86_BUG_NULL_SEG X86_BUG(9) /* Nulling a selector preserves the base */ ... #ifdef CONFIG_X86_32 #define X86_BUG_ESPFIX X86_BUG(9) /* "" IRET to 16-bit SS corrupts ESP/RSP high bits */ #endif I think what happened was that this added the X86_BUG_ESPFIX, but in an #ifdef below most of the bugs: 58a5aac53313 x86/entry/32: Introduce and use X86_BUG_ESPFIX instead of paravirt_enabled Then this came along and added X86_BUG_NULL_SEG, but collided with the earlier one that did the bug below the main block defining all the X86_BUG()s. 7a5d67048745 x86/cpu: Probe the behavior of nulling out a segment at boot time Signed-off-by: Dave Hansen Acked-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Dave Hansen Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160618001503.CEE1B141@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/cpufeatures.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 5b58d8361764fc627e19aef1319f5ac7a0d7bf6f Merge: 92f7d07 16a910a Author: David S. Miller Date: Fri Jul 8 23:53:41 2016 -0400 Merge tag 'mac80211-for-davem-2016-07-06' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Two more fixes: * handle allocation failures in new(ish) A-MSDU decapsulation * don't leak memory on nl80211 ACL parse errors ==================== Signed-off-by: David S. Miller commit 92f7d07d68c1dfcbb80b3259f29dad8efe890803 Author: hayeswang Date: Wed Jul 6 17:35:59 2016 +0800 r8152: remove the setting of LAN_WAKE_EN The LAN_WAKE_EN is not used to determine if the device could support WOL. It is used to signal a GPIO pin when a WOL event occurs. The WOL still works even though it is disabled. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 205e1e255c479f3fd77446415706463b282f94e4 Author: WANG Cong Date: Tue Jul 5 22:12:36 2016 -0700 ppp: defer netns reference release for ppp channel Matt reported that we have a NULL pointer dereference in ppp_pernet() from ppp_connect_channel(), i.e. pch->chan_net is NULL. This is due to that a parallel ppp_unregister_channel() could happen while we are in ppp_connect_channel(), during which pch->chan_net set to NULL. Since we need a reference to net per channel, it makes sense to sync the refcnt with the life time of the channel, therefore we should release this reference when we destroy it. Fixes: 1f461dcdd296 ("ppp: take reference on channels netns") Reported-by: Matt Bennett Cc: Paul Mackerras Cc: linux-ppp@vger.kernel.org Cc: Guillaume Nault Cc: Cyrill Gorcunov Signed-off-by: Cong Wang Reviewed-by: Cyrill Gorcunov Signed-off-by: David S. Miller drivers/net/ppp/ppp_generic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 06708f81528725148473c0869d6af5f809c6824b Author: Dmitri Epshtein Date: Wed Jul 6 04:18:58 2016 +0200 net: mvneta: set real interrupt per packet for tx_done Commit aebea2ba0f74 ("net: mvneta: fix Tx interrupt delay") intended to set coalescing threshold to a value guaranteeing interrupt generation per each sent packet, so that buffers can be released with no delay. In fact setting threshold to '1' was wrong, because it causes interrupt every two packets. According to the documentation a reason behind it is following - interrupt occurs once sent buffers counter reaches a value, which is higher than one specified in MVNETA_TXQ_SIZE_REG(q). This behavior was confirmed during tests. Also when testing the SoC working as a NAS device, better performance was observed with int-per-packet, as it strongly depends on the fact that all transmitted packets are released immediately. This commit enables NETA controller work in interrupt per sent packet mode by setting coalescing threshold to 0. Signed-off-by: Dmitri Epshtein Signed-off-by: Marcin Wojtas Cc: # v3.10+ Fixes aebea2ba0f74 ("net: mvneta: fix Tx interrupt delay") Acked-by: Willy Tarreau Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee40fb2948fc99096836995d4f3ddcc0efbac790 Merge: b987c75 ea1a25c Author: Linus Torvalds Date: Fri Jul 8 18:59:46 2016 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Three fixes. One is the qla24xx MSI regression, one is a theoretical problem over blacklist matching, which would bite USB badly if it ever triggered and one is a system hang with a particular type of IPR device" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: qla2xxx: Fix NULL pointer deref in QLA interrupt SCSI: fix new bug in scsi_dev_info_list string matching ipr: Clear interrupt on croc/crocodile when running with LSI commit fa5b4a509d7bbba5d45c8ea177bddfd0b618876a Author: Lv Zheng Date: Fri Jul 8 09:25:05 2016 +0800 ACPI / EC: Fix code ordering issue in ec_remove_handlers() There is an order issue in ec_remove_handlers() that acpi_ec_stop() is called before removing the operation region handler. That is incorrect, because the operation region handler removal triggers _REG(DISCONNECT) which may result in new EC transactions to carry out. That existing issue has been triggered by the following commit: Commit: dcf15cbded656a12335bc4151f3f75f10080a375 Subject: ACPI / EC: Fix a boot EC regresion by restoring boot EC which changed the driver to call ec_remove_handlers() after invoking _REG(CONNECT), so the issue has become visible. Fixes: dcf15cbded65 (ACPI / EC: Fix a boot EC regresion by restoring boot EC) Link: https://bugzilla.kernel.org/show_bug.cgi?id=102421 Reported-and-tested-by: Wolfram Sang Reported-by: Nicholas Signed-off-by: Lv Zheng [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/ec.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit b987c759d21a1c7551357e3bc74e7f8026e696a2 Merge: b89c44b f0fe970 Author: Linus Torvalds Date: Fri Jul 8 09:48:28 2016 -0700 Merge tag 'ecryptfs-4.7-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs Pull eCryptfs fixes from Tyler Hicks: "Provide a more concise fix for CVE-2016-1583: - Additionally fixes linux-stable regressions caused by the cherry-picking of the original fix Some very minor changes that have queued up: - Fix typos in code comments - Remove unnecessary check for NULL before destroying kmem_cache" * tag 'ecryptfs-4.7-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs: ecryptfs: don't allow mmap when the lower fs doesn't support it Revert "ecryptfs: forbid opening files without mmap handler" ecryptfs: fix spelling mistakes eCryptfs: fix typos in comment ecryptfs: drop null test before destroy functions commit b89c44bb233b51c3f03eaff22802a70036edf7cd Merge: cfae7e3 522e5cb7 Author: Linus Torvalds Date: Fri Jul 8 09:35:23 2016 -0700 Merge tag 'iommu-fixes-v4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "Two Fixes: - Intel VT-d fix for a suspend/resume issue, introduced with the scalability improvements in this cycle. - AMD IOMMU fix for systems that have unity mappings defined. There was a race where translation got enabled before the unity mappings were in place. This issue was seen on some HP servers" * tag 'iommu-fixes-v4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Fix unity mapping initialization race iommu/vt-d: Fix infinite loop in free_all_cpu_cached_iovas commit cfae7e3eb1334ff8035bb66f307f3d4010e65646 Merge: 267ba96 6f2d9d9 Author: Linus Torvalds Date: Fri Jul 8 09:12:41 2016 -0700 Merge tag 'for-linus-4.7b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen bug fixes from David Vrabel: - Fix two bugs in the handling of xenbus transactions. - Make the xen acpi driver compatible with Xen 4.7. * tag 'for-linus-4.7b-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/acpi: allow xen-acpi-processor driver to load on Xen 4.7 xenbus: simplify xenbus_dev_request_and_reply() xenbus: don't bail early from xenbus_dev_request_and_reply() xenbus: don't BUG() on user mode induced condition commit 267ba96492c897970471cbe64f748e3f46ae71cf Merge: a017f58 47c459b Author: Linus Torvalds Date: Fri Jul 8 09:08:27 2016 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "A couple of late fixes here, but one that we've been sitting on for a few weeks while the details were worked out. Specifically, we now enforce USER_DS on taking exceptions whilst in the kernel, which avoids leaking kernel data to userspace through things like perf. The other patch is an update to a workaround for a hardware erratum on some Cavium SoCs. Summary: - Enforce USER_DS on exception entry from EL1 - Apply workaround for Cavium errata #27456 on Thunderx-81xx parts" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: Enable workaround for Cavium erratum 27456 on thunderx-81xx arm64: kernel: Save and restore UAO and addr_limit on exception entry commit a017f583ec87d40b06eee6a6beeabe879c8113dd Merge: 369da7f c76a093 Author: Linus Torvalds Date: Fri Jul 8 09:06:52 2016 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Three fixes: - A boot crash fix with certain configs - a MAINTAINERS entry update - Documentation typo fixes" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/Documentation: Fix various typos in Documentation/x86/ files x86/amd_nb: Fix boot crash on non-AMD systems MAINTAINERS: Update the Calgary IOMMU entry commit 369da7fc6d627aca19baec09ebe4486c69aef5f2 Merge: 612807f ea1dc6f Author: Linus Torvalds Date: Fri Jul 8 09:04:34 2016 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Two load-balancing fixes for cgroups-intense workloads" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/fair: Fix calc_cfs_shares() fixed point arithmetics width confusion sched/fair: Fix effective_load() to consistently use smoothed load commit 612807fe28abb0a04a627684fb5d4d23108edb1b Merge: 977dcf0 2c81a64 Author: Linus Torvalds Date: Fri Jul 8 09:02:16 2016 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "Various fixes: - 32-bit callgraph bug fix - suboptimal event group scheduling bug fix - event constraint fixes for Broadwell/Skylake - RAPL module name collision fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Fix pmu::filter_match for SW-led groups x86/perf/intel/rapl: Fix module name collision with powercap intel-rapl perf/x86: Fix 32-bit perf user callgraph collection perf/x86/intel: Update event constraints when HT is off commit 977dcf0c475eaefa334f6bf6b63d27742d0eade5 Merge: 18b1667 547aefc Author: Linus Torvalds Date: Fri Jul 8 08:59:33 2016 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Ingo Molnar: "Two MIPS-GIC irqchip driver fixes to unbreak certain MIPS boards" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mips-gic: Match IPI IRQ domain by bus token only irqchip/mips-gic: Map to VPs using HW VPNum commit 18b16676c36ae6e438ddb543bbb45accbbc4f901 Merge: 1d110cf 92c74bc Author: Linus Torvalds Date: Fri Jul 8 08:57:03 2016 -0700 Merge tag 'gpio-v4.7-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "I don't like to toss in last minute patches, but these are all for things that are broken, and have bitten people for real. Two of them go into stable. Maybe all of them if the compile test problem is a pain in the ass also for stable folks. Final (hopefully) GPIO fixes for v4.7: - Fix an oops on the Asus Eee PC 1201 - Revert a patch trying to split GPIO parsing and GPIO configuration - Revert a too liberal compile testing thing" * tag 'gpio-v4.7-5' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: Revert "gpio: gpiolib-of: Allow compile testing" Revert "gpiolib: Split GPIO flags parsing and GPIO configuration" gpio: sch: Fix Oops on module load on Asus Eee PC 1201 commit 1d110cf5d307bd52e826a2ceaa7daab83be61b7a Merge: cc23c61 39c8859 Author: Linus Torvalds Date: Fri Jul 8 08:55:27 2016 -0700 Merge tag 'drm-fixes-for-v4.7-rc7' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "One nouveau fix, and a few AMD Polaris fixes and some Allwinner fixes. I've got some vmware fixes that I might send separate over the weekend, they fix some black screens, but I'm still debating them" * tag 'drm-fixes-for-v4.7-rc7' of git://people.freedesktop.org/~airlied/linux: drm/amd/powerplay: Update CKS on/ CKS off voltage offset calculation. drm/amd/powerplay: fix bug that get wrong polaris evv voltage. drm/amd/powerplay: incorrectly use of the function return value drm/amd/powerplay: fix incorrect voltage table value for tonga drm/amd/powerplay: fix incorrect voltage table value for polaris10 drm/nouveau/disp/sor/gf119: select correct sor when poking training pattern gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle drm/sun4i: Send vblank event when the CRTC is disabled drm/sun4i: Report proper vblank commit f0fe970df3838c202ef6c07a4c2b36838ef0a88b Author: Jeff Mahoney Date: Tue Jul 5 17:32:30 2016 -0400 ecryptfs: don't allow mmap when the lower fs doesn't support it There are legitimate reasons to disallow mmap on certain files, notably in sysfs or procfs. We shouldn't emulate mmap support on file systems that don't offer support natively. CVE-2016-1583 Signed-off-by: Jeff Mahoney Cc: stable@vger.kernel.org [tyhicks: clean up f_op check by using ecryptfs_file_to_lower()] Signed-off-by: Tyler Hicks fs/ecryptfs/file.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 58541f7a6458e17ab417321b284f0090f530aa91 Author: Sinclair Yeh Date: Thu Jul 7 11:01:30 2016 -0700 drm/vmwgfx: Fix error paths when mapping framebuffer Rather than returning immediately, make sure to unlock the mutexes first. Signed-off-by: Sinclair Yeh Reviewed-by: Charmaine Lee Reported-by: Emil Velikov Cc: drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f2d9d99213514360034c6d52d2c3919290b3504 Author: Jan Beulich Date: Fri Jul 8 06:15:07 2016 -0600 xen/acpi: allow xen-acpi-processor driver to load on Xen 4.7 As of Xen 4.7 PV CPUID doesn't expose either of CPUID[1].ECX[7] and CPUID[0x80000007].EDX[7] anymore, causing the driver to fail to load on both Intel and AMD systems. Doing any kind of hardware capability checks in the driver as a prerequisite was wrong anyway: With the hypervisor being in charge, all such checking should be done by it. If ACPI data gets uploaded despite some missing capability, the hypervisor is free to ignore part or all of that data. Ditch the entire check_prereq() function, and do the only valid check (xen_initial_domain()) in the caller in its place. Signed-off-by: Jan Beulich Cc: Signed-off-by: David Vrabel drivers/xen/xen-acpi-processor.c | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) commit c8607e020014cf11a61601a0005270bad81cabdf Author: Florian Westphal Date: Wed Jul 6 14:53:06 2016 +0200 netfilter: nft_ct: fix expiration getter We need to compute timeout.expires - jiffies, not the other way around. Add a helper, another patch can then later change more places in conntrack code where we currently open-code this. Will allow us to only change one place later when we remove per-ct timer. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso include/net/netfilter/nf_conntrack.h | 8 ++++++++ net/netfilter/nft_ct.c | 6 +----- 2 files changed, 9 insertions(+), 5 deletions(-) commit e5a79475a7ae171fef82608c6e11f51bb85a6745 Author: Jan Beulich Date: Thu Jul 7 01:32:35 2016 -0600 xenbus: simplify xenbus_dev_request_and_reply() No need to retain a local copy of the full request message, only the type is really needed. Signed-off-by: Jan Beulich Signed-off-by: David Vrabel drivers/xen/xenbus/xenbus_xs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 7469be95a487319514adce2304ad2af3553d2fc9 Author: Jan Beulich Date: Thu Jul 7 01:32:04 2016 -0600 xenbus: don't bail early from xenbus_dev_request_and_reply() xenbus_dev_request_and_reply() needs to track whether a transaction is open. For XS_TRANSACTION_START messages it calls transaction_start() and for XS_TRANSACTION_END messages it calls transaction_end(). If sending an XS_TRANSACTION_START message fails or responds with an an error, the transaction is not open and transaction_end() must be called. If sending an XS_TRANSACTION_END message fails, the transaction is still open, but if an error response is returned the transaction is closed. Commit 027bd7e89906 ("xen/xenbus: Avoid synchronous wait on XenBus stalling shutdown/restart") introduced a regression where failed XS_TRANSACTION_START messages were leaving the transaction open. This can cause problems with suspend (and migration) as all transactions must be closed before suspending. It appears that the problematic change was added accidentally, so just remove it. Signed-off-by: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Signed-off-by: David Vrabel drivers/xen/xenbus/xenbus_xs.c | 3 --- 1 file changed, 3 deletions(-) commit a8ff48cb70835f48de5703052760312019afea55 Author: Takashi Iwai Date: Fri Jul 8 08:23:43 2016 +0200 ALSA: pcm: Free chmap at PCM free callback, too The chmap ctls assigned to PCM streams are freed in the PCM disconnect callback. However, since the disconnect callback isn't called when the card gets freed before registering, the chmap ctls may still be left assigned. They are eventually freed together with other ctls, but it may cause an Oops at pcm_chmap_ctl_private_free(), as the function refers to the assigned PCM stream, while the PCM objects have been already freed beforehand. The fix is to free the chmap ctls also at PCM free callback, not only at PCM disconnect. Reported-by: Laxminath Kasam Cc: Signed-off-by: Takashi Iwai sound/core/pcm.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) commit f388cdcdd160687c6650833f286b9c89c50960ff Author: Takashi Iwai Date: Fri Jul 8 08:05:19 2016 +0200 ALSA: ctl: Stop notification after disconnection snd_ctl_remove() has a notification for the removal event. It's superfluous when done during the device got disconnected. Although the notification itself is mostly harmless, it may potentially be harmful, and should be suppressed. Actually some components PCM may free ctl elements during the disconnect or free callbacks, thus it's no theoretical issue. This patch adds the check of card->shutdown flag for avoiding unnecessary notifications after (or during) the disconnect. Cc: Signed-off-by: Takashi Iwai sound/core/control.c | 2 ++ 1 file changed, 2 insertions(+) commit 8a132099f080d7384bb6ab4cc168f76cb4b47d08 Author: Hui Wang Date: Fri Jul 8 14:26:57 2016 +0800 ALSA: hda/realtek - add new pin definition in alc225 pin quirk table We have some Dell laptops which can't detect headset mic, the machines use the codec ALC225, they have some new pin configuration values, after adding them in the alc225 pin quirk table, they work well. Cc: Signed-off-by: Hui Wang Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit cc23c619f8da3ccbe6a856c79fb5a3d245b68daf Merge: 7ed18e2 30a46a4 Author: Linus Torvalds Date: Thu Jul 7 20:56:09 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull apparmor fix from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: apparmor: fix oops, validate buffer size in apparmor_setprocattr() commit 7ed18e2d1b6782989eb399ef79a8cc1a1b583b3c Merge: c09230f b6d9015 Author: Linus Torvalds Date: Thu Jul 7 20:49:41 2016 -0700 Merge tag 'acpi-4.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "All of these fix recent regressions in ACPICA, in the ACPI PCI IRQ management code and in the ACPI AML debugger. Specifics: - Fix a lock ordering issue in ACPICA introduced by a recent commit that attempted to fix a deadlock in the dynamic table loading code which in turn appeared after changes related to the handling of module-level AML also made in this cycle (Lv Zheng). - Fix a recent regression in the ACPI IRQ management code that may cause PCI drivers to be unable to register an IRQ if that IRQ happens to be shared with a device on the ISA bus, like the parallel port, by reverting one commit entirely and restoring the previous behavior in two other places (Sinan Kaya). - Fix a recent regression in the ACPI AML debugger introduced by the commit that removed incorrect usage of IS_ERR_VALUE() from multiple places (Lv Zheng)" * tag 'acpi-4.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / debugger: Fix regression introduced by IS_ERR_VALUE() removal ACPICA: Namespace: Fix namespace/interpreter lock ordering ACPI,PCI,IRQ: separate ISA penalty calculation Revert "ACPI, PCI, IRQ: remove redundant code in acpi_irq_penalty_init()" ACPI,PCI,IRQ: factor in PCI possible commit c09230f30876589e246c83a4b4649e60534638cf Merge: ac904ae 7fe39a2 Author: Linus Torvalds Date: Thu Jul 7 20:46:48 2016 -0700 Merge tag 'pm-4.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "One fix for a recent cpuidle core change that, against all odds, introduced a functional regression on Power systems and the fix for the crash during resume from hibernation on x86-64 that has been in the works for the last few weeks (it actually was ready last week, but I wanted to allow the reporters to test if for some more time). Specifics: - Fix a recent performance regression on Power systems (powernv and pseries) introduced by a core cpuidle commit that decreased the precision of the last_residency conversion from nano- to microseconds, which should not matter in theory, but turned out to play not-so-well with the special "snooze" idle state on Power (Shreyas B Prabhu). - Fix a crash during resume from hibernation on x86-64 caused by possible corruption of the kernel text part of page tables in the last phase of image restoration exposed by a security-related change during the 4.3 development cycle (Rafael Wysocki)" * tag 'pm-4.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpuidle: Fix last_residency division x86/power/64: Fix kernel text mapping corruption during image restoration commit 39c8859418d5d2d29482fcd7d58daba6e299fac5 Merge: 27c0b74 3b8e64f Author: Dave Airlie Date: Fri Jul 8 13:29:11 2016 +1000 Merge tag 'sunxi-drm-fixes-for-4.7-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-fixes Allwinner DRM driver fixes for 4.7, take 2 A new set of fixes for the sun4i driver, mostly related to vblank handling, and a minor fix to release a reference on the device tree nodes we're parsing in the probe logic. * tag 'sunxi-drm-fixes-for-4.7-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle drm/sun4i: Send vblank event when the CRTC is disabled drm/sun4i: Report proper vblank commit 30a46a4647fd1df9cf52e43bf467f0d9265096ca Author: Vegard Nossum Date: Thu Jul 7 13:41:11 2016 -0700 apparmor: fix oops, validate buffer size in apparmor_setprocattr() When proc_pid_attr_write() was changed to use memdup_user apparmor's (interface violating) assumption that the setprocattr buffer was always a single page was violated. The size test is not strictly speaking needed as proc_pid_attr_write() will reject anything larger, but for the sake of robustness we can keep it in. SMACK and SELinux look safe to me, but somebody else should probably have a look just in case. Based on original patch from Vegard Nossum modified for the case that apparmor provides null termination. Fixes: bb646cdb12e75d82258c2f2e7746d5952d3e321a Reported-by: Vegard Nossum Cc: Al Viro Cc: John Johansen Cc: Paul Moore Cc: Stephen Smalley Cc: Eric Paris Cc: Casey Schaufler Cc: stable@kernel.org Signed-off-by: John Johansen Reviewed-by: Tyler Hicks Signed-off-by: James Morris security/apparmor/lsm.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) commit 78c4e172412de5d0456dc00d2b34050aa0b683b5 Author: Jeff Mahoney Date: Tue Jul 5 17:32:29 2016 -0400 Revert "ecryptfs: forbid opening files without mmap handler" This reverts commit 2f36db71009304b3f0b95afacd8eba1f9f046b87. It fixed a local root exploit but also introduced a dependency on the lower file system implementing an mmap operation just to open a file, which is a bit of a heavy hammer. The right fix is to have mmap depend on the existence of the mmap handler instead. Signed-off-by: Jeff Mahoney Cc: stable@vger.kernel.org Signed-off-by: Tyler Hicks fs/ecryptfs/kthread.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) commit ac904ae6e6f0a56be7b9a1cf66fbd50dd025fb06 Merge: 4c2a849 8ba8682 Author: Linus Torvalds Date: Thu Jul 7 15:34:09 2016 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block IO fixes from Jens Axboe: "Three small fixes that have been queued up and tested for this series: - A bug fix for xen-blkfront from Bob Liu, fixing an issue with incomplete requests during migration. - A fix for an ancient issue in retrieving the IO priority of a different PID than self, preventing that task from going away while we access it. From Omar. - A writeback fix from Tahsin, fixing a case where we'd call ihold() with a zero ref count inode" * 'for-linus' of git://git.kernel.dk/linux-block: block: fix use-after-free in sys_ioprio_get() writeback: inode cgroup wb switch should not call ihold() xen-blkfront: save uncompleted reqs in blkfront_resume() commit 4c2a8499a450b6582eb5637a8f0d472168355ddd Merge: 076501f f860898 Author: Linus Torvalds Date: Thu Jul 7 15:32:17 2016 -0700 Merge tag 'configfs-for-4.7' of git://git.infradead.org/users/hch/configfs Pull configfs fix from Christoph Hellwig: "A fix from Marek for ppos handling in configfs_write_bin_file, which was introduced in Linux 4.5, but didn't have any users until recently" * tag 'configfs-for-4.7' of git://git.infradead.org/users/hch/configfs: configfs: Remove ppos increment in configfs_write_bin_file commit b6d90158c935d4a22e56f41647b479ab5ea449d4 Merge: 4520904 f7eca37 7e3fd81 Author: Rafael J. Wysocki Date: Thu Jul 7 23:37:37 2016 +0200 Merge branches 'acpica-fixes', 'acpi-pci-fixes' and 'acpi-debug-fixes' * acpica-fixes: ACPICA: Namespace: Fix namespace/interpreter lock ordering * acpi-pci-fixes: ACPI,PCI,IRQ: separate ISA penalty calculation Revert "ACPI, PCI, IRQ: remove redundant code in acpi_irq_penalty_init()" ACPI,PCI,IRQ: factor in PCI possible * acpi-debug-fixes: ACPI / debugger: Fix regression introduced by IS_ERR_VALUE() removal commit 7fe39a21557b251e101671f2c3f79558a756afef Merge: a99cde4 dbd1b8e 65c0554 Author: Rafael J. Wysocki Date: Thu Jul 7 23:17:20 2016 +0200 Merge branches 'pm-cpuidle-fixes' and 'pm-sleep-fixes' * pm-cpuidle-fixes: cpuidle: Fix last_residency division * pm-sleep-fixes: x86/power/64: Fix kernel text mapping corruption during image restoration commit 3777ed688fba82d0bd43f9fc1ebbc6abe788576d Author: Quentin Armitage Date: Thu Jun 16 08:00:14 2016 +0100 ipvs: fix bind to link-local mcast IPv6 address in backup When using HEAD from https://git.kernel.org/cgit/utils/kernel/ipvsadm/ipvsadm.git/, the command: ipvsadm --start-daemon backup --mcast-interface eth0.60 \ --mcast-group ff02::1:81 fails with the error message: Argument list too long whereas both: ipvsadm --start-daemon master --mcast-interface eth0.60 \ --mcast-group ff02::1:81 and: ipvsadm --start-daemon backup --mcast-interface eth0.60 \ --mcast-group 224.0.0.81 are successful. The error message "Argument list too long" isn't helpful. The error occurs because an IPv6 address is given in backup mode. The error is in make_receive_sock() in net/netfilter/ipvs/ip_vs_sync.c, since it fails to set the interface on the address or the socket before calling inet6_bind() (via sock->ops->bind), where the test 'if (!sk->sk_bound_dev_if)' failed. Setting sock->sk->sk_bound_dev_if on the socket before calling inet6_bind() resolves the issue. Fixes: d33288172e72 ("ipvs: add more mcast parameters for the sync daemon") Signed-off-by: Quentin Armitage Acked-by: Julian Anastasov Signed-off-by: Simon Horman net/netfilter/ipvs/ip_vs_sync.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 47c459beabe969c6751e2ea8d1f85c5fa1652d6c Author: Ganapatrao Kulkarni Date: Thu Jul 7 10:18:17 2016 +0530 arm64: Enable workaround for Cavium erratum 27456 on thunderx-81xx Cavium erratum 27456 commit 104a0c02e8b1 ("arm64: Add workaround for Cavium erratum 27456") is applicable for thunderx-81xx pass1.0 SoC as well. Adding code to enable to 81xx. Signed-off-by: Ganapatrao Kulkarni Reviewed-by: Andrew Pinski Signed-off-by: Will Deacon arch/arm64/include/asm/cputype.h | 2 ++ arch/arm64/kernel/cpu_errata.c | 6 ++++++ 2 files changed, 8 insertions(+) commit e19a6ee2460bdd0d0055a6029383422773f9999a Author: James Morse Date: Mon Jun 20 18:28:01 2016 +0100 arm64: kernel: Save and restore UAO and addr_limit on exception entry If we take an exception while at EL1, the exception handler inherits the original context's addr_limit and PSTATE.UAO values. To be consistent always reset addr_limit and PSTATE.UAO on (re-)entry to EL1. This prevents accidental re-use of the original context's addr_limit. Based on a similar patch for arm from Russell King. Cc: # 4.6- Acked-by: Will Deacon Reviewed-by: Mark Rutland Signed-off-by: James Morse Signed-off-by: Will Deacon arch/arm64/include/asm/ptrace.h | 2 ++ arch/arm64/kernel/asm-offsets.c | 1 + arch/arm64/kernel/entry.S | 19 +++++++++++++++++-- arch/arm64/mm/fault.c | 3 ++- 4 files changed, 22 insertions(+), 3 deletions(-) commit 0beef634b86a1350c31da5fcc2992f0d7c8a622b Author: Jan Beulich Date: Thu Jul 7 01:23:57 2016 -0600 xenbus: don't BUG() on user mode induced condition Inability to locate a user mode specified transaction ID should not lead to a kernel crash. For other than XS_TRANSACTION_START also don't issue anything to xenbus if the specified ID doesn't match that of any active transaction. Signed-off-by: Jan Beulich Cc: Signed-off-by: David Vrabel drivers/xen/xenbus/xenbus_dev_frontend.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 2c81a6477081966fe80b8c6daa68459bca896774 Author: Mark Rutland Date: Tue Jun 14 16:10:41 2016 +0100 perf/core: Fix pmu::filter_match for SW-led groups The following commit: 66eb579e66ec ("perf: allow for PMU-specific event filtering") added the pmu::filter_match() callback. This was intended to avoid HW constraints on events from resulting in extremely pessimistic scheduling. However, pmu::filter_match() is only called for the leader of each event group. When the leader is a SW event, we do not filter the groups, and may fail at pmu::add() time, and when this happens we'll give up on scheduling any event groups later in the list until they are rotated ahead of the failing group. This can result in extremely sub-optimal event scheduling behaviour, e.g. if running the following on a big.LITTLE platform: $ taskset -c 0 ./perf stat \ -e 'a57{context-switches,armv8_cortex_a57/config=0x11/}' \ -e 'a53{context-switches,armv8_cortex_a53/config=0x11/}' \ ls context-switches (0.00%) armv8_cortex_a57/config=0x11/ (0.00%) 24 context-switches (37.36%) 57589154 armv8_cortex_a53/config=0x11/ (37.36%) Here the 'a53' event group was always eligible to be scheduled, but the 'a57' group never eligible to be scheduled, as the task was always affine to a Cortex-A53 CPU. The SW (group leader) event in the 'a57' group was eligible, but the HW event failed at pmu::add() time, resulting in ctx_flexible_sched_in giving up on scheduling further groups with HW events. One way of avoiding this is to check pmu::filter_match() on siblings as well as the group leader. If any of these fail their pmu::filter_match() call, we must skip the entire group before attempting to add any events. Signed-off-by: Mark Rutland 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: Thomas Gleixner Cc: Will Deacon Fixes: 66eb579e66ec ("perf: allow for PMU-specific event filtering") Link: http://lkml.kernel.org/r/1465917041-15339-1-git-send-email-mark.rutland@arm.com [ Small readability edits. ] Signed-off-by: Ingo Molnar kernel/events/core.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) commit 5eb495349f5ec3b134f7341a2450392fc86d99d0 Author: Lucas Stach Date: Thu Jun 30 17:32:08 2016 +0200 ARM: tegra: beaver: Allow SD card voltage to be changed This allows to switch the card signal voltage level to 1.8 V, which is needed for any ultra high speed modes to work. Signed-off-by: Lucas Stach Acked-by: Jon Hunter Signed-off-by: Thierry Reding Signed-off-by: Olof Johansson arch/arm/boot/dts/tegra30-beaver.dts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 27c0b7419c3a9249b72a67f2c575e22aedd67a67 Merge: fd508702 2172150 Author: Dave Airlie Date: Thu Jul 7 12:40:12 2016 +1000 Merge branch 'linux-4.7' of git://github.com/skeggsb/linux into drm-fixes Just one fix for a stupid thinko in a DP training pattern commit. * 'linux-4.7' of git://github.com/skeggsb/linux: drm/nouveau/disp/sor/gf119: select correct sor when poking training pattern commit fd50870296d6e73ff277d9f1a518d68c95d17f63 Merge: a99cde4 ab6bad0 Author: Dave Airlie Date: Thu Jul 7 12:37:42 2016 +1000 Merge branch 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Just a couple of fixes for amdgpu for 4.7: - 2 small tonga powerplay fixes - Additional Polaris fixes * 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: Update CKS on/ CKS off voltage offset calculation. drm/amd/powerplay: fix bug that get wrong polaris evv voltage. drm/amd/powerplay: incorrectly use of the function return value drm/amd/powerplay: fix incorrect voltage table value for tonga drm/amd/powerplay: fix incorrect voltage table value for polaris10 commit 076501ff6ba265a473689c112eda9f1f34f620b5 Author: Randy Dunlap Date: Wed Jul 6 16:06:53 2016 -0700 init/Kconfig: keep Expert users menu together The "expert" menu was broken (split) such that all entries in it after KALLSYMS were displayed in the "General setup" area instead of in the "Expert users" area. Fix this by adding one kconfig dependency. Yes, the Expert users menu is fragile. Problems like this have happened several times in the past. I will attempt to isolate the Expert users menu if there is interest in that. Fixes: 4d5d5664c900 ("x86: kallsyms: disable absolute percpu symbols on !SMP") Signed-off-by: Randy Dunlap Cc: Ard Biesheuvel Cc: stable@vger.kernel.org # 4.6 Signed-off-by: Linus Torvalds init/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ab6bad05c886cf0ef0c86bd1f665cdbe8e5e75e7 Author: Rex Zhu Date: Tue Jun 28 16:55:52 2016 -0400 drm/amd/powerplay: Update CKS on/ CKS off voltage offset calculation. As get the right evv voltage, update them to latest coefficients to align with BB. agd: squash in Slava's 32 bit build fix Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 23 ++++++++++------------ 1 file changed, 10 insertions(+), 13 deletions(-) commit e5eb37170b3cbbf948c6aeaccece818a59e76a6c Author: Rex Zhu Date: Wed Jun 29 16:37:35 2016 +0800 drm/amd/powerplay: fix bug that get wrong polaris evv voltage. value is 32 bits for polaris, not 16. Signed-off-by: Rex Zhu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 7 ++++--- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 4 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) commit 4b2427605e5325eafb5cfc2698f517db68e41075 Author: Rex Zhu Date: Tue Jul 5 13:11:47 2016 +0800 drm/amd/powerplay: incorrectly use of the function return value '0' means true. Signed-off-by: Rex Zhu Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/tonga_processpptables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1dfefee8939b07dd65a35bb78f6a06df85578301 Author: Huang Rui Date: Wed Jul 6 09:32:24 2016 +0800 drm/amd/powerplay: fix incorrect voltage table value for tonga Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 095d28c62f9a05edc186e1b2b02bc44585402bdd Author: Huang Rui Date: Wed Jul 6 09:31:35 2016 +0800 drm/amd/powerplay: fix incorrect voltage table value for polaris10 Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc86765181aa26cc9afcb0a6f9f253cbb1186f26 Merge: 4cdbbbd 903ce4a Author: Linus Torvalds Date: Wed Jul 6 09:42:43 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) All users of AF_PACKET's fanout feature want a symmetric packet header hash for load balancing purposes, so give it to them. 2) Fix vlan state synchronization in e1000e, from Jarod Wilson. 3) Use correct socket pointer in ip_skb_dst_mtu(), from Shmulik Ladkani. 4) mlx5 bug fixes from Mohamad Haj Yahia, Daniel Jurgens, Matthew Finlay, Rana Shahout, and Shaker Daibes. Mostly to do with operation timeouts and PCI error handling. 5) Fix checksum handling in mirred packet action, from WANG Cong. 6) Set skb->dev correctly when transmitting in !protect_frames case of macsec driver, from Daniel Borkmann. 7) Fix MTU calculation in geneve driver, from Haishuang Yan. 8) Missing netif_napi_del() in unregister path of qeth driver, from Ursula Braun. 9) Handle malformed route netlink messages in decnet properly, from Vergard Nossum. 10) Memory leak of percpu data in ipv6 routing code, from Martin KaFai Lau. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (41 commits) ipv6: Fix mem leak in rt6i_pcpu net: fix decnet rtnexthop parsing cxgb4: update latest firmware version supported net/mlx5: Avoid setting unused var when modifying vport node GUID bonding: fix enslavement slave link notifications r8152: fix runtime function for RTL8152 qeth: delete napi struct when removing a qeth device Revert "fsl/fman: fix error handling" fsl/fman: fix error handling cdc_ncm: workaround for EM7455 "silent" data interface RDS: fix rds_tcp_init() error path geneve: fix max_mtu setting net: phy: dp83867: Fix initialization of PHYCR register enc28j60: Fix race condition in enc28j60 driver net: stmmac: Fix null-function call in ISR on stmmac1000 tipc: fix nl compat regression for link statistics net: bcmsysport: Device stats are unsigned long macsec: set actual real device for xmit when !protect_frames net_sched: fix mirrored packets checksum packet: Use symmetric hash for PACKET_FANOUT_HASH. ... commit 4cdbbbd11f53c32f2359722148033b5e13dd33b5 Merge: 4d0a279 9cd2574 Author: Linus Torvalds Date: Wed Jul 6 09:12:43 2016 -0700 Merge tag 'sound-4.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Here are a collection of small fixes: at this time, we've got a slightly high amount, but all small and trivial fixes, and nothing scary can be seen there" * tag 'sound-4.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (21 commits) ALSA: hda/realtek: Add Lenovo L460 to docking unit fixup ALSA: timer: Fix negative queue usage by racy accesses ASoC: rt5645: fix reg-2f default value. ASoC: fsl_ssi: Fix number of words per frame for I2S-slave mode ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift() ALSA: hda - Add PCI ID for Kabylake-H ALSA: echoaudio: Fix memory allocation ASoC: Intel: atom: fix missing breaks that would cause the wrong operation to execute ALSA: hda - fix read before array start ASoC: cx20442: set tty->receiver_room in v253_open ASoC: ak4613: Enable cache usage to fix crashes on resume ASoC: wm8940: Enable cache usage to fix crashes on resume ASoC: Intel: Skylake: Initialize module list for Broxton ASoC: wm5102: Correct supported channels on trace compressed DAI ASoC: wm5110: Add missing route from OUT3R to SYSCLK ASoC: rt5670: fix HP Playback Volume control ASoC: hdmi-codec: select CONFIG_HDMI ASoC: davinci-mcasp: Fix dra7 DMA offset when using CFG port ASoC: hdac_hdmi: Fix potential NULL dereference ASoC: ak4613: Remove owner assignment from platform_driver ... commit 4d0a279c7c9965d080c029f85b9e7fa4a8e1973e Merge: a99cde4 096cdc6 Author: Linus Torvalds Date: Wed Jul 6 09:07:23 2016 -0700 Merge tag 'chrome-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform Pull chrome platform fix from Olof Johansson: "A single fix this time, closing a window where ioctl args are fetched twice" * tag 'chrome-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform: platform/chrome: cros_ec_dev - double fetch bug in ioctl commit 522e5cb76d0663c88f96b6a8301451c8efa37207 Author: Joerg Roedel Date: Fri Jul 1 16:42:55 2016 +0200 iommu/amd: Fix unity mapping initialization race There is a race condition in the AMD IOMMU init code that causes requested unity mappings to be blocked by the IOMMU for a short period of time. This results on boot failures and IO_PAGE_FAULTs on some machines. Fix this by making sure the unity mappings are installed before all other DMA is blocked. Fixes: aafd8ba0ca74 ('iommu/amd: Implement add_device and remove_device') Cc: stable@vger.kernel.org # v4.2+ Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit ea1a25c3348abc33d7d94db28501766adf3d1c7d Merge: 5e7ff2c 262e2bf Author: James Bottomley Date: Wed Jul 6 07:25:55 2016 -0700 Merge branch 'jejb-fixes' into fixes commit d1fe176ca51fa3cb35f70c1d876d9a090e9befce Author: Sven Eckelmann Date: Sun Jun 12 10:43:19 2016 +0200 batman-adv: Fix speedy join in gateway client mode Speedy join only works when the received packet is either broadcast or an 4addr unicast packet. Thus packets converted from broadcast to unicast via the gateway handling code have to be converted to 4addr packets to allow the receiving gateway server to add the sender address as temporary entry to the translation table. Not doing it will make the batman-adv gateway server drop the DHCP response in many situations because it doesn't yet have the TT entry for the destination of the DHCP response. Fixes: 371351731e9c ("batman-adv: change interface_rx to get orig node") Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/send.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88d02a2ba6c52350f9a73ff1b01a5be839c3ca17 Author: David Daney Date: Thu Jun 16 15:50:31 2016 -0700 MIPS: Fix page table corruption on THP permission changes. When the core THP code is modifying the permissions of a huge page it calls pmd_modify(), which unfortunately was clearing the _PAGE_HUGE bit of the page table entry. The result can be kernel messages like: mm/memory.c:397: bad pmd 000000040080004d. mm/memory.c:397: bad pmd 00000003ff00004d. mm/memory.c:397: bad pmd 000000040100004d. or: ------------[ cut here ]------------ WARNING: at mm/mmap.c:3200 exit_mmap+0x150/0x158() Modules linked in: ipv6 at24 octeon3_ethernet octeon_srio_nexus m25p80 CPU: 12 PID: 1295 Comm: pmderr Not tainted 3.10.87-rt80-Cavium-Octeon #4 Stack : 0000000040808000 0000000014009ce1 0000000000400004 ffffffff81076ba0 0000000000000000 0000000000000000 ffffffff85110000 0000000000000119 0000000000000004 0000000000000000 0000000000000119 43617669756d2d4f 0000000000000000 ffffffff850fda40 ffffffff85110000 0000000000000000 0000000000000000 0000000000000009 ffffffff809207a0 0000000000000c80 ffffffff80f1bf20 0000000000000001 000000ffeca36828 0000000000000001 0000000000000000 0000000000000001 000000ffeca7e700 ffffffff80886924 80000003fd7a0000 80000003fd7a39b0 80000003fdea8000 ffffffff80885780 80000003fdea8000 ffffffff80f12218 000000000000000c 000000000000050f 0000000000000000 ffffffff80865c4c 0000000000000000 0000000000000000 ... Call Trace: [] show_stack+0x6c/0xf8 [] warn_slowpath_common+0x78/0xa8 [] exit_mmap+0x150/0x158 [] mmput+0x5c/0x110 [] do_exit+0x230/0xa68 [] do_group_exit+0x54/0x1d0 [] __wake_up_parent+0x0/0x18 ---[ end trace c7b38293191c57dc ]--- BUG: Bad rss-counter state mm:80000003fa168000 idx:1 val:1536 Fix by not clearing _PAGE_HUGE bit. Signed-off-by: David Daney Tested-by: Aaro Koskinen Cc: stable@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13687/ Signed-off-by: Ralf Baechle arch/mips/include/asm/pgtable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 16a910a6722b7a8680409e634c7c0dac073c01e4 Author: Gregory Greenman Date: Tue Jul 5 15:23:10 2016 +0300 cfg80211: handle failed skb allocation Handle the case when dev_alloc_skb returns NULL. Cc: stable@vger.kernel.org Fixes: 2b67f944f88c2 ("cfg80211: reuse existing page fragments in A-MSDU rx") Signed-off-by: Gregory Greenman Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg net/wireless/util.c | 2 ++ 1 file changed, 2 insertions(+) commit 6e8ef842223b90a33efd570128bb566a9ae6f5ad Author: Purushottam Kushwaha Date: Tue Jul 5 13:44:51 2016 +0530 nl80211: Move ACL parsing later to avoid a possible memory leak No support for pbss results in a memory leak for the acl_data (if parse_acl_data succeeds). Fix this by moving the ACL parsing later. Cc: stable@vger.kernel.org Fixes: 34d505193bd10 ("cfg80211: basic support for PBSS network type") Signed-off-by: Purushottam Kushwaha Signed-off-by: Johannes Berg net/wireless/nl80211.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 175a20c16fdb7700fcac63f1eeb2caa7e1dddd2d Author: Ville Syrjälä Date: Thu Jun 23 18:06:49 2016 +0300 x86/perf/intel/rapl: Fix module name collision with powercap intel-rapl Since commit 4b6e2571bf00 the rapl perf module calls itself intel-rapl. That name was already in use by the rapl powercap driver, which now fails to load if the perf module is loaded. Fix the problem by renaming the perf module to intel-rapl-perf, so that both modules can coexist. Fixes: 4b6e2571bf00 ("x86/perf/intel/rapl: Make the Intel RAPL PMU driver modular") Signed-off-by: Ville Syrjälä Cc: Vince Weaver Cc: Alexander Shishkin Cc: Kan Liang Cc: Stephane Eranian Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Jiri Olsa Link: http://lkml.kernel.org/r/1466694409-3620-1-git-send-email-ville.syrjala@linux.intel.com Signed-off-by: Thomas Gleixner arch/x86/events/intel/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9d6928639134cff896a92f8ff7fad14370e88d3c Merge: 0863477 9ca91a6 Author: Michael Turquette Date: Tue Jul 5 17:16:08 2016 -0700 Merge tag 'sunxi-clk-fixes-for-4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into clk-fixes Allwinner clock fixes for 4.7 A bunch of changes for the display clocks merged in 4.7 commit 903ce4abdf374e3365d93bcb3df56c62008835ba Author: Martin KaFai Lau Date: Tue Jul 5 12:10:23 2016 -0700 ipv6: Fix mem leak in rt6i_pcpu It was first reported and reproduced by Petr (thanks!) in https://bugzilla.kernel.org/show_bug.cgi?id=119581 free_percpu(rt->rt6i_pcpu) used to always happen in ip6_dst_destroy(). However, after fixing a deadlock bug in commit 9c7370a166b4 ("ipv6: Fix a potential deadlock when creating pcpu rt"), free_percpu() is not called before setting non_pcpu_rt->rt6i_pcpu to NULL. It is worth to note that rt6i_pcpu is protected by table->tb6_lock. kmemleak somehow did not report it. We nailed it down by observing the pcpu entries in /proc/vmallocinfo (first suggested by Hannes, thanks!). Signed-off-by: Martin KaFai Lau Fixes: 9c7370a166b4 ("ipv6: Fix a potential deadlock when creating pcpu rt") Reported-by: Petr Novopashenniy Tested-by: Petr Novopashenniy Acked-by: Hannes Frederic Sowa Cc: Hannes Frederic Sowa Cc: Petr Novopashenniy Signed-off-by: David S. Miller net/ipv6/ip6_fib.c | 1 + 1 file changed, 1 insertion(+) commit ab58298cf459fcd4f588a401d36abf0bd2215b51 Author: Vegard Nossum Date: Tue Jul 5 21:12:53 2016 +0200 net: fix decnet rtnexthop parsing dn_fib_count_nhs() could enter an infinite loop if nhp->rtnh_len == 0 (i.e. if userspace passes a malformed netlink message). Let's use the helpers from net/nexthop.h which take care of all this stuff. We can do exactly the same as e.g. fib_count_nexthops() and fib_get_nhs() from net/ipv4/fib_semantics.c. This fixes the softlockup for me. Cc: Thomas Graf Signed-off-by: Vegard Nossum Signed-off-by: David S. Miller net/decnet/dn_fib.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 7e3fd813717693597daaa95dee875f4cb2d911ef Author: Lv Zheng Date: Tue Jul 5 19:18:07 2016 +0800 ACPI / debugger: Fix regression introduced by IS_ERR_VALUE() removal The FIFO unlocking mechanism in acpi_dbg has been broken by the following commit: Commit: 287980e49ffc0f6d911601e7e352a812ed27768e Subject: remove lots of IS_ERR_VALUE abuses It converted !IS_ERR_VALUE(ret) into !ret which was not entirely correct. Fix the regression by taking ret > 0 into account too as appropriate. Fixes: 287980e49ffc (remove lots of IS_ERR_VALUE abuses) Signed-off-by: Lv Zheng [ rjw: Simplifications, changelog & subject massage ] Signed-off-by: Rafael J. Wysocki drivers/acpi/acpi_dbg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 096cdc6f52225835ff503f987a0d68ef770bb78e Author: Dan Carpenter Date: Tue Jun 21 16:58:46 2016 +0300 platform/chrome: cros_ec_dev - double fetch bug in ioctl We verify "u_cmd.outsize" and "u_cmd.insize" but we need to make sure that those values have not changed between the two copy_from_user() calls. Otherwise it could lead to a buffer overflow. Additionally, cros_ec_cmd_xfer() can set s_cmd->insize to a lower value. We should use the new smaller value so we don't copy too much data to the user. Reported-by: Pengfei Wang Fixes: a841178445bb ('mfd: cros_ec: Use a zero-length array for command data') Signed-off-by: Dan Carpenter Reviewed-by: Kees Cook Tested-by: Gwendal Grignou Cc: # v4.2+ Signed-off-by: Olof Johansson drivers/platform/chrome/cros_ec_dev.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 217215041b9285af2193a755b56a8f3ed408bfe2 Author: Ben Skeggs Date: Wed Jul 6 06:50:36 2016 +1000 drm/nouveau/disp/sor/gf119: select correct sor when poking training pattern Fixes a regression caused by a stupid thinko from "disp/sor/gf119: both links use the same training register". Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 45209046c47b93fadf26dc59a9da724f387b9cf2 Author: Lv Zheng Date: Tue Jul 5 13:53:12 2016 +0800 ACPICA: Namespace: Fix namespace/interpreter lock ordering There is a lock order issue in acpi_load_tables(). The namespace lock is held before holding the interpreter lock. With ACPI_MUTEX_DEBUG enabled in the kernel, this is printed to the log during boot: [ 0.885699] ACPI Error: Invalid acquire order: Thread 405884224 owns [ACPI_MTX_Namespace], wants [ACPI_MTX_Interpreter] (20160422/utmutex-263) [ 0.885881] ACPI Error: Could not acquire AML Interpreter mutex (20160422/exutils-95) [ 0.893846] ACPI Error: Mutex [0x0] is not acquired, cannot release (20160422/utmutex-326) [ 0.894019] ACPI Error: Could not release AML Interpreter mutex (20160422/exutils-133) The issue has been introduced by the following commit: Commit: 2f38b1b16d9280689e5cfa47a4c50956bf437f0d ACPICA Commit: bfe03ffcde8ed56a7eae38ea0b188aeb12f9c52e Subject: ACPICA: Namespace: Fix a regression that MLC support triggers dead lock in dynamic table loading Which fixed a deadlock issue for acpi_ns_load_table() in acpi_ex_add_table() but didn't take care of the lock order in acpi_ns_load_table() correctly. Originally (before the above commit), ACPICA used the namespace/interpreter locks in the following 2 key code paths: 1. Table loading: acpi_ns_load_table L(Namespace) acpi_ns_parse_table acpi_ns_one_complete_parse U(Namespace) 2. Object evaluation: acpi_ns_evaluate L(Interpreter) acpi_ps_execute_method U(Interpreter) acpi_ns_load_table L(Namespace) U(Namespace) acpi_ev_initialize_region L(Namespace) U(Namespace) address_space.setup L(Namespace) U(Namespace) address_space.handler L(Namespace) U(Namespace) acpi_os_wait_semaphore acpi_os_acquire_mutex acpi_os_sleep L(Interpreter) U(Interpreter) During runtime, while acpi_ns_evaluate is called, the lock order is always Interpreter -> Namespace. In turn, the problematic commit acquires the locks in the following order: 3. Table loading: acpi_ns_load_table L(Namespace) acpi_ns_parse_table L(Interpreter) acpi_ns_one_complete_parse U(Interpreter) U(Namespace) To fix the lock order issue, move the interpreter lock to acpi_ns_load_table() to ensure the lock order correctness: 4. Table loading: acpi_ns_load_table L(Interpreter) L(Namespace) acpi_ns_parse_table acpi_ns_one_complete_parse U(Namespace) U(Interpreter) However, this doesn't fix the current design issues related to the namespace lock. For example, we can notice that in acpi_ns_evaluate(), outside of acpi_ns_load_table(), the namespace objects may be created by the named object creation control methods. And the creation of the method-owned namespace objects are not locked by the namespace lock. This patch doesn't try to fix such kind of existing issues. Fixes: 2f38b1b16d92 (ACPICA: Namespace: Fix a regression that MLC support triggers dead lock in dynamic table loading) Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/nsload.c | 7 ++++++- drivers/acpi/acpica/nsparse.c | 9 ++------- 2 files changed, 8 insertions(+), 8 deletions(-) commit c94c09535c4debcc439f55b5b6d9ebe57bd4665a Author: Al Viro Date: Tue Jul 5 09:49:21 2016 -0400 nfs_atomic_open(): prevent parallel nfs_lookup() on a negative hashed Signed-off-by: Al Viro fs/nfs/dir.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) commit 00699ad8571afd7fb8bc2c61f67c86c2428680ab Author: Al Viro Date: Tue Jul 5 09:44:53 2016 -0400 Use the right predicate in ->atomic_open() instances ->atomic_open() can be given an in-lookup dentry *or* a negative one found in dcache. Use d_in_lookup() to tell one from another, rather than d_unhashed(). Signed-off-by: Al Viro fs/9p/vfs_inode.c | 2 +- fs/9p/vfs_inode_dotl.c | 2 +- fs/ceph/file.c | 2 +- fs/cifs/dir.c | 2 +- fs/fuse/dir.c | 2 +- fs/gfs2/inode.c | 2 +- fs/nfs/dir.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 262e2bfd7d1e1f1ee48b870e5dfabb87c06b975e Author: Bruno Prémont Date: Thu Jun 30 17:00:32 2016 +0200 qla2xxx: Fix NULL pointer deref in QLA interrupt In qla24xx_process_response_queue() rsp->msix->cpuid may trigger NULL pointer dereference when rsp->msix is NULL: [ 5.622457] NULL pointer dereference at 0000000000000050 [ 5.622457] IP: [] qla24xx_process_response_queue+0x44/0x4b0 [ 5.622457] PGD 0 [ 5.622457] Oops: 0000 [#1] SMP [ 5.622457] Modules linked in: [ 5.622457] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.6.3-x86_64 #1 [ 5.622457] Hardware name: HP ProLiant DL360 G5, BIOS P58 05/02/2011 [ 5.622457] task: ffff8801a88f3740 ti: ffff8801a8954000 task.ti: ffff8801a8954000 [ 5.622457] RIP: 0010:[] [] qla24xx_process_response_queue+0x44/0x4b0 [ 5.622457] RSP: 0000:ffff8801afb03de8 EFLAGS: 00010002 [ 5.622457] RAX: 0000000000000000 RBX: 0000000000000032 RCX: 00000000ffffffff [ 5.622457] RDX: 0000000000000002 RSI: ffff8801a79bf8c8 RDI: ffff8800c8f7e7c0 [ 5.622457] RBP: ffff8801afb03e68 R08: 0000000000000000 R09: 0000000000000000 [ 5.622457] R10: 00000000ffff8c47 R11: 0000000000000002 R12: ffff8801a79bf8c8 [ 5.622457] R13: ffff8800c8f7e7c0 R14: ffff8800c8f60000 R15: 0000000000018013 [ 5.622457] FS: 0000000000000000(0000) GS:ffff8801afb00000(0000) knlGS:0000000000000000 [ 5.622457] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 5.622457] CR2: 0000000000000050 CR3: 0000000001e07000 CR4: 00000000000006e0 [ 5.622457] Stack: [ 5.622457] ffff8801afb03e30 ffffffff810c0f2d 0000000000000086 0000000000000002 [ 5.622457] ffff8801afb03e28 ffffffff816570e1 ffff8800c8994628 0000000000000002 [ 5.622457] ffff8801afb03e60 ffffffff816772d4 b47c472ad6955e68 0000000000000032 [ 5.622457] Call Trace: [ 5.622457] [ 5.622457] [] ? __wake_up_common+0x4d/0x80 [ 5.622457] [] ? usb_hcd_resume_root_hub+0x51/0x60 [ 5.622457] [] ? uhci_hub_status_data+0x64/0x240 [ 5.622457] [] qla24xx_intr_handler+0xf0/0x2e0 [ 5.622457] [] ? get_next_timer_interrupt+0xce/0x200 [ 5.622457] [] handle_irq_event_percpu+0x64/0x100 [ 5.622457] [] handle_irq_event+0x27/0x50 [ 5.622457] [] handle_edge_irq+0x65/0x140 [ 5.622457] [] handle_irq+0x18/0x30 [ 5.622457] [] do_IRQ+0x46/0xd0 [ 5.622457] [] common_interrupt+0x7f/0x7f [ 5.622457] [ 5.622457] [] ? mwait_idle+0x68/0x80 [ 5.622457] [] arch_cpu_idle+0xa/0x10 [ 5.622457] [] default_idle_call+0x27/0x30 [ 5.622457] [] cpu_startup_entry+0x19b/0x230 [ 5.622457] [] start_secondary+0x136/0x140 [ 5.622457] Code: 00 00 65 48 8b 04 25 28 00 00 00 48 89 45 d0 31 c0 48 8b 47 58 a8 02 0f 84 c5 00 00 00 48 8b 46 50 49 89 f4 65 8b 15 34 bb aa 7e <39> 50 50 74 11 89 50 50 48 8b 46 50 8b 40 50 41 89 86 60 8b 00 [ 5.622457] RIP [] qla24xx_process_response_queue+0x44/0x4b0 [ 5.622457] RSP [ 5.622457] CR2: 0000000000000050 [ 5.622457] ---[ end trace fa2b19c25106d42b ]--- [ 5.622457] Kernel panic - not syncing: Fatal exception in interrupt The affected code was introduced by commit cdb898c52d1dfad4b4800b83a58b3fe5d352edde (qla2xxx: Add irq affinity notification). Only dereference rsp->msix when it has been set so the machine can boot fine. Possibly rsp->msix is unset because: [ 3.479679] qla2xxx [0000:00:00.0]-0005: : QLogic Fibre Channel HBA Driver: 8.07.00.33-k. [ 3.481839] qla2xxx [0000:13:00.0]-001d: : Found an ISP2432 irq 17 iobase 0xffffc90000038000. [ 3.484081] qla2xxx [0000:13:00.0]-0035:0: MSI-X; Unsupported ISP2432 (0x2, 0x3). [ 3.485804] qla2xxx [0000:13:00.0]-0037:0: Falling back-to MSI mode -258. [ 3.890145] scsi host0: qla2xxx [ 3.891956] qla2xxx [0000:13:00.0]-00fb:0: QLogic QLE2460 - PCI-Express Single Channel 4Gb Fibre Channel HBA. [ 3.894207] qla2xxx [0000:13:00.0]-00fc:0: ISP2432: PCIe (2.5GT/s x4) @ 0000:13:00.0 hdma+ host#=0 fw=7.03.00 (9496). [ 5.714774] qla2xxx [0000:13:00.0]-500a:0: LOOP UP detected (4 Gbps). Signed-off-by: Bruno Prémont Acked-by: Quinn Tran CC: # 4.5+ Fixes: cdb898c52d1dfad4b4800b83a58b3fe5d352edde Signed-off-by: James Bottomley drivers/scsi/qla2xxx/qla_isr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5d6516120ee5c777fb7b1ba9d39031881ad511b Author: Ganesh Goudar Date: Tue Jul 5 18:07:24 2016 +0530 cxgb4: update latest firmware version supported Change t4fw_version.h to update latest firmware version number 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 eae033c1b86721ec54511607fc26bfb94a0e004b Author: Or Gerlitz Date: Tue Jul 5 12:17:12 2016 +0300 net/mlx5: Avoid setting unused var when modifying vport node GUID GCC complains on unused-but-set-variable, clean this up. Fixes: 23898c763f4a ('net/mlx5: E-Switch, Modify node guid on vf set MAC') Signed-off-by: Or Gerlitz Acked-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/vport.c | 3 --- 1 file changed, 3 deletions(-) commit a30b016808e214c6864ad579ef867b3fe0a314f8 Author: Aviv Heller Date: Tue Jul 5 12:09:47 2016 +0300 bonding: fix enslavement slave link notifications Currently, link notifications are not sent by bond_set_slave_link_state() upon enslavement if the slave is enslaved when up. This happens because slave->link default init value is 0, which is the same as BOND_LINK_UP, resulting in bond_set_slave_link_state() ignoring this transition. This patch sets the default value of slave->link to BOND_LINK_NOCHANGE, assuring it will count as a state transition and thus trigger notification logic. Signed-off-by: Aviv Heller Reviewed-by: Jiri Pirko Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/bonding/bond_main.c | 1 + 1 file changed, 1 insertion(+) commit 2609af19362d03332b55fc7836e7023bcd6d90bf Author: hayeswang Date: Tue Jul 5 16:11:46 2016 +0800 r8152: fix runtime function for RTL8152 The RTL8152 doesn't have U1U2 and U2P3 features, so use different runtime functions for RTL812 and RTL8153 by adding autosuspend_en() to rtl_ops. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) commit 92c74bceb0dd4b74a6c0b56c2f9a5c93a0860808 Author: Linus Walleij Date: Tue Jul 5 08:46:43 2016 +0200 Revert "gpio: gpiolib-of: Allow compile testing" This reverts commit 1e4a80640338924b9f9fd7a121ac31d08134410a. This creates more problems than it solves right now. Compile testing needs to go in with patches fixing the problems it uncovers. Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 22ebf00eb56fe77922de8138aa9af9996582c2b3 Author: Lukasz Gemborowski Date: Mon Jun 27 12:57:47 2016 +0200 i2c: mux: reg: wrong condition checked for of_address_to_resource return value of_address_to_resource return 0 on successful call but devm_ioremap_resource is called only if it returns non-zero value Signed-off-by: Lukasz Gemborowski Reviewed-by: Alexander Sverdlin Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/muxes/i2c-mux-reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eab09988e47f2b4322faa5ee1430d05714e59000 Author: Jon Hunter Date: Tue Jun 14 21:26:46 2016 +0100 i2c: tegra: Correct error path in probe Commit 497fbe24987b ("i2c: tegra: enable multi master mode for tegra210") enables the Tegra I2C 'div_clk' for adapters using the multi-master mode during the device probe. Although the probe error path was updated to disable the clock on probe failure, there is one place after calling tegra_i2c_init() where the clock will not be disabled on failure. Correct the error path so that the 'div_clk' is disabled if calling tegra_i2c_init() fails. Fixes: 497fbe24987b ("i2c: tegra: enable multi master mode for tegra210") Signed-off-by: Jon Hunter Acked-by: Laxman Dewangan Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 547aefc4db877e65245c3d95fcce703701bf3a0c Author: Paul Burton Date: Tue Jul 5 14:26:00 2016 +0100 irqchip/mips-gic: Match IPI IRQ domain by bus token only Commit fbde2d7d8290 ("MIPS: Add generic SMP IPI support") introduced code which calls irq_find_matching_host with a NULL node parameter in order to discover IPI IRQ domains which are not associated with the DT root node's interrupt parent. This suggests that implementations of IPI IRQ domains should effectively ignore the node parameter if it is NULL and search purely based upon the bus token. Commit 2af70a962070 ("irqchip/mips-gic: Add a IPI hierarchy domain") did not do this when implementing the GIC IPI IRQ domain, and on MIPS Boston boards this leads to no IPI domain being discovered and a NULL pointer dereference when attempting to send an IPI: CPU 0 Unable to handle kernel paging request at virtual address 0000000000000040, epc == ffffffff8016e70c, ra == ffffffff8010ff5c Oops[#1]: CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.7.0-rc6-00223-gad0d1b6 #945 task: a8000000ff066fc0 ti: a8000000ff068000 task.ti: a8000000ff068000 $ 0 : 0000000000000000 0000000000000001 ffffffff80730000 0000000000000003 $ 4 : 0000000000000000 ffffffff8057e5b0 a800000001e3ee00 0000000000000000 $ 8 : 0000000000000000 0000000000000023 0000000000000001 0000000000000001 $12 : 0000000000000000 ffffffff803323d0 0000000000000000 0000000000000000 $16 : 0000000000000000 0000000000000000 0000000000000001 ffffffff801108fc $20 : 0000000000000000 ffffffff8057e5b0 0000000000000001 0000000000000000 $24 : 0000000000000000 ffffffff8012de28 $28 : a8000000ff068000 a8000000ff06fbc0 0000000000000000 ffffffff8010ff5c Hi : ffffffff8014c174 Lo : a800000001e1e140 epc : ffffffff8016e70c __ipi_send_mask+0x24/0x11c ra : ffffffff8010ff5c mips_smp_send_ipi_mask+0x68/0x178 Status: 140084e2 KX SX UX KERNEL EXL Cause : 00800008 (ExcCode 02) BadVA : 0000000000000040 PrId : 0001a920 (MIPS I6400) Process swapper/0 (pid: 1, threadinfo=a8000000ff068000, task=a8000000ff066fc0, tls=0000000000000000) Stack : 0000000000000000 0000000000000000 0000000000000001 ffffffff801108fc 0000000000000000 ffffffff8057e5b0 0000000000000001 ffffffff8010ff5c 0000000000000001 0000000000000020 0000000000000000 0000000000000000 0000000000000000 ffffffff801108fc 0000000000000000 0000000000000001 0000000000000001 0000000000000000 0000000000000000 ffffffff801865e8 a8000000ff0c7500 a8000000ff06fc90 0000000000000001 0000000000000002 ffffffff801108fc ffffffff801868b8 0000000000000000 ffffffff801108fc 0000000000000000 0000000000000003 ffffffff8068c700 0000000000000001 ffffffff80730000 0000000000000001 a8000000ff00a290 ffffffff80110c50 0000000000000003 a800000001e48308 0000000000000003 0000000000000008 ... Call Trace: [] __ipi_send_mask+0x24/0x11c [] mips_smp_send_ipi_mask+0x68/0x178 [] generic_exec_single+0x150/0x170 [] smp_call_function_single+0x108/0x160 [] cps_boot_secondary+0x328/0x394 [] __cpu_up+0x38/0x90 [] bringup_cpu+0x24/0xac [] cpuhp_up_callbacks+0x58/0xdc [] cpu_up+0x118/0x18c [] smp_init+0xbc/0xe8 [] kernel_init_freeable+0xa0/0x228 [] kernel_init+0x10/0xf0 [] ret_from_kernel_thread+0x14/0x1c Fix this by allowing the GIC IPI IRQ domain to match purely based upon the bus token if the node provided is NULL. Fixes: 2af70a962070 ("irqchip/mips-gic: Add a IPI hierarchy domain") Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: Jason Cooper Cc: Qais Yousef Cc: Ralf Baechle Cc: Marc Zyngier Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160705132600.27730-2-paul.burton@imgtec.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mips-gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99ec8a3608330d202448085185cf28389b789b7b Author: Paul Burton Date: Tue Jul 5 14:25:59 2016 +0100 irqchip/mips-gic: Map to VPs using HW VPNum When mapping an interrupt to a VP(E) we must use the identifier for the VP that the hardware expects, and this does not always match up with the Linux CPU number. Commit d46812bb0bef ("irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR") corrected this for the cases that existed at the time it was written, but commit 2af70a962070 ("irqchip/mips-gic: Add a IPI hierarchy domain") added another case before the former patch was merged. This leads to incorrectly using Linux CPU numbers when mapping interrupts to VPs, which breaks on certain systems such as those with multi-core I6400 CPUs. Fix by adding the appropriate call to mips_cm_vp_id() to retrieve the expected VP identifier. Fixes: d46812bb0bef ("irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR") Fixes: 2af70a962070 ("irqchip/mips-gic: Add a IPI hierarchy domain") Signed-off-by: Paul Burton Cc: linux-mips@linux-mips.org Cc: Jason Cooper Cc: Qais Yousef Cc: Ralf Baechle Cc: Marc Zyngier Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160705132600.27730-1-paul.burton@imgtec.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mips-gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3867b228d6aed0e916d8d36119b465cb1946bb32 Author: Maxime Coquelin Date: Fri Jul 1 15:19:56 2016 +0200 MAINTAINERS: update STi maintainer list Remove myself as STi maintainer as I will no longer have access to STi platforms, and remove Srini too, who now works on other platforms. Patrice will manage the pull requests. Signed-off-by: Maxime Coquelin Cc: Patrice Chotard Cc: Srinivas Kandagatla Cc: Arnd Bergmann Acked-by: Patrice Chotard Acked-by: Srinivas Kandagatla Signed-off-by: Arnd Bergmann MAINTAINERS | 2 -- 1 file changed, 2 deletions(-) commit 8ca2cf2c8e0d172824ac305391fb4273dd1e3e5a Author: Maxime Coquelin Date: Wed Jun 22 15:56:58 2016 +0200 MAINTAINERS: update STM32 maintainers list I will have less time to work on STM32 platform, so I propose Alexandre as co-maintainer. Alex is working in the STMicroelectronics division in charge of STM32 family, so he will have access to all technical information and hardware. Signed-off-by: Maxime Coquelin Cc: Alexandre Torgue Signed-off-by: Arnd Bergmann MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 86545b94376f445a3646227f0d433bec5e00499b Merge: 600da64 b44439e Author: Arnd Bergmann Date: Tue Jul 5 15:56:33 2016 +0200 Merge tag 'mvebu-fixes-4.7-2' of git://git.infradead.org/linux-mvebu into fixes Pull "mvebu fixes for 4.7 (part 2)" from Gregory CLEMENT: Fix a regression introduced by a cleanup on kirkwood_pm_init * tag 'mvebu-fixes-4.7-2' of git://git.infradead.org/linux-mvebu: ARM: mvebu: compile pm code conditionally commit 600da64b771af45e40018500cd510b0c570130aa Merge: ed749a5 eee25ab Author: Arnd Bergmann Date: Tue Jul 5 15:55:12 2016 +0200 Merge tag 'sunxi-fixes-for-4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into fixes Pull "Allwinner Fixes for 4.7" from Maxime Ripard: Two patches fixing simplefb on the SoCs that had their display clocks enabled, and one fix for the CHIP that will enable its sched clock. * tag 'sunxi-fixes-for-4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: dts: sun7i: Fix pll3x2 and pll7x2 not having a parent clock ARM: dts: sunxi: Add pll3 to simplefb nodes clocks lists ARM: sunxi/dt: make the CHIP inherit from allwinner,sun5i-a13 commit cbef1e102003edb236c6b2319ab269ccef963731 Author: Sven Eckelmann Date: Thu Jun 30 21:41:13 2016 +0200 batman-adv: Free last_bonding_candidate on release of orig_node The orig_ifinfo reference counter for last_bonding_candidate in batadv_orig_node has to be reduced when an originator node is released. Otherwise the orig_ifinfo is leaked and the reference counter the netdevice is not reduced correctly. Fixes: f3b3d9018975 ("batman-adv: add bonding again") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/originator.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 15c2ed753cd9e3e746472deab8151337a5b6da56 Author: Sven Eckelmann Date: Thu Jun 30 20:11:34 2016 +0200 batman-adv: Fix reference leak in batadv_find_router The replacement of last_bonding_candidate in batadv_orig_node has to be an atomic operation. Otherwise it is possible that the reference counter of a batadv_orig_ifinfo is reduced which was no longer the last_bonding_candidate when the new candidate is added. This can either lead to an invalid memory access or to reference leaks which make it impossible to an interface which was added to batman-adv. Fixes: f3b3d9018975 ("batman-adv: add bonding again") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/routing.c | 52 ++++++++++++++++++++++++++++++++++++------------ net/batman-adv/types.h | 4 +++- 2 files changed, 42 insertions(+), 14 deletions(-) commit 3db0decf1185357d6ab2256d0dede1ca9efda03d Author: Sven Eckelmann Date: Fri Jul 1 15:49:43 2016 +0200 batman-adv: Fix non-atomic bla_claim::backbone_gw access The pointer batadv_bla_claim::backbone_gw can be changed at any time. Therefore, access to it must be protected to ensure that two function accessing the same backbone_gw are actually accessing the same. This is especially important when the crc_lock is used or when the backbone_gw of a claim is exchanged. Not doing so leads to invalid memory access and/or reference leaks. Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code") Fixes: 5a1dd8a4773d ("batman-adv: lock crc access in bridge loop avoidance") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 111 ++++++++++++++++++++++++++------- net/batman-adv/types.h | 2 + 2 files changed, 90 insertions(+), 23 deletions(-) commit 33fbb1f3db87ce53da925b3e034b4dd446d483f8 Author: Sven Eckelmann Date: Thu Jun 30 20:10:46 2016 +0200 batman-adv: Fix orig_node_vlan leak on orig_node_release batadv_orig_node_new uses batadv_orig_node_vlan_new to allocate a new batadv_orig_node_vlan and add it to batadv_orig_node::vlan_list. References to this list have also to be cleaned when the batadv_orig_node is removed. Fixes: 7ea7b4a14275 ("batman-adv: make the TT CRC logic VLAN specific") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/originator.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 60154a1e0495ffb8343a95cefe1e874634572fa8 Author: Sven Eckelmann Date: Sat Jul 2 09:52:14 2016 +0200 batman-adv: Avoid nullptr dereference in dat after vlan_insert_tag vlan_insert_tag can return NULL on errors. The distributed arp table code therefore has to check the return value of vlan_insert_tag for NULL before it can safely operate on this pointer. Fixes: be1db4f6615b ("batman-adv: make the Distributed ARP Table vlan aware") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/distributed-arp-table.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 10c78f5854d361ded4736c1831948e0a5f67b932 Author: Sven Eckelmann Date: Sat Jul 2 09:52:13 2016 +0200 batman-adv: Avoid nullptr dereference in bla after vlan_insert_tag vlan_insert_tag can return NULL on errors. The bridge loop avoidance code therefore has to check the return value of vlan_insert_tag for NULL before it can safely operate on this pointer. Fixes: 23721387c409 ("batman-adv: add basic bridge loop avoidance code") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: Simon Wunderlich net/batman-adv/bridge_loop_avoidance.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 9cd25743765cfe851aed8d655a62d60156aed293 Author: Torsten Hilbrich Date: Tue Jul 5 10:40:22 2016 +0200 ALSA: hda/realtek: Add Lenovo L460 to docking unit fixup This solves the issue that a headphone is not working on the docking unit. Signed-off-by: Torsten Hilbrich Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 3b8e64f6f8e2d437b15572f445b1932a45f9be6a Author: Peter Chen Date: Tue Jul 5 10:04:53 2016 +0800 gpu: drm: sun4i_drv: add missing of_node_put after calling of_parse_phandle of_node_put needs to be called when the device node which is got from of_parse_phandle has finished using. Cc: Maxime Ripard Cc: Chen-Yu Tsai Signed-off-by: Peter Chen Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + 1 file changed, 1 insertion(+) commit 7831b4ff0d926e0deeaabef9db8800ed069a2757 Author: Ursula Braun Date: Mon Jul 4 14:07:16 2016 +0200 qeth: delete napi struct when removing a qeth device A qeth_card contains a napi_struct linked to the net_device during device probing. This struct must be deleted when removing the qeth device, otherwise Panic on oops can occur when qeth devices are repeatedly removed and added. Fixes: a1c3ed4c9ca ("qeth: NAPI support for l2 and l3 discipline") Cc: stable@vger.kernel.org # v2.6.37+ Signed-off-by: Ursula Braun Tested-by: Alexander Klein Signed-off-by: David S. Miller drivers/s390/net/qeth_l2_main.c | 1 + drivers/s390/net/qeth_l3_main.c | 1 + 2 files changed, 2 insertions(+) commit c8e2ca30fdba613c088ab2fd5ac7b9c69b402559 Author: David S. Miller Date: Mon Jul 4 17:16:41 2016 -0700 Revert "fsl/fman: fix error handling" This reverts commit a788a4a040e003574b8ad17115706ab1601ec572. This patch is wrong, the type returned doesn't fit what the error pointer macros expect. Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a788a4a040e003574b8ad17115706ab1601ec572 Author: Christophe Jaillet Date: Mon Jul 4 07:46:42 2016 +0200 fsl/fman: fix error handling This is likely that checking 'fman->fifo_offset' instead of 'fman->cam_offset' is expected here. Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fman/fman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c086e7096170390594c425114d98172bc9aceb8a Author: Bjørn Mork Date: Sun Jul 3 22:24:50 2016 +0200 cdc_ncm: workaround for EM7455 "silent" data interface Several Lenovo users have reported problems with their Sierra Wireless EM7455 modem. The driver has loaded successfully and the MBIM management channel has appeared to work, including establishing a connection to the mobile network. But no frames have been received over the data interface. The problem affects all EM7455 and MC7455, and is assumed to affect other modems based on the same Qualcomm chipset and baseband firmware. Testing narrowed the problem down to what seems to be a firmware timing bug during initialization. Adding a short sleep while probing is sufficient to make the problem disappear. Experiments have shown that 1-2 ms is too little to have any effect, while 10-20 ms is enough to reliably succeed. Reported-by: Stefan Armbruster Reported-by: Ralph Plawetzki Reported-by: Andreas Fett Reported-by: Rasmus Lerdorf Reported-by: Samo Ratnik Reported-and-tested-by: Aleksander Morgado Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller drivers/net/usb/cdc_ncm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3dad5424adfb346c871847d467f97dcdca64ea97 Author: Vegard Nossum Date: Sun Jul 3 10:54:54 2016 +0200 RDS: fix rds_tcp_init() error path If register_pernet_subsys() fails, we shouldn't try to call unregister_pernet_subsys(). Fixes: 467fa15356 ("RDS-TCP: Support multiple RDS-TCP listen endpoints, one per netns.") Cc: stable@vger.kernel.org Cc: Sowmini Varadhan Cc: David S. Miller Signed-off-by: Vegard Nossum Acked-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/tcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d5d5e8d55732c7c35c354e45e3b0af2795978a57 Author: Haishuang Yan Date: Sat Jul 2 15:02:48 2016 +0800 geneve: fix max_mtu setting For ipv6+udp+geneve encapsulation data, the max_mtu should subtract sizeof(ipv6hdr), instead of sizeof(iphdr). Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller drivers/net/geneve.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 85b03b3033fd4eba82665b3b9902c095a08cc52f Author: Johan Hovold Date: Sun Jul 3 18:32:05 2016 +0200 Revert "gpiolib: Split GPIO flags parsing and GPIO configuration" This reverts commit 923b93e451db876d1479d3e4458fce14fec31d1c. Make sure consumers do not overwrite gpio flags for pins that have already been claimed. While adding support for gpio drivers to refuse a request using unsupported flags, the order of when the requested flag was checked and the new flags were applied was reversed to that consumers could overwrite flags for already requested gpios. This not only affects device-tree setups where two drivers could request the same gpio using conflicting configurations, but also allowed user space to clear gpio flags for already claimed pins simply by attempting to export them through the sysfs interface. By for example clearing the FLAG_ACTIVE_LOW flag this way, user space could effectively change the polarity of a signal. Reverting this change obviously prevents gpio drivers from doing sanity checks on the flags in their request callbacks. Fortunately only one recently added driver (gpio-tps65218 in v4.6) appears to do this, and a follow up patch could restore this functionality through a different interface. Cc: stable # 4.4 Signed-off-by: Johan Hovold Signed-off-by: Linus Walleij drivers/gpio/gpiolib-legacy.c | 8 +++---- drivers/gpio/gpiolib.c | 52 +++++++++++++------------------------------ 2 files changed, 20 insertions(+), 40 deletions(-) commit 87041a58d3b19455d39baed2a5e5bb43b58fb915 Author: Colin Pitrat Date: Sat Jun 18 19:05:04 2016 +0100 gpio: sch: Fix Oops on module load on Asus Eee PC 1201 This fixes the issue descirbe in bug 117531 (https://bugzilla.kernel.org/show_bug.cgi?id=117531). It's a regression introduced in linux 4.5 that causes a Oops at load of gpio_sch and prevents powering off the computer. The issue is that sch_gpio_reg_set is called in sch_gpio_probe before gpio_chip data is initialized with the pointer to the sch_gpio struct. As sch_gpio_reg_set calls gpiochip_get_data, it returns NULL which causes the Oops. The patch follows Mika's advice (https://lkml.org/lkml/2016/5/9/61) and consists in modifying sch_gpio_reg_get and sch_gpio_reg_set to take a sch_gpio struct directly instead of a gpio_chip, which avoids the call to gpiochip_get_data. Thanks Mika for your patience with me :-) Cc: stable@vger.kernel.org Signed-off-by: Colin Pitrat Acked-by: Alexandre Courbot Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/gpio/gpio-sch.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 07a2daab49c549a37b5b744cbebb6e3f445f12bc Author: Vivek Goyal Date: Fri Jul 1 16:34:25 2016 -0400 ovl: Copy up underlying inode's ->i_mode to overlay inode Right now when a new overlay inode is created, we initialize overlay inode's ->i_mode from underlying inode ->i_mode but we retain only file type bits (S_IFMT) and discard permission bits. This patch changes it and retains permission bits too. This should allow overlay to do permission checks on overlay inode itself in task context. [SzM] It also fixes clearing suid/sgid bits on write. Signed-off-by: Vivek Goyal Reported-by: Eryu Guan Signed-off-by: Miklos Szeredi Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay") Cc: fs/overlayfs/inode.c | 3 +-- fs/overlayfs/overlayfs.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) commit b99c2d913810e56682a538c9f2394d76fca808f8 Author: Miklos Szeredi Date: Mon Jul 4 16:49:48 2016 +0200 ovl: handle ATTR_KILL* Before 4bacc9c9234c ("overlayfs: Make f_path...") file->f_path pointed to the underlying file, hence suid/sgid removal on write worked fine. After that patch file->f_path pointed to the overlay file, and the file mode bits weren't copied to overlay_inode->i_mode. So the suid/sgid removal simply stopped working. The fix is to copy the mode bits, but then ovl_setattr() needs to clear ATTR_MODE to avoid the BUG() in notify_change(). So do this first, then in the next patch copy the mode. Reported-by: Eryu Guan Signed-off-by: Miklos Szeredi Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay") Cc: fs/overlayfs/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit dbd1b8ea43b17e2ed4acda72f83ea17f69408682 Author: Shreyas B. Prabhu Date: Fri Jul 1 09:24:14 2016 -0500 cpuidle: Fix last_residency division Snooze is a poll idle state in powernv and pseries platforms. Snooze has a timeout so that if a CPU stays in snooze for more than target residency of the next available idle state, then it would exit thereby giving chance to the cpuidle governor to re-evaluate and promote the CPU to a deeper idle state. Therefore whenever snooze exits due to this timeout, its last_residency will be target_residency of the next deeper state. Commit e93e59ce5b85 "cpuidle: Replace ktime_get() with local_clock()" changed the math around last_residency calculation. Specifically, while converting last_residency value from nano- to microseconds, it carries out right shift by 10. Because of that, in snooze timeout exit scenarios last_residency calculated is roughly 2.3% less than target_residency of the next available state. This pattern is picked up by get_typical_interval() in the menu governor and therefore expected_interval in menu_select() is frequently less than the target_residency of any state other than snooze. Due to this we are entering snooze at a higher rate, thereby affecting the single thread performance. Fix this by using more precise division via ktime_us_delta(). Fixes: e93e59ce5b85 "cpuidle: Replace ktime_get() with local_clock()" Reported-by: Anton Blanchard Bisected-by: Shilpasri G Bhat Signed-off-by: Shreyas B. Prabhu Acked-by: Daniel Lezcano Acked-by: Balbir Singh Signed-off-by: Rafael J. Wysocki drivers/cpuidle/cpuidle.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 3fa6993fef634e05d200d141a85df0b044572364 Author: Takashi Iwai Date: Mon Jul 4 14:02:15 2016 +0200 ALSA: timer: Fix negative queue usage by racy accesses The user timer tu->qused counter may go to a negative value when multiple concurrent reads are performed since both the check and the decrement of tu->qused are done in two individual locked contexts. This results in bogus read outs, and the endless loop in the user-space side. The fix is to move the decrement of the tu->qused counter into the same spinlock context as the zero-check of the counter. Cc: Signed-off-by: Takashi Iwai sound/core/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0caa7616a6aca449dd68b58cb29bd491d296c2d5 Author: Aaron Campbell Date: Sat Jul 2 21:23:24 2016 -0300 iommu/vt-d: Fix infinite loop in free_all_cpu_cached_iovas Per VT-d spec Section 10.4.2 ("Capability Register"), the maximum number of possible domains is 64K; indeed this is the maximum value that the cap_ndoms() macro will expand to. Since the value 65536 will not fix in a u16, the 'did' variable must be promoted to an int, otherwise the test for < 65536 will always be true and the loop will never end. The symptom, in my case, was a hung machine during suspend. Fixes: 3bd4f9112f87 ("iommu/vt-d: Fix overflow of iommu->domains array") Signed-off-by: Aaron Campbell Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a99cde438de0c4c0cecc1d1af1a55a75b10bfdef Author: Linus Torvalds Date: Sun Jul 3 23:01:00 2016 -0700 Linux 4.7-rc6 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b295dd5b8eb755bc7b57220d93705994090e954 Merge: 236bfd8 5c672ab Author: Linus Torvalds Date: Sun Jul 3 12:02:00 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse Pull fuse fix from Miklos Szeredi: "This makes sure userspace filesystems are not broken by the parallel lookups and readdir feature" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse: fuse: serialize dirops by default commit 236bfd8ed868edfc42a656682487683ade3fede4 Merge: 4f30292 e7c0b59 Author: Linus Torvalds Date: Sun Jul 3 11:57:09 2016 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "This contains fixes for a dentry leak, a regression in 4.6 noticed by Docker users and missing write access checking in truncate" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: warn instead of error if d_type is not supported ovl: get_write_access() in truncate ovl: fix dentry leak for default_permissions commit 86a8280a7fe007d61b05fa8a352edc0595283dad Author: Andrea Gelmini Date: Sat May 21 13:57:20 2016 +0200 m68k: Assorted spelling fixes - s/acccess/access/ - s/accoding/according/ - s/addad/added/ - s/addreess/address/ - s/allocatiom/allocation/ - s/Assember/Assembler/ - s/compactnes/compactness/ - s/conneced/connected/ - s/decending/descending/ - s/diectly/directly/ - s/diplacement/displacement/ Signed-off-by: Andrea Gelmini [geert: Squashed, fix arch/m68k/ifpsp060/src/pfpsp.S] Signed-off-by: Geert Uytterhoeven arch/m68k/coldfire/head.S | 2 +- arch/m68k/coldfire/m5272.c | 2 +- arch/m68k/coldfire/pci.c | 2 +- arch/m68k/ifpsp060/src/fpsp.S | 8 ++++---- arch/m68k/ifpsp060/src/pfpsp.S | 4 ++-- arch/m68k/include/asm/dma.h | 2 +- arch/m68k/include/asm/m525xsim.h | 4 ++-- arch/m68k/include/asm/mcfmmu.h | 2 +- arch/m68k/include/asm/q40_master.h | 2 +- arch/m68k/mac/iop.c | 2 +- arch/m68k/math-emu/fp_decode.h | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) commit fc18822510721fe694d273c5211c71ea52796d76 Author: Josh Poimboeuf Date: Fri Jul 1 23:02:05 2016 -0500 perf/x86: Fix 32-bit perf user callgraph collection A basic perf callgraph record operation causes an immediate panic on a 32-bit kernel compiled with CONFIG_CC_STACKPROTECTOR=y: $ perf record -g ls Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: c0404fbd CPU: 0 PID: 998 Comm: ls Not tainted 4.7.0-rc5+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.1-1.fc24 04/01/2014 c0dd5967 ff7afe1c 00000086 f41dbc2c c07445a0 464c457f f41dbca8 f41dbc44 c05646f4 f41dbca8 464c457f f41dbca8 464c457f f41dbc54 c04625be c0ce56fc c0404fbd f41dbc88 c0404fbd b74668f0 f41dc000 00000000 c0000000 00000000 Call Trace: [] dump_stack+0x58/0x78 [] panic+0x8e/0x1c6 [] __stack_chk_fail+0x1e/0x30 [] ? perf_callchain_user+0x22d/0x230 [] perf_callchain_user+0x22d/0x230 [] get_perf_callchain+0x1ff/0x270 [] perf_callchain+0x78/0x90 [] perf_prepare_sample+0x24b/0x370 [] perf_event_output_forward+0x24/0x70 [] __perf_event_overflow+0xa0/0x210 [] ? cpu_clock_event_read+0x43/0x50 [] perf_swevent_hrtimer+0x101/0x180 [] ? kmap_atomic_prot+0x35/0x140 [] ? get_page_from_freelist+0x279/0x950 [] ? vma_interval_tree_remove+0x158/0x230 [] ? wp_page_copy.isra.82+0x2f4/0x630 [] ? page_add_file_rmap+0x1d/0x50 [] ? unlock_page+0x61/0x80 [] ? filemap_map_pages+0x305/0x320 [] ? handle_mm_fault+0xb7f/0x1560 [] ? timerqueue_del+0x1b/0x70 [] ? __remove_hrtimer+0x2e/0x60 [] __hrtimer_run_queues+0xcb/0x2a0 [] ? __perf_event_overflow+0x210/0x210 [] hrtimer_interrupt+0x8a/0x180 [] local_apic_timer_interrupt+0x32/0x60 [] smp_apic_timer_interrupt+0x33/0x50 [] apic_timer_interrupt+0x34/0x3c Kernel Offset: disabled ---[ end Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: c0404fbd The panic is caused by the fact that perf_callchain_user() mistakenly assumes it's 64-bit only and ends up corrupting the stack. Signed-off-by: Josh Poimboeuf Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: stable@vger.kernel.org # v4.5+ Fixes: 75925e1ad7f5 ("perf/x86: Optimize stack walk user accesses") Link: http://lkml.kernel.org/r/1a547f5077ec30f75f9b57074837c3c80df86e5e.1467432113.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar arch/x86/events/core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit 9010ae4a8dee29e5886e86682799dde0eee7f447 Author: Stephane Eranian Date: Fri Jul 1 15:22:22 2016 -0700 perf/x86/intel: Update event constraints when HT is off This patch updates the event constraints for non-PEBS mode for Intel Broadwell and Skylake processors. When HT is off, each CPU gets 8 generic counters. However, not all events can be programmed on any of the 8 counters. This patch adds the constraints for the MEM_* events which can only be measured on the bottom 4 counters. The constraints are also valid when HT is off because, then, there are only 4 generic counters and they are the bottom counters. Signed-off-by: Stephane Eranian Cc: Alexander Shishkin Cc: Arnaldo Carvalho de Melo Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Vince Weaver Cc: kan.liang@intel.com Link: http://lkml.kernel.org/r/1467411742-13245-1-git-send-email-eranian@google.com Signed-off-by: Ingo Molnar arch/x86/events/intel/core.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit e7c0b5991dd1be7b6f6dc2b54a15a0f47b64b007 Author: Vivek Goyal Date: Fri Jul 1 10:02:44 2016 -0400 ovl: warn instead of error if d_type is not supported overlay needs underlying fs to support d_type. Recently I put in a patch in to detect this condition and started failing mount if underlying fs did not support d_type. But this breaks existing configurations over kernel upgrade. Those who are running docker (partially broken configuration) with xfs not supporting d_type, are surprised that after kernel upgrade docker does not run anymore. https://github.com/docker/docker/issues/22937#issuecomment-229881315 So instead of erroring out, detect broken configuration and warn about it. This should allow existing docker setups to continue working after kernel upgrade. Signed-off-by: Vivek Goyal Signed-off-by: Miklos Szeredi Fixes: 45aebeaf4f67 ("ovl: Ensure upper filesystem supports d_type") Cc: 4.6 fs/overlayfs/super.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 4f302921c1458d790ae21147f7043f4e6b6a1085 Merge: 70bd68d 6d037de Author: Linus Torvalds Date: Sat Jul 2 19:10:21 2016 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS fix from Ralf Baechle: "Only a single fix for 4.7 pending at this point. It fixes an issue that may lead to corruption of the cache mode bits in the page table" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: Fix possible corruption of cache mode by mprotect. commit 70bd68d7f725b801d62566774d4770601998d03a Merge: 99b0f54 bfa3708 Author: Linus Torvalds Date: Sat Jul 2 17:47:54 2016 -0700 Merge tag 'powerpc-4.7-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - tm: Always reclaim in start_thread() for exec() class syscalls from Cyril Bur - tm: Avoid SLB faults in treclaim/trecheckpoint when RI=0 from Michael Neuling - eeh: Fix wrong argument passed to eeh_rmv_device() from Gavin Shan - Initialise pci_io_base as early as possible from Darren Stevens * tag 'powerpc-4.7-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc: Initialise pci_io_base as early as possible powerpc/tm: Avoid SLB faults in treclaim/trecheckpoint when RI=0 powerpc/eeh: Fix wrong argument passed to eeh_rmv_device() powerpc/tm: Always reclaim in start_thread() for exec() class syscalls commit b291c418172f2cfbe009d81cd9a92f7a2de7c579 Author: Stefan Hauser Date: Fri Jul 1 22:35:03 2016 +0200 net: phy: dp83867: Fix initialization of PHYCR register When initializing the PHY control register, the FIFO depth bits are written without reading the previous register value, i.e. all other bits are overwritten with zero. This disables automatic MDI-X configuration, which is enabled by default. Fix initialization by doing a read/modify/write operation. Signed-off-by: Stefan Hauser Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/dp83867.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 373819ec391de0d11f63b10b2fb69ef2854236ca Author: Sergio Valverde Date: Fri Jul 1 11:44:30 2016 -0600 enc28j60: Fix race condition in enc28j60 driver The interrupt worker code for the enc28j60 relies only on the TXIF flag to determinate if the packet transmission was completed. However the datasheet specifies in section 12.1.3 that TXERIF will clear the TXRTS after a transmit abort. Also in section 12.1.4 that TXIF will be set when TXRTS transitions from '1' to '0'. Therefore the TXIF flag is enabled during transmission errors. This causes a race condition, since the worker code will invoke enc28j60_tx_clear() -> netif_wake_queue(), potentially invoking the ndo_start_xmit function to send a new packet. The enc28j60_send_packet function uses a workqueue that invokes enc28j60_hw_tx(). In between this function is called, the worker from the interrupt handler will enter the path for error handler because of the TXERIF flag, causing to invoke enc28j60_tx_clear() again and releasing the packet scheduled for transmission, causing a kernel crash with due a NULL pointer. These crashes due a NULL pointer were observed under stress conditions of the device. A BUG_ON() sequence was used to validate the issue was fixed, and has been running without problems for 2 years now. Signed-off-by: Diego Dompe Acked-by: Sergio Valverde Signed-off-by: David S. Miller drivers/net/ethernet/microchip/enc28j60.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a8b7d7709dc6db7d6d8a9a04aa9d49b029a27203 Author: Matt Corallo Date: Thu Jun 30 19:46:16 2016 +0000 net: stmmac: Fix null-function call in ISR on stmmac1000 (resent due to overhelpful mail client corrupting patch) At least on Meson GXBB, the CORE_IRQ_MTL_RX_OVERFLOW interrupt is thrown with the stmmac1000 driver, which does not support set_rx_tail_ptr. With this patch and the clock fixes, 1G ethernet works on ODROID-C2. Signed-off-by: Matt Corallo Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 99b0f54e6a3a4012aacfaada5644a8e520447d80 Merge: 467ce76 88c0871 Author: Linus Torvalds Date: Sat Jul 2 09:41:28 2016 -0700 Merge tag 'drm-fixes-for-v4.7-rc6' of git://people.freedesktop.org/~airlied/linux Pull drm fixes frlm Dave Airlie: "Just some AMD and Intel fixes, the AMD ones are further production Polaris fixes, and the Intel ones fix some early timeouts, some PCI ID changes and a couple of other fixes. Still a bit Internet challenged here, hopefully end of next week will solve it" * tag 'drm-fixes-for-v4.7-rc6' of git://people.freedesktop.org/~airlied/linux: drm/i915: Fix missing unlock on error in i915_ppgtt_info() drm/amd/powerplay: workaround for UVD clock issue drm/amdgpu: add ACLK_CNTL setting for polaris10 drm/amd/powerplay: fix issue uvd dpm can't enabled on Polaris11. drm/amd/powerplay: Workaround for Memory EDC Error on Polaris10. drm/i915: Removing PCI IDs that are no longer listed as Kabylake. drm/i915: Add more Kabylake PCI IDs. drm/i915: Avoid early timeout during AUX transfers drm/i915/hsw: Avoid early timeout during LCPLL disable/restore drm/i915/lpt: Avoid early timeout during FDI PHY reset drm/i915/bxt: Avoid early timeout during PLL enable drm/i915: Refresh cached DP port register value on resume drm/amd/powerplay: Update CKS on/ CKS off voltage offset calculation drm/amd/powerplay: disable FFC. drm/amd/powerplay: add some definition for FFC feature on polaris. commit 467ce7693f5111c11daeb75e02eba2ab9ee6f334 Merge: a2b0db5 2a9b27b Author: Linus Torvalds Date: Sat Jul 2 09:40:11 2016 -0700 Merge tag 'spi-fix-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "A few small driver-specific fixes for SPI, all in the normal important if you hit them category especially the rockchip driver fix which addresses a race which has been exposed more frequently with some recent performance improvements" * tag 'spi-fix-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: sunxi: fix transfer timeout spi: sun4i: fix FIFO limit spi: rockchip: Signal unfinished DMA transfers spi: spi-ti-qspi: Suspend the queue before removing the device commit a2b0db5b55d5d70d6cdc380af287145418cb9c15 Merge: 4438512 a29a36f Author: Linus Torvalds Date: Sat Jul 2 09:39:03 2016 -0700 Merge tag 'regulator-fix-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Two small fixes for the regulator subsystem - one fixing a crash with one of the devices supported by the max77620 driver, another fixing startup for the anatop regulator when it starts up with the regulator in bypass mode" * tag 'regulator-fix-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: max77620: check for valid regulator info regulator: anatop: allow regulator to be in bypass mode commit 443851200542932414ee63ad774750633a880b4f Merge: dbdc3bb 0863477 Author: Linus Torvalds Date: Sat Jul 2 09:36:49 2016 -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 small fix for the newly added oxnas clk driver and a handful of rockchip clk driver fixes for newly added rk3399 support" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: Fix return value check in oxnas_stdclk_probe() clk: rockchip: release io resource when failing to init clk on rk3399 clk: rockchip: fix cpuclk registration error handling clk: rockchip: Revert "clk: rockchip: reset init state before mmc card initialization" clk: rockchip: fix incorrect parent for rk3399's {c,g}pll_aclk_perihp_src clk: rockchip: mark rk3399 GIC clocks as critical clk: rockchip: initialize flags of clk_init_data in mmc-phase clock commit 046e9ceefab985a137fbd15b946497a88e5a6513 Merge: 62db715 7c5eec4 Author: Takashi Iwai Date: Sat Jul 2 10:50:45 2016 +0200 Merge tag 'asoc-fix-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v4.7 A small clutch of hardware specific fixes for various ASoC devices, all small individually and important if you have that device but not otherwise. commit 88c087109b5fedaf9b61839d08543fdaf9d5ec39 Merge: 40793e8 cab1032 Author: Dave Airlie Date: Sat Jul 2 15:50:41 2016 +1000 Merge tag 'drm-intel-fixes-2016-06-30' of git://anongit.freedesktop.org/drm-intel into drm-fixes here's a batch of i915 fixes for 4.7. * tag 'drm-intel-fixes-2016-06-30' of git://anongit.freedesktop.org/drm-intel: drm/i915: Fix missing unlock on error in i915_ppgtt_info() drm/i915: Removing PCI IDs that are no longer listed as Kabylake. drm/i915: Add more Kabylake PCI IDs. drm/i915: Avoid early timeout during AUX transfers drm/i915/hsw: Avoid early timeout during LCPLL disable/restore drm/i915/lpt: Avoid early timeout during FDI PHY reset drm/i915/bxt: Avoid early timeout during PLL enable drm/i915: Refresh cached DP port register value on resume commit 40793e85d2f1088e1067f1ddeb63f4dd2336f198 Merge: dbdc3bb a7f14a1 Author: Dave Airlie Date: Sat Jul 2 15:48:33 2016 +1000 Merge branch 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Just a few more late fixes for Polaris cards. * 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: workaround for UVD clock issue drm/amdgpu: add ACLK_CNTL setting for polaris10 drm/amd/powerplay: fix issue uvd dpm can't enabled on Polaris11. drm/amd/powerplay: Workaround for Memory EDC Error on Polaris10. drm/amd/powerplay: Update CKS on/ CKS off voltage offset calculation drm/amd/powerplay: disable FFC. drm/amd/powerplay: add some definition for FFC feature on polaris. commit 6d037de90a1fd7b4879b48d4dd5c4839b271be98 Author: Ralf Baechle Date: Fri Jul 1 15:01:01 2016 +0200 MIPS: Fix possible corruption of cache mode by mprotect. The following testcase may result in a page table entries with a invalid CCA field being generated: static void *bindstack; static int sysrqfd; static void protect_low(int protect) { mprotect(bindstack, BINDSTACK_SIZE, protect); } static void sigbus_handler(int signal, siginfo_t * info, void *context) { void *addr = info->si_addr; write(sysrqfd, "x", 1); printf("sigbus, fault address %p (should not happen, but might)\n", addr); abort(); } static void run_bind_test(void) { unsigned int *p = bindstack; p[0] = 0xf001f001; write(sysrqfd, "x", 1); /* Set trap on access to p[0] */ protect_low(PROT_NONE); write(sysrqfd, "x", 1); /* Clear trap on access to p[0] */ protect_low(PROT_READ | PROT_WRITE | PROT_EXEC); write(sysrqfd, "x", 1); /* Check the contents of p[0] */ if (p[0] != 0xf001f001) { write(sysrqfd, "x", 1); /* Reached, but shouldn't be */ printf("badness, shouldn't happen but does\n"); abort(); } } int main(void) { struct sigaction sa; sysrqfd = open("/proc/sysrq-trigger", O_WRONLY); if (sigprocmask(SIG_BLOCK, NULL, &sa.sa_mask)) { perror("sigprocmask"); return 0; } sa.sa_sigaction = sigbus_handler; sa.sa_flags = SA_SIGINFO | SA_NODEFER | SA_RESTART; if (sigaction(SIGBUS, &sa, NULL)) { perror("sigaction"); return 0; } bindstack = mmap(NULL, BINDSTACK_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); if (bindstack == MAP_FAILED) { perror("mmap bindstack"); return 0; } printf("bindstack: %p\n", bindstack); run_bind_test(); printf("done\n"); return 0; } There are multiple ingredients for this: 1) PAGE_NONE is defined to _CACHE_CACHABLE_NONCOHERENT, which is CCA 3 on all platforms except SB1 where it's CCA 5. 2) _page_cachable_default must have bits set which are not set _CACHE_CACHABLE_NONCOHERENT. 3) Either the defective version of pte_modify for XPA or the standard version must be in used. However pte_modify for the 36 bit address space support is no affected. In that case additional bits in the final CCA mode may generate an invalid value for the CCA field. On the R10000 system where this was tracked down for example a CCA 7 has been observed, which is Uncached Accelerated. Fixed by: 1) Using the proper CCA mode for PAGE_NONE just like for all the other PAGE_* pte/pmd bits. 2) Fix the two affected variants of pte_modify. Further code inspection also shows the same issue to exist in pmd_modify which would affect huge page systems. Issue in pte_modify tracked down by Alastair Bridgewater, PAGE_NONE and pmd_modify issue found by me. The history of this goes back beyond Linus' git history. Chris Dearman's commit 351336929ccf222ae38ff0cb7a8dd5fd5c6236a0 ("[MIPS] Allow setting of the cache attribute at run time.") missed the opportunity to fix this but it was originally introduced in lmo commit d523832cf12007b3242e50bb77d0c9e63e0b6518 ("Missing from last commit.") and 32cc38229ac7538f2346918a09e75413e8861f87 ("New configuration option CONFIG_MIPS_UNCACHED.") Signed-off-by: Ralf Baechle Reported-by: Alastair Bridgewater arch/mips/include/asm/pgtable.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit f7eca374f000bd8bd6aacc2619475fdba0b7ecca Author: Sinan Kaya Date: Wed Jun 29 04:27:37 2016 -0400 ACPI,PCI,IRQ: separate ISA penalty calculation Since commit 103544d86976 (ACPI,PCI,IRQ: reduce resource requirements) the penalty values are calculated on the fly rather than at boot time. This works fine for PCI interrupts but not so well for ISA interrupts. The information on whether or not an ISA interrupt is in use is not available to the pci_link.c code directly. That information is obtained from the outside via acpi_penalize_isa_irq(). [If its "active" argument is true, then the IRQ is in use by ISA.] Since the current code relies on PCI Link objects for determination of penalties, we are factoring in the PCI penalty twice after acpi_penalize_isa_irq() function is called. To avoid that, limit the newly added functionality to just PCI interrupts so that old behavior is still maintained. Fixes: 103544d86976 (ACPI,PCI,IRQ: reduce resource requirements) Signed-off-by: Sinan Kaya Tested-by: Wim Osterholt Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 487cf917ed0d12afaf403d9d77684bf44b8c13be Author: Sinan Kaya Date: Wed Jun 29 04:27:36 2016 -0400 Revert "ACPI, PCI, IRQ: remove redundant code in acpi_irq_penalty_init()" Trying to make the ISA and PCI init functionality common turned out to be a bad idea, because the ISA path depends on external functionality. Restore the previous behavior and limit the refactoring to PCI interrupts only. Fixes: 1fcb6a813c4f "ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init()" Signed-off-by: Sinan Kaya Tested-by: Wim Osterholt Signed-off-by: Rafael J. Wysocki arch/x86/pci/acpi.c | 1 + drivers/acpi/pci_link.c | 36 ++++++++++++++++++++++++++++++++++++ include/acpi/acpi_drivers.h | 1 + 3 files changed, 38 insertions(+) commit 4a6e68bf96c1fa293717d2f00a68a68c92fa4150 Author: Sinan Kaya Date: Wed Jun 29 04:27:35 2016 -0400 ACPI,PCI,IRQ: factor in PCI possible The change introduced in commit 103544d86976 (ACPI,PCI,IRQ: reduce resource requirements) omitted the initially applied PCI_POSSIBLE penalty when the IRQ is active. Incorrect calculation of the penalty leads the ACPI code to assigning a wrong interrupt number to a PCI INTx interrupt. This would not be as bad as it sounds in theory. It would just cause the interrupts to be shared and result in performance penalty. However, some drivers (like the parallel port driver) don't like interrupt sharing and in the above case they will causes all of the PCI drivers wanting to share the interrupt to be unable to request it. The issue has not been caught in testing because the behavior is platform-specific and depends on the peripherals ending up sharing the IRQ and their drivers. Before the above commit the code would add the PCI_POSSIBLE value divided by the number of possible IRQ users to the IRQ penalty during initialization. Later in that code path, if the IRQ is chosen as the active IRQ or if it is used by ISA; additional penalties are added. Fixes: 103544d86976 (ACPI,PCI,IRQ: reduce resource requirements) Signed-off-by: Sinan Kaya Tested-by: Wim Osterholt [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_link.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit dbdc3bb74faeec5fd92e28c15c945045d5aab426 Merge: 81dbd6f 5479458 Author: Linus Torvalds Date: Fri Jul 1 15:31:48 2016 -0700 Merge tag 'acpi-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Fix an expression in the ACPI PCI IRQ management code added by a recent commit that overlooked missing parens in it, so the result of the computation is incorrect in some cases (Sinan Kaya)" * tag 'acpi-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI,PCI,IRQ: correct operator precedence commit 81dbd6f59d91afdba16ec2edb58f6f048feed838 Merge: 48c4565 742c87b Author: Linus Torvalds Date: Fri Jul 1 15:28:22 2016 -0700 Merge tag 'pm-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Three cpufreq fixes, one in the core (stable-candidate) and two in drivers (intel_pstate and cpufreq-dt). Specifics: - Fix a recent intel_pstate regression that caused the number of wakeups to increase significantly on an idle system in some cases due to excessive synchronize_sched() invocations (Rafael Wysocki). - Fix unnecessary invocations of WARN_ON() in the cpufreq core after cpufreq has been suspended introduced during the 4.6 cycla (Rafael Wysocki). - Fix an error code path in the cpufreq-dt-platdev driver that forgets to drop a reference to a DT node (Masahiro Yamada)" * tag 'pm-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: Avoid false-positive WARN_ON()s in cpufreq_update_policy() cpufreq: dt: call of_node_put() before error out intel_pstate: Do not clear utilization update hooks on policy changes commit 48c4565ed66ee7d045ac8d3c442ca7e588b32bc8 Merge: 2728c57 e06b933 Author: Linus Torvalds Date: Fri Jul 1 15:20:11 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Tmpfs readdir throughput regression fix (this cycle) + some -stable fodder all over the place. One missing bit is Miklos' tonight locks.c fix - NFS folks had already grabbed that one by the time I woke up ;-)" [ The locks.c fix came through the nfsd tree just moments ago ] * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: namespace: update event counter when umounting a deleted dentry 9p: use file_dentry() ceph: fix d_obtain_alias() misuses lockless next_positive() libfs.c: new helper - next_positive() dcache_{readdir,dir_lseek}(): don't bother with nested ->d_lock commit 2728c57fda2c10cb290f1516cab5b170ea2e3f22 Merge: 0d064a7 6343a21 Author: Linus Torvalds Date: Fri Jul 1 15:18:49 2016 -0700 Merge tag 'nfsd-4.7-3' of git://linux-nfs.org/~bfields/linux Pull lockd/locks fixes from Bruce Fields: "One fix for lockd soft lookups in an error path, and one fix for file leases on overlayfs" * tag 'nfsd-4.7-3' of git://linux-nfs.org/~bfields/linux: locks: use file_inode() lockd: unregister notifier blocks if the service fails to come up completely commit 0d064a7b9c43e79c97cb2372850e12971de23b22 Merge: f3683cc 5baaf3b Author: Linus Torvalds Date: Fri Jul 1 15:17:16 2016 -0700 Merge tag 'mfd-fixes-4.7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull more MFD fixes from Lee Jones: "Apologies for missing these from the first pull request. Final patches fixing Reset API change" * tag 'mfd-fixes-4.7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: usb: dwc3: st: Use explicit reset_control_get_exclusive() API phy: phy-stih407-usb: Use explicit reset_control_get_exclusive() API phy: miphy28lp: Inform the reset framework that our reset line may be shared commit f3683ccd12ac625cee12650ca8595c7b9cb16d77 Merge: 6e5c4f1 1bcbf42 Author: Linus Torvalds Date: Fri Jul 1 15:15:03 2016 -0700 Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fixes from Dan Williams: "1/ Two regression fixes since v4.6: one for the byte order of a sysfs attribute (bz121161) and another for QEMU 2.6's NVDIMM _DSM (ACPI Device Specific Method) implementation that gets tripped up by new auto-probing behavior in the NFIT driver. 2/ A fix tagged for -stable that stops the kernel from clobbering/ignoring changes to the configuration of a 'pfn' instance ("struct page" driver). For example changing the alignment from 2M to 1G may silently revert to 2M if that value is currently stored on media. 3/ A fix from Eric for an xfstests failure in dax. It is not currently tagged for -stable since it requires an 8-exabyte file system to trigger, and there appear to be no user visible side effects" * 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nfit: fix format interface code byte order dax: fix offset overflow in dax_io acpi, nfit: fix acpi_check_dsm() vs zero functions implemented libnvdimm, pfn, dax: fix initialization vs autodetect for mode + alignment commit 55e77a3e8297581c919b45adcc4d0815b69afa84 Author: Richard Alpe Date: Fri Jul 1 11:11:21 2016 +0200 tipc: fix nl compat regression for link statistics Fix incorrect use of nla_strlcpy() where the first NLA_HDRLEN bytes of the link name where left out. Making the output of tipc-config -ls look something like: Link statistics: dcast-link 1:data0-1.1.2:data0 1:data0-1.1.3:data0 Also, for the record, the patch that introduce this regression claims "Sending the whole object out can cause a leak". Which isn't very likely as this is a compat layer, where the data we are parsing is generated by us and we know the string to be NULL terminated. But you can of course never be to secure. Fixes: 5d2be1422e02 (tipc: fix an infoleak in tipc_nl_compat_link_dump) Signed-off-by: Richard Alpe Signed-off-by: David S. Miller net/tipc/netlink_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 016eb55157166132b094e53434748cae35e18455 Author: Florian Fainelli Date: Thu Jun 30 13:27:20 2016 -0700 net: bcmsysport: Device stats are unsigned long On 64bits kernels, device stats are 64bits wide, not 32bits. Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bcmsysport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79c62220d74a4a3f961a2cb7320da09eebf5daf7 Author: Daniel Borkmann Date: Fri Jul 1 00:00:54 2016 +0200 macsec: set actual real device for xmit when !protect_frames Avoid recursions of dev_queue_xmit() to the wrong net device when frames are unprotected, since at that time skb->dev still points to our own macsec dev and unlike macsec_encrypt_finish() dev pointer doesn't get updated to real underlying device. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Daniel Borkmann Acked-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/macsec.c | 1 + 1 file changed, 1 insertion(+) commit 82a31b9231f02d9c1b7b290a46999d517b0d312a Author: WANG Cong Date: Thu Jun 30 10:15:22 2016 -0700 net_sched: fix mirrored packets checksum Similar to commit 9b368814b336 ("net: fix bridge multicast packet checksum validation") we need to fixup the checksum for CHECKSUM_COMPLETE when pushing skb on RX path. Otherwise we get similar splats. Cc: Jamal Hadi Salim Cc: Tom Herbert Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/linux/skbuff.h | 19 +++++++++++++++++++ net/core/skbuff.c | 18 ------------------ net/sched/act_mirred.c | 2 +- 3 files changed, 20 insertions(+), 19 deletions(-) commit eb70db8756717b90c01ccc765fdefc4dd969fc74 Author: David S. Miller Date: Fri Jul 1 16:07:50 2016 -0400 packet: Use symmetric hash for PACKET_FANOUT_HASH. People who use PACKET_FANOUT_HASH want a symmetric hash, meaning that they want packets going in both directions on a flow to hash to the same bucket. The core kernel SKB hash became non-symmetric when the ipv6 flow label and other entities were incorporated into the standard flow hash order to increase entropy. But there are no users of PACKET_FANOUT_HASH who want an assymetric hash, they all want a symmetric one. Therefore, use the flow dissector to compute a flat symmetric hash over only the protocol, addresses and ports. This hash does not get installed into and override the normal skb hash, so this change has no effect whatsoever on the rest of the stack. Reported-by: Eric Leblond Tested-by: Eric Leblond Signed-off-by: David S. Miller include/linux/skbuff.h | 1 + net/core/flow_dissector.c | 43 +++++++++++++++++++++++++++++++++++++++++++ net/packet/af_packet.c | 2 +- 3 files changed, 45 insertions(+), 1 deletion(-) commit beca4cf55323147ca9c8a98de1871be6e4fe8f34 Author: Thomas Hellstrom Date: Wed Jun 29 13:37:35 2016 -0700 drm/vmwgfx: Fix corner case screen target management When the surface backing a framebuffer doesn't match the framebuffer's dimensions, the screen target code would test the framebuffer dimensions rather than the surface dimensions when deciding whether to bind the surface as a screen target directly. This causes a screen target - surface dimension mismatch and a subsequent device error. Fix this by testing against the surface dimension. v2: Fix review comments by Sinclair Yeh. Signed-off-by: Thomas Hellstrom Reviewed-by: Sinclair Yeh Cc: drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d5f1a291e32309324a8c481ed84b5c118d1360ea Author: Sinclair Yeh Date: Wed Jun 29 13:23:18 2016 -0700 drm/vmwgfx: Delay pinning fbdev framebuffer until after mode set For the Screen Object display unit, we need to reserve a guest-invisible region equal to the size of the framebuffer for the host. This region can only be reserved in VRAM, whereas the guest-visible framebuffer can be reserved in either VRAM or GMR. As such priority should be given to the guest-invisible region otherwise in a limited VRAM situation, we can fail to allocate this region. This patch makes it so that vmw_sou_backing_alloc() is called before the framebuffer is pinned. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Cc: --- This is the last patch of a 3-patch series to fix console black screen issue on Ubuntu 16.04 server drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 47 ++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 22 deletions(-) commit 4ed7e2242b637bc4af0416e4aa9f945db30fb44a Author: Sinclair Yeh Date: Wed Jun 29 13:20:26 2016 -0700 drm/vmwgfx: Check pin count before attempting to move a buffer In certain scenarios, e.g. when fbdev is enabled, we can get into a situation where a vmw_framebuffer_pin() is called on a buffer that is already pinned. When this happens, ttm_bo_validate() will unintentially remove the TTM_PL_FLAG_NO_EVICT flag, thus unpinning it, and leaving no way to actually pin the buffer again. To prevent this, if a buffer is already pinned, then instead of calling ttm_bo_validate(), just make sure the proposed placement is compatible with the existing placement. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Cc: --- This is the 2nd patch in a 3-patch series to fix a console black screen issue on Ubuntu 16.04 server. This fixes a BUG_ON() condition where a pinned buffer gets accidentally put onto the LRU list. drivers/gpu/drm/vmwgfx/vmwgfx_dmabuf.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) commit 94477bff390aa4612d2332c8abafaae0a13d6923 Author: Sinclair Yeh Date: Wed Jun 29 12:58:49 2016 -0700 drm/ttm: Make ttm_bo_mem_compat available There are cases where it is desired to see if a proposed placement is compatible with a buffer object before calling ttm_bo_validate(). Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Cc: --- This is the first of a 3-patch series to fix a black screen issue observed on Ubuntu 16.04 server. drivers/gpu/drm/ttm/ttm_bo.c | 7 ++++--- include/drm/ttm/ttm_bo_api.h | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) commit 04319d89fbec72dfd60738003c3813b97c1d5f5a Author: Sinclair Yeh Date: Wed Jun 29 12:15:48 2016 -0700 drm/vmwgfx: Add an option to change assumed FB bpp Offer an option for advanced users who want larger modes at 16bpp. This becomes necessary after the fix: "Work around mode set failure in 2D VMs." Without this patch, there would be no way for existing advanced users to get to a high res mode, and the regression is they will likely get a black screen after a software update on their current VM. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Cc: drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 5 +++++ drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 3 +++ 3 files changed, 9 insertions(+) commit 7c20d213dd3cd6295bf9162730e7a368af957854 Author: Sinclair Yeh Date: Wed Jun 29 11:29:47 2016 -0700 drm/vmwgfx: Work around mode set failure in 2D VMs In a low-memory 2D VM, fbdev can take up a large percentage of available memory, making them unavailable for other DRM clients. Since we do not take fbdev into account when filtering modes, we end up claiming to support more modes than we actually do. As a result, users get a black screen when setting a mode too large for current available memory. In a low-memory VM configuration, users can get a black screen for a mode as low as 1024x768. The current mode filtering mechanism keys off of SVGA_REG_SUGGESTED_GBOBJECT_MEM_SIZE_KB, i.e. the maximum amount of surface memory we have. Since this value is a performance suggestion, not a hard limit, and since there should not be much of a performance impact for a 2D VM, rather than filtering out more modes, we will just allow ourselves to exceed the SVGA's performance suggestion. Also changed assumed bpp to 32 from 16 to make sure we can actually support all the modes listed. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Cc: drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 7 +++++++ drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 9 +-------- 2 files changed, 8 insertions(+), 8 deletions(-) commit a9cd9c044aa90ba2b31d1bf3e3432f38fb1d25fe Author: Sinclair Yeh Date: Wed Jun 29 16:31:01 2016 -0700 drm/vmwgfx: Add a check to handle host message failure Discovered by static code analysis tool. If for some reason communication with the host fails more than preset number of retries, return an error instead of return garbage. Signed-off-by: Sinclair Yeh Reviewed-by: Charmaine Lee Reported-by: Dan Carpenter drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 3 +++ 1 file changed, 3 insertions(+) commit 6e5c4f13a53d8b126f5636cb29b1c80d10d6838e Merge: 756c0ae d839722 Author: Linus Torvalds Date: Fri Jul 1 09:21:34 2016 -0700 Merge tag 'staging-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO fixes from Greg KH: "Here are a few small staging and iio driver fixes for 4.7-rc6. Nothing major here, just a number of small fixes, all have been in linux-next for a while, and the full details are in the shortlog" * tag 'staging-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: iio:ad7266: Fix probe deferral for vref iio:ad7266: Fix support for optional regulators iio:ad7266: Fix broken regulator error handling iio: accel: kxsd9: fix the usage of spi_w8r8() staging: iio: accel: fix error check staging: iio: ad5933: fix order of cycle conditions staging: iio: fix ad7606_spi regression iio: inv_mpu6050: Fix use-after-free in ACPI code commit 756c0aeca3c2deeadf331394b7ae4a3b2cb4d401 Merge: 0232b23 5353ed8 Author: Linus Torvalds Date: Fri Jul 1 09:20:12 2016 -0700 Merge tag 'tty-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty fixes from Greg KH: "Here are two tty fixes for some reported issues. One resolves a crash in devpts, and the other resolves a problem with the fbcon cursor blink causing lockups. Both have been in linux-next with no reported problems" * tag 'tty-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: devpts: fix null pointer dereference on failed memory allocation tty: vt: Fix soft lockup in fbcon cursor blink timer. commit 0232b23d084bd075cee0812242323bbd1f4d0763 Merge: aa7a6c8 ab2a4bf Author: Linus Torvalds Date: Fri Jul 1 09:18:17 2016 -0700 Merge tag 'usb-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB and PHY fixes from Greg KH: "Here are a number of small USB and PHY driver fixes for 4.7-rc6. Nothing major here, all are described in the shortlog below. All have been in linux-next with no reported issues" * tag 'usb-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: USB: don't free bandwidth_mutex too early USB: EHCI: declare hostpc register as zero-length array phy-sun4i-usb: Fix irq free conditions to match request conditions phy: bcm-ns-usb2: checking the wrong variable phy-sun4i-usb: fix missing __iomem * phy: phy-sun4i-usb: Fix optional gpios failing probe phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe() phy: rcar-gen3-usb2: fix unexpected repeat interrupts of VBUS change usb: common: otg-fsm: add license to usb-otg-fsm commit aa7a6c8e5252ba28f36a8f87b9acd6a726aa3ae5 Merge: 1a0a02d 6082ee7 Author: Linus Torvalds Date: Fri Jul 1 09:13:31 2016 -0700 Merge tag 'iommu-fixes-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "Three fixes: - Fix use of smp_processor_id() in preemptible code in the IOVA allocation code. This got introduced with the scalability improvements in this release cycle. - A VT-d fix for out-of-bounds access of the iommu->domains array. The bug showed during suspend/resume. - AMD IOMMU fix to print the correct device id in the ACPI parsing code" * tag 'iommu-fixes-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/amd: Initialize devid variable before using it iommu/vt-d: Fix overflow of iommu->domains array iommu/iova: Disable preemption around use of this_cpu_ptr() commit a29a36f2650dbaa54c8aed8cc9af909113c19ad3 Merge: 4c2e07c 8a092e6 91ff811 Author: Mark Brown Date: Fri Jul 1 18:06:48 2016 +0200 Merge remote-tracking branches 'regulator/fix/anatop' and 'regulator/fix/max77620' into regulator-linus commit 7c5eec4edf4693aa61f3ee78bf28621dfe33d9f0 Merge: af5fb67 4f35325 572f1f6 50c7a0e Author: Mark Brown Date: Fri Jul 1 18:05:34 2016 +0200 Merge remote-tracking branches 'asoc/fix/rcar', 'asoc/fix/rt5670' and 'asoc/fix/wm8940' into asoc-linus commit af5fb67877a52561c614e5fda6d163acef4c4c69 Merge: 9d3146c dcd2d1f 19edeb3 86c0ae7 8e1cc0e 4f14f5c 6de7df8 Author: Mark Brown Date: Fri Jul 1 18:05:31 2016 +0200 Merge remote-tracking branches 'asoc/fix/ak4613', 'asoc/fix/arizona', 'asoc/fix/cx20442', 'asoc/fix/davinci', 'asoc/fix/fsl-ssi' and 'asoc/fix/hdmi' into asoc-linus commit 9d3146c401b0a09552bb2b5f4cedcbccd5dfb3fa Merge: de07bb5 fdfe3b3 Author: Mark Brown Date: Fri Jul 1 18:05:30 2016 +0200 Merge remote-tracking branch 'asoc/fix/rt5645' into asoc-linus commit de07bb5b11350082494b96cc2ec63714556cf213 Merge: 4c2e07c 18f5839 Author: Mark Brown Date: Fri Jul 1 18:05:30 2016 +0200 Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus commit 8ba8682107ee2ca3347354e018865d8e1967c5f4 Author: Omar Sandoval Date: Fri Jul 1 00:39:35 2016 -0700 block: fix use-after-free in sys_ioprio_get() get_task_ioprio() accesses the task->io_context without holding the task lock and thus can race with exit_io_context(), leading to a use-after-free. The reproducer below hits this within a few seconds on my 4-core QEMU VM: #define _GNU_SOURCE #include #include #include #include int main(int argc, char **argv) { pid_t pid, child; long nproc, i; /* ioprio_set(IOPRIO_WHO_PROCESS, 0, IOPRIO_PRIO_VALUE(IOPRIO_CLASS_IDLE, 0)); */ syscall(SYS_ioprio_set, 1, 0, 0x6000); nproc = sysconf(_SC_NPROCESSORS_ONLN); for (i = 0; i < nproc; i++) { pid = fork(); assert(pid != -1); if (pid == 0) { for (;;) { pid = fork(); assert(pid != -1); if (pid == 0) { _exit(0); } else { child = wait(NULL); assert(child == pid); } } } pid = fork(); assert(pid != -1); if (pid == 0) { for (;;) { /* ioprio_get(IOPRIO_WHO_PGRP, 0); */ syscall(SYS_ioprio_get, 2, 0); } } } for (;;) { /* ioprio_get(IOPRIO_WHO_PGRP, 0); */ syscall(SYS_ioprio_get, 2, 0); } return 0; } This gets us KASAN dumps like this: [ 35.526914] ================================================================== [ 35.530009] BUG: KASAN: out-of-bounds in get_task_ioprio+0x7b/0x90 at addr ffff880066f34e6c [ 35.530009] Read of size 2 by task ioprio-gpf/363 [ 35.530009] ============================================================================= [ 35.530009] BUG blkdev_ioc (Not tainted): kasan: bad access detected [ 35.530009] ----------------------------------------------------------------------------- [ 35.530009] Disabling lock debugging due to kernel taint [ 35.530009] INFO: Allocated in create_task_io_context+0x2b/0x370 age=0 cpu=0 pid=360 [ 35.530009] ___slab_alloc+0x55d/0x5a0 [ 35.530009] __slab_alloc.isra.20+0x2b/0x40 [ 35.530009] kmem_cache_alloc_node+0x84/0x200 [ 35.530009] create_task_io_context+0x2b/0x370 [ 35.530009] get_task_io_context+0x92/0xb0 [ 35.530009] copy_process.part.8+0x5029/0x5660 [ 35.530009] _do_fork+0x155/0x7e0 [ 35.530009] SyS_clone+0x19/0x20 [ 35.530009] do_syscall_64+0x195/0x3a0 [ 35.530009] return_from_SYSCALL_64+0x0/0x6a [ 35.530009] INFO: Freed in put_io_context+0xe7/0x120 age=0 cpu=0 pid=1060 [ 35.530009] __slab_free+0x27b/0x3d0 [ 35.530009] kmem_cache_free+0x1fb/0x220 [ 35.530009] put_io_context+0xe7/0x120 [ 35.530009] put_io_context_active+0x238/0x380 [ 35.530009] exit_io_context+0x66/0x80 [ 35.530009] do_exit+0x158e/0x2b90 [ 35.530009] do_group_exit+0xe5/0x2b0 [ 35.530009] SyS_exit_group+0x1d/0x20 [ 35.530009] entry_SYSCALL_64_fastpath+0x1a/0xa4 [ 35.530009] INFO: Slab 0xffffea00019bcd00 objects=20 used=4 fp=0xffff880066f34ff0 flags=0x1fffe0000004080 [ 35.530009] INFO: Object 0xffff880066f34e58 @offset=3672 fp=0x0000000000000001 [ 35.530009] ================================================================== Fix it by grabbing the task lock while we poke at the io_context. Cc: stable@vger.kernel.org Reported-by: Dmitry Vyukov Signed-off-by: Omar Sandoval Signed-off-by: Jens Axboe block/ioprio.c | 2 ++ 1 file changed, 2 insertions(+) commit 6343a2120862f7023006c8091ad95c1f16a32077 Author: Miklos Szeredi Date: Fri Jul 1 14:56:07 2016 +0200 locks: use file_inode() (Another one for the f_path debacle.) ltp fcntl33 testcase caused an Oops in selinux_file_send_sigiotask. The reason is that generic_add_lease() used filp->f_path.dentry->inode while all the others use file_inode(). This makes a difference for files opened on overlayfs since the former will point to the overlay inode the latter to the underlying inode. So generic_add_lease() added the lease to the overlay inode and generic_delete_lease() removed it from the underlying inode. When the file was released the lease remained on the overlay inode's lock list, resulting in use after free. Reported-by: Eryu Guan Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay") Cc: Signed-off-by: Miklos Szeredi Reviewed-by: Jeff Layton Signed-off-by: J. Bruce Fields fs/locks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cc1c73ad66610bffc80b691136ffc1e9a3b1a58 Author: Florian Westphal Date: Sun Apr 24 01:18:21 2016 +0200 netfilter: conntrack: avoid integer overflow when resizing Can overflow so we might allocate very small table when bucket count is high on a 32bit platform. Note: resize is only possible from init_netns. Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 08df7bc5001e7fc8bdb0a74e04ad2db5f797ed3d Merge: f87fda0 87424ad Author: David S. Miller Date: Fri Jul 1 06:12:12 2016 -0400 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox 100G mlx5 resiliency and xmit path fixes This series provides two set of fixes to the mlx5 driver: - Resiliency fixes for reset flow and internal pci errors - xmit path fixes Please consider queuing those patches for -stable (4.6). Reset flow fixes for core driver: - Add more commands to the list of error simulated commands when pci errors occur - Avoid calling sleeping function by the health poll thread - Fix incorrect page count when in internal error - Fix timeout in wait vital for VFs - Deadlock fix and Timeout handling in commands interface Reset flow and resiliency fixes for mlx5e netdev driver: - Handle RQ flush in error cases - Implement ndo_tx_timeout callback - Timeout if SQ doesn't flush during close - Log link state changes - Validate BW weight values of ETS xmit path fixes: - Fix wrong fallback assumption in select queue callback - Account for all L2 headers when copying headers into inline segment ==================== Signed-off-by: David S. Miller commit 87424ad52d76535234f217637fcaadcd2ef2334d Author: Shaker Daibes Date: Thu Jun 30 17:34:50 2016 +0300 net/mlx5e: Log link state changes Add Link UP/Down prints to kernel log when link state changes Signed-off-by: Shaker Daibes Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit cdcf11212b22ff8e3de88ced1a6eda5bb950e120 Author: Rana Shahout Date: Thu Jun 30 17:34:49 2016 +0300 net/mlx5e: Validate BW weight values of ETS Valid weight assigned to ETS TClass values are 1-100 Fixes: 08fb1dacdd76 ('net/mlx5e: Support DCBNL IEEE ETS') Signed-off-by: Rana Shahout Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 - drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit 7ccdd0841b305323e10e779c476d3fbae2165756 Author: Rana Shahout Date: Thu Jun 30 17:34:48 2016 +0300 net/mlx5e: Fix select queue callback The default fallback function used by mlx5e select queue can return any TX queues in range [0..dev->num_real_tx_queues). The current implementation assumes that the fallback function returns a number in the range [0.. number of channels). Actually dev->num_real_tx_queues = (number of channels) * dev->num_tc; which is more than the expected range if num_tc is configured and could lead to crashes. To fix this we test if num_tc is not configured we can safely return the fallback suggestion, if not we will reciprocal_scale the fallback result and normalize it to the desired range. Fixes: 08fb1dacdd76 ('net/mlx5e: Support DCBNL IEEE ETS') Signed-off-by: Rana Shahout Signed-off-by: Saeed Mahameed Reported-by: Doug Ledford Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 ++++- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 16 ++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) commit e3a19b53cbb0e6738b7a547f262179065b72e3fa Author: Matthew Finlay Date: Thu Jun 30 17:34:47 2016 +0300 net/mlx5e: Copy all L2 headers into inline segment ConnectX4-Lx uses an inline wqe mode that currently defaults to requiring the entire L2 header be included in the wqe. This patch fixes mlx5e_get_inline_hdr_size() to account for all L2 headers (VLAN, QinQ, etc) using skb_network_offset(skb). Fixes: e586b3b0baee ("net/mlx5: Ethernet Datapath files") Signed-off-by: Matthew Finlay Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6cd392a082deca8accec5c50b5b3fc1a9de5bfa2 Author: Daniel Jurgens Date: Thu Jun 30 17:34:46 2016 +0300 net/mlx5e: Handle RQ flush in error cases Add a timeout to avoid an infinite loop waiting for RQ's to flush. This occurs during AER/EEH and will also happen if the device stops posting completions due to internal error or reset, or if moving the RQ to the error state fails. Also cleanup posted receive resources when closing the RQ. Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality') Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 7 ++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 16 +++++++-- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 41 +++++++++++++++++++++++ 3 files changed, 61 insertions(+), 3 deletions(-) commit 3947ca1859999ac00698c0da0d233813a93d288a Author: Daniel Jurgens Date: Thu Jun 30 17:34:45 2016 +0300 net/mlx5e: Implement ndo_tx_timeout callback Add callback to handle TX timeouts. Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality') Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 46 +++++++++++++++++++++++ 2 files changed, 47 insertions(+) commit 29429f3300a378f7c29583b4c2c2ef29e2190a69 Author: Daniel Jurgens Date: Thu Jun 30 17:34:44 2016 +0300 net/mlx5e: Timeout if SQ doesn't flush during close Avoid an infinite loop by timing out waiting for the SQ to flush. Also clean up the TX descriptors if that happens. Fixes: f62b8bb8f2d3 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality') Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 ++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 25 +++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 32 +++++++++++++++++++++++ 3 files changed, 56 insertions(+), 3 deletions(-) commit 65ee67084589c1783a74b4a4a5db38d7264ec8b5 Author: Mohamad Haj Yahia Date: Thu Jun 30 17:34:43 2016 +0300 net/mlx5: Add timeout handle to commands with callback The current implementation does not handle timeout in case of command with callback request, and this can lead to deadlock if the command doesn't get fw response. Add delayed callback timeout work before posting the command to fw. In case of real fw command completion we will cancel the delayed work. In case of fw command timeout the callback timeout handler will be called and it will simulate fw completion with timeout error. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 38 ++++++++++++++++++++++----- include/linux/mlx5/driver.h | 1 + 2 files changed, 32 insertions(+), 7 deletions(-) commit 9cba4ebcf374c3772f6eb61f2d065294b2451b49 Author: Mohamad Haj Yahia Date: Thu Jun 30 17:34:42 2016 +0300 net/mlx5: Fix potential deadlock in command mode change Call command completion handler in case of timeout when working in interrupts mode. Avoid flushing the commands workqueue after acquiring the semaphores to prevent a potential deadlock. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 79 +++++++++++---------------- 1 file changed, 33 insertions(+), 46 deletions(-) commit d57847dc4177c6fd8d950cb533f5edf0eab45b11 Author: Daniel Jurgens Date: Thu Jun 30 17:34:41 2016 +0300 net/mlx5: Fix wait_vital for VFs and remove fixed sleep The device ID for VFs is in a different location than PFs. This results in the poll always timing out for VFs. There's no good way to read the VF device ID without using the PF's configuration space. Switch to waiting for the health poll to start incrementing. Also remove the 1s sleep at the beginning. fixes: 89d44f0a6c73 ('net/mlx5_core: Add pci error handlers to mlx5_core driver') Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 41 ++++++++++---------------- 1 file changed, 15 insertions(+), 26 deletions(-) commit 5adff6a0886273eb426360400f120443833760a3 Author: Daniel Jurgens Date: Thu Jun 30 17:34:40 2016 +0300 net/mlx5: Fix incorrect page count when in internal error Change page cleanup flow when in internal error to properly decrement the page counts when reclaiming pages. The prevents timing out waiting for extra pages that were actually cleaned up previously. fixes: 89d44f0a6c73 ('net/mlx5_core: Add pci error handlers to mlx5_core driver') Signed-off-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlx5/core/pagealloc.c | 63 +++++++++++++++------- 1 file changed, 44 insertions(+), 19 deletions(-) commit c1d4d2e92ad670168a17a57dfa182a5a5baa72d4 Author: Mohamad Haj Yahia Date: Thu Jun 30 17:34:39 2016 +0300 net/mlx5: Avoid calling sleeping function by the health poll thread In internal error state the health poll thread will eventually call synchronize_irq() (to safely trigger command completions) which might sleep, so we are calling sleeping function from atomic context which is invalid. Here we move trigger_cmd_completions(dev) to enter error state which is the earliest stage in error state handling. This way we won't need to wait for next health poll to trigger command completions and will solve the scheduling while atomic issue. mlx5_enter_error_state can be called from two contexts, protect it with dev->intf_state_lock Fixes: 89d44f0a6c73 ('net/mlx5_core: Add pci error handlers to mlx5_core driver') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/health.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 0d834442cc247c7b3f3bd6019512ae03e96dd99a Author: Mohamad Haj Yahia Date: Thu Jun 30 17:34:38 2016 +0300 net/mlx5: Fix teardown errors that happen in pci error handler In case of internal error state we will simulate the commands status through the return value translation function, but we need to simulate all the teardown fw commands as successful so we will not have fw command failure prints. This also fix memory leaks that happen because we skip teardown stages due to failed fw commands. Fixes: 89d44f0a6c73 ('net/mlx5_core: Add pci error handlers to mlx5_core driver') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit f87fda00b6ed232a817c655b8d179b48bde8fdbe Author: Eric Dumazet Date: Thu Jun 30 16:13:41 2016 +0200 bonding: prevent out of bound accesses ether_addr_equal_64bits() requires some care about its arguments, namely that 8 bytes might be read, even if last 2 byte values are not used. KASan detected a violation with null_mac_addr and lacpdu_mcast_addr in bond_3ad.c Same problem with mac_bcast[] and mac_v6_allmcast[] in bond_alb.c : Although the 8-byte alignment was there, KASan would detect out of bound accesses. Fixes: 815117adaf5b ("bonding: use ether_addr_equal_unaligned for bond addr compare") Fixes: bb54e58929f3 ("bonding: Verify RX LACPDU has proper dest mac-addr") Fixes: 885a136c52a8 ("bonding: use compare_ether_addr_64bits() in ALB") Signed-off-by: Eric Dumazet Reported-by: Dmitry Vyukov Acked-by: Dmitry Vyukov Acked-by: Nikolay Aleksandrov Acked-by: Ding Tianhong Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 11 +++++++---- drivers/net/bonding/bond_alb.c | 7 ++----- include/net/bonding.h | 7 ++++++- 3 files changed, 15 insertions(+), 10 deletions(-) commit fdfe3b32db70aa49d1d60a1ddd2280099174bddb Author: Bard Liao Date: Fri Jul 1 09:49:05 2016 +0800 ASoC: rt5645: fix reg-2f default value. The default value of reg-2f in codec rt5650 is 0x5002, not 0x1002. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d8c4530e50dc030efcec575aa69483439fc6fda Author: Russell King - ARM Linux Date: Thu Jun 30 10:36:15 2016 +0100 net: mvneta: fix open() error cleanup If mvneta_mdio_probe() fails, a kernel warning is triggered due to missing cleanup in the error path. Add the necessary cleanup. ------------[ cut here ]------------ WARNING: CPU: 1 PID: 281 at kernel/irq/manage.c:1814 __free_percpu_irq+0xfc/0x130 percpu IRQ 38 still enabled on CPU0! Modules linked in: bnep bluetooth xhci_plat_hcd xhci_hcd marvell_cesa armada_thermal des_generic ehci_orion mcp3021 spi_orion sfp mdio_i2c evbug fuse CPU: 1 PID: 281 Comm: connmand Not tainted 4.7.0-rc2+ #53 Hardware name: Marvell Armada 380/385 (Device Tree) Backtrace: [] (dump_backtrace) from [] (show_stack+0x18/0x1c) r6:60010093 r5:ffffffff r4:00000000 r3:dc8ba500 [] (show_stack) from [] (dump_stack+0xa4/0xdc) [] (dump_stack) from [] (__warn+0xd8/0x104) r6:c081e6a0 r5:00000000 r4:edfe5d50 r3:dc8ba500 [] (__warn) from [] (warn_slowpath_fmt+0x40/0x48) r10:a0010013 r8:c09356f8 r7:00000026 r6:ef11a260 r5:edd7b980 r4:ef11a200 [] (warn_slowpath_fmt) from [] (__free_percpu_irq+0xfc/0x130) r3:00000026 r2:c081e7ac [] (__free_percpu_irq) from [] (free_percpu_irq+0x48/0x74) r10:00008914 r8:00000000 r7:ffffffed r6:c09356f8 r5:00000026 r4:ef11a200 [] (free_percpu_irq) from [] (mvneta_open+0x118/0x134) r6:ffffffed r5:ef01e640 r4:ef01e000 r3:ef01e000 [] (mvneta_open) from [] (__dev_open+0xa4/0x108) r7:ef01e030 r6:c06ff3d8 r5:ffff9003 r4:ef01e000 [] (__dev_open) from [] (__dev_change_flags+0x94/0x150) r7:00001002 r6:00000001 r5:ffff9003 r4:ef01e000 [] (__dev_change_flags) from [] (dev_change_flags+0x20/0x50) r8:00000000 r7:c09334c8 r6:00001002 r5:00000148 r4:ef01e000 r3:00008914 [] (dev_change_flags) from [] (devinet_ioctl+0x6f4/0x7e0) r8:00000000 r7:c09334c8 r6:00000000 r5:ee87200c r4:00000000 r3:00008914 [] (devinet_ioctl) from [] (inet_ioctl+0x1b8/0x1c8) r10:beb4499c r9:edfe4000 r8:ecf13280 r7:c096cf00 r6:beb4499c r5:eef7c240 r4:00008914 [] (inet_ioctl) from [] (sock_ioctl+0x78/0x300) [] (sock_ioctl) from [] (do_vfs_ioctl+0x98/0xa60) r7:00000011 r6:00008914 r5:00000011 r4:c01568d0 [] (do_vfs_ioctl) from [] (SyS_ioctl+0x3c/0x60) r10:00000000 r9:edfe4000 r8:beb4499c r7:00000011 r6:00008914 r5:ecf13280 r4:ecf13280 [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x1c) r8:c0010004 r7:00000036 r6:00000011 r5:000a2978 r4:00000000 r3:00009003 ---[ end trace 711f625d5b04b3a7 ]--- Signed-off-by: Russell King Tested-by: Jon Nettleton Signed-off-by: David S. Miller drivers/net/ethernet/marvell/mvneta.c | 2 ++ 1 file changed, 2 insertions(+) commit f95ae8a0edba1cb85110df4f1c96786419a0472f Author: hayeswang Date: Thu Jun 30 15:33:35 2016 +0800 r8152: clear LINK_OFF_WAKE_EN after autoresume LINK_OFF_WAKE_EN should be cleared after autoresume, otherwise after system suspend, the system would wake up when linking off occurs. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5baaf3b9efe127d239038de9219d381f4d882b26 Author: Lee Jones Date: Tue Jun 28 09:24:40 2016 +0100 usb: dwc3: st: Use explicit reset_control_get_exclusive() API We're making all reset line users specify whether their lines are shared with other IP or they operate them exclusively. In this case the line is exclusively used only by this IP, so use the *_exclusive() API accordingly. Acked-by: Felipe Balbi Signed-off-by: Lee Jones drivers/usb/dwc3/dwc3-st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f5f35830fb84364a24794fe6c7101f85318481d2 Author: Lee Jones Date: Tue Jun 28 09:33:55 2016 +0100 phy: phy-stih407-usb: Use explicit reset_control_get_exclusive() API We're making all reset line users specify whether their lines are shared with other IP or they operate them exclusively. In this case the line is exclusively used only by this IP, so use the *_exclusive() API accordingly. Acked-by: Kishon Vijay Abraham I Signed-off-by: Lee Jones drivers/phy/phy-stih407-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8293c8a3bb068bd2d2dfe00b6b0000a8fc5c860a Author: Lee Jones Date: Fri Jun 3 11:44:28 2016 +0100 phy: miphy28lp: Inform the reset framework that our reset line may be shared On the STiH410 B2120 development board the MiPHY28lp shares its reset line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device (DRD). New functionality in the reset subsystems forces consumers to be explicit when requesting shared/exclusive reset lines. Acked-by: Kishon Vijay Abraham I Signed-off-by: Lee Jones drivers/phy/phy-miphy28lp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9216a97a12b069c62f0e927a9f54be4883648a0f Author: Sony Chacko Date: Wed Jun 29 17:51:34 2016 -0400 qlcnic: add wmb() call in transmit data path. Call wmb() to ensure writes are complete before hardware fetches updated Tx descriptors. Signed-off-by: Sony Chacko Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 2 ++ 1 file changed, 2 insertions(+) commit c76a093dc1415d364020b8b33f1e194ef4d26fd0 Author: Masanari Iida Date: Fri Jul 1 12:46:01 2016 +0900 x86/Documentation: Fix various typos in Documentation/x86/ files Signed-off-by: Masanari Iida Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: corbet@lwn.net Cc: linux-doc@vger.kernel.org Link: http://lkml.kernel.org/r/20160701034601.30308-1-standby24x7@gmail.com Signed-off-by: Ingo Molnar Documentation/x86/intel_mpx.txt | 6 +++--- Documentation/x86/tlb.txt | 4 ++-- Documentation/x86/x86_64/machinecheck | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 1ead852dd88779eda12cb09cc894a03d9abfe1ec Author: Borislav Petkov Date: Thu Jun 16 19:13:49 2016 +0200 x86/amd_nb: Fix boot crash on non-AMD systems Fix boot crash that triggers if this driver is built into a kernel and run on non-AMD systems. AMD northbridges users call amd_cache_northbridges() and it returns a negative value to signal that we weren't able to cache/detect any northbridges on the system. At least, it should do so as all its callers expect it to do so. But it does return a negative value only when kmalloc() fails. Fix it to return -ENODEV if there are no NBs cached as otherwise, amd_nb users like amd64_edac, for example, which relies on it to know whether it should load or not, gets loaded on systems like Intel Xeons where it shouldn't. Reported-and-tested-by: Tony Battersby Signed-off-by: Borislav Petkov Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1466097230-5333-2-git-send-email-bp@alien8.de Link: https://lkml.kernel.org/r/5761BEB0.9000807@cybernetics.com Signed-off-by: Ingo Molnar arch/x86/kernel/amd_nb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e06b933e6ded42384164d28a2060b7f89243b895 Author: Andrey Ulanov Date: Fri Apr 15 14:24:41 2016 -0700 namespace: update event counter when umounting a deleted dentry - m_start() in fs/namespace.c expects that ns->event is incremented each time a mount added or removed from ns->list. - umount_tree() removes items from the list but does not increment event counter, expecting that it's done before the function is called. - There are some codepaths that call umount_tree() without updating "event" counter. e.g. from __detach_mounts(). - When this happens m_start may reuse a cached mount structure that no longer belongs to ns->list (i.e. use after free which usually leads to infinite loop). This change fixes the above problem by incrementing global event counter before invoking umount_tree(). Change-Id: I622c8e84dcb9fb63542372c5dbf0178ee86bb589 Cc: stable@vger.kernel.org Signed-off-by: Andrey Ulanov Signed-off-by: Al Viro fs/namespace.c | 1 + 1 file changed, 1 insertion(+) commit b403f0e37a11f84f7ceaf40b0075499e5bcfd220 Author: Miklos Szeredi Date: Wed Jun 29 10:54:23 2016 +0200 9p: use file_dentry() v9fs may be used as lower layer of overlayfs and accessing f_path.dentry can lead to a crash. In this case it's a NULL pointer dereference in p9_fid_create(). Fix by replacing direct access of file->f_path.dentry with the file_dentry() accessor, which will always return a native object. Reported-by: Alessio Igor Bogani Signed-off-by: Miklos Szeredi Tested-by: Alessio Igor Bogani Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay and f_inode to the underlay") Cc: Signed-off-by: Al Viro fs/9p/vfs_file.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 65c0554b73c920023cc8998802e508b798113b46 Author: Rafael J. Wysocki Date: Thu Jun 30 18:11:41 2016 +0200 x86/power/64: Fix kernel text mapping corruption during image restoration Logan Gunthorpe reports that hibernation stopped working reliably for him after commit ab76f7b4ab23 (x86/mm: Set NX on gap between __ex_table and rodata). That turns out to be a consequence of a long-standing issue with the 64-bit image restoration code on x86, which is that the temporary page tables set up by it to avoid page tables corruption when the last bits of the image kernel's memory contents are copied into their original page frames re-use the boot kernel's text mapping, but that mapping may very well get corrupted just like any other part of the page tables. Of course, if that happens, the final jump to the image kernel's entry point will go to nowhere. The exact reason why commit ab76f7b4ab23 matters here is that it sometimes causes a PMD of a large page to be split into PTEs that are allocated dynamically and get corrupted during image restoration as described above. To fix that issue note that the code copying the last bits of the image kernel's memory contents to the page frames occupied by them previoulsy doesn't use the kernel text mapping, because it runs from a special page covered by the identity mapping set up for that code from scratch. Hence, the kernel text mapping is only needed before that code starts to run and then it will only be used just for the final jump to the image kernel's entry point. Accordingly, the temporary page tables set up in swsusp_arch_resume() on x86-64 need to contain the kernel text mapping too. That mapping is only going to be used for the final jump to the image kernel, so it only needs to cover the image kernel's entry point, because the first thing the image kernel does after getting control back is to switch over to its own original page tables. Moreover, the virtual address of the image kernel's entry point in that mapping has to be the same as the one mapped by the image kernel's page tables. With that in mind, modify the x86-64's arch_hibernation_header_save() and arch_hibernation_header_restore() routines to pass the physical address of the image kernel's entry point (in addition to its virtual address) to the boot kernel (a small piece of assembly code involved in passing the entry point's virtual address to the image kernel is not necessary any more after that, so drop it). Update RESTORE_MAGIC too to reflect the image header format change. Next, in set_up_temporary_mappings(), use the physical and virtual addresses of the image kernel's entry point passed in the image header to set up a minimum kernel text mapping (using memory pages that won't be overwritten by the image kernel's memory contents) that will map those addresses to each other as appropriate. This makes the concern about the possible corruption of the original boot kernel text mapping go away and if the the minimum kernel text mapping used for the final jump marks the image kernel's entry point memory as executable, the jump to it is guaraneed to succeed. Fixes: ab76f7b4ab23 (x86/mm: Set NX on gap between __ex_table and rodata) Link: http://marc.info/?l=linux-pm&m=146372852823760&w=2 Reported-by: Logan Gunthorpe Reported-and-tested-by: Borislav Petkov Tested-by: Kees Cook Signed-off-by: Rafael J. Wysocki arch/x86/power/hibernate_64.c | 97 ++++++++++++++++++++++++++++++++++----- arch/x86/power/hibernate_asm_64.S | 55 ++++++++++------------ 2 files changed, 109 insertions(+), 43 deletions(-) commit cb7d224f82e41d82518e7f9ea271d215d4d08e6e Author: Scott Mayhew Date: Thu Jun 30 10:39:32 2016 -0400 lockd: unregister notifier blocks if the service fails to come up completely If the lockd service fails to start up then we need to be sure that the notifier blocks are not registered, otherwise a subsequent start of the service could cause the same notifier to be registered twice, leading to soft lockups. Signed-off-by: Scott Mayhew Cc: stable@vger.kernel.org Fixes: 0751ddf77b6a "lockd: Register callbacks on the inetaddr_chain..." Signed-off-by: J. Bruce Fields fs/lockd/svc.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 74524955556096a0b2a821a49b4d0abebad3ee16 Author: Tahsin Erdogan Date: Thu Jun 16 05:15:33 2016 -0700 writeback: inode cgroup wb switch should not call ihold() Asynchronous wb switching of inodes takes an additional ref count on an inode to make sure inode remains valid until switchover is completed. However, anyone calling ihold() must already have a ref count on inode, but in this case inode->i_count may already be zero: ------------[ cut here ]------------ WARNING: CPU: 1 PID: 917 at fs/inode.c:397 ihold+0x2b/0x30 CPU: 1 PID: 917 Comm: kworker/u4:5 Not tainted 4.7.0-rc2+ #49 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011 Workqueue: writeback wb_workfn (flush-8:16) 0000000000000000 ffff88007ca0fb58 ffffffff805990af 0000000000000000 0000000000000000 ffff88007ca0fb98 ffffffff80268702 0000018d000004e2 ffff88007cef40e8 ffff88007c9b89a8 ffff880079e3a740 0000000000000003 Call Trace: [] dump_stack+0x4d/0x6e [] __warn+0xc2/0xe0 [] warn_slowpath_null+0x18/0x20 [] ihold+0x2b/0x30 [] inode_switch_wbs+0x11c/0x180 [] wbc_detach_inode+0x170/0x1a0 [] writeback_sb_inodes+0x21c/0x530 [] wb_writeback+0xee/0x1e0 [] wb_workfn+0xd7/0x280 [] ? try_to_wake_up+0x1b1/0x2b0 [] process_one_work+0x129/0x300 [] worker_thread+0x126/0x480 [] ? __schedule+0x1c7/0x561 [] ? process_one_work+0x300/0x300 [] kthread+0xc4/0xe0 [] ? kfree+0xc8/0x100 [] ret_from_fork+0x1f/0x40 [] ? __kthread_parkme+0x70/0x70 ---[ end trace aaefd2fd9f306bc4 ]--- Signed-off-by: Tahsin Erdogan Acked-by: Tejun Heo Reviewed-by: Jan Kara Signed-off-by: Jens Axboe fs/fs-writeback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cd368300aa5bcec40c079ee5096287847506504 Author: Maxime Ripard Date: Mon Jun 20 12:20:59 2016 +0200 drm/sun4i: Send vblank event when the CRTC is disabled So far, we were missing to send the vblank event when disabling the CRTC, making us never report the last vblank event. This was causing a time out on the page flip, which should be solved now. Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_crtc.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 0b340405fca980b12a2ddafdd4536ad6fb624755 Author: Maxime Ripard Date: Mon Jun 20 12:20:58 2016 +0200 drm/sun4i: Report proper vblank The sun4i display engine doesn't have any vblank counter. Use the proper helper for that. Signed-off-by: Maxime Ripard drivers/gpu/drm/sun4i/sun4i_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a0a02d1efa066001fd315c1b4df583d939fa2c4 Merge: 284341d f5c5c22 Author: Linus Torvalds Date: Thu Jun 30 09:57:52 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: "ARM and x86 fixes" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: nVMX: VMX instructions: fix segment checks when L1 is in long mode. KVM: LAPIC: cap __delay at lapic_timer_advance_ns KVM: x86: move nsec_to_cycles from x86.c to x86.h pvclock: Get rid of __pvclock_read_cycles in function pvclock_read_flags pvclock: Cleanup to remove function pvclock_get_nsec_offset pvclock: Add CPU barriers to get correct version value KVM: arm/arm64: Stop leaking vcpu pid references arm64: KVM: fix build with CONFIG_ARM_PMU disabled commit 284341d2605da0ab231bc7486ff032c4f1563819 Merge: 20bfdca 9bd5451 Author: Linus Torvalds Date: Thu Jun 30 09:53:43 2016 -0700 Merge tag 'arc-4.7-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fix from Vineet Gupta: "Reinstate dwarf unwinder/loadable-modules with new gnu tools" * tag 'arc-4.7-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: arc: unwind: warn only once if DW2_UNWIND is disabled ARC: unwind: ensure that .debug_frame is generated (vs. .eh_frame) commit 20bfdca19976994e5537aa786c39375bbd103b53 Merge: 4aa34ce 33cdcee Author: Linus Torvalds Date: Thu Jun 30 09:49:26 2016 -0700 Merge tag 'pwm/for-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm fixes from Thierry Reding: "One more fix for some fallout observed after the introduction of the atomic API" * tag 'pwm/for-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: Fix pwm_apply_args() commit 4aa34ce3c1ee86ee6abbe9adc310e5f8bcca2800 Merge: e7bdea7 ba4a1c2 Author: Linus Torvalds Date: Thu Jun 30 09:44:34 2016 -0700 Merge tag 'mfd-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fixes from Lee Jones: "Contained are some standard fixes and unusually an extension to the Reset API. Some of those changes are required to fix a bug introduced in -rc1, which introduces extra 'reset line checks' i.e. whether the line is shared or not. If a line is shared and the new *_shared() API is not used, the request fails with an error. This breaks USB in v4.7 for ST's platforms. Admittedly, there are some patches contained in our (MFD/Reset) immutable branch which are not true -fixes, but there isn't anything I can do about that. Rest assured though, there aren't any API 'changes'. Everything is the same from the consumer's perspective. - Use new reset_*_get_shared() variant to prevent reset line obtainment failure (Fixes commit 0b52297f2288: "reset: Add support for shared reset controls") - Fix unintentional switch() fall-through into error path - Fix uninitialised variable compiler warning" * tag 'mfd-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: da9053: Fix compiler warning message for uninitialised variable mfd: max77620: Fix FPS switch statements phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared usb: dwc3: st: Inform the reset framework that our reset line may be shared usb: host: ehci-st: Inform the reset framework that our reset line may be shared usb: host: ohci-st: Inform the reset framework that our reset line may be shared reset: TRIVIAL: Add line break at same place for similar APIs reset: Supply *_shared variant calls when using *_optional APIs reset: Supply *_shared variant calls when using of_* API reset: Ensure drivers are explicit when requesting reset lines reset: Reorder inline reset_control_get*() wrappers commit f5c5c225fce4cb98fe4451d4c4d654e3f18b9f82 Merge: ff30ef4 591d215 Author: Paolo Bonzini Date: Thu Jun 30 17:11:20 2016 +0200 Merge tag 'kvm-arm-for-v4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-master KVM/ARM Fixes for v4.7-rc6: Fixes a build issue without CONFIG_ARM_PMU and plugs pid leak on arm/arm64. commit 54794580f5949253520265e46c903878ab222d84 Author: Sinan Kaya Date: Wed Jun 29 04:27:38 2016 -0400 ACPI,PCI,IRQ: correct operator precedence The omitted parenthesis prevents the addition operation when acpi_penalize_isa_irq function is called. Fixes: 103544d86976 (ACPI,PCI,IRQ: reduce resource requirements) Signed-off-by: Sinan Kaya Signed-off-by: Rafael J. Wysocki drivers/acpi/pci_link.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43daa96b166c3cf5ff30dfac0c5efa2620e4beab Author: Soohoon Lee Date: Wed Jun 29 15:07:21 2016 -0400 usbnet: Stop RX Q on MTU change When MTU is changed unlink_urbs() flushes RX Q but mean while usbnet_bh() can fill up the Q at the same time. Depends on which HCD is down there unlink takes long time then the flush never ends. Signed-off-by: Soohoon Lee Reviewed-by: Kimball Murray Signed-off-by: David S. Miller drivers/net/usb/usbnet.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit fedbb6b4ff341c1e2120f4ffbf367fd78ac3e8f3 Author: Shmulik Ladkani Date: Wed Jun 29 21:47:03 2016 +0300 ipv4: Fix ip_skb_dst_mtu to use the sk passed by ip_finish_output ip_skb_dst_mtu uses skb->sk, assuming it is an AF_INET socket (e.g. it calls ip_sk_use_pmtu which casts sk as an inet_sk). However, in the case of UDP tunneling, the skb->sk is not necessarily an inet socket (could be AF_PACKET socket, or AF_UNSPEC if arriving from tun/tap). OTOH, the sk passed as an argument throughout IP stack's output path is the one which is of PMTU interest: - In case of local sockets, sk is same as skb->sk; - In case of a udp tunnel, sk is the tunneling socket. Fix, by passing ip_finish_output's sk to ip_skb_dst_mtu. This augments 7026b1ddb6 'netfilter: Pass socket pointer down through okfn().' Signed-off-by: Shmulik Ladkani Reviewed-by: Hannes Frederic Sowa Signed-off-by: David S. Miller include/net/ip.h | 5 ++--- net/bridge/br_netfilter_hooks.c | 2 +- net/ipv4/ip_output.c | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) commit 5ab0d6a016b19d8cbd503eafd0ef701cfd854402 Merge: e7bdea7 b3a3c51 Author: David S. Miller Date: Thu Jun 30 08:57:24 2016 -0400 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2016-06-29 This series contains fixes to e1000e and ixgbevf. Jarod Wilson's fix for e1000e was a follow-on patch to his previous fix to keep the hardware VLAN CTAG's for receive and transmit in sync, which in turn resolves the original issue, so revert a portion of the original fix. Xin Long noticed that the ret_val needed to be initialized to IXGBE_ERR_MBX, instead of -IXGBE_ERR_MBX. ==================== Signed-off-by: David S. Miller commit 2a9b27b326d67dcd1bca066bc35c709da972833c Merge: 4c2e07c bea8205 4dc0dd8 719bd65 3ac066e Author: Mark Brown Date: Thu Jun 30 13:17:29 2016 +0100 Merge remote-tracking branches 'spi/fix/ep93xx', 'spi/fix/rockchip', 'spi/fix/sunxi' and 'spi/fix/ti-qspi' into spi-linus commit b44439e42912b9dcc510a0ff891809ea2cadc46b Author: Arnd Bergmann Date: Mon Jun 20 18:08:22 2016 +0200 ARM: mvebu: compile pm code conditionally A cleanup to include the headers correctly caused another build problem: arch/arm/mach-mvebu/kirkwood-pm.c:70:13: error: redefinition of 'kirkwood_pm_init' arch/arm/mach-mvebu/kirkwood-pm.h:23:20: note: previous definition of 'kirkwood_pm_init' was here The underlying issue is that kirkwood-pm.o is not actually meant to be used when CONFIG_PM is disabled, so we should also leave it out of the Makefile. The same seems to be true for the PM code in MACH_MVEBU_V7, and I'm treating it the same way here. Signed-off-by: Arnd Bergmann Fixes: d705c1a66e15 ("ARM: Kirkwood: fix kirkwood_pm_init() declaration/type") Signed-off-by: Gregory CLEMENT arch/arm/mach-mvebu/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 5c672ab3f0ee0f78f7acad183f34db0f8781a200 Author: Miklos Szeredi Date: Thu Jun 30 13:10:49 2016 +0200 fuse: serialize dirops by default Negotiate with userspace filesystems whether they support parallel readdir and lookup. Disable parallelism by default for fear of breaking fuse filesystems. Signed-off-by: Miklos Szeredi Fixes: 9902af79c01a ("parallel lookups: actual switch to rwsem") Fixes: d9b3dbdcfd62 ("fuse: switch to ->iterate_shared()") fs/fuse/dir.c | 4 ++++ fs/fuse/fuse_i.h | 9 +++++++++ fs/fuse/inode.c | 19 ++++++++++++++++++- include/uapi/linux/fuse.h | 7 ++++++- 4 files changed, 37 insertions(+), 2 deletions(-) commit cab103274352721b77fc5923a631fc63350bef8e Author: Wei Yongjun Date: Mon Jun 13 23:42:00 2016 +0000 drm/i915: Fix missing unlock on error in i915_ppgtt_info() Add the missing unlock before return from function i915_ppgtt_info() in the error handling case. Fixes: 1d2ac403ae3b(drm: Protect dev->filelist with its own mutex) Signed-off-by: Wei Yongjun Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1465861320-26221-1-git-send-email-weiyj_lk@163.com (cherry picked from commit b0212486909de4f239ca9f20d032de1b1f2dc52e) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f8608985f851c917b3884b692d8e326b0210d34e Author: Marek Vasut Date: Wed May 18 16:16:51 2016 +0200 configfs: Remove ppos increment in configfs_write_bin_file The simple_write_to_buffer() already increments the @ppos on success, see fs/libfs.c simple_write_to_buffer() comment: " On success, the number of bytes written is returned and the offset @ppos advanced by this number, or negative value is returned on error. " If the configfs_write_bin_file() is invoked with @count smaller than the total length of the written binary file, it will be invoked multiple times. Since configfs_write_bin_file() increments @ppos on success, after calling simple_write_to_buffer(), the @ppos is incremented twice. Subsequent invocation of configfs_write_bin_file() will result in the next piece of data being written to the offset twice as long as the length of the previous write, thus creating buffer with "holes" in it. The simple testcase using DTO follows: $ mkdir /sys/kernel/config/device-tree/overlays/1 $ dd bs=1 if=foo.dtbo of=/sys/kernel/config/device-tree/overlays/1/dtbo Without this patch, the testcase will result in twice as big buffer in the kernel, which is then passed to the cfs_overlay_item_dtbo_write() . Signed-off-by: Marek Vasut Cc: Geert Uytterhoeven Cc: Christoph Hellwig Cc: Pantelis Antoniou fs/configfs/file.c | 2 -- 1 file changed, 2 deletions(-) commit bfa37087aa04e45f56c41142dfceecb79b8e6ef9 Author: Darren Stevens Date: Wed Jun 29 21:06:28 2016 +0100 powerpc: Initialise pci_io_base as early as possible Commit d6a9996e84ac ("powerpc/mm: vmalloc abstraction in preparation for radix") turned kernel memory and IO addresses from #defined constants to variables initialised at runtime. On PA6T (pasemi) systems the setup_arch() machine call initialises the onboard PCI-e root-ports, and uses pci_io_base to do this, which is now before its value has been set, resulting in a panic early in boot before console IO is initialised. Move the pci_io_base initialisation to the same place as vmalloc ranges are set (hash__early_init_mmu()/radix__early_init_mmu()) - this is the earliest possible place we can initialise it. Fixes: d6a9996e84ac ("powerpc/mm: vmalloc abstraction in preparation for radix") Reported-by: Christian Zigotzky Signed-off-by: Darren Stevens Reviewed-by: Aneesh Kumar K.V [mpe: Add #ifdef CONFIG_PCI, massage change log slightly] Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/pgtable.h | 1 + arch/powerpc/kernel/pci_64.c | 1 - arch/powerpc/mm/hash_utils_64.c | 4 ++++ arch/powerpc/mm/pgtable-radix.c | 5 +++++ 4 files changed, 10 insertions(+), 1 deletion(-) commit ba4a1c28a92df55b9263e838068b92eaa80c7850 Author: Steve Twiss Date: Mon Jun 27 16:06:36 2016 +0100 mfd: da9053: Fix compiler warning message for uninitialised variable Fix compiler warning caused by an uninitialised variable inside da9052_group_write() function. Defaulting the value to zero covers the trivial case. Signed-off-by: Steve Twiss Reported-by: Geert Uytterhoeven Signed-off-by: Lee Jones include/linux/mfd/da9052/da9052.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82d8eb40bab10082050be945c8e7096df8e9f989 Author: Rhyland Klein Date: Thu May 12 13:45:04 2016 -0400 mfd: max77620: Fix FPS switch statements When configuring FPS during probe, assuming a DT node is present for FPS, the code can run into a problem with the switch statements in max77620_config_fps() and max77620_get_fps_period_reg_value(). Namely, in the case of chip->chip_id == MAX77620, it will set fps_[mix|max]_period but then fall through to the default switch case and return -EINVAL. Returning this from max77620_config_fps() will cause probe to fail. Signed-off-by: Rhyland Klein Reviewed-by: Laxman Dewangan Reviewed-by: Thierry Reding Tested-by: Thierry Reding Tested-by: Alexandre Courbot Signed-off-by: Lee Jones drivers/mfd/max77620.c | 2 ++ 1 file changed, 2 insertions(+) commit 9278e707f4e187df2b4d9eeb2bc78a1724fbe4ac Author: Lee Jones Date: Tue Jun 28 09:32:12 2016 +0100 phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared On the STiH410 B2120 development board the ports on the Generic PHY share their reset lines with each other. New functionality in the reset subsystems forces consumers to be explicit when requesting shared/exclusive reset lines. Signed-off-by: Lee Jones drivers/phy/phy-stih407-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 002f17bc54ff4005260d8e6e6700de97f5b25679 Author: Lee Jones Date: Tue Jun 28 09:23:58 2016 +0100 usb: dwc3: st: Inform the reset framework that our reset line may be shared On the STiH410 B2120 development board the MiPHY28lp shares its reset line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device (DRD). New functionality in the reset subsystems forces consumers to be explicit when requesting shared/exclusive reset lines. Acked-by: Felipe Balbi Signed-off-by: Lee Jones drivers/usb/dwc3/dwc3-st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 19599304625b74c95bff318c735928eec668b1ca Author: Lee Jones Date: Mon Jun 6 18:08:53 2016 +0100 usb: host: ehci-st: Inform the reset framework that our reset line may be shared On the STiH410 B2120 development board the ST EHCI IP shares its reset line with the OHCI IP. New functionality in the reset subsystems forces consumers to be explicit when requesting shared/exclusive reset lines. Acked-by: Peter Griffin Acked-by: Alan Stern Signed-off-by: Lee Jones drivers/usb/host/ehci-st.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit f5ee3f2b5ad6881a8194b9f684ce11640d1062f7 Author: Lee Jones Date: Mon Jun 6 18:08:54 2016 +0100 usb: host: ohci-st: Inform the reset framework that our reset line may be shared On the STiH410 B2120 development board the ST EHCI IP shares its reset line with the OHCI IP. New functionality in the reset subsystems forces consumers to be explicit when requesting shared/exclusive reset lines. Acked-by: Alan Stern Signed-off-by: Lee Jones drivers/usb/host/ohci-st.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e7bdea7750eb2a64aea4a08fa5c0a31719c8155d Merge: 89a82a9 e547f26 Author: Linus Torvalds Date: Wed Jun 29 15:30:26 2016 -0700 Merge tag 'nfs-for-4.7-2' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client bugfixes from Anna Schumaker: "Stable bugfixes: - Fix _cancel_empty_pagelist - Fix a double page unlock - Make nfs_atomic_open() call d_drop() on all ->open_context() errors. - Fix another OPEN_DOWNGRADE bug Other bugfixes: - Ensure we handle delegation errors in nfs4_proc_layoutget() - Layout stateids start out as being invalid - Add sparse lock annotations for pnfs_find_alloc_layout - Handle bad delegation stateids in nfs4_layoutget_handle_exception - Fix up O_DIRECT results - Fix potential use after free of state in nfs4_do_reclaim. - Mark the layout stateid invalid when all segments are removed - Don't let readdirplus revalidate an inode that was marked as stale - Fix potential race in nfs_fhget() - Fix an unused variable warning" * tag 'nfs-for-4.7-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: NFS: Fix another OPEN_DOWNGRADE bug make nfs_atomic_open() call d_drop() on all ->open_context() errors. NFS: Fix an unused variable warning NFS: Fix potential race in nfs_fhget() NFS: Don't let readdirplus revalidate an inode that was marked as stale NFSv4.1/pnfs: Mark the layout stateid invalid when all segments are removed NFS: Fix a double page unlock pnfs_nfs: fix _cancel_empty_pagelist nfs4: Fix potential use after free of state in nfs4_do_reclaim. NFS: Fix up O_DIRECT results NFS/pnfs: handle bad delegation stateids in nfs4_layoutget_handle_exception NFSv4.1/pnfs: Add sparse lock annotations for pnfs_find_alloc_layout NFSv4.1/pnfs: Layout stateids start out as being invalid NFSv4.1/pnfs: Ensure we handle delegation errors in nfs4_proc_layoutget() commit 89a82a9218fabd753979847f494565f1fa91d7a8 Merge: 32826ac 3f5be2d Author: Linus Torvalds Date: Wed Jun 29 15:18:47 2016 -0700 Merge branch 'stable-4.7' of git://git.infradead.org/users/pcmoore/audit Pull audit fixes from Paul Moore: "Two small patches to fix audit problems in 4.7-rcX: the first fixes a potential kref leak, the second removes some header file noise. The first is an important bug fix that really should go in before 4.7 is released, the second is not critical, but falls into the very-nice- to-have category so I'm including in the pull request. Both patches are straightforward, self-contained, and pass our testsuite without problem" * 'stable-4.7' of git://git.infradead.org/users/pcmoore/audit: audit: move audit_get_tty to reduce scope and kabi changes audit: move calcs after alloc and check when logging set loginuid commit d839722131307eff1f3fe1636a5af839c90fbf96 Merge: df01321 68b356e Author: Greg Kroah-Hartman Date: Wed Jun 29 13:53:31 2016 -0700 Merge tag 'iio-fixes-for-4.7c' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Third set of fixes for IIO in the 4.7 cycle. A couple of really old bugs and the results of Mark taking a close look at some nasty regulator handling. * ad7266 - Fix broken regulator handling that won't play well with dummy regulators. - Correctly handle and optional regulator. - Fix probe deferral for the vref regulator. * kxsd9 - Fix a wrong error check that leads to an inability to write or read the scale. * sca3000 - Fix a wrong error check that leads to an inability to read back the sampling frequency. commit 0bcc0eab363aa80f79769324bf3f2ab7781840f2 Author: Lee Jones Date: Mon Jun 6 16:56:53 2016 +0100 reset: TRIVIAL: Add line break at same place for similar APIs Standardise the way inline functions: devm_reset_control_get_shared_by_index devm_reset_control_get_exclusive_by_index ... are formatted. Signed-off-by: Lee Jones Signed-off-by: Philipp Zabel include/linux/reset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c33d61a0c400c50f378ef03a386e646abca292ca Author: Lee Jones Date: Mon Jun 6 16:56:52 2016 +0100 reset: Supply *_shared variant calls when using *_optional APIs Consumers need to be able to specify whether they are requesting an 'exclusive' or 'shared' reset line no matter which API (of_*, devm_*, etc) they are using. This change allows users of the optional_* API in particular to specify that their request is for a 'shared' line. Signed-off-by: Lee Jones Signed-off-by: Philipp Zabel include/linux/reset.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 40faee8ee471ae526344cd5c62ff520d356de841 Author: Lee Jones Date: Mon Jun 6 16:56:51 2016 +0100 reset: Supply *_shared variant calls when using of_* API Consumers need to be able to specify whether they are requesting an 'exclusive' or 'shared' reset line no matter which API (of_*, devm_*, etc) they are using. This change allows users of the of_* API in particular to specify that their request is for a 'shared' line. Signed-off-by: Lee Jones Signed-off-by: Philipp Zabel include/linux/reset.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit a53e35db70d1638002e40d495d096181dbb0fe16 Author: Lee Jones Date: Mon Jun 6 16:56:50 2016 +0100 reset: Ensure drivers are explicit when requesting reset lines Phasing out generic reset line requests enables us to make some better decisions on when and how to (de)assert said lines. If an 'exclusive' line is requested, we know a device *requires* a reset and that it's preferable to act upon a request right away. However, if a 'shared' reset line is requested, we can reasonably assume sure that placing a device into reset isn't a hard requirement, but probably a measure to save power and is thus able to cope with not being asserted if another device is still in use. In order allow gentle adoption and not to forcing all consumers to move to the API immediately, causing administration headache between subsystems, this patch adds some temporary stand-in shim-calls. This will ease the burden at merge time and allow subsystems to migrate over to the new API in a more realistic time-frame. Signed-off-by: Lee Jones Signed-off-by: Philipp Zabel include/linux/reset.h | 106 ++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 82 insertions(+), 24 deletions(-) commit 3c35f6edc09b239a60de87a5aeb78563fc372704 Author: Lee Jones Date: Mon Jun 6 16:56:49 2016 +0100 reset: Reorder inline reset_control_get*() wrappers We're about to split the current API into two, where consumers will be forced to be explicit when requesting reset lines. The choice will be to either the call the *_exclusive or *_shared variant depending on whether they can actually tolorate not being asserted when that request is made. The new API will look like this once reorded and complete: reset_control_get_exclusive() reset_control_get_shared() reset_control_get_optional_exclusive() reset_control_get_optional_shared() of_reset_control_get_exclusive() of_reset_control_get_shared() of_reset_control_get_exclusive_by_index() of_reset_control_get_shared_by_index() devm_reset_control_get_exclusive() devm_reset_control_get_shared() devm_reset_control_get_optional_exclusive() devm_reset_control_get_optional_shared() devm_reset_control_get_exclusive_by_index() devm_reset_control_get_shared_by_index() Signed-off-by: Lee Jones Signed-off-by: Philipp Zabel include/linux/reset.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) commit df253e8454de6f85636aa4d9d99555fbcad6f580 Merge: edb50a5 7b427a5 Author: Jens Axboe Date: Wed Jun 29 13:15:19 2016 -0600 Merge branch 'stable/for-jens-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus commit 32826ac41f2170df0d9a2e8df5a9b570c7858ccf Merge: 653c574 751ad81 Author: Linus Torvalds Date: Wed Jun 29 11:50:42 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: "I've been traveling so this accumulates more than week or so of bug fixing. It perhaps looks a little worse than it really is. 1) Fix deadlock in ath10k driver, from Ben Greear. 2) Increase scan timeout in iwlwifi, from Luca Coelho. 3) Unbreak STP by properly reinjecting STP packets back into the stack. Regression fix from Ido Schimmel. 4) Mediatek driver fixes (missing malloc failure checks, leaking of scratch memory, wrong indexing when mapping TX buffers, etc.) from John Crispin. 5) Fix endianness bug in icmpv6_err() handler, from Hannes Frederic Sowa. 6) Fix hashing of flows in UDP in the ruseport case, from Xuemin Su. 7) Fix netlink notifications in ovs for tunnels, delete link messages are never emitted because of how the device registry state is handled. From Nicolas Dichtel. 8) Conntrack module leaks kmemcache on unload, from Florian Westphal. 9) Prevent endless jump loops in nft rules, from Liping Zhang and Pablo Neira Ayuso. 10) Not early enough spinlock initialization in mlx4, from Eric Dumazet. 11) Bind refcount leak in act_ipt, from Cong WANG. 12) Missing RCU locking in HTB scheduler, from Florian Westphal. 13) Several small MACSEC bug fixes from Sabrina Dubroca (missing RCU barrier, using heap for SG and IV, and erroneous use of async flag when allocating AEAD conext.) 14) RCU handling fix in TIPC, from Ying Xue. 15) Pass correct protocol down into ipv4_{update_pmtu,redirect}() in SIT driver, from Simon Horman. 16) Socket timer deadlock fix in TIPC from Jon Paul Maloy. 17) Fix potential deadlock in team enslave, from Ido Schimmel. 18) Memory leak in KCM procfs handling, from Jiri Slaby. 19) ESN generation fix in ipv4 ESP, from Herbert Xu. 20) Fix GFP_KERNEL allocations with locks held in act_ife, from Cong WANG. 21) Use after free in netem, from Eric Dumazet. 22) Uninitialized last assert time in multicast router code, from Tom Goff. 23) Skip raw sockets in sock_diag destruction broadcast, from Willem de Bruijn. 24) Fix link status reporting in thunderx, from Sunil Goutham. 25) Limit resegmentation of retransmit queue so that we do not retransmit too large GSO frames. From Eric Dumazet. 26) Delay bpf program release after grace period, from Daniel Borkmann" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (141 commits) openvswitch: fix conntrack netlink event delivery qed: Protect the doorbell BAR with the write barriers. neigh: Explicitly declare RCU-bh read side critical section in neigh_xmit() e1000e: keep VLAN interfaces functional after rxvlan off cfg80211: fix proto in ieee80211_data_to_8023 for frames without LLC header qlcnic: use the correct ring in qlcnic_83xx_process_rcv_ring_diag() bpf, perf: delay release of BPF prog after grace period net: bridge: fix vlan stats continue counter tcp: do not send too big packets at retransmit time ibmvnic: fix to use list_for_each_safe() when delete items net: thunderx: Fix TL4 configuration for secondary Qsets net: thunderx: Fix link status reporting net/mlx5e: Reorganize ethtool statistics net/mlx5e: Fix number of PFC counters reported to ethtool net/mlx5e: Prevent adding the same vxlan port net/mlx5e: Check for BlueFlame capability before allocating SQ uar net/mlx5e: Change enum to better reflect usage net/mlx5: Add ConnectX-5 PCIe 4.0 to list of supported devices net/mlx5: Update command strings net: marvell: Add separate config ANEG function for Marvell 88E1111 ... commit 653c574a7df4760442162272169834d63c33f298 Merge: 00bf377 bcf4dd5 Author: Linus Torvalds Date: Wed Jun 29 11:48:05 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Another two bug fixes for 4.7: - The revert of patch which removed boot information for systems using an intermediate boot kernel, e.g. the SLES12 grub setup. - A fix for an incorrect inline assembly constraint that causes broken code to be generated with gcc 4.8.5" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: fix test_fp_ctl inline assembly contraints Revert "s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL" commit 4f14f5c11db161ab89b02f7196496ca32ca5dbf8 Author: Alexander Shiyan Date: Sat Jun 25 07:59:22 2016 +0300 ASoC: fsl_ssi: Fix number of words per frame for I2S-slave mode The i.MX51 datasheet says: Chapter 56.1.2.4 I2S Mode ... When I2S modes are entered (I2S master (01) or I2S slave (10)), the following settings are recommended: ... - TX Frame Rate should be 2 i.e. (STCCR[12:8] = 1) - RX Frame Rate should be 2 i.e. (SRCCR[12:8] = 1) Chapter 56.3.3.12 SSI Transmit and Receive Clock Control Registers (STCCR & SRCCR) ... Bits 12-8 DC4-DC0 Frame Rate Divider Control. These bits are used to control the divide ratio for the programmable frame rate dividers. The divide ratio works on the word clock. In Normal mode, this ratio determines the word transfer rate. In Network mode, this ratio sets the number of words per frame. The divide ratio ranges from 1 to 32 in Normal mode and from 2 to 32 in Network mode. In Normal mode, a divide ratio of 1 (DC=00000) provides continuous periodic data word transfer. A bit-length frame sync must be used in this case. Function fsl_ssi_hw_params() setup Normal mode for MONO output, so with DC=0, SSI enters to continuous periodic data word transfer. To fix this, setup DC for any I2S mode. Patch has tested on custom board based on Digi CCMX-51 module (i.MX51). Signed-off-by: Alexander Shiyan Signed-off-by: Mark Brown sound/soc/fsl/fsl_ssi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 1bcbf42d2732b3fdaa8559b0dfc91567769e23c8 Author: Dan Williams Date: Wed Jun 29 11:19:32 2016 -0700 nfit: fix format interface code byte order Per JEDEC Annex L Release 3 the SPD data is: Bits 9~5 00 000 = Function Undefined 00 001 = Byte addressable energy backed 00 010 = Block addressed 00 011 = Byte addressable, no energy backed All other codes reserved Bits 4~0 0 0000 = Proprietary interface 0 0001 = Standard interface 1 All other codes reserved; see Definitions of Functions ...and per the ACPI 6.1 spec: byte0: Bits 4~0 (0 or 1) byte1: Bits 9~5 (1, 2, or 3) ...so a format interface code displayed as 0x301 should be stored in the nfit as (0x1, 0x3), little-endian. Cc: Toshi Kani Cc: Rafael J. Wysocki Cc: Robert Moore Cc: Robert Elliott Link: https://bugzilla.kernel.org/show_bug.cgi?id=121161 Fixes: 30ec5fd464d5 ("nfit: fix format interface code byte order per ACPI6.1") Fixes: 5ad9a7fde07a ("acpi/nfit: Update nfit driver to comply with ACPI 6.1") Reported-by: Kristin Jacque Signed-off-by: Dan Williams drivers/acpi/nfit.c | 6 +++--- drivers/acpi/nfit.h | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) commit 91ff811f32763ea3135e832f7c1aeafc85ae1c98 Author: Venkat Reddy Talla Date: Wed Jun 29 15:31:27 2016 +0530 regulator: max77620: check for valid regulator info SD4 regulator is not registered with regulator core framework in probe as there is no support in MAX77620 PMIC, removing SD4 entry from MAX77620 regulator information list and checking for valid regulator information data before configuring FPS source and FPS power up/down period to avoid NULL pointer exception if regulator not registered with core. Signed-off-by: Venkat Reddy Talla Signed-off-by: Mark Brown drivers/regulator/max77620-regulator.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit caca925fca4fb30c67be88cacbe908eec6721e43 Author: Cameron Gutman Date: Wed Jun 29 09:51:35 2016 -0700 Input: xpad - validate USB endpoint count during probe This prevents a malicious USB device from causing an oops. Signed-off-by: Cameron Gutman Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 3 +++ 1 file changed, 3 insertions(+) commit 00bf377d19ad3d80cbc7a036521279a86e397bfb Merge: 52827f3 b41aa4f Author: Linus Torvalds Date: Wed Jun 29 10:05:44 2016 -0700 Merge tag 'pinctrl-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Here are a bunch of fixes for pin control. Just drivers and a MAINTAINERS fixup: - Driver fixes for i.MX, single register, Tegra and BayTrail. - MAINTAINERS entry for the documentation" * tag 'pinctrl-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: baytrail: Fix mingled clock pins MAINTAINERS: belong Documentation/pinctrl.txt properly pinctrl: tegra: Fix build dependency gpio: tegra: Make lockdep class file-scoped pinctrl: single: Fix missing flush of posted write for a wakeirq pinctrl: imx: Do not treat a PIN without MUX register as an error commit 52827f389b32f6d04a1bcb4428b5499815c36a24 Merge: de4921c 82d6489 Author: Linus Torvalds Date: Wed Jun 29 10:04:42 2016 -0700 Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup Pull cgroup fixes from Tejun Heo: "Three fix patches. Two are for cgroup / css init failure path. The last one makes css_set_lock irq-safe as the deadline scheduler ends up calling put_css_set() from irq context" * 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup: Disable IRQs while holding css_set_lock cgroup: set css->id to -1 during init cgroup: remove redundant cleanup in css_create commit 9a9b6aa6a8759c83024627d681eff982d6ee03b7 Author: Douglas Anderson Date: Tue Jun 28 10:32:00 2016 -0700 Input: add SW_PEN_INSERTED define Some devices with a pen may have a switch that can be used to detect when the pen is inserted or removed to a slot on the device. Let's add a define to the input event codes so that everyone can be on the same page for what event we should generate when the pen is inserted or removed. In general the pen switch could be used by the software on the device to kick off any number of actions when the pen is inserted or removed. Signed-off-by: Douglas Anderson Signed-off-by: Dmitry Torokhov include/uapi/linux/input-event-codes.h | 1 + 1 file changed, 1 insertion(+) commit 7b427a59538a98161321aa46c13f4ea81b43f4eb Author: Bob Liu Date: Mon Jun 27 16:33:24 2016 +0800 xen-blkfront: save uncompleted reqs in blkfront_resume() Uncompleted reqs used to be 'saved and resubmitted' in blkfront_recover() during migration, but that's too late after multi-queue was introduced. After a migrate to another host (which may not have multiqueue support), the number of rings (block hardware queues) may be changed and the ring and shadow structure will also be reallocated. The blkfront_recover() then can't 'save and resubmit' the real uncompleted reqs because shadow structure have been reallocated. This patch fixes this issue by moving the 'save' logic out of blkfront_recover() to earlier place in blkfront_resume(). The 'resubmit' is not changed and still in blkfront_recover(). Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk Cc: stable@vger.kernel.org drivers/block/xen-blkfront.c | 91 +++++++++++++++++++------------------------- 1 file changed, 40 insertions(+), 51 deletions(-) commit b3a3c5176c146ec7de653a3062237620464175fb Author: Xin Long Date: Fri May 13 01:51:55 2016 +0800 ixgbevf: ixgbevf_write/read_posted_mbx should use IXGBE_ERR_MBX to initialize ret_val Now ixgbevf_write/read_posted_mbx use -IXGBE_ERR_MBX as the initiative return value, but it's incorrect, cause in ixgbevf_vlan_rx_add_vid(), it use err == IXGBE_ERR_MBX, the err returned from mac.ops.set_vfta, and in ixgbevf_set_vfta_vf, it return from write/read_posted. so we should initialize err with IXGBE_ERR_MBX, instead of -IXGBE_ERR_MBX. With this fix, the other functions that called it also can work well, cause they only care about if err is 0 or not. Signed-off-by: Xin Long Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/ixgbevf/mbx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a7f14a184e0e8e94becfc3f9608f6b0f9c339572 Author: Rex Zhu Date: Tue Jun 28 16:22:07 2016 +0800 drm/amd/powerplay: workaround for UVD clock issue workaround issue that when uvd dpm disabled, uvd clock remain high on polaris10. Manually turn off the clocks. Signed-off-by: Rex Zhu Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 4 ++++ 1 file changed, 4 insertions(+) commit d9d533c1483c4daf76e7e720c35896a430563ff8 Author: Ken Wang Date: Tue Jun 28 13:28:50 2016 +0800 drm/amdgpu: add ACLK_CNTL setting for polaris10 This is a temporary workaround for early boards. Signed-off-by: Ken Wang Reviewed-by: Rex Zhu Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 +++ 1 file changed, 3 insertions(+) commit 838086414b3cda5c592591f2b82256996306dab6 Author: Jarod Wilson Date: Thu Jun 9 19:50:13 2016 -0400 e1000e: keep Rx/Tx HW_VLAN_CTAG in sync The bit in the e1000 driver that mentions explicitly that the hardware has no support for separate RX/TX VLAN accel toggling rings true for e1000e as well, and thus both NETIF_F_HW_VLAN_CTAG_RX and NETIF_F_HW_VLAN_CTAG_TX need to be kept in sync. Revert a portion of commit 889ad456660461 ("e1000e: keep VLAN interfaces functional after rxvlan off") since keeping the bits in sync resolves the original issue. Signed-off-by: Jarod Wilson Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher drivers/net/ethernet/intel/e1000e/netdev.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 0636e0d666e0238fa22348172c20a49f42a94395 Author: Rex Zhu Date: Mon Jun 27 17:30:24 2016 +0800 drm/amd/powerplay: fix issue uvd dpm can't enabled on Polaris11. 1. Populate correct value of VDDCI voltage for SMC SAMU, VCE, and UVD levels depending on whether VDDCi control is SVI2 or GPIO. 2. Populate SMC ACPI minimum voltage using VBIOS boot SCLK and MCLK When static voltage is configured as VDDCI, driver still tries to program a voltage for MM minVoltage using VDDC-VDDCI delta requirement. minVoltage should be set as boot up voltage. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 101 ++++++++++++--------- 1 file changed, 60 insertions(+), 41 deletions(-) commit 3a8bd717ee3e0508fc0dd517b97e950989e15f8c Author: Rex Zhu Date: Mon Jun 27 14:46:47 2016 +0800 drm/amd/powerplay: Workaround for Memory EDC Error on Polaris10. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) commit 03bea60409328de54e4ff7ec41672e12a9cb0908 Author: Miklos Szeredi Date: Wed Jun 29 16:03:55 2016 +0200 ovl: get_write_access() in truncate When truncating a file we should check write access on the underlying inode. And we should do so on the lower file as well (before copy-up) for consistency. Original patch and test case by Aihua Zhang. - - >o >o - - test.c - - >o >o - - #include #include #include int main(int argc, char *argv[]) { int ret; ret = truncate(argv[0], 4096); if (ret != -1) { fprintf(stderr, "truncate(argv[0]) should have failed\n"); return 1; } if (errno != ETXTBSY) { perror("truncate(argv[0])"); return 1; } return 0; } - - >o >o - - >o >o - - >o >o - - Reported-by: Aihua Zhang Signed-off-by: Miklos Szeredi Cc: fs/overlayfs/inode.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 62db7152c924e4c060e42b34a69cd39658e8a0dc Author: Takashi Iwai Date: Wed Jun 29 15:23:08 2016 +0200 ALSA: au88x0: Fix calculation in vortex_wtdma_bufshift() vortex_wtdma_bufshift() function does calculate the page index wrongly, first masking then shift, which always results in zero. The proper computation is to first shift, then mask. Reported-by: Dan Carpenter Cc: Signed-off-by: Takashi Iwai sound/pci/au88x0/au88x0_core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 751ad819b0bf443ad8963eb7bfbd533e6a463973 Merge: d913d3a c041778 Author: David S. Miller Date: Wed Jun 29 08:33:46 2016 -0400 Merge tag 'mac80211-for-davem-2016-06-29-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Just two small fixes * fix mesh peer link counter, decrement wasn't always done at all * fix ethertype (length) for packets without RFC 1042 or bridge tunnel header ==================== Signed-off-by: David S. Miller commit d913d3a763a6f66a862a6eafcf6da89a7905832a Author: Samuel Gauthier Date: Tue Jun 28 17:22:26 2016 +0200 openvswitch: fix conntrack netlink event delivery Only the first and last netlink message for a particular conntrack are actually sent. The first message is sent through nf_conntrack_confirm when the conntrack is committed. The last one is sent when the conntrack is destroyed on timeout. The other conntrack state change messages are not advertised. When the conntrack subsystem is used from netfilter, nf_conntrack_confirm is called for each packet, from the postrouting hook, which in turn calls nf_ct_deliver_cached_events to send the state change netlink messages. This commit fixes the problem by calling nf_ct_deliver_cached_events in the non-commit case as well. Fixes: 7f8a436eaa2c ("openvswitch: Add conntrack action") CC: Joe Stringer CC: Justin Pettit CC: Andy Zhou CC: Thomas Graf Signed-off-by: Samuel Gauthier Acked-by: Joe Stringer Signed-off-by: David S. Miller net/openvswitch/conntrack.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 34c7bb4705a0a2d344b0c82eaf3d3bfa2bc9da45 Author: Sudarsana Reddy Kalluru Date: Tue Jun 28 07:46:03 2016 -0400 qed: Protect the doorbell BAR with the write barriers. SPQ doorbell is currently protected with the compilation barrier. Under the stress scenarios, we may get into a state where (due to the weak ordering) several ramrod doorbells were written to the BAR with an out-of-order producer values. Need to change the barrier type to a write barrier to make sure that the write buffer is flushed after each doorbell. Signed-off-by: Sudarsana Reddy Kalluru Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_spq.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit b560f03ddfb072bca65e9440ff0dc4f9b1d1f056 Author: David Barroso Date: Tue Jun 28 11:16:43 2016 +0300 neigh: Explicitly declare RCU-bh read side critical section in neigh_xmit() neigh_xmit() expects to be called inside an RCU-bh read side critical section, and while one of its two current callers gets this right, the other one doesn't. More specifically, neigh_xmit() has two callers, mpls_forward() and mpls_output(), and while both callers call neigh_xmit() under rcu_read_lock(), this provides sufficient protection for neigh_xmit() only in the case of mpls_forward(), as that is always called from softirq context and therefore doesn't need explicit BH protection, while mpls_output() can be called from process context with softirqs enabled. When mpls_output() is called from process context, with softirqs enabled, we can be preempted by a softirq at any time, and RCU-bh considers the completion of a softirq as signaling the end of any pending read-side critical sections, so if we do get a softirq while we are in the part of neigh_xmit() that expects to be run inside an RCU-bh read side critical section, we can end up with an unexpected RCU grace period running right in the middle of that critical section, making things go boom. This patch fixes this impedance mismatch in the callee, by making neigh_xmit() always take rcu_read_{,un}lock_bh() around the code that expects to be treated as an RCU-bh read side critical section, as this seems a safer option than fixing it in the callers. Fixes: 4fd3d7d9e868f ("neigh: Add helper function neigh_xmit") Signed-off-by: David Barroso Signed-off-by: Lennert Buytenhek Acked-by: David Ahern Acked-by: Robert Shearman Signed-off-by: David S. Miller net/core/neighbour.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 889ad4566604610804df984e1a3dd5e2c66256e5 Author: Jarod Wilson Date: Tue Jun 28 20:41:31 2016 -0700 e1000e: keep VLAN interfaces functional after rxvlan off I've got a bug report about an e1000e interface, where a VLAN interface is set up on top of it: $ ip link add link ens1f0 name ens1f0.99 type vlan id 99 $ ip link set ens1f0 up $ ip link set ens1f0.99 up $ ip addr add 192.168.99.92 dev ens1f0.99 At this point, I can ping another host on vlan 99, ip 192.168.99.91. However, if I do the following: $ ethtool -K ens1f0 rxvlan off Then no traffic passes on ens1f0.99. It comes back if I toggle rxvlan on again. I'm not sure if this is actually intended behavior, or if there's a lack of software VLAN stripping fallback, or what, but things continue to work if I simply don't call e1000e_vlan_strip_disable() if there are active VLANs (plagiarizing a function from the e1000 driver here) on the interface. Also slipped a related-ish fix to the kerneldoc text for e1000e_vlan_strip_disable here... Signed-off-by: Jarod Wilson Tested-by: Aaron Brown Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller drivers/net/ethernet/intel/e1000e/netdev.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit c041778c966c92c964033f1cdfee60a9f2b5e465 Author: Felix Fietkau Date: Wed Jun 29 10:36:39 2016 +0200 cfg80211: fix proto in ieee80211_data_to_8023 for frames without LLC header The PDU length of incoming LLC frames is set to the total skb payload size in __ieee80211_data_to_8023() of net/wireless/util.c which incorrectly includes the length of the IEEE 802.11 header. The resulting LLC frame header has a too large PDU length, causing the llc_fixup_skb() function of net/llc/llc_input.c to reject the incoming skb, effectively breaking STP. Solve the problem by properly substracting the IEEE 802.11 frame header size from the PDU length, allowing the LLC processor to pick up the incoming control messages. Special thanks to Gerry Rozema for tracking down the regression and proposing a suitable patch. Fixes: 2d1c304cb2d5 ("cfg80211: add function for 802.3 conversion with separate output buffer") Cc: stable@vger.kernel.org Reported-by: Gerry Rozema Signed-off-by: Felix Fietkau Signed-off-by: Johannes Berg net/wireless/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6858107e78b4ecb9f244db814ffbdba1b5ce759b Author: Vinod Koul Date: Wed Jun 29 10:27:52 2016 +0530 ALSA: hda - Add PCI ID for Kabylake-H Kabylake-H shows up as PCI ID 0xa2f0. We missed adding this earlier with other KBL IDs. Signed-off-by: Vinod Koul Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 5b4d10f5e0369ed79434593b7cd8e85eebbe473f Author: Dan Carpenter Date: Mon Jun 27 23:50:29 2016 +0300 qlcnic: use the correct ring in qlcnic_83xx_process_rcv_ring_diag() There is a static checker warning here "warn: mask and shift to zero" and the code sets "ring" to zero every time. From looking at how QLCNIC_FETCH_RING_ID() is used in qlcnic_83xx_process_rcv_ring() the qlcnic_83xx_hndl() should be removed. Fixes: 4be41e92f7c6 ('qlcnic: 83xx data path routines') Signed-off-by: Dan Carpenter Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ceb56070359b7329b5678b5d95a376fcb24767be Author: Daniel Borkmann Date: Mon Jun 27 21:38:11 2016 +0200 bpf, perf: delay release of BPF prog after grace period Commit dead9f29ddcc ("perf: Fix race in BPF program unregister") moved destruction of BPF program from free_event_rcu() callback to __free_event(), which is problematic if used with tail calls: if prog A is attached as trace event directly, but at the same time present in a tail call map used by another trace event program elsewhere, then we need to delay destruction via RCU grace period since it can still be in use by the program doing the tail call (the prog first needs to be dropped from the tail call map, then trace event with prog A attached destroyed, so we get immediate destruction). Fixes: dead9f29ddcc ("perf: Fix race in BPF program unregister") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Cc: Jann Horn Signed-off-by: David S. Miller include/linux/bpf.h | 4 ++++ kernel/events/core.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) commit 565ce8f32ac4a233b474f401e1d3e7e1de0a31fd Author: Nikolay Aleksandrov Date: Mon Jun 27 18:34:42 2016 +0200 net: bridge: fix vlan stats continue counter I made a dumb off-by-one mistake when I added the vlan stats counter dumping code. The increment should happen before the check, not after otherwise we miss one entry when we continue dumping. Fixes: a60c090361ea ("bridge: netlink: export per-vlan stats") Signed-off-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3d2e9f8eb1487f4191ff08ce2d3d63702c65a90 Author: Eric Dumazet Date: Mon Jun 27 17:38:50 2016 +0200 tcp: do not send too big packets at retransmit time Arjun reported a bug in TCP stack and bisected it to a recent commit. In case where we process SACK, we can coalesce multiple skbs into fat ones (tcp_shift_skb_data()), to lower write queue overhead, because we do not expect to retransmit these packets. However, SACK reneging can happen, forcing the sender to retransmit all these packets. If skb->len is above 64KB, we then send buggy IP packets that could hang TSO engine on cxgb4. Neal suggested to use tcp_tso_autosize() instead of tp->gso_segs so that we cook packets of optimal size vs TCP/pacing. Thanks to Arjun for reporting the bug and running the tests ! Fixes: 10d3be569243 ("tcp-tso: do not split TSO packets at retransmit time") Signed-off-by: Eric Dumazet Reported-by: Arjun V Tested-by: Arjun V Acked-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv4/tcp_output.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 96183182ad05d1ce31b9048921c12bf4ad621eaf Author: Wei Yongjun Date: Mon Jun 27 20:48:53 2016 +0800 ibmvnic: fix to use list_for_each_safe() when delete items Since we will remove items off the list using list_del() we need to use a safe version of the list_for_each() macro aptly named list_for_each_safe(). Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller drivers/net/ethernet/ibm/ibmvnic.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 6b9dc6a474fd4e025c615ed4582735360005727c Author: Rodrigo Vivi Date: Thu Jun 23 14:50:36 2016 -0700 drm/i915: Removing PCI IDs that are no longer listed as Kabylake. This is unusual. Usually IDs listed on early stages of platform definition are kept there as reserved for later use. However these IDs here are not listed anymore in any of steppings and devices IDs tables for Kabylake on configurations overview section of BSpec. So it is better removing them before they become used in any other future platform. Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: http://patchwork.freedesktop.org/patch/msgid/1466718636-19675-2-git-send-email-rodrigo.vivi@intel.com (cherry picked from commit a922eb8d4581c883c37ce6e12dca9ff2cb1ea723) Signed-off-by: Jani Nikula include/drm/i915_pciids.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit 42482b4546336ecd93acdd95e435bafd7a4c581c Author: Rodrigo Vivi Date: Thu Jun 23 14:50:35 2016 -0700 drm/i915: Add more Kabylake PCI IDs. The spec has been updated adding new PCI IDs. Signed-off-by: Rodrigo Vivi Reviewed-by: Dhinakaran Pandiyan Link: http://patchwork.freedesktop.org/patch/msgid/1466718636-19675-1-git-send-email-rodrigo.vivi@intel.com (cherry picked from commit 33d9391d3020e069dca98fa87a604c037beb2b9e) Signed-off-by: Jani Nikula include/drm/i915_pciids.h | 3 +++ 1 file changed, 3 insertions(+) commit b2c1b30e3e6dea37d5a7176bd09cf5967fb43665 Merge: f5074d0 3e29adb Author: David S. Miller Date: Wed Jun 29 05:14:19 2016 -0400 Merge branch 'thunderx-fixes' Sunil Goutham says: ==================== net: thunderx: Miscellaneous fixes This 2 patch series fixes issues w.r.t physical link status reporting and transmit datapath configuration for secondary qsets. Changes from v1: Fixed lmac disable sequence for interfaces of type SGMII. ==================== Signed-off-by: David S. Miller commit 3e29adba567306504e99b8363edf2d47c19dbe1b Author: Sunil Goutham Date: Mon Jun 27 15:30:03 2016 +0530 net: thunderx: Fix TL4 configuration for secondary Qsets TL4 calculation for a given SQ of secondary Qsets is incorrect and goes out of bounds and also for some SQ's TL4 chosen will transmit data via a different BGX interface and not same as primary Qset's interface. This patch fixes this issue. Signed-off-by: Sunil Goutham Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/nic_main.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit 3f4c68cfde30caa1f6d8368fd19590671411ade2 Author: Sunil Goutham Date: Mon Jun 27 15:30:02 2016 +0530 net: thunderx: Fix link status reporting Check for SMU RX local/remote faults along with SPU LINK status. Otherwise at times link is UP at our end but DOWN at link partner's side. Also due to an issue in BGX it's rarely seen that initialization doesn't happen properly and SMU RX reports faults with everything fine at SPU. This patch tries to reinitialize LMAC to fix it. Also fixed LMAC disable sequence to properly bring down link. Signed-off-by: Sunil Goutham Signed-off-by: Tao Wang Signed-off-by: David S. Miller drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 91 +++++++++++++++-------- drivers/net/ethernet/cavium/thunder/thunder_bgx.h | 2 + 2 files changed, 62 insertions(+), 31 deletions(-) commit f5074d0ce2f8b45b3d5998a280edd2066c0cfcda Merge: 3ec0a0f bfe6d8d Author: David S. Miller Date: Wed Jun 29 04:28:59 2016 -0400 Merge branch 'mlx5-100G-fixes' Saeed Mahameed says: ==================== Mellanox 100G mlx5 fixes#2 for 4.7-rc The following series provides one-liners fixes for mlx5 driver plus one medium patch to reorganize ethtool counters reporting. Highlights: - Added MODIFY_FLOW_TABLE to command strings table - Add ConnectX-5 PCIe 4.0 to list of supported devices - Rename ASYNC_EVENTS enum - Enable BlueFlame only when supported by device - Avoid adding same vxlan port twice - Report the correct number of PFC counters - Reorganize ethtool reported counters and remove duplications ==================== Signed-off-by: David S. Miller commit bfe6d8d1d433cbd5513a93132695e6dbdd79e6f2 Author: Gal Pressman Date: Mon Jun 27 12:08:38 2016 +0300 net/mlx5e: Reorganize ethtool statistics Categorize and reorganize ethtool statistics counters by renaming to "rx_*" and "tx_*" and removing redundant and duplicated counters, this way they are easier to grasp and more user friendly. Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 30 ++- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 27 ++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 +- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 228 +++++++++------------ drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 4 +- 5 files changed, 130 insertions(+), 163 deletions(-) commit ed80ec4c179d1f44cc1b36c7a102353ae6103793 Author: Gal Pressman Date: Mon Jun 27 12:08:37 2016 +0300 net/mlx5e: Fix number of PFC counters reported to ethtool Number of PFC counters used to count only number of priorities with PFC enabled, but each priority has more than one counter, hence the need to multiply it by the number of PFC counters per priority. Fixes: cf678570d5a1 ('net/mlx5e: Add per priority group to PPort counters') Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 9ceec359e4ebdbbfd35375203c5bd06d602225f7 Author: Matthew Finlay Date: Mon Jun 27 12:08:36 2016 +0300 net/mlx5e: Prevent adding the same vxlan port Do not allow the same vxlan udp port to be added to the device more than once. Fixes: b3f63c3d5e2c ("net/mlx5e: Add netdev support for VXLAN tunneling") Signed-off-by: Matthew Finlay Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/vxlan.c | 3 +++ 1 file changed, 3 insertions(+) commit fd4782c21359cfd52af4c3180a2bb6bad55c1eba Author: Gal Pressman Date: Mon Jun 27 12:08:35 2016 +0300 net/mlx5e: Check for BlueFlame capability before allocating SQ uar Previous to this patch mapping was always set to write combining without checking whether BlueFlame is supported in the device. Fixes: 0ba422410bbf ('net/mlx5: Fix global UAR mapping') Signed-off-by: Gal Pressman Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e0f46eb9f64ca2e97d242b6e02b8ae2c7fe6dc56 Author: Eli Cohen Date: Mon Jun 27 12:08:34 2016 +0300 net/mlx5e: Change enum to better reflect usage Change MLX5E_STATE_ASYNC_EVENTS_ENABLE to MLX5E_STATE_ASYNC_EVENTS_ENABLED since it represent a state and not an operation. Fixes: acff797cd1874 ('net/mlx5: Extend mlx5_core to support ConnectX-4 Ethernet functionality') Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en.h | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) commit 7092fe866907f4f243122ab388cbf0e77305afaa Author: Majd Dibbiny Date: Mon Jun 27 12:08:33 2016 +0300 net/mlx5: Add ConnectX-5 PCIe 4.0 to list of supported devices Add the upcoming ConnectX-5 PCIe 4.0 device to the list of supported devices by the mlx5 driver. Signed-off-by: Majd Dibbiny Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5be1ea899da4f11de92897d2ea706e0820609b9e Author: Eli Cohen Date: Mon Jun 27 12:08:32 2016 +0300 net/mlx5: Update command strings Add command string for MODIFY_FLOW_TABLE which is used by the driver. Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 1 + 1 file changed, 1 insertion(+) commit ba34a65324259082dc6d2924cb82d562db1c6a6b Author: Imre Deak Date: Tue Jun 28 13:37:33 2016 +0300 drm/i915: Avoid early timeout during AUX transfers Since wait_for_atomic doesn't re-check the wait-for condition after expiry of the timeout it can fail when called from non-atomic context even if the condition is set correctly before the expiry. Fix this by using the non-atomic wait_for instead. Due to the relatively long 10ms timeout, probably this didn't cause any real problems, but fix it in any case for consistency. Fixes: 0351b93992aa ("drm/i915: Do not lie about atomic timeout granularity") CC: Chris Wilson CC: Tvrtko Ursulin Signed-off-by: Imre Deak Reviewed-by: Tvrtko Ursulin CC: drm-intel-fixes@lists.freedesktop.org Link: http://patchwork.freedesktop.org/patch/msgid/1467110253-16046-5-git-send-email-imre.deak@intel.com (cherry picked from commit 713a6b668932213247b394559bc229cd0fec2777) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fa7c13e5b1e2076b0ec716ed584ab76f9e65b7a6 Author: Imre Deak Date: Tue Jun 28 13:37:32 2016 +0300 drm/i915/hsw: Avoid early timeout during LCPLL disable/restore Since wait_for_atomic doesn't re-check the wait-for condition after expiry of the timeout it can fail when called from non-atomic context even if the condition is set correctly before the expiry. Fix this by using the non-atomic wait_for instead. Fixes: 0351b93992aa ("drm/i915: Do not lie about atomic timeout granularity") CC: Chris Wilson CC: Tvrtko Ursulin Signed-off-by: Imre Deak Reviewed-by: Tvrtko Ursulin CC: drm-intel-fixes@lists.freedesktop.org Link: http://patchwork.freedesktop.org/patch/msgid/1467110253-16046-4-git-send-email-imre.deak@intel.com (cherry picked from commit f53dd63f1119a98a16d1a5a7cb3277a2f1ff483d) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 11f6145791775ce41b8993fd29e19eb53ef0ff14 Author: Imre Deak Date: Tue Jun 28 13:37:31 2016 +0300 drm/i915/lpt: Avoid early timeout during FDI PHY reset Since wait_for_atomic doesn't re-check the wait-for condition after expiry of the timeout it can fail when called from non-atomic context even if the condition is set correctly before the expiry. Fix this by using the non-atomic wait_for instead. Fixes: 0351b93992aa ("drm/i915: Do not lie about atomic timeout granularity") CC: Chris Wilson CC: Tvrtko Ursulin Signed-off-by: Imre Deak Reviewed-by: Tvrtko Ursulin CC: drm-intel-fixes@lists.freedesktop.org Link: http://patchwork.freedesktop.org/patch/msgid/1467110253-16046-3-git-send-email-imre.deak@intel.com (cherry picked from commit cf3598c23cd09d5f063fa8c12fe9ddd5a352d3d5) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ea12e2a0cad62f6d634da62e7bf50ffe077de13b Author: Imre Deak Date: Tue Jun 28 13:37:30 2016 +0300 drm/i915/bxt: Avoid early timeout during PLL enable Since wait_for_atomic doesn't re-check the wait-for condition after expiry of the timeout it can fail when called from non-atomic context even if the condition is set correctly before the expiry. Fix this by using the non-atomic wait_for instead. I noticed this via the PLL locking timing out incorrectly, with this fix I couldn't reproduce the problem. Fixes: 0351b93992aa ("drm/i915: Do not lie about atomic timeout granularity") CC: Chris Wilson CC: Tvrtko Ursulin Signed-off-by: Imre Deak Reviewed-by: Tvrtko Ursulin CC: drm-intel-fixes@lists.freedesktop.org Link: http://patchwork.freedesktop.org/patch/msgid/1467110253-16046-2-git-send-email-imre.deak@intel.com (cherry picked from commit 0b786e41c73956126f6297764459021deef8aba7) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dpll_mgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 664a84d2c77cbff2945ed7f96d08afbba42b6293 Author: Ville Syrjälä Date: Fri May 13 20:53:56 2016 +0300 drm/i915: Refresh cached DP port register value on resume During hibernation the cached DP port register value will be left with whatever value we have there when we create the hibernation image. Currently that means the port (and eDP PLL) will be off in the cached value. However when we resume there is no guarantee that the value in the actual register will match the cached value. If i915 isn't loaded in the kernel that loads the hibernation image, the port may well be on (eg. left on by the BIOS). The encoder state readout does the right thing in this case and updates our encoder state to reflect the actual hardware state. However the post-resume modeset will then use the stale cached port register value in intel_dp_link_down() and potentially confuse the hardware. This was caught by the following assert WARNING: CPU: 3 PID: 5288 at ../drivers/gpu/drm/i915/intel_dp.c:2184 assert_edp_pll+0x99/0xa0 [i915] eDP PLL state assertion failure (expected on, current off) on account of the eDP PLL getting prematurely turned off when shutting down the port, since the DP_PLL_ENABLE bit wasn't set in the cached register value. Presumably I introduced this problem in commit 6fec76628333 ("drm/i915: Use intel_dp->DP in eDP PLL setup") as before that we didn't update the cached value after shuttting the port down. That's assuming the port got enabled at least once prior to hibernating. If that didn't happen then the cached value would still have been totally out of sync with reality (eg. first boot w/o eDP on, then hibernate, and then resume with eDP on). So, let's fix this properly and refresh the cached register value from the hardware register during resume. DDI platforms shouldn't use the cached value during port disable at least, so shouldn't have this particular issue. They might still have issues if we skip the initial modeset and then try to retrain the link or something. But untangling this DP vs. DDI mess is a bigger topic, so let's jut punt on DDI for now. Cc: Jani Nikula Cc: stable@vger.kernel.org Fixes: 6fec76628333 ("drm/i915: Use intel_dp->DP in eDP PLL setup") Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1463162036-27931-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak (cherry picked from commit 64989ca4b27acb026b6496ec21e43bee66f86a5b) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 3ec0a0f10ceb77c78f540ded1d13bf0cf7f89a07 Author: Harini Katakam Date: Mon Jun 27 13:09:59 2016 +0530 net: marvell: Add separate config ANEG function for Marvell 88E1111 Marvell 88E1111 currently uses the generic marvell config ANEG function. This function has a sequence accessing Page 5 and Register 31, both of which are not defined or reserved for this PHY. Hence this patch adds a new config ANEG function for Marvell 88E1111 without these erroneous accesses. Signed-off-by: Harini Katakam Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) commit d10f0b312adc21b9b78e36cf695e6157989ce041 Merge: 69fc58a 420cb1b Author: David S. Miller Date: Wed Jun 29 04:01:53 2016 -0400 Merge branch 'batman-adv-fixes' Sven Eckelmann says: ==================== batman-adv: Fixes for Linux 4.7 Antonio currently seems to be occupied. This is currently rather unfortunate because there are patches waiting in the batman-adv development repository maint(enance) branch [1] since up to 6 weeks. I am now getting asked when these patches will hit the distribution kernels and therefore decided to submit these patches directly to netdev. The patch from Simon works around the problem that warnings could be triggered in the translation table code via packets using a VLAN not configured on the target host. This warning was replaced with a rate limited info message. Ben Hutchings found an superfluous batadv_softif_vlan_put in the error handling code of the translation table while he backported the "batman-adv: Fix reference counting of vlan object for tt_local_entry" patch to the stable kernels. He noticed correctly that this batadv_softif_vlan_put should also have been removed by the said patch. The most requested fix at the moment is related to a double free in the translation table code. It is a race condition which mostly happens on systems with multiple cores and multiple network interface attached to batman-adv. Two Freifunk communities which were haunted by weird crashes (with backtraces reporting problems in other parts of the kernel) were kind enough to test this patch. They reported that there systems are now running stable after applying this patch. An invalid memory access was detected in the batadv_icmp_packet_rr handling code when receiving a skbuff with fragments. The last patch is fixing a memory leak when the interface is removed via .dellink. The code to fix it was copied from the code handling the legacy sysfs interface to remove netdevices from a batman-adv netdevice. There are still 28 patches in the development tree for v4.8 but I will leave them to Antonio because these are cleanups and features and therefore for net- next. ==================== Signed-off-by: David S. Miller commit 420cb1b764f9169c5d2601b4af90e4a1702345ee Author: Sven Eckelmann Date: Sun Jun 26 11:16:13 2016 +0200 batman-adv: Clean up untagged vlan when destroying via rtnl-link The untagged vlan object is only destroyed when the interface is removed via the legacy sysfs interface. But it also has to be destroyed when the standard rtnl-link interface is used. Fixes: 5d2c05b21337 ("batman-adv: add per VLAN interface attribute framework") Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Marek Lindner Signed-off-by: David S. Miller net/batman-adv/soft-interface.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3b55e4422087f9f7b241031d758a0c65584e4297 Author: Sven Eckelmann Date: Sun Jun 26 11:16:12 2016 +0200 batman-adv: Fix ICMP RR ethernet access after skb_linearize The skb_linearize may reallocate the skb. This makes the calculated pointer for ethhdr invalid. But it the pointer is used later to fill in the RR field of the batadv_icmp_packet_rr packet. Instead re-evaluate eth_hdr after the skb_linearize+skb_cow to fix the pointer and avoid the invalid read. Fixes: da6b8c20a5b8 ("batman-adv: generalize batman-adv icmp packet handling") Signed-off-by: Sven Eckelmann Signed-off-by: Marek Lindner Signed-off-by: David S. Miller net/batman-adv/routing.c | 1 + 1 file changed, 1 insertion(+) commit baceced93274ff2f846eae991664f9094425ffa8 Author: Ben Hutchings Date: Sun Jun 26 11:16:11 2016 +0200 batman-adv: Fix double-put of vlan object Each batadv_tt_local_entry hold a single reference to a batadv_softif_vlan. In case a new entry cannot be added to the hash table, the error path puts the reference, but the reference will also now be dropped by batadv_tt_local_entry_release(). Fixes: a33d970d0b54 ("batman-adv: Fix reference counting of vlan object for tt_local_entry") Signed-off-by: Ben Hutchings Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: David S. Miller net/batman-adv/translation-table.c | 1 - 1 file changed, 1 deletion(-) commit 9c4604a298e0a9807eaf2cd912d1ebf24d98fbeb Author: Sven Eckelmann Date: Sun Jun 26 11:16:10 2016 +0200 batman-adv: Fix use-after-free/double-free of tt_req_node The tt_req_node is added and removed from a list inside a spinlock. But the locking is sometimes removed even when the object is still referenced and will be used later via this reference. For example batadv_send_tt_request can create a new tt_req_node (including add to a list) and later re-acquires the lock to remove it from the list and to free it. But at this time another context could have already removed this tt_req_node from the list and freed it. CPU#0 batadv_batman_skb_recv from net_device 0 -> batadv_iv_ogm_receive -> batadv_iv_ogm_process -> batadv_iv_ogm_process_per_outif -> batadv_tvlv_ogm_receive -> batadv_tvlv_ogm_receive -> batadv_tvlv_containers_process -> batadv_tvlv_call_handler -> batadv_tt_tvlv_ogm_handler_v1 -> batadv_tt_update_orig -> batadv_send_tt_request -> batadv_tt_req_node_new spin_lock(...) allocates new tt_req_node and adds it to list spin_unlock(...) return tt_req_node CPU#1 batadv_batman_skb_recv from net_device 1 -> batadv_recv_unicast_tvlv -> batadv_tvlv_containers_process -> batadv_tvlv_call_handler -> batadv_tt_tvlv_unicast_handler_v1 -> batadv_handle_tt_response spin_lock(...) tt_req_node gets removed from list and is freed spin_unlock(...) CPU#0 <- returned to batadv_send_tt_request spin_lock(...) tt_req_node gets removed from list and is freed MEMORY CORRUPTION/SEGFAULT/... spin_unlock(...) This can only be solved via reference counting to allow multiple contexts to handle the list manipulation while making sure that only the last context holding a reference will free the object. Fixes: a73105b8d4c7 ("batman-adv: improved client announcement mechanism") Signed-off-by: Sven Eckelmann Tested-by: Martin Weinelt Tested-by: Amadeus Alfa Signed-off-by: Marek Lindner Signed-off-by: David S. Miller net/batman-adv/translation-table.c | 43 ++++++++++++++++++++++++++++++++------ net/batman-adv/types.h | 2 ++ 2 files changed, 39 insertions(+), 6 deletions(-) commit 0b3dd7dfb81ad8af53791ea2bb64b83bac1b7d32 Author: Simon Wunderlich Date: Sun Jun 26 11:16:09 2016 +0200 batman-adv: replace WARN with rate limited output on non-existing VLAN If a VLAN tagged frame is received and the corresponding VLAN is not configured on the soft interface, it will splat a WARN on every packet received. This is a quite annoying behaviour for some scenarios, e.g. if bat0 is bridged with eth0, and there are arbitrary VLAN tagged frames from Ethernet coming in without having any VLAN configuration on bat0. The code should probably create vlan objects on the fly and transparently transport these VLAN-tagged Ethernet frames, but until this is done, at least the WARN splat should be replaced by a rate limited output. Fixes: 354136bcc3c4 ("batman-adv: fix kernel crash due to missing NULL checks") Signed-off-by: Simon Wunderlich Signed-off-by: Marek Lindner Signed-off-by: Sven Eckelmann Signed-off-by: David S. Miller net/batman-adv/translation-table.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 69fc58a57e56bf5e39b48809aefffdaa1b04c945 Author: Florian Fainelli Date: Fri Jun 24 16:25:24 2016 -0700 net: phy: Manage fixed PHY address space using IDA If we have a system which uses fixed PHY devices and calls fixed_phy_register() then fixed_phy_unregister() we can exhaust the number of fixed PHYs available after a while, since we keep incrementing the variable phy_fixed_addr, but we never decrement it. This patch fixes that by converting the fixed PHY allocation to using IDA, which takes care of the allocation/dealloaction of the PHY addresses for us. Fixes: a75951217472 ("net: phy: extend fixed driver with fixed_phy_register()") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/phy/fixed_phy.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit eee25ab19de632af1ab4d2ac50bfc5006802e664 Author: Hans de Goede Date: Tue Jun 28 22:11:14 2016 +0200 ARM: dts: sun7i: Fix pll3x2 and pll7x2 not having a parent clock Fix pll3x2 and pll7x2 not having a parent clock, specifically this fixes the kernel turning of pll3 while simplefb is using it when uboot has configured things to use pll3x2 as lcd ch clk parent. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun7i-a20.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit a4859d75944a726533ab86d24bb5ffd1b2b7d6cc Author: Miklos Szeredi Date: Wed Jun 29 08:26:59 2016 +0200 ovl: fix dentry leak for default_permissions When using the 'default_permissions' mount option, ovl_permission() on non-directories was missing a dput(alias), resulting in "BUG Dentry still in use". Signed-off-by: Miklos Szeredi Fixes: 8d3095f4ad47 ("ovl: default permissions") Cc: # v4.5+ fs/overlayfs/inode.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 190ce8693c23eae09ba5f303a83bf2fbeb6478b1 Author: Michael Neuling Date: Tue Jun 28 13:01:04 2016 +1000 powerpc/tm: Avoid SLB faults in treclaim/trecheckpoint when RI=0 Currently we have 2 segments that are bolted for the kernel linear mapping (ie 0xc000... addresses). This is 0 to 1TB and also the kernel stacks. Anything accessed outside of these regions may need to be faulted in. (In practice machines with TM always have 1T segments) If a machine has < 2TB of memory we never fault on the kernel linear mapping as these two segments cover all physical memory. If a machine has > 2TB of memory, there may be structures outside of these two segments that need to be faulted in. This faulting can occur when running as a guest as the hypervisor may remove any SLB that's not bolted. When we treclaim and trecheckpoint we have a window where we need to run with the userspace GPRs. This means that we no longer have a valid stack pointer in r1. For this window we therefore clear MSR RI to indicate that any exceptions taken at this point won't be able to be handled. This means that we can't take segment misses in this RI=0 window. In this RI=0 region, we currently access the thread_struct for the process being context switched to or from. This thread_struct access may cause a segment fault since it's not guaranteed to be covered by the two bolted segment entries described above. We've seen this with a crash when running as a guest with > 2TB of memory on PowerVM: Unrecoverable exception 4100 at c00000000004f138 Oops: Unrecoverable exception, sig: 6 [#1] SMP NR_CPUS=2048 NUMA pSeries CPU: 1280 PID: 7755 Comm: kworker/1280:1 Tainted: G X 4.4.13-46-default #1 task: c000189001df4210 ti: c000189001d5c000 task.ti: c000189001d5c000 NIP: c00000000004f138 LR: 0000000010003a24 CTR: 0000000010001b20 REGS: c000189001d5f730 TRAP: 4100 Tainted: G X (4.4.13-46-default) MSR: 8000000100001031 CR: 24000048 XER: 00000000 CFAR: c00000000004ed18 SOFTE: 0 GPR00: ffffffffc58d7b60 c000189001d5f9b0 00000000100d7d00 000000003a738288 GPR04: 0000000000002781 0000000000000006 0000000000000000 c0000d1f4d889620 GPR08: 000000000000c350 00000000000008ab 00000000000008ab 00000000100d7af0 GPR12: 00000000100d7ae8 00003ffe787e67a0 0000000000000000 0000000000000211 GPR16: 0000000010001b20 0000000000000000 0000000000800000 00003ffe787df110 GPR20: 0000000000000001 00000000100d1e10 0000000000000000 00003ffe787df050 GPR24: 0000000000000003 0000000000010000 0000000000000000 00003fffe79e2e30 GPR28: 00003fffe79e2e68 00000000003d0f00 00003ffe787e67a0 00003ffe787de680 NIP [c00000000004f138] restore_gprs+0xd0/0x16c LR [0000000010003a24] 0x10003a24 Call Trace: [c000189001d5f9b0] [c000189001d5f9f0] 0xc000189001d5f9f0 (unreliable) [c000189001d5fb90] [c00000000001583c] tm_recheckpoint+0x6c/0xa0 [c000189001d5fbd0] [c000000000015c40] __switch_to+0x2c0/0x350 [c000189001d5fc30] [c0000000007e647c] __schedule+0x32c/0x9c0 [c000189001d5fcb0] [c0000000007e6b58] schedule+0x48/0xc0 [c000189001d5fce0] [c0000000000deabc] worker_thread+0x22c/0x5b0 [c000189001d5fd80] [c0000000000e7000] kthread+0x110/0x130 [c000189001d5fe30] [c000000000009538] ret_from_kernel_thread+0x5c/0xa4 Instruction dump: 7cb103a6 7cc0e3a6 7ca222a6 78a58402 38c00800 7cc62838 08860000 7cc000a6 38a00006 78c60022 7cc62838 0b060000 7ccff120 e8270078 e8a70098 ---[ end trace 602126d0a1dedd54 ]--- This fixes this by copying the required data from the thread_struct to the stack before we clear MSR RI. Then once we clear RI, we only access the stack, guaranteeing there's no segment miss. We also tighten the region over which we set RI=0 on the treclaim() path. This may have a slight performance impact since we're adding an mtmsr instruction. Fixes: 090b9284d725 ("powerpc/tm: Clear MSR RI in non-recoverable TM code") Signed-off-by: Michael Neuling Reviewed-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/tm.S | 61 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 17 deletions(-) commit 5e7ff2ca7f2da55fe777167849d0c93403bd0dc8 Author: Alan Stern Date: Thu Jun 23 15:05:26 2016 -0400 SCSI: fix new bug in scsi_dev_info_list string matching Commit b704f70ce200 ("SCSI: fix bug in scsi_dev_info_list matching") changed the way vendor- and model-string matching was carried out in the routine that looks up entries in a SCSI devinfo list. The new matching code failed to take into account the case of a maximum-length string; in such cases it could end up testing for a terminating '\0' byte beyond the end of the memory allocated to the string. This out-of-bounds bug was detected by UBSAN. I don't know if anybody has actually encountered this bug. The symptom would be that a device entry in the blacklist might not be matched properly if it contained an 8-character vendor name or a 16-character model name. Such entries certainly exist in scsi_static_device_list. This patch fixes the problem by adding a check for a maximum-length string before the '\0' test. Signed-off-by: Alan Stern Fixes: b704f70ce200 ("SCSI: fix bug in scsi_dev_info_list matching") Tested-by: Wilfried Klaebe CC: # v4.4+ Signed-off-by: Martin K. Petersen drivers/scsi/scsi_devinfo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 54e430bbd490e18ab116afa4cd90dcc45787b3df Author: Brian King Date: Mon Jun 27 09:09:40 2016 -0500 ipr: Clear interrupt on croc/crocodile when running with LSI If we fall back to using LSI on the Croc or Crocodile chip we need to clear the interrupt so we don't hang the system. Cc: Tested-by: Benjamin Herrenschmidt Signed-off-by: Brian King Signed-off-by: Martin K. Petersen drivers/scsi/ipr.c | 1 + 1 file changed, 1 insertion(+) commit e547f2628327fec6afd2e03b46f113f614cca05b Author: Trond Myklebust Date: Sat Jun 25 19:19:28 2016 -0400 NFS: Fix another OPEN_DOWNGRADE bug Olga Kornievskaia reports that the following test fails to trigger an OPEN_DOWNGRADE on the wire, and only triggers the final CLOSE. fd0 = open(foo, RDRW) -- should be open on the wire for "both" fd1 = open(foo, RDONLY) -- should be open on the wire for "read" close(fd0) -- should trigger an open_downgrade read(fd1) close(fd1) The issue is that we're missing a check for whether or not the current state transitioned from an O_RDWR state as opposed to having transitioned from a combination of O_RDONLY and O_WRONLY. Reported-by: Olga Kornievskaia Fixes: cd9288ffaea4 ("NFSv4: Fix another bug in the close/open_downgrade code") Cc: stable@vger.kernel.org # 2.6.33+ Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 3f5be2da8565c1cce5655bb0948fcc957c6eb6c6 Author: Richard Guy Briggs Date: Tue Jun 28 12:07:50 2016 -0400 audit: move audit_get_tty to reduce scope and kabi changes The only users of audit_get_tty and audit_put_tty are internal to audit, so move it out of include/linux/audit.h to kernel.h and create a proper function rather than inlining it. This also reduces kABI changes. Suggested-by: Paul Moore Signed-off-by: Richard Guy Briggs [PM: line wrapped description] Signed-off-by: Paul Moore include/linux/audit.h | 24 ------------------------ kernel/audit.c | 17 +++++++++++++++++ kernel/audit.h | 4 ++++ kernel/auditsc.c | 1 - 4 files changed, 21 insertions(+), 25 deletions(-) commit 76a658c20efd541a62838d9ff68ce94170d7a549 Author: Richard Guy Briggs Date: Tue Jun 28 12:06:58 2016 -0400 audit: move calcs after alloc and check when logging set loginuid Move the calculations of values after the allocation in case the allocation fails. This avoids wasting effort in the rare case that it fails, but more importantly saves us extra logic to release the tty ref. Signed-off-by: Richard Guy Briggs Signed-off-by: Paul Moore kernel/auditsc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit de4921ce9b3bc68aa530249df8d85cde8edc0968 Merge: 595d9e3 76bf344 Author: Linus Torvalds Date: Tue Jun 28 12:11:31 2016 -0700 Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata fixes from Tejun Heo: "Two trivial fixes - one for a bug in the allocation failure path and the other a compiler warning fix" * 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: ata: sata_mv: fix mis-conversion in mv_write_cached_reg() ata: fix return value check in ahci_seattle_get_port_info() commit 595d9e34eedc4b8d0631260ce93bbeb08e5b3bd7 Merge: 02184c6 6dd2e27 Author: Linus Torvalds Date: Tue Jun 28 12:01:14 2016 -0700 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 multitouch palm rejection from Allen Hung" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: multitouch: enable palm rejection for Windows Precision Touchpad Revert "HID: multitouch: enable palm rejection if device implements confidence usage" commit 9a0fee2b552b1235fb1706ae1fc664ae74573be8 Author: Willem de Bruijn Date: Fri Jun 24 16:02:35 2016 -0400 sock_diag: do not broadcast raw socket destruction Diag intends to broadcast tcp_sk and udp_sk socket destruction. Testing sk->sk_protocol for IPPROTO_TCP/IPPROTO_UDP alone is not sufficient for this. Raw sockets can have the same type. Add a test for sk->sk_type. Fixes: eb4cb008529c ("sock_diag: define destruction multicast groups") Signed-off-by: Willem de Bruijn Signed-off-by: David S. Miller include/linux/sock_diag.h | 6 ++++++ 1 file changed, 6 insertions(+) commit ab8ed951080e8f59b1da4ea10ac7c05ba24a3cbd Author: Aaron Campbell Date: Fri Jun 24 10:05:32 2016 -0300 connector: fix out-of-order cn_proc netlink message delivery The proc connector messages include a sequence number, allowing userspace programs to detect lost messages. However, performing this detection is currently more difficult than necessary, since netlink messages can be delivered to the application out-of-order. To fix this, leave pre-emption disabled during cn_netlink_send(), and use GFP_NOWAIT. The following was written as a test case. Building the kernel w/ make -j32 proved a reliable way to generate out-of-order cn_proc messages. int main(int argc, char *argv[]) { static uint32_t last_seq[CPU_SETSIZE], seq; int cpu, fd; struct sockaddr_nl sa; struct __attribute__((aligned(NLMSG_ALIGNTO))) { struct nlmsghdr nl_hdr; struct __attribute__((__packed__)) { struct cn_msg cn_msg; struct proc_event cn_proc; }; } rmsg; struct __attribute__((aligned(NLMSG_ALIGNTO))) { struct nlmsghdr nl_hdr; struct __attribute__((__packed__)) { struct cn_msg cn_msg; enum proc_cn_mcast_op cn_mcast; }; } smsg; fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR); if (fd < 0) { perror("socket"); } sa.nl_family = AF_NETLINK; sa.nl_groups = CN_IDX_PROC; sa.nl_pid = getpid(); if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) < 0) { perror("bind"); } memset(&smsg, 0, sizeof(smsg)); smsg.nl_hdr.nlmsg_len = sizeof(smsg); smsg.nl_hdr.nlmsg_pid = getpid(); smsg.nl_hdr.nlmsg_type = NLMSG_DONE; smsg.cn_msg.id.idx = CN_IDX_PROC; smsg.cn_msg.id.val = CN_VAL_PROC; smsg.cn_msg.len = sizeof(enum proc_cn_mcast_op); smsg.cn_mcast = PROC_CN_MCAST_LISTEN; if (send(fd, &smsg, sizeof(smsg), 0) != sizeof(smsg)) { perror("send"); } while (recv(fd, &rmsg, sizeof(rmsg), 0) == sizeof(rmsg)) { cpu = rmsg.cn_proc.cpu; if (cpu < 0) { continue; } seq = rmsg.cn_msg.seq; if ((last_seq[cpu] != 0) && (seq != last_seq[cpu] + 1)) { printf("out-of-order seq=%d on cpu=%d\n", seq, cpu); } last_seq[cpu] = seq; } /* NOTREACHED */ perror("recv"); return -1; } Signed-off-by: Aaron Campbell Signed-off-by: David S. Miller drivers/connector/cn_proc.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit 0888d5f3c0f183ea6177355752ada433d370ac89 Author: daniel Date: Fri Jun 24 12:35:18 2016 +0200 Bridge: Fix ipv6 mc snooping if bridge has no ipv6 address The bridge is falsly dropping ipv6 mulitcast packets if there is: 1. No ipv6 address assigned on the brigde. 2. No external mld querier present. 3. The internal querier enabled. When the bridge fails to build mld queries, because it has no ipv6 address, it slilently returns, but keeps the local querier enabled. This specific case causes confusing packet loss. Ipv6 multicast snooping can only work if: a) An external querier is present OR b) The bridge has an ipv6 address an is capable of sending own queries Otherwise it has to forward/flood the ipv6 multicast traffic, because snooping cannot work. This patch fixes the issue by adding a flag to the bridge struct that indicates that there is currently no ipv6 address assinged to the bridge and returns a false state for the local querier in __br_multicast_querier_exists(). Special thanks to Linus Lüssing. Fixes: d1d81d4c3dd8 ("bridge: check return value of ipv6_dev_get_saddr()") Signed-off-by: Daniel Danzberger Acked-by: Linus Lüssing Signed-off-by: David S. Miller net/bridge/br_multicast.c | 4 ++++ net/bridge/br_private.h | 23 +++++++++++++++++++---- 2 files changed, 23 insertions(+), 4 deletions(-) commit 6dd2e27a103d716921cc4a1a96a9adc0a8e3ab57 Author: Allen Hung Date: Thu Jun 23 16:31:30 2016 +0800 HID: multitouch: enable palm rejection for Windows Precision Touchpad The usage Confidence is mandary to Windows Precision Touchpad devices. If it is examined in input_mapping on a WIndows Precision Touchpad, a new add quirk MT_QUIRK_CONFIDENCE desgned for such devices will be applied to the device. A touch with the confidence bit is not set is determined as invalid. Tested on Dell XPS13 9343 Cc: stable@vger.kernel.org # v4.5+ Reviewed-by: Benjamin Tissoires Tested-by: Andy Lutomirski # XPS 13 9350, BIOS 1.4.3 Signed-off-by: Allen Hung Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 62630ea768869beeb1e514b0bf5607a0c9b93d12 Author: Allen Hung Date: Thu Jun 23 16:31:29 2016 +0800 Revert "HID: multitouch: enable palm rejection if device implements confidence usage" This reverts commit 25a84db15b3f ("HID: multitouch: enable palm rejection if device implements confidence usage") The commit enables palm rejection for Win8 Precision Touchpad devices but the quirk MT_QUIRK_VALID_IS_CONFIDENCE it is using is not working very properly. This quirk is originally designed for some WIn7 touchscreens. Use of this for a Win8 Precision Touchpad will cause unexpected pointer jumping problem. Cc: stable@vger.kernel.org # v4.5+ Reviewed-by: Benjamin Tissoires Tested-by: Andy Lutomirski # XPS 13 9350, BIOS 1.4.3 Signed-off-by: Allen Hung Signed-off-by: Jiri Kosina drivers/hid/hid-multitouch.c | 5 ----- 1 file changed, 5 deletions(-) commit cca0e542e02e48cce541a49c4046ec094ec27c1e Author: Gavin Shan Date: Fri Jun 24 14:49:02 2016 +1000 powerpc/eeh: Fix wrong argument passed to eeh_rmv_device() When calling eeh_rmv_device() in eeh_reset_device() for partial hotplug case, @rmv_data instead of its address is the proper argument. Otherwise, the stack frame is corrupted when writing to @rmv_data (actually its address) in eeh_rmv_device(). It results in kernel crash as observed. This fixes the issue by passing @rmv_data, not its address to eeh_rmv_device() in eeh_reset_device(). Fixes: 67086e32b564 ("powerpc/eeh: powerpc/eeh: Support error recovery for VF PE") Reported-by: Pridhiviraj Paidipeddi Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 126e7557328a1cd576be4fca95b133a2695283ff Author: Jouni Malinen Date: Sun Jun 19 23:51:02 2016 +0300 mac80211: Fix mesh estab_plinks counting in STA removal case If a user space program (e.g., wpa_supplicant) deletes a STA entry that is currently in NL80211_PLINK_ESTAB state, the number of established plinks counter was not decremented and this could result in rejecting new plink establishment before really hitting the real maximum plink limit. For !user_mpm case, this decrementation is handled by mesh_plink_deactive(). Fix this by decrementing estab_plinks on STA deletion (mesh_sta_cleanup() gets called from there) so that the counter has a correct value and the Beacon frame advertisement in Mesh Configuration element shows the proper value for capability to accept additional peers. Cc: stable@vger.kernel.org Signed-off-by: Jouni Malinen Signed-off-by: Johannes Berg net/mac80211/mesh.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f299a02d5f13c4deb52c1a7ddf2b42630fe6294a Author: Wang Sheng-Hui Date: Fri Jun 24 08:52:11 2016 +0800 net/mlx5: use mlx5_buf_alloc_node instead of mlx5_buf_alloc in mlx5_wq_ll_create Commit 311c7c71c9bb ("net/mlx5e: Allocate DMA coherent memory on reader NUMA node") introduced mlx5_*_alloc_node() but missed changing some calling and warn messages. This patch introduces 2 changes: * Use mlx5_buf_alloc_node() instead of mlx5_buf_alloc() in mlx5_wq_ll_create() * Update the failure warn messages with _node postfix for mlx5_*_alloc function names Fixes: 311c7c71c9bb ("net/mlx5e: Allocate DMA coherent memory on reader NUMA node") Signed-off-by: Wang Sheng-Hui Acked-By: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/wq.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit d1b5a8da298bc15f67e16f18aa0812c35fe639a2 Merge: 0622cab 3894396 Author: David S. Miller Date: Tue Jun 28 04:22:25 2016 -0400 Merge branch 'bgmac-fixes' Florian Fainelli says: ==================== net: bgmac: Random fixes This patch series fixes a few issues spotted by code inspection and actual testing. ==================== Signed-off-by: David S. Miller commit 3894396e64994f31c3ef5c7e6f63dded0593e567 Author: Florian Fainelli Date: Thu Jun 23 14:25:33 2016 -0700 net: bgmac: Remove superflous netif_carrier_on() bgmac_open() calls phy_start() to initialize the PHY state machine, which will set the interface's carrier state accordingly, no need to force that as this could be conflicting with the PHY state determined by PHYLIB. Fixes: dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 2 -- 1 file changed, 2 deletions(-) commit c3897f2a69e54dd113fc9abd2daf872e5b495798 Author: Florian Fainelli Date: Thu Jun 23 14:25:32 2016 -0700 net: bgmac: Start transmit queue in bgmac_open The driver does not start the transmit queue in bgmac_open(). If the queue was stopped prior to closing then re-opening the interface, we would never be able to wake-up again. Fixes: dd4544f05469 ("bgmac: driver for GBit MAC core on BCMA bus") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 3 +++ 1 file changed, 3 insertions(+) commit d2b13233879ca1268a1c027d4573109e5a777811 Author: Florian Fainelli Date: Thu Jun 23 14:23:12 2016 -0700 net: bgmac: Fix SOF bit checking We are checking for the Start of Frame bit in the ctl1 word, while this bit is set in the ctl0 word instead. Read the ctl0 word and update the check to verify that. Fixes: 9cde94506eac ("bgmac: implement scatter/gather support") Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bgmac.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 0622cab0341cac6b30da177b0faa39fae0680e71 Author: Jay Vosburgh Date: Thu Jun 23 14:20:51 2016 -0700 bonding: fix 802.3ad aggregator reselection Since commit 7bb11dc9f59d ("bonding: unify all places where actor-oper key needs to be updated."), the logic in bonding to handle selection between multiple aggregators has not functioned. This affects only configurations wherein the bonding slaves connect to two discrete aggregators (e.g., two independent switches, each with LACP enabled), thus creating two separate aggregation groups within a single bond. The cause is a change in 7bb11dc9f59d to no longer set AD_PORT_BEGIN on a port after a link state change, which would cause the port to be reselected for attachment to an aggregator as if were newly added to the bond. We cannot restore the prior behavior, as it contradicts IEEE 802.1AX 5.4.12, which requires ports that "become inoperable" (lose carrier, setting port_enabled=false as per 802.1AX 5.4.7) to remain selected (i.e., assigned to the aggregator). As the port now remains selected, the aggregator selection logic is not invoked. A side effect of this change is that aggregators in bonding will now contain ports that are link down. The aggregator selection logic does not currently handle this situation correctly, causing incorrect aggregator selection. This patch makes two changes to repair the aggregator selection logic in bonding to function as documented and within the confines of the standard: First, the aggregator selection and related logic now utilizes the number of active ports per aggregator, not the number of selected ports (as some selected ports may be down). The ad_select "bandwidth" and "count" options only consider ports that are link up. Second, on any carrier state change of any slave, the aggregator selection logic is explicitly called to insure the correct aggregator is active. Reported-by: Veli-Matti Lintu Fixes: 7bb11dc9f59d ("bonding: unify all places where actor-oper key needs to be updated.") Signed-off-by: Jay Vosburgh Signed-off-by: David S. Miller drivers/net/bonding/bond_3ad.c | 64 +++++++++++++++++++++++++++++------------- 1 file changed, 45 insertions(+), 19 deletions(-) commit 70a0dec45174c976c64b4c8c1d0898581f759948 Author: Tom Goff Date: Thu Jun 23 16:11:57 2016 -0400 ipmr/ip6mr: Initialize the last assert time of mfc entries. This fixes wrong-interface signaling on 32-bit platforms for entries created when jiffies > 2^31 + MFC_ASSERT_THRESH. Signed-off-by: Tom Goff Signed-off-by: David S. Miller net/ipv4/ipmr.c | 4 +++- net/ipv6/ip6mr.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit bcf4dd5f9ee096bd1510f838dd4750c35df4e38b Author: Martin Schwidefsky Date: Mon Jun 27 17:06:45 2016 +0200 s390: fix test_fp_ctl inline assembly contraints The test_fp_ctl function is used to test if a given value is a valid floating-point control. The inline assembly in test_fp_ctl uses an incorrect constraint for the 'orig_fpc' variable. If the compiler chooses the same register for 'fpc' and 'orig_fpc' the test_fp_ctl() function always returns true. This allows user space to trigger kernel oopses with invalid floating-point control values on the signal stack. This problem has been introduced with git commit 4725c86055f5bbdcdf "s390: fix save and restore of the floating-point-control register" Cc: stable@vger.kernel.org # v3.13+ Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/include/asm/fpu/api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5419447e2142d6ed68c9f5c1a28630b3a290a845 Author: Michael Holzheu Date: Mon Jun 13 17:03:48 2016 +0200 Revert "s390/kdump: Clear subchannel ID to signal non-CCW/SCSI IPL" This reverts commit 852ffd0f4e23248b47531058e531066a988434b5. There are use cases where an intermediate boot kernel (1) uses kexec to boot the final production kernel (2). For this scenario we should provide the original boot information to the production kernel (2). Therefore clearing the boot information during kexec() should not be done. Cc: stable@vger.kernel.org # v3.17+ Reported-by: Steffen Maier Signed-off-by: Michael Holzheu Reviewed-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/ipl.c | 7 ------- 1 file changed, 7 deletions(-) commit 9bd54517ee86cb164c734f72ea95aeba4804f10b Author: Alexey Brodkin Date: Thu Jun 23 11:00:39 2016 +0300 arc: unwind: warn only once if DW2_UNWIND is disabled If CONFIG_ARC_DW2_UNWIND is disabled every time arc_unwind_core() gets called following message gets printed in debug console: ----------------->8--------------- CONFIG_ARC_DW2_UNWIND needs to be enabled ----------------->8--------------- That message makes sense if user indeed wants to see a backtrace or get nice function call-graphs in perf but what if user disabled unwinder for the purpose? Why pollute his debug console? So instead we'll warn user about possibly missing feature once and let him decide if that was what he or she really wanted. Signed-off-by: Alexey Brodkin Cc: stable@vger.kernel.org Signed-off-by: Vineet Gupta arch/arc/kernel/stacktrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f52e126cc7476196f44f3c313b7d9f0699a881fc Author: Vineet Gupta Date: Tue Jun 28 09:42:25 2016 +0530 ARC: unwind: ensure that .debug_frame is generated (vs. .eh_frame) With recent binutils update to support dwarf CFI pseudo-ops in gas, we now get .eh_frame vs. .debug_frame. Although the call frame info is exactly the same in both, the CIE differs, which the current kernel unwinder can't cope with. This broke both the kernel unwinder as well as loadable modules (latter because of a new unhandled relo R_ARC_32_PCREL from .rela.eh_frame in the module loader) The ideal solution would be to switch unwinder to .eh_frame. For now however we can make do by just ensureing .debug_frame is generated by removing -fasynchronous-unwind-tables .eh_frame generated with -gdwarf-2 -fasynchronous-unwind-tables .debug_frame generated with -gdwarf-2 Fixes STAR 9001058196 Cc: stable@vger.kernel.org Signed-off-by: Vineet Gupta arch/arc/Makefile | 2 -- 1 file changed, 2 deletions(-) commit 02184c60eba8491ea574cd17b8ba766c86d468f2 Merge: 18751e2 3627612 Author: Linus Torvalds Date: Mon Jun 27 20:43:00 2016 -0700 Merge tag 'for-v4.7-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply fixes from Sebastian Reichel. * tag 'for-v4.7-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power_supply: tps65217-charger: Fix NULL deref during property export power_supply: power_supply_read_temp only if use_cnt > 0 commit 18751e2eb51261059e51e1a7cf5aec2fd5429608 Merge: 3992a27 60842ef Author: Linus Torvalds Date: Mon Jun 27 20:34:43 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: vmmouse - remove port reservation Input: elantech - add more IC body types to the list Input: wacom_w8001 - ignore invalid pen data packets Input: wacom_w8001 - w8001_MAX_LENGTH should be 13 Input: xpad - fix oops when attaching an unknown Xbox One gamepad MAINTAINERS: add Pali Rohár as reviewer of ALPS PS/2 touchpad driver Input: add HDMI CEC specific keycodes Input: add BUS_CEC type Input: xpad - fix rumble on Xbox One controllers with 2015 firmware commit 742c87bf27d3b715820da6f8a81d6357adbf18f8 Author: Rafael J. Wysocki Date: Tue Jun 28 03:29:29 2016 +0200 cpufreq: Avoid false-positive WARN_ON()s in cpufreq_update_policy() CPU notifications from the firmware coming in when cpufreq is suspended cause cpufreq_update_current_freq() to return 0 which triggers the WARN_ON() in cpufreq_update_policy() for no reason. Avoid that by checking cpufreq_suspended before calling cpufreq_update_current_freq(). Fixes: c9d9c929e674 (cpufreq: Abort cpufreq_update_current_freq() for cpufreq_suspended set) Signed-off-by: Rafael J. Wysocki Acked-by: Viresh Kumar Cc: 4.6+ # 4.6+ drivers/cpufreq/cpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) commit ca5eda5d3db6026080cff267459625c87c43e9ab Author: Masahiro Yamada Date: Mon Jun 27 14:50:13 2016 +0900 cpufreq: dt: call of_node_put() before error out If of_match_node() fails, this init function bails out without calling of_node_put(). Also change of_node_put(of_root) to of_node_put(np); both of them hold the same pointer, but it seems better to call of_node_put() against the node returned by of_find_node_by_path(). Signed-off-by: Masahiro Yamada Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki drivers/cpufreq/cpufreq-dt-platdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 5ab666e09541e64ce2fd73411c3b5b9e4ad334b1 Author: Rafael J. Wysocki Date: Mon Jun 27 23:47:15 2016 +0200 intel_pstate: Do not clear utilization update hooks on policy changes intel_pstate_set_policy() is invoked by the cpufreq core during driver initialization, on changes of policy attributes (minimim and maximum frequency, for example) via sysfs and via CPU notifications from the platform firmware. On some platforms the latter may occur relatively often. Commit bb6ab52f2bef (intel_pstate: Do not set utilization update hook too early) made intel_pstate_set_policy() clear the CPU's utilization update hook before updating the policy attributes for it (and set the hook again after doind that), but that involves invoking synchronize_sched() and adds overhead to the CPU notifications mentioned above and to the sched-RCU handling in general. That extra overhead is arguably not necessary, because updating policy attributes when the CPU's utilization update hook is active should not lead to any adverse effects, so drop the clearing of the hook from intel_pstate_set_policy() and make it check if the hook has been set already when attempting to set it. Fixes: bb6ab52f2bef (intel_pstate: Do not set utilization update hook too early) Reported-by: Jisheng Zhang Tested-by: Jisheng Zhang Tested-by: Doug Smythies Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 3992a272a72c7a258236cf035f74396ec4f89941 Merge: fbe601f b36fad6 Author: Linus Torvalds Date: Mon Jun 27 13:38:58 2016 -0700 Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild regression fix from Michal Marek: "The problem is that commit 9c8fa9bc08f6 ("kbuild: fix if_change and friends to consider argument order") fixed a potential missed rebuild, but this results in unnnecessary rebuilds with the packaging targets. Which is still more correct than the previous logic, but also very annoying" * 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kbuild: Initialize exported variables commit 9c6795a9b3cbb56a9fbfaf43909c5c22999ba317 Author: Christophe JAILLET Date: Mon Jun 27 21:06:51 2016 +0200 ALSA: echoaudio: Fix memory allocation 'commpage_bak' is allocated with 'sizeof(struct echoaudio)' bytes. We then copy 'sizeof(struct comm_page)' bytes in it. On my system, smatch complains because one is 2960 and the other is 3072. This would result in memory corruption or a oops. Signed-off-by: Christophe JAILLET Cc: Signed-off-by: Takashi Iwai sound/pci/echoaudio/echoaudio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 023954351fae0e34ba247cff4d798c98290b20a4 Author: Eric Sandeen Date: Thu Jun 23 16:54:46 2016 -0500 dax: fix offset overflow in dax_io This isn't functionally apparent for some reason, but when we test io at extreme offsets at the end of the loff_t rang, such as in fstests xfs/071, the calculation of "max" in dax_io() can be wrong due to pos + size overflowing. For example, # xfs_io -c "pwrite 9223372036854771712 512" /mnt/test/file enters dax_io with: start 0x7ffffffffffff000 end 0x7ffffffffffff200 and the rounded up "size" variable is 0x1000. This yields: pos + size 0x8000000000000000 (overflows loff_t) end 0x7ffffffffffff200 Due to the overflow, the min() function picks the wrong value for the "max" variable, and when we send (max - pos) into i.e. copy_from_iter_pmem() it is also the wrong value. This somehow(tm) gets magically absorbed without incident, probably because iter->count is correct. But it seems best to fix it up properly by comparing the two values as unsigned. Signed-off-by: Eric Sandeen Signed-off-by: Dan Williams fs/dax.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit fbe601f7a34b395deb85a63ae5cddd0c084c8db1 Merge: 5b7452c 45e8a25 Author: Linus Torvalds Date: Mon Jun 27 11:23:44 2016 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Various small cifs/smb3 fixes, include some for stable, and some from the recent SMB3 test event" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: File names with trailing period or space need special case conversion Fix reconnect to not defer smb3 session reconnect long after socket reconnect cifs: check hash calculating succeeded cifs: dynamic allocation of ntlmssp blob cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name cifs: stuff the fl_owner into "pid" field in the lock request commit 5b7452c840ad085e5ca1bb5b5a23a18e6d5b0c33 Merge: 4c2e07c 055ddaa Author: Linus Torvalds Date: Mon Jun 27 10:59:53 2016 -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: - Missing length check for user-space GETALG request - Bogus memmove length in ux500 driver - Incorrect priority setting for vmx driver - Incorrect ABI selection for vmx driver" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: user - re-add size check for CRYPTO_MSG_GETALG crypto: ux500 - memmove the right size crypto: vmx - Increase priority of aes-cbc cipher crypto: vmx - Fix ABI detection commit ab2a4bf83902c170d29ba130a8abb5f9d90559e1 Author: Alan Stern Date: Mon Jun 27 10:23:10 2016 -0400 USB: don't free bandwidth_mutex too early The USB core contains a bug that can show up when a USB-3 host controller is removed. If the primary (USB-2) hcd structure is released before the shared (USB-3) hcd, the core will try to do a double-free of the common bandwidth_mutex. The problem was described in graphical form by Chung-Geol Kim, who first reported it: ================================================= At *remove USB(3.0) Storage sequence <1> --> <5> ((Problem Case)) ================================================= VOLD ------------------------------------|------------ (uevent) ________|_________ |<1> | |dwc3_otg_sm_work | |usb_put_hcd | |peer_hcd(kref=2)| |__________________| ________|_________ |<2> | |New USB BUS #2 | | | |peer_hcd(kref=1) | | | --(Link)-bandXX_mutex| | |__________________| | ___________________ | |<3> | | |dwc3_otg_sm_work | | |usb_put_hcd | | |primary_hcd(kref=1)| | |___________________| | _________|_________ | |<4> | | |New USB BUS #1 | | |hcd_release | | |primary_hcd(kref=0)| | | | | |bandXX_mutex(free) |<- |___________________| (( VOLD )) ______|___________ |<5> | | SCSI | |usb_put_hcd | |peer_hcd(kref=0) | |*hcd_release | |bandXX_mutex(free*)|<- double free |__________________| ================================================= This happens because hcd_release() frees the bandwidth_mutex whenever it sees a primary hcd being released (which is not a very good idea in any case), but in the course of releasing the primary hcd, it changes the pointers in the shared hcd in such a way that the shared hcd will appear to be primary when it gets released. This patch fixes the problem by changing hcd_release() so that it deallocates the bandwidth_mutex only when the _last_ hcd structure referencing it is released. The patch also removes an unnecessary test, so that when an hcd is released, both the shared_hcd and primary_hcd pointers in the hcd's peer will be cleared. Signed-off-by: Alan Stern Reported-by: Chung-Geol Kim Tested-by: Chung-Geol Kim CC: Signed-off-by: Greg Kroah-Hartman drivers/usb/core/hcd.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) commit 4192f672fae559f32d82de72a677701853cc98a7 Author: Stefan Hajnoczi Date: Thu Jun 23 16:28:58 2016 +0100 vsock: make listener child lock ordering explicit There are several places where the listener and pending or accept queue child sockets are accessed at the same time. Lockdep is unhappy that two locks from the same class are held. Tell lockdep that it is safe and document the lock ordering. Originally Claudio Imbrenda sent a similar patch asking whether this is safe. I have audited the code and also covered the vsock_pending_work() function. Suggested-by: Claudio Imbrenda Signed-off-by: Stefan Hajnoczi Signed-off-by: David S. Miller net/vmw_vsock/af_vsock.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 48f1dcb55a7d29aeb8965c567660c14d0dfd1a42 Author: Paolo Abeni Date: Thu Jun 23 15:25:09 2016 +0200 ipv6: enforce egress device match in per table nexthop lookups with the commit 8c14586fc320 ("net: ipv6: Use passed in table for nexthop lookups"), net hop lookup is first performed on route creation in the passed-in table. However device match is not enforced in table lookup, so the found route can be later discarded due to egress device mismatch and no global lookup will be performed. This cause the following to fail: ip link add dummy1 type dummy ip link add dummy2 type dummy ip link set dummy1 up ip link set dummy2 up ip route add 2001:db8:8086::/48 dev dummy1 metric 20 ip route add 2001:db8:d34d::/64 via 2001:db8:8086::2 dev dummy1 metric 20 ip route add 2001:db8:8086::/48 dev dummy2 metric 21 ip route add 2001:db8:d34d::/64 via 2001:db8:8086::2 dev dummy2 metric 21 RTNETLINK answers: No route to host This change fixes the issue enforcing device lookup in ip6_nh_lookup_table() v1->v2: updated commit message title Fixes: 8c14586fc320 ("net: ipv6: Use passed in table for nexthop lookups") Reported-and-tested-by: Beniamino Galvani Signed-off-by: Paolo Abeni Acked-by: David Ahern Signed-off-by: David S. Miller net/ipv6/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5aa3e24928bb95ddb159c5949f1c09493e9e8505 Merge: a37503b 71873a9 Author: David S. Miller Date: Mon Jun 27 10:05:55 2016 -0400 Merge tag 'linux-can-fixes-for-4.7-20160623' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-06-23 this is a pull request of 3 patches for the upcoming linux-4.7 release. The first two patches are by Oliver Hartkopp fixing oopes in the generic CAN device netlink handling. Jimmy Assarsson's patch for the kvaser_usb driver adds support for more devices by adding their USB product ids. ==================== Signed-off-by: David S. Miller commit ff30ef40deca4658e27b0c596e7baf39115e858f Author: Quentin Casasnovas Date: Sat Jun 18 11:01:05 2016 +0200 KVM: nVMX: VMX instructions: fix segment checks when L1 is in long mode. I couldn't get Xen to boot a L2 HVM when it was nested under KVM - it was getting a GP(0) on a rather unspecial vmread from Xen: (XEN) ----[ Xen-4.7.0-rc x86_64 debug=n Not tainted ]---- (XEN) CPU: 1 (XEN) RIP: e008:[] vmx_get_segment_register+0x14e/0x450 (XEN) RFLAGS: 0000000000010202 CONTEXT: hypervisor (d1v0) (XEN) rax: ffff82d0801e6288 rbx: ffff83003ffbfb7c rcx: fffffffffffab928 (XEN) rdx: 0000000000000000 rsi: 0000000000000000 rdi: ffff83000bdd0000 (XEN) rbp: ffff83000bdd0000 rsp: ffff83003ffbfab0 r8: ffff830038813910 (XEN) r9: ffff83003faf3958 r10: 0000000a3b9f7640 r11: ffff83003f82d418 (XEN) r12: 0000000000000000 r13: ffff83003ffbffff r14: 0000000000004802 (XEN) r15: 0000000000000008 cr0: 0000000080050033 cr4: 00000000001526e0 (XEN) cr3: 000000003fc79000 cr2: 0000000000000000 (XEN) ds: 0000 es: 0000 fs: 0000 gs: 0000 ss: 0000 cs: e008 (XEN) Xen code around (vmx_get_segment_register+0x14e/0x450): (XEN) 00 00 41 be 02 48 00 00 <44> 0f 78 74 24 08 0f 86 38 56 00 00 b8 08 68 00 (XEN) Xen stack trace from rsp=ffff83003ffbfab0: ... (XEN) Xen call trace: (XEN) [] vmx_get_segment_register+0x14e/0x450 (XEN) [] get_page_from_gfn_p2m+0x165/0x300 (XEN) [] hvmemul_get_seg_reg+0x52/0x60 (XEN) [] hvm_emulate_prepare+0x53/0x70 (XEN) [] handle_mmio+0x2b/0xd0 (XEN) [] emulate.c#_hvm_emulate_one+0x111/0x2c0 (XEN) [] handle_hvm_io_completion+0x274/0x2a0 (XEN) [] __get_gfn_type_access+0xfa/0x270 (XEN) [] timer.c#add_entry+0x4b/0xb0 (XEN) [] timer.c#remove_entry+0x7c/0x90 (XEN) [] hvm_do_resume+0x23/0x140 (XEN) [] vmx_do_resume+0xa7/0x140 (XEN) [] context_switch+0x13b/0xe40 (XEN) [] schedule.c#schedule+0x22e/0x570 (XEN) [] softirq.c#__do_softirq+0x5c/0x90 (XEN) [] domain.c#idle_loop+0x25/0x50 (XEN) (XEN) (XEN) **************************************** (XEN) Panic on CPU 1: (XEN) GENERAL PROTECTION FAULT (XEN) [error_code=0000] (XEN) **************************************** Tracing my host KVM showed it was the one injecting the GP(0) when emulating the VMREAD and checking the destination segment permissions in get_vmx_mem_address(): 3) | vmx_handle_exit() { 3) | handle_vmread() { 3) | nested_vmx_check_permission() { 3) | vmx_get_segment() { 3) 0.074 us | vmx_read_guest_seg_base(); 3) 0.065 us | vmx_read_guest_seg_selector(); 3) 0.066 us | vmx_read_guest_seg_ar(); 3) 1.636 us | } 3) 0.058 us | vmx_get_rflags(); 3) 0.062 us | vmx_read_guest_seg_ar(); 3) 3.469 us | } 3) | vmx_get_cs_db_l_bits() { 3) 0.058 us | vmx_read_guest_seg_ar(); 3) 0.662 us | } 3) | get_vmx_mem_address() { 3) 0.068 us | vmx_cache_reg(); 3) | vmx_get_segment() { 3) 0.074 us | vmx_read_guest_seg_base(); 3) 0.068 us | vmx_read_guest_seg_selector(); 3) 0.071 us | vmx_read_guest_seg_ar(); 3) 1.756 us | } 3) | kvm_queue_exception_e() { 3) 0.066 us | kvm_multiple_exception(); 3) 0.684 us | } 3) 4.085 us | } 3) 9.833 us | } 3) + 10.366 us | } Cross-checking the KVM/VMX VMREAD emulation code with the Intel Software Developper Manual Volume 3C - "VMREAD - Read Field from Virtual-Machine Control Structure", I found that we're enforcing that the destination operand is NOT located in a read-only data segment or any code segment when the L1 is in long mode - BUT that check should only happen when it is in protected mode. Shuffling the code a bit to make our emulation follow the specification allows me to boot a Xen dom0 in a nested KVM and start HVM L2 guests without problems. Fixes: f9eb4af67c9d ("KVM: nVMX: VMX instructions: add checks for #GP/#SS exceptions") Signed-off-by: Quentin Casasnovas Cc: Eugene Korenevsky Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Thomas Gleixner Cc: Ingo Molnar Cc: H. Peter Anvin Cc: linux-stable Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) commit b606f189c7d5bf9b875bba168162fe05287880fe Author: Marcelo Tosatti Date: Mon Jun 20 22:33:48 2016 -0300 KVM: LAPIC: cap __delay at lapic_timer_advance_ns The host timer which emulates the guest LAPIC TSC deadline timer has its expiration diminished by lapic_timer_advance_ns nanoseconds. Therefore if, at wait_lapic_expire, a difference larger than lapic_timer_advance_ns is encountered, delay at most lapic_timer_advance_ns. This fixes a problem where the guest can cause the host to delay for large amounts of time. Reported-by: Alan Jenkins Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini arch/x86/kvm/lapic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8d93c874ac899bfdf0ad3787baef684a0c878c2c Author: Marcelo Tosatti Date: Mon Jun 20 22:28:02 2016 -0300 KVM: x86: move nsec_to_cycles from x86.c to x86.h Move the inline function nsec_to_cycles from x86.c to x86.h, as the next patch uses it from lapic.c. Signed-off-by: Marcelo Tosatti Signed-off-by: Paolo Bonzini arch/x86/kvm/x86.c | 6 ------ arch/x86/kvm/x86.h | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) commit ed911b43adb889c37a37fa57a995f0b460c633b6 Author: Minfei Huang Date: Sat May 28 20:27:43 2016 +0800 pvclock: Get rid of __pvclock_read_cycles in function pvclock_read_flags There is a generic function __pvclock_read_cycles to be used to get both flags and cycles. For function pvclock_read_flags, it's useless to get cycles value. To make this function be more effective, get this variable flags directly in function. Signed-off-by: Minfei Huang Signed-off-by: Paolo Bonzini arch/x86/kernel/pvclock.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit f7550d076d55c1b5f02f95012e3a5a84d264c47d Author: Minfei Huang Date: Fri May 27 14:17:11 2016 +0800 pvclock: Cleanup to remove function pvclock_get_nsec_offset Function __pvclock_read_cycles is short enough, so there is no need to have another function pvclock_get_nsec_offset to calculate tsc delta. It's better to combine it into function __pvclock_read_cycles. Remove useless variables in function __pvclock_read_cycles. Signed-off-by: Minfei Huang Signed-off-by: Paolo Bonzini arch/x86/include/asm/pvclock.h | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit 749d088b8e7f4b9826ede02b9a043e417fa84aa1 Author: Minfei Huang Date: Fri May 27 14:17:10 2016 +0800 pvclock: Add CPU barriers to get correct version value Protocol for the "version" fields is: hypervisor raises it (making it uneven) before it starts updating the fields and raises it again (making it even) when it is done. Thus the guest can make sure the time values it got are consistent by checking the version before and after reading them. Add CPU barries after getting version value just like what function vread_pvclock does, because all of callees in this function is inline. Fixes: 502dfeff239e8313bfbe906ca0a1a6827ac8481b Cc: stable@vger.kernel.org Signed-off-by: Minfei Huang Signed-off-by: Paolo Bonzini arch/x86/include/asm/pvclock.h | 2 ++ arch/x86/kernel/pvclock.c | 4 ++++ 2 files changed, 6 insertions(+) commit d20cb71dbf3487f24549ede1a8e2d67579b4632e Author: Al Viro Date: Mon Jun 20 13:14:36 2016 -0400 make nfs_atomic_open() call d_drop() on all ->open_context() errors. In "NFSv4: Move dentry instantiation into the NFSv4-specific atomic open code" unconditional d_drop() after the ->open_context() had been removed. It had been correct for success cases (there ->open_context() itself had been doing dcache manipulations), but not for error ones. Only one of those (ENOENT) got a compensatory d_drop() added in that commit, but in fact it should've been done for all errors. As it is, the case of O_CREAT non-exclusive open on a hashed negative dentry racing with e.g. symlink creation from another client ended up with ->open_context() getting an error and proceeding to call nfs_lookup(). On a hashed dentry, which would've instantly triggered BUG_ON() in d_materialise_unique() (or, these days, its equivalent in d_splice_alias()). Cc: stable@vger.kernel.org # v3.10+ Tested-by: Oleg Drokin Signed-off-by: Al Viro Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6082ee72e9d89e80a664418be06f47d728243e85 Author: Nicolas Iooss Date: Sun Jun 26 10:33:29 2016 +0200 iommu/amd: Initialize devid variable before using it Commit 2a0cb4e2d423 ("iommu/amd: Add new map for storing IVHD dev entry type HID") added a call to DUMP_printk in init_iommu_from_acpi() which used the value of devid before this variable was initialized. Fixes: 2a0cb4e2d423 ('iommu/amd: Add new map for storing IVHD dev entry type HID') Signed-off-by: Nicolas Iooss Signed-off-by: Joerg Roedel drivers/iommu/amd_iommu_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3bd4f9112f87a9c65fe6e817272806167f0bc9ed Author: Jan Niehusmann Date: Mon Jun 6 14:20:11 2016 +0200 iommu/vt-d: Fix overflow of iommu->domains array The valid range of 'did' in get_iommu_domain(*iommu, did) is 0..cap_ndoms(iommu->cap), so don't exceed that range in free_all_cpu_cached_iovas(). The user-visible impact of the out-of-bounds access is the machine hanging on suspend-to-ram. It is, in fact, a kernel panic, but due to already suspended devices, that's often not visible to the user. Fixes: 22e2f9fa63b0 ("iommu/vt-d: Use per-cpu IOVA caching") Signed-off-by: Jan Niehusmann Tested-By: Marius Vlad Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 591d215afcc2f94e8e2c69a63c924c044677eb31 Author: James Morse Date: Wed Jun 8 17:24:45 2016 +0100 KVM: arm/arm64: Stop leaking vcpu pid references kvm provides kvm_vcpu_uninit(), which amongst other things, releases the last reference to the struct pid of the task that was last running the vcpu. On arm64 built with CONFIG_DEBUG_KMEMLEAK, starting a guest with kvmtool, then killing it with SIGKILL results (after some considerable time) in: > cat /sys/kernel/debug/kmemleak > unreferenced object 0xffff80007d5ea080 (size 128): > comm "lkvm", pid 2025, jiffies 4294942645 (age 1107.776s) > hex dump (first 32 bytes): > 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ > backtrace: > [] create_object+0xfc/0x278 > [] kmemleak_alloc+0x34/0x70 > [] kmem_cache_alloc+0x16c/0x1d8 > [] alloc_pid+0x34/0x4d0 > [] copy_process.isra.6+0x79c/0x1338 > [] _do_fork+0x74/0x320 > [] SyS_clone+0x18/0x20 > [] el0_svc_naked+0x24/0x28 > [] 0xffffffffffffffff On x86 kvm_vcpu_uninit() is called on the path from kvm_arch_destroy_vm(), on arm no equivalent call is made. Add the call to kvm_arch_vcpu_free(). Signed-off-by: James Morse Fixes: 749cf76c5a36 ("KVM: ARM: Initial skeleton to compile KVM support") Cc: # 3.10+ Acked-by: Marc Zyngier Signed-off-by: Christoffer Dall arch/arm/kvm/arm.c | 1 + 1 file changed, 1 insertion(+) commit 583248e6620a4726093295e2d6785fcbc2e86428 Author: Chris Wilson Date: Wed Jun 1 12:10:08 2016 +0100 iommu/iova: Disable preemption around use of this_cpu_ptr() Between acquiring the this_cpu_ptr() and using it, ideally we don't want to be preempted and work on another CPU's private data. this_cpu_ptr() checks whether or not preemption is disable, and get_cpu_ptr() provides a convenient wrapper for operating on the cpu ptr inside a preemption disabled critical section (which currently is provided by the spinlock). [ 167.997877] BUG: using smp_processor_id() in preemptible [00000000] code: usb-storage/216 [ 167.997940] caller is debug_smp_processor_id+0x17/0x20 [ 167.997945] CPU: 7 PID: 216 Comm: usb-storage Tainted: G U 4.7.0-rc1-gfxbench-RO_Patchwork_1057+ #1 [ 167.997948] Hardware name: Hewlett-Packard HP Pro 3500 Series/2ABF, BIOS 8.11 10/24/2012 [ 167.997951] 0000000000000000 ffff880118b7f9c8 ffffffff8140dca5 0000000000000007 [ 167.997958] ffffffff81a3a7e9 ffff880118b7f9f8 ffffffff8142a927 0000000000000000 [ 167.997965] ffff8800d499ed58 0000000000000001 00000000000fffff ffff880118b7fa08 [ 167.997971] Call Trace: [ 167.997977] [] dump_stack+0x67/0x92 [ 167.997981] [] check_preemption_disabled+0xd7/0xe0 [ 167.997985] [] debug_smp_processor_id+0x17/0x20 [ 167.997990] [] alloc_iova_fast+0xb7/0x210 [ 167.997994] [] intel_alloc_iova+0x7f/0xd0 [ 167.997998] [] intel_map_sg+0xbd/0x240 [ 167.998002] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 167.998009] [] usb_hcd_map_urb_for_dma+0x4b9/0x5a0 [ 167.998013] [] usb_hcd_submit_urb+0xe9/0xaa0 [ 167.998017] [] ? mark_held_locks+0x6f/0xa0 [ 167.998022] [] ? __raw_spin_lock_init+0x1c/0x50 [ 167.998025] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 167.998028] [] usb_submit_urb+0x3f3/0x5a0 [ 167.998032] [] ? trace_hardirqs_on_caller+0x122/0x1b0 [ 167.998035] [] usb_sg_wait+0x67/0x150 [ 167.998039] [] usb_stor_bulk_transfer_sglist.part.3+0x82/0xd0 [ 167.998042] [] usb_stor_bulk_srb+0x4c/0x60 [ 167.998045] [] usb_stor_Bulk_transport+0x17e/0x420 [ 167.998049] [] usb_stor_invoke_transport+0x242/0x540 [ 167.998052] [] ? debug_lockdep_rcu_enabled+0x1d/0x20 [ 167.998058] [] usb_stor_transparent_scsi_command+0x9/0x10 [ 167.998061] [] usb_stor_control_thread+0x158/0x260 [ 167.998064] [] ? fill_inquiry_response+0x20/0x20 [ 167.998067] [] ? fill_inquiry_response+0x20/0x20 [ 167.998071] [] kthread+0xea/0x100 [ 167.998078] [] ret_from_fork+0x1f/0x40 [ 167.998081] [] ? kthread_create_on_node+0x1f0/0x1f0 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96293 Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Cc: Joerg Roedel Cc: iommu@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org Fixes: 9257b4a206fc ('iommu/iova: introduce per-cpu caching to iova allocation') Signed-off-by: Joerg Roedel drivers/iommu/iova.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0efce9da1255f13d910842b62cb14371044a3c50 Author: Sudeep Holla Date: Wed Jun 8 11:38:55 2016 +0100 arm64: KVM: fix build with CONFIG_ARM_PMU disabled When CONFIG_ARM_PMU is disabled, we get the following build error: arch/arm64/kvm/sys_regs.c: In function 'pmu_counter_idx_valid': arch/arm64/kvm/sys_regs.c:564:27: error: 'ARMV8_PMU_CYCLE_IDX' undeclared (first use in this function) if (idx >= val && idx != ARMV8_PMU_CYCLE_IDX) ^ arch/arm64/kvm/sys_regs.c:564:27: note: each undeclared identifier is reported only once for each function it appears in arch/arm64/kvm/sys_regs.c: In function 'access_pmu_evcntr': arch/arm64/kvm/sys_regs.c:592:10: error: 'ARMV8_PMU_CYCLE_IDX' undeclared (first use in this function) idx = ARMV8_PMU_CYCLE_IDX; ^ arch/arm64/kvm/sys_regs.c: In function 'access_pmu_evtyper': arch/arm64/kvm/sys_regs.c:638:14: error: 'ARMV8_PMU_CYCLE_IDX' undeclared (first use in this function) if (idx == ARMV8_PMU_CYCLE_IDX) ^ arch/arm64/kvm/hyp/switch.c:86:15: error: 'ARMV8_PMU_USERENR_MASK' undeclared (first use in this function) write_sysreg(ARMV8_PMU_USERENR_MASK, pmuserenr_el0); This patch fixes the build with CONFIG_ARM_PMU disabled. Cc: Christoffer Dall Cc: Marc Zyngier Signed-off-by: Sudeep Holla Signed-off-by: Christoffer Dall include/kvm/arm_pmu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e96a87c5431c256feb65bcfc5aec92d9f7839b6 Author: Cyril Bur Date: Fri Jun 17 14:58:34 2016 +1000 powerpc/tm: Always reclaim in start_thread() for exec() class syscalls Userspace can quite legitimately perform an exec() syscall with a suspended transaction. exec() does not return to the old process, rather it load a new one and starts that, the expectation therefore is that the new process starts not in a transaction. Currently exec() is not treated any differently to any other syscall which creates problems. Firstly it could allow a new process to start with a suspended transaction for a binary that no longer exists. This means that the checkpointed state won't be valid and if the suspended transaction were ever to be resumed and subsequently aborted (a possibility which is exceedingly likely as exec()ing will likely doom the transaction) the new process will jump to invalid state. Secondly the incorrect attempt to keep the transactional state while still zeroing state for the new process creates at least two TM Bad Things. The first triggers on the rfid to return to userspace as start_thread() has given the new process a 'clean' MSR but the suspend will still be set in the hardware MSR. The second TM Bad Thing triggers in __switch_to() as the processor is still transactionally suspended but __switch_to() wants to zero the TM sprs for the new process. This is an example of the outcome of calling exec() with a suspended transaction. Note the first 700 is likely the first TM bad thing decsribed earlier only the kernel can't report it as we've loaded userspace registers. c000000000009980 is the rfid in fast_exception_return() Bad kernel stack pointer 3fffcfa1a370 at c000000000009980 Oops: Bad kernel stack pointer, sig: 6 [#1] CPU: 0 PID: 2006 Comm: tm-execed Not tainted NIP: c000000000009980 LR: 0000000000000000 CTR: 0000000000000000 REGS: c00000003ffefd40 TRAP: 0700 Not tainted MSR: 8000000300201031 CR: 00000000 XER: 00000000 CFAR: c0000000000098b4 SOFTE: 0 PACATMSCRATCH: b00000010000d033 GPR00: 0000000000000000 00003fffcfa1a370 0000000000000000 0000000000000000 GPR04: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR08: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR12: 00003fff966611c0 0000000000000000 0000000000000000 0000000000000000 NIP [c000000000009980] fast_exception_return+0xb0/0xb8 LR [0000000000000000] (null) Call Trace: Instruction dump: f84d0278 e9a100d8 7c7b03a6 e84101a0 7c4ff120 e8410170 7c5a03a6 e8010070 e8410080 e8610088 e8810090 e8210078 <4c000024> 48000000 e8610178 88ed023b Kernel BUG at c000000000043e80 [verbose debug info unavailable] Unexpected TM Bad Thing exception at c000000000043e80 (msr 0x201033) Oops: Unrecoverable exception, sig: 6 [#2] CPU: 0 PID: 2006 Comm: tm-execed Tainted: G D task: c0000000fbea6d80 ti: c00000003ffec000 task.ti: c0000000fb7ec000 NIP: c000000000043e80 LR: c000000000015a24 CTR: 0000000000000000 REGS: c00000003ffef7e0 TRAP: 0700 Tainted: G D MSR: 8000000300201033 CR: 28002828 XER: 00000000 CFAR: c000000000015a20 SOFTE: 0 PACATMSCRATCH: b00000010000d033 GPR00: 0000000000000000 c00000003ffefa60 c000000000db5500 c0000000fbead000 GPR04: 8000000300001033 2222222222222222 2222222222222222 00000000ff160000 GPR08: 0000000000000000 800000010000d033 c0000000fb7e3ea0 c00000000fe00004 GPR12: 0000000000002200 c00000000fe00000 0000000000000000 0000000000000000 GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000 GPR20: 0000000000000000 0000000000000000 c0000000fbea7410 00000000ff160000 GPR24: c0000000ffe1f600 c0000000fbea8700 c0000000fbea8700 c0000000fbead000 GPR28: c000000000e20198 c0000000fbea6d80 c0000000fbeab680 c0000000fbea6d80 NIP [c000000000043e80] tm_restore_sprs+0xc/0x1c LR [c000000000015a24] __switch_to+0x1f4/0x420 Call Trace: Instruction dump: 7c800164 4e800020 7c0022a6 f80304a8 7c0222a6 f80304b0 7c0122a6 f80304b8 4e800020 e80304a8 7c0023a6 e80304b0 <7c0223a6> e80304b8 7c0123a6 4e800020 This fixes CVE-2016-5828. Fixes: bc2a9408fa65 ("powerpc: Hook in new transactional memory code") Cc: stable@vger.kernel.org # v3.9+ Signed-off-by: Cyril Bur Signed-off-by: Michael Ellerman arch/powerpc/kernel/process.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit ea1dc6fc6242f991656e35e2ed3d90ec1cd13418 Author: Peter Zijlstra Date: Fri Jun 24 16:11:02 2016 +0200 sched/fair: Fix calc_cfs_shares() fixed point arithmetics width confusion Commit: fde7d22e01aa ("sched/fair: Fix overly small weight for interactive group entities") did something non-obvious but also did it buggy yet latent. The problem was exposed for real by a later commit in the v4.7 merge window: 2159197d6677 ("sched/core: Enable increased load resolution on 64-bit kernels") ... after which tg->load_avg and cfs_rq->load.weight had different units (10 bit fixed point and 20 bit fixed point resp.). Add a comment to explain the use of cfs_rq->load.weight over the 'natural' cfs_rq->avg.load_avg and add scale_load_down() to correct for the difference in unit. Since this is (now, as per a previous commit) the only user of calc_tg_weight(), collapse it. The effects of this bug should be randomly inconsistent SMP-balancing of cgroups workloads. Reported-by: Jirka Hladky Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 2159197d6677 ("sched/core: Enable increased load resolution on 64-bit kernels") Fixes: fde7d22e01aa ("sched/fair: Fix overly small weight for interactive group entities") Signed-off-by: Ingo Molnar kernel/sched/fair.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 7dd4912594daf769a46744848b05bd5bc6d62469 Author: Peter Zijlstra Date: Fri Jun 24 15:53:54 2016 +0200 sched/fair: Fix effective_load() to consistently use smoothed load Starting with the following commit: fde7d22e01aa ("sched/fair: Fix overly small weight for interactive group entities") calc_tg_weight() doesn't compute the right value as expected by effective_load(). The difference is in the 'correction' term. In order to ensure \Sum rw_j >= rw_i we cannot use tg->load_avg directly, since that might be lagging a correction on the current cfs_rq->avg.load_avg value. Therefore we use tg->load_avg - cfs_rq->tg_load_avg_contrib + cfs_rq->avg.load_avg. Now, per the referenced commit, calc_tg_weight() doesn't use cfs_rq->avg.load_avg, as is later used in @w, but uses cfs_rq->load.weight instead. So stop using calc_tg_weight() and do it explicitly. The effects of this bug are wake_affine() making randomly poor choices in cgroup-intense workloads. Signed-off-by: Peter Zijlstra (Intel) Cc: # v4.3+ Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: fde7d22e01aa ("sched/fair: Fix overly small weight for interactive group entities") Signed-off-by: Ingo Molnar kernel/sched/fair.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit a37503bc387ce2434106d4bf4870bd73081c7355 Author: Jeremy Linton Date: Wed Jun 22 12:40:50 2016 -0500 net: smsc911x: Fix bug where PHY interrupts are overwritten by 0 By default, mdiobus_alloc() sets the PHYs to polling mode, but a pointer size memcpy means that a couple IRQs end up being overwritten with a value of 0. This means that PHY_POLL is disabled and results in unpredictable behavior depending on the PHY's location on the MDIO bus. Remove that memcpy and the now unused phy_irq member to force the SMSC911x PHYs into polling mode 100% of the time. Fixes: e7f4dc3536a4 ("mdio: Move allocation of interrupts into core") Signed-off-by: Jeremy Linton Reviewed-by: Andrew Lunn Acked-by: Sergei Shtylyov Signed-off-by: David S. Miller drivers/net/ethernet/smsc/smsc911x.c | 2 -- 1 file changed, 2 deletions(-) commit 4c2e07c6a29e0129e975727b9f57eede813eea85 Author: Linus Torvalds Date: Sun Jun 26 17:52:03 2016 -0700 Linux 4.7-rc5 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5353ed8deedee9e5acb9f896e9032158f5d998de Author: Colin Ian King Date: Mon Jun 20 15:40:27 2016 +0100 devpts: fix null pointer dereference on failed memory allocation An ENOMEM when creating a pair tty in tty_ldisc_setup causes a null pointer dereference in devpts_kill_index because tty->link->driver_data is NULL. The oops was triggered with the pty stressor in stress-ng when in a low memory condition. tty_init_dev tries to clean up a tty_ldisc_setup ENOMEM error by calling release_tty, however, this ultimately tries to clean up the NULL pair'd tty in pty_unix98_remove, triggering the Oops. Add check to pty_unix98_remove to only clean up fsi if it is not NULL. Ooops: [ 23.020961] Oops: 0000 [#1] SMP [ 23.020976] Modules linked in: ppdev snd_hda_codec_generic snd_hda_intel snd_hda_codec parport_pc snd_hda_core snd_hwdep parport snd_pcm input_leds joydev snd_timer serio_raw snd soundcore i2c_piix4 mac_hid ib_iser rdma_cm iw_cm ib_cm ib_core configfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi autofs4 btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel qxl aes_x86_64 ttm lrw gf128mul glue_helper ablk_helper drm_kms_helper cryptd syscopyarea sysfillrect psmouse sysimgblt floppy fb_sys_fops drm pata_acpi jitterentropy_rng drbg ansi_cprng [ 23.020978] CPU: 0 PID: 1452 Comm: stress-ng-pty Not tainted 4.7.0-rc4+ #2 [ 23.020978] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Ubuntu-1.8.2-1ubuntu1 04/01/2014 [ 23.020979] task: ffff88007ba30000 ti: ffff880078ea8000 task.ti: ffff880078ea8000 [ 23.020981] RIP: 0010:[] [] ida_remove+0x1f/0x120 [ 23.020981] RSP: 0018:ffff880078eabb60 EFLAGS: 00010a03 [ 23.020982] RAX: 4444444444444567 RBX: 0000000000000000 RCX: 000000000000001f [ 23.020982] RDX: 000000000000014c RSI: 000000000000026f RDI: 0000000000000000 [ 23.020982] RBP: ffff880078eabb70 R08: 0000000000000004 R09: 0000000000000036 [ 23.020983] R10: 000000000000026f R11: 0000000000000000 R12: 000000000000026f [ 23.020983] R13: 000000000000026f R14: ffff88007c944b40 R15: 000000000000026f [ 23.020984] FS: 00007f9a2f3cc700(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000 [ 23.020984] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 23.020985] CR2: 0000000000000010 CR3: 000000006c81b000 CR4: 00000000001406f0 [ 23.020988] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 23.020988] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 23.020988] Stack: [ 23.020989] 0000000000000000 000000000000026f ffff880078eabb90 ffffffff812a5a99 [ 23.020990] 0000000000000000 00000000fffffff4 ffff880078eabba8 ffffffff814f9cbe [ 23.020991] ffff88007965c800 ffff880078eabbc8 ffffffff814eef43 fffffffffffffff4 [ 23.020991] Call Trace: [ 23.021000] [] devpts_kill_index+0x29/0x50 [ 23.021002] [] pty_unix98_remove+0x2e/0x50 [ 23.021006] [] release_tty+0xb3/0x1b0 [ 23.021007] [] tty_init_dev+0xd4/0x1c0 [ 23.021011] [] ptmx_open+0xae/0x190 [ 23.021013] [] chrdev_open+0xbf/0x1b0 [ 23.021015] [] do_dentry_open+0x203/0x310 [ 23.021016] [] ? cdev_put+0x30/0x30 [ 23.021017] [] vfs_open+0x54/0x80 [ 23.021018] [] ? may_open+0x8c/0x100 [ 23.021019] [] path_openat+0x2eb/0x1440 [ 23.021020] [] ? putname+0x54/0x60 [ 23.021022] [] ? n_tty_ioctl_helper+0x27/0x100 [ 23.021023] [] do_filp_open+0x91/0x100 [ 23.021024] [] ? getname_flags+0x56/0x1f0 [ 23.021026] [] ? __alloc_fd+0x46/0x190 [ 23.021027] [] do_sys_open+0x124/0x210 [ 23.021028] [] SyS_open+0x1e/0x20 [ 23.021035] [] entry_SYSCALL_64_fastpath+0x1e/0xa8 [ 23.021044] Code: 63 28 45 31 e4 eb dd 0f 1f 44 00 00 55 4c 63 d6 48 ba 89 88 88 88 88 88 88 88 4c 89 d0 b9 1f 00 00 00 48 f7 e2 48 89 e5 41 54 53 <8b> 47 10 48 89 fb 8d 3c c5 00 00 00 00 48 c1 ea 09 b8 01 00 00 [ 23.021045] RIP [] ida_remove+0x1f/0x120 [ 23.021045] RSP [ 23.021046] CR2: 0000000000000010 Signed-off-by: Colin Ian King Cc: stable Signed-off-by: Greg Kroah-Hartman drivers/tty/pty.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2ac9b9735b4d1924d7484e497c930ea013a29ac1 Merge: da2f6ab 951d77f Author: Linus Torvalds Date: Sun Jun 26 10:08:49 2016 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two straightforward fixes. One is a concurrency issue only affecting SAS connected SATA drives, but which could hang the storage subsystem if it triggers (because the outstanding command count on error never goes back to zero) and the other is a NO_TAG fallout from the switch to hostwide tags which causes the system to crash on module insertion (we've checked carefully and only the 53c700 family of drivers is vulnerable to this issue)" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: 53c700: fix BUG on untagged commands scsi: fix race between simultaneous decrements of ->host_failed commit 68b356eb3d9f5e38910fb62e22a78e2a18d544ae Author: Mark Brown Date: Mon Jun 20 13:53:34 2016 +0100 iio:ad7266: Fix probe deferral for vref Currently the ad7266 driver treats any failure to get vref as though the regulator were not present but this means that if probe deferral is triggered the driver will act as though the regulator were not present. Instead only use the internal reference if we explicitly got -ENODEV which is what is returned for absent regulators. Signed-off-by: Mark Brown Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7266.c | 3 +++ 1 file changed, 3 insertions(+) commit e5511c816e5ac4909bdd38e85ac344e2b9b8e984 Author: Mark Brown Date: Mon Jun 20 13:53:33 2016 +0100 iio:ad7266: Fix support for optional regulators The ad7266 driver attempts to support deciding between the use of internal and external power supplies by checking to see if an error is returned when requesting the regulator. This doesn't work with the current code since the driver uses a normal regulator_get() which is for non-optional supplies and so assumes that if a regulator is not provided by the platform then this is a bug in the platform integration and so substitutes a dummy regulator. Use regulator_get_optional() instead which indicates to the framework that the regulator may be absent and provides a dummy regulator instead. Signed-off-by: Mark Brown Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7266.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b7f4e25f3309f106a5c7ff42c8231494cf285d3 Author: Mark Brown Date: Mon Jun 20 13:53:32 2016 +0100 iio:ad7266: Fix broken regulator error handling All regulator_get() variants return either a pointer to a regulator or an ERR_PTR() so testing for NULL makes no sense and may lead to bugs if we use NULL as a valid regulator. Fix this by using IS_ERR() as expected. Signed-off-by: Mark Brown Cc: Signed-off-by: Jonathan Cameron drivers/iio/adc/ad7266.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c1f91b98552da49d9d8eed32b3132a58d2f4598 Author: Linus Walleij Date: Fri Jun 17 15:22:24 2016 +0200 iio: accel: kxsd9: fix the usage of spi_w8r8() These two spi_w8r8() calls return a value with is used by the code following the error check. The dubious use was caused by a cleanup patch. Fixes: d34dbee8ac8e ("staging:iio:accel:kxsd9 cleanup and conversion to iio_chan_spec.") Signed-off-by: Linus Walleij Cc: Signed-off-by: Jonathan Cameron drivers/iio/accel/kxsd9.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef3149eb3ddb7f9125e11c90f8330e371b55cffd Author: Luis de Bethencourt Date: Wed Jun 22 20:43:30 2016 +0100 staging: iio: accel: fix error check sca3000_read_ctrl_reg() returns a negative number on failure, check for this instead of zero. Signed-off-by: Luis de Bethencourt Cc: Signed-off-by: Jonathan Cameron drivers/staging/iio/accel/sca3000_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 18f5839932e5c8c019f394d433dc5efcd6ae737a Author: Alan Cox Date: Thu Jun 23 22:07:03 2016 +0530 ASoC: Intel: atom: fix missing breaks that would cause the wrong operation to execute Now we correctly error an attempt to execute an unsupported operation. Signed-off-by: Alan Cox Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/atom/sst-mfld-platform-compress.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 81e43960dce1c8e58e682fb3ec26c1d8f83a9afc Author: Bob Copeland Date: Sat Jun 25 07:58:45 2016 -0400 ALSA: hda - fix read before array start UBSAN reports the following warning from accessing path->path[-1] in set_path_power(): [ 16.078040] ================================================================================ [ 16.078124] UBSAN: Undefined behaviour in sound/pci/hda/hda_generic.c:3981:17 [ 16.078198] index -1 is out of range for type 'hda_nid_t [10]' [ 16.078270] CPU: 2 PID: 1738 Comm: modprobe Not tainted 4.7.0-rc1-wt+ #47 [ 16.078274] Hardware name: LENOVO 3443CTO/3443CTO, BIOS G6ET23WW (1.02 ) 08/14/2012 [ 16.078278] ffff8800cb246000 ffff8800cb3638b8 ffffffff815c4fe3 0000000000000032 [ 16.078286] ffff8800cb3638e0 ffffffffffffffff ffff8800cb3638d0 ffffffff8162443d [ 16.078294] ffffffffa0894200 ffff8800cb363920 ffffffff81624af7 0000000000000292 [ 16.078302] Call Trace: [ 16.078311] [] dump_stack+0x86/0xd3 [ 16.078317] [] ubsan_epilogue+0xd/0x40 [ 16.078324] [] __ubsan_handle_out_of_bounds+0x67/0x70 [ 16.078335] [] set_path_power+0x1bf/0x230 [snd_hda_codec_generic] [ 16.078344] [] add_pin_power_ctls+0x8d/0xc0 [snd_hda_codec_generic] [ 16.078352] [] ? pin_power_down_callback+0x20/0x20 [snd_hda_codec_generic] [ 16.078360] [] add_all_pin_power_ctls+0x107/0x150 [snd_hda_codec_generic] [ 16.078370] [] snd_hda_gen_parse_auto_config+0x2d73/0x49e0 [snd_hda_codec_generic] [ 16.078376] [] ? trace_hardirqs_on_caller+0x1b0/0x2c0 [ 16.078390] [] alc_parse_auto_config+0x147/0x310 [snd_hda_codec_realtek] [ 16.078402] [] patch_alc269+0x23a/0x560 [snd_hda_codec_realtek] [ 16.078417] [] hda_codec_driver_probe+0xa4/0x1a0 [snd_hda_codec] [ 16.078424] [] driver_probe_device+0x101/0x380 [ 16.078430] [] __driver_attach+0xb9/0x100 [ 16.078438] [] ? driver_probe_device+0x380/0x380 [ 16.078444] [] bus_for_each_dev+0x70/0xc0 [ 16.078449] [] driver_attach+0x27/0x50 [ 16.078454] [] bus_add_driver+0x166/0x2c0 [ 16.078460] [] ? 0xffffffffa0369000 [ 16.078465] [] driver_register+0x7d/0x130 [ 16.078477] [] __hda_codec_driver_register+0x6f/0x90 [snd_hda_codec] [ 16.078488] [] realtek_driver_init+0x1e/0x1000 [snd_hda_codec_realtek] [ 16.078493] [] do_one_initcall+0x4e/0x1d0 [ 16.078499] [] ? rcu_read_lock_sched_held+0x6d/0x80 [ 16.078504] [] ? kmem_cache_alloc_trace+0x391/0x560 [ 16.078510] [] ? do_init_module+0x28/0x273 [ 16.078515] [] do_init_module+0x9b/0x273 [ 16.078522] [] load_module+0x20b2/0x3410 [ 16.078527] [] ? m_show+0x210/0x210 [ 16.078533] [] ? kernel_read+0x66/0xe0 [ 16.078541] [] SYSC_finit_module+0xba/0xc0 [ 16.078547] [] SyS_finit_module+0xe/0x10 [ 16.078552] [] entry_SYSCALL_64_fastpath+0x1f/0xbd [ 16.078556] ================================================================================ Fix by checking path->depth before use. Signed-off-by: Bob Copeland Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_generic.c | 2 ++ 1 file changed, 2 insertions(+) commit ed749a53b2d7b9287ee57c17dc29385c89104744 Merge: 33688ab 929e604e Author: Olof Johansson Date: Sat Jun 25 21:19:37 2016 -0700 Merge tag 'mvebu-fixes-4.7-1' of git://git.infradead.org/linux-mvebu into fixes mvebu fixes for 4.7 (part 1) Various I/O memory fix for Cortex A9 based SoCs * tag 'mvebu-fixes-4.7-1' of git://git.infradead.org/linux-mvebu: ARM: dts: armada-38x: fix MBUS_ID for crypto SRAM on Armada 385 Linksys ARM: mvebu: map PCI I/O regions strongly ordered ARM: mvebu: fix HW I/O coherency related deadlocks Signed-off-by: Olof Johansson commit 1b45996d2ebf9680ccd0db875fc668aa025f40fd Author: David Daney Date: Tue May 17 11:41:04 2016 -0700 tty: vt: Fix soft lockup in fbcon cursor blink timer. We are getting somewhat random soft lockups with this signature: [ 86.992215] [] el1_irq+0xa0/0x10c [ 86.997082] [] cursor_timer_handler+0x30/0x54 [ 87.002991] [] call_timer_fn+0x54/0x1a8 [ 87.008378] [] run_timer_softirq+0x1c4/0x2bc [ 87.014200] [] __do_softirq+0x114/0x344 [ 87.019590] [] irq_exit+0x74/0x98 [ 87.024458] [] __handle_domain_irq+0x98/0xfc [ 87.030278] [] gic_handle_irq+0x94/0x190 This is caused by the vt visual_init() function calling into fbcon_init() with a vc_cur_blink_ms value of zero. This is a transient condition, as it is later set to a non-zero value. But, if the timer happens to expire while the blink rate is zero, it goes into an endless loop, and we get soft lockup. The fix is to initialize vc_cur_blink_ms before calling the con_init() function. Signed-off-by: David Daney Cc: stable@vger.kernel.org Acked-by: Pavel Machek Tested-by: Ming Lei Acked-by: Scot Doyle Tested-by: Henrique de Moraes Holschuh Signed-off-by: Greg Kroah-Hartman drivers/tty/vt/vt.c | 1 + 1 file changed, 1 insertion(+) commit da2f6aba4a21f8da3331e5251a117c52764da579 Merge: b971712a 02dbfc9 Author: Linus Torvalds Date: Sat Jun 25 08:53:38 2016 -0700 Merge branch 'for-linus-4.7-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes part 2 from Chris Mason: "This has one patch from Omar to bring iterate_shared back to btrfs. We have a tree of work we queue up for directory items and it doesn't lend itself well to shared access. While we're cleaning it up, Omar has changed things to use an exclusive lock when there are delayed items" * 'for-linus-4.7-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix ->iterate_shared() by upgrading i_rwsem for delayed nodes commit b971712afc8dd0de38e943ea9d904fe8c8aff956 Merge: ca83a55 b7f6705 Author: Linus Torvalds Date: Sat Jun 25 08:42:31 2016 -0700 Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "I have a two part pull this time because one of the patches Dave Sterba collected needed to be against v4.7-rc2 or higher (we used rc4). I try to make my for-linus-xx branch testable on top of the last major so we can hand fixes to people on the list more easily, so I've split this pull in two. This first part has some fixes and two performance improvements that we've been testing for some time. Josef's two performance fixes are most notable. The transid tracking patch makes a big improvement on pretty much every workload" * 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: Force stripesize to the value of sectorsize btrfs: fix disk_i_size update bug when fallocate() fails Btrfs: fix error handling in map_private_extent_buffer Btrfs: fix error return code in btrfs_init_test_fs() Btrfs: don't do nocow check unless we have to btrfs: fix deadlock in delayed_ref_async_start Btrfs: track transid for delayed ref flushing commit ca83a55c9fe20b45a26101853a772e08aff90dcb Merge: 9a949a9 d5dbbe6 Author: Linus Torvalds Date: Sat Jun 25 06:55:48 2016 -0700 Merge tag 'sound-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "Again pretty calm weeks: we've had only a few trivial / stable HD-audio fixes in addition to a possible race fix for snd-dummy driver spotted by syzkaller" * tag 'sound-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: dummy: Fix a use-after-free at closing ALSA: hda / realtek - add two more Thinkpad IDs (5050,5053) for tpt460 fixup ALSA: hda - Fix the headset mic jack detection on Dell machine ALSA: hda/tegra: iomem fixups for sparse warnings ALSA: hdac_regmap - fix the register access for runtime PM commit 9a949a98596c45763299158b9018f3491e3cbf99 Merge: 57801c1 dcfc472 Author: Linus Torvalds Date: Sat Jun 25 06:49:32 2016 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 kprobe fix from Thomas Gleixner: "A single fix clearing the TF bit when a fault is single stepped" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: kprobes/x86: Clear TF bit in fault on single-stepping commit 57801c1b817128cbb3a4dc45e6a1e0e31a227a19 Merge: e3b22bc feb245e Author: Linus Torvalds Date: Sat Jun 25 06:38:42 2016 -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: "A couple of scheduler fixes: - force watchdog reset while processing sysrq-w - fix a deadlock when enabling trace events in the scheduler - fixes to the throttled next buddy logic - fixes for the average accounting (missing serialization and underflow handling) - allow kernel threads for fallback to online but not active cpus" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Allow kthreads to fall back to online && !active cpus sched/fair: Do not announce throttled next buddy in dequeue_task_fair() sched/fair: Initialize throttle_count for new task-groups lazily sched/fair: Fix cfs_rq avg tracking underflow kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w sched/debug: Fix deadlock when enabling sched events sched/fair: Fix post_init_entity_util_avg() serialization commit 02dbfc99b424dde3cf0a492ed3bec4f222441754 Author: Omar Sandoval Date: Fri May 20 13:50:33 2016 -0700 Btrfs: fix ->iterate_shared() by upgrading i_rwsem for delayed nodes Commit fe742fd4f90f ("Revert "btrfs: switch to ->iterate_shared()"") backed out the conversion to ->iterate_shared() for Btrfs because the delayed inode handling in btrfs_real_readdir() is racy. However, we can still do readdir in parallel if there are no delayed nodes. This is a temporary fix which upgrades the shared inode lock to an exclusive lock only when we have delayed items until we come up with a more complete solution. While we're here, rename the btrfs_{get,put}_delayed_items functions to make it very clear that they're just for readdir. Tested with xfstests and by doing a parallel kernel build: while make tinyconfig && make -j4 && git clean dqfx; do : done along with a bunch of parallel finds in another shell: while true; do for ((i=0; i<4; i++)); do find . >/dev/null & done wait done Signed-off-by: Omar Sandoval Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/delayed-inode.c | 27 ++++++++++++++++++++++----- fs/btrfs/delayed-inode.h | 10 ++++++---- fs/btrfs/inode.c | 10 ++++++---- 3 files changed, 34 insertions(+), 13 deletions(-) commit e3b22bc3d705b4a265247a9e2a1dea9ecf01a0cd Merge: 2de2307 4c5ea0a Author: Linus Torvalds Date: Sat Jun 25 06:14:44 2016 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fix from Thomas Gleixner: "A single fix to address a race in the static key logic" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/static_key: Fix concurrent static_key_slow_inc() commit 2de23071f5f7eb80a6cccf45438b271da81246af Merge: 2f6e974 4b2312b Author: Linus Torvalds Date: Sat Jun 25 06:09:59 2016 -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: "A single fix for the fallout from the conversion of MIPS GIC to irq domains" * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/mips-gic: Fix IRQs in gic_dev_domain commit 2f6e97477bb44f8d1b36e6ead62b4934052d884d Merge: 9521d39 844e3be Author: Linus Torvalds Date: Sat Jun 25 06:01:48 2016 -0700 Merge tag 'powerpc-4.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: "mm/radix (Aneesh Kumar K.V): - Update to tlb functions ric argument - Flush page walk cache when freeing page table - Update Radix tree size as per ISA 3.0 mm/hash (Aneesh Kumar K.V): - Use the correct PPP mask when updating HPTE - Don't add memory coherence if cache inhibited is set eeh (Gavin Shan): - Fix invalid cached PE primary bus bpf/jit (Naveen N. Rao): - Disable classic BPF JIT on ppc64le .. and fix faults caused by radix patching of SLB miss handler (Michael Ellerman)" * tag 'powerpc-4.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/bpf/jit: Disable classic BPF JIT on ppc64le powerpc: Fix faults caused by radix patching of SLB miss handler powerpc/eeh: Fix invalid cached PE primary bus powerpc/mm/radix: Update Radix tree size as per ISA 3.0 powerpc/mm/hash: Don't add memory coherence if cache inhibited is set powerpc/mm/hash: Use the correct PPP mask when updating HPTE powerpc/mm/radix: Flush page walk cache when freeing page table powerpc/mm/radix: Update to tlb functions ric argument commit 9521d39976db20f8ef9b56af66661482a17d5364 Author: Michael Ellerman Date: Sat Jun 25 21:53:30 2016 +1000 Fix build break in fork.c when THREAD_SIZE < PAGE_SIZE Commit b235beea9e99 ("Clarify naming of thread info/stack allocators") breaks the build on some powerpc configs, where THREAD_SIZE < PAGE_SIZE: kernel/fork.c:235:2: error: implicit declaration of function 'free_thread_stack' kernel/fork.c:355:8: error: assignment from incompatible pointer type stack = alloc_thread_stack_node(tsk, node); ^ Fix it by renaming free_stack() to free_thread_stack(), and updating the return type of alloc_thread_stack_node(). Fixes: b235beea9e99 ("Clarify naming of thread info/stack allocators") Signed-off-by: Michael Ellerman Signed-off-by: Linus Torvalds kernel/fork.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b42b90d177d0c7f46f9c888c10c7900578ae7e09 Author: Al Viro Date: Fri Jun 24 23:49:03 2016 -0400 ceph: fix d_obtain_alias() misuses on failure d_obtain_alias() will have done iput() Signed-off-by: Al Viro fs/ceph/export.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit 086e3eb65e3b04d7186f5e527aa6fc375dd5495c Merge: aebe9bb 0fd5ed8 Author: Linus Torvalds Date: Fri Jun 24 19:08:33 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "Two weeks worth of fixes here" * emailed patches from Andrew Morton : (41 commits) init/main.c: fix initcall_blacklisted on ia64, ppc64 and parisc64 autofs: don't get stuck in a loop if vfs_write() returns an error mm/page_owner: avoid null pointer dereference tools/vm/slabinfo: fix spelling mistake: "Ocurrences" -> "Occurrences" fs/nilfs2: fix potential underflow in call to crc32_le oom, suspend: fix oom_reaper vs. oom_killer_disable race ocfs2: disable BUG assertions in reading blocks mm, compaction: abort free scanner if split fails mm: prevent KASAN false positives in kmemleak mm/hugetlb: clear compound_mapcount when freeing gigantic pages mm/swap.c: flush lru pvecs on compound page arrival memcg: css_alloc should return an ERR_PTR value on error memcg: mem_cgroup_migrate() may be called with irq disabled hugetlb: fix nr_pmds accounting with shared page tables Revert "mm: disable fault around on emulated access bit architecture" Revert "mm: make faultaround produce old ptes" mailmap: add Boris Brezillon's email mailmap: add Antoine Tenart's email mm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask mm: mempool: kasan: don't poot mempool objects in quarantine ... commit aebe9bb85e6358dc85f81533b14f5c2dfe14c8b4 Merge: 3fb5e59 9903fd1 Author: Linus Torvalds Date: Fri Jun 24 18:52:31 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "This is the second batch of queued up rdma patches for this rc cycle. There isn't anything really major in here. It's passed 0day, linux-next, and local testing across a wide variety of hardware. There are still a few known issues to be tracked down, but this should amount to the vast majority of the rdma RC fixes. Round two of 4.7 rc fixes: - A couple minor fixes to the rdma core - Multiple minor fixes to hfi1 - Multiple minor fixes to mlx4/mlx4 - A few minor fixes to i40iw" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (31 commits) IB/srpt: Reduce QP buffer size i40iw: Enable level-1 PBL for fast memory registration i40iw: Return correct max_fast_reg_page_list_len i40iw: Correct status check on i40iw_get_pble i40iw: Correct CQ arming IB/rdmavt: Correct qp_priv_alloc() return value test IB/hfi1: Don't zero out qp->s_ack_queue in rvt_reset_qp IB/hfi1: Fix deadlock with txreq allocation slow path IB/mlx4: Prevent cross page boundary allocation IB/mlx4: Fix memory leak if QP creation failed IB/mlx4: Verify port number in flow steering create flow IB/mlx4: Fix error flow when sending mads under SRIOV IB/mlx4: Fix the SQ size of an RC QP IB/mlx5: Fix wrong naming of port_rcv_data counter IB/mlx5: Fix post send fence logic IB/uverbs: Initialize ib_qp_init_attr with zeros IB/core: Fix false search of the IB_SA_WELL_KNOWN_GUID IB/core: Fix RoCE v1 multicast join logic issue IB/core: Fix no default GIDs when netdevice reregisters IB/hfi1: Send a pkey change event on driver pkey update ... commit 3fb5e59c888759407f2130e6c6213d1244de465c Merge: 260eaba 93a2001 Author: Linus Torvalds Date: Fri Jun 24 18:43:58 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID fix from Jiri Kosina: "hiddev ioctl() validation fix from Scott Bauer" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands commit 260eaba4eaf0daec2e21735de30de14b1d6a4d08 Merge: ed13fbb 5ce9171 Author: Linus Torvalds Date: Fri Jun 24 18:36:15 2016 -0700 Merge tag 'hwmon-for-linus-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fix from Guenter Roeck: "Improve fan type detection for dell-smm to prevent kernel hang" * tag 'hwmon-for-linus-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (dell-smm) Cache fan_type() calls and change fan detection commit ed13fbbf871cf0198b283c563b6394b02b31646c Merge: 3522b35 2605b98 Author: Linus Torvalds Date: Fri Jun 24 18:29:55 2016 -0700 Merge tag 'acpi-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Stable-candidate fix for a deadlock in ACPICA introduced during the 4.5 development cycle by a commit attempting to improve the handling of AML code that doesn't belong to any namespace objects in a given definition block (Lv Zheng)" * tag 'acpi-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading commit 3522b35cb2e2e24e03edf112e6466f3a626918a9 Merge: 032fd3e e753f30 Author: Linus Torvalds Date: Fri Jun 24 18:03:22 2016 -0700 Merge tag 'pm-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Fix for a latent cpufreq driver bug uncovered by a recent ACPICA change and several fixes for the devfreq framework, including one fix for an issue introduced recently. Specifics: - Fix a latent initialization issue in the pcc-cpufreq driver (incorrect initial value of a structure field) that has been uncovered by a recent ACPICA commit (Mike Galbraith). - Add a missing notification in an update_devfreq() error code path forgotten by a recent devfreq commit (Chanwoo Choi). - Fix devfreq device frequency initialization (Lukasz Luba). - Fix an incorrect IS_ERR() check in the devfreq framework discovered by the Smatch checker (Dan Carpenter). - Drop two excessive put_device() calls from the devfreq framework (MyungJoo Ham, Cai Zhiyong). - Fix a possible memory leak in the devfreq framework and drop an unnecessary kfree() invocation from it (MyungJoo Ham)" * tag 'pm-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / devfreq: Send the DEVFREQ_POSTCHANGE notification when target() is failed cpufreq: pcc-cpufreq: Fix doorbell.access_width PM / devfreq: fix initialization of current frequency in last status PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check PM / devfreq: remove double put_device PM / devfreq: fix double call put_device PM / devfreq: fix duplicated kfree on devfreq pointer PM / devfreq: devm_kzalloc to have dev pointer more precisely commit 032fd3e58c428c98538cc69113dd11b2801bf35a Merge: d05be0d d2bd05d Author: Linus Torvalds Date: Fri Jun 24 17:57:37 2016 -0700 Merge tag 'for-linus-4.7b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen bug fixes from David Vrabel: - fix x86 PV dom0 crash during early boot on some hardware - fix two pciback bugs affects certain devices - fix potential overflow when clearing page tables in x86 PV * tag 'for-linus-4.7b-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen-pciback: return proper values during BAR sizing x86/xen: avoid m2p lookup when setting early page table entries xen/pciback: Fix conf_space read/write overlap check. x86/xen: fix upper bound of pmd loop in xen_cleanhighmap() xen/balloon: Fix declared-but-not-defined warning commit d05be0d7e87b7808525e6bc000a87e095cc80040 Merge: 9c46a6d d74b4e4 Author: Linus Torvalds Date: Fri Jun 24 17:51:14 2016 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "Here are a few more arm64 fixes, but things do finally appear to be slowing down. The main fix is avoiding hibernation in a previously unanticipated situation where we have CPUs parked in the kernel, but it's all good stuff. - Fix icache/dcache sync for anonymous pages under migration - Correct the ASID limit check - Fix parallel builds of Image and Image.gz - Refuse to hibernate when we have CPUs that we can't offline" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: hibernate: Don't hibernate on systems with stuck CPUs arm64: smp: Add function to determine if cpus are stuck in the kernel arm64: mm: remove page_mapping check in __sync_icache_dcache arm64: fix boot image dependencies to not generate invalid images arm64: update ASID limit commit 0fd5ed8d897cffdc74903931bd7fcc9d8d154460 Author: Rasmus Villemoes Date: Fri Jun 24 14:50:30 2016 -0700 init/main.c: fix initcall_blacklisted on ia64, ppc64 and parisc64 When I replaced kasprintf("%pf") with a direct call to sprint_symbol_no_offset I must have broken the initcall blacklisting feature on the arches where dereference_function_descriptor() is non-trivial. Fixes: c8cdd2be213f (init/main.c: simplify initcall_blacklisted()) Link: http://lkml.kernel.org/r/1466027283-4065-1-git-send-email-linux@rasmusvillemoes.dk Signed-off-by: Rasmus Villemoes Cc: Yang Shi Cc: Prarit Bhargava Cc: Petr Mladek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds init/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5a9294e5c535deab69831076af15cd35e1c95f8b Author: Andrey Vagin Date: Fri Jun 24 14:50:27 2016 -0700 autofs: don't get stuck in a loop if vfs_write() returns an error __vfs_write() returns a negative value in a error case. Link: http://lkml.kernel.org/r/20160616083108.6278.65815.stgit@pluto.themaw.net Signed-off-by: Andrey Vagin Signed-off-by: Ian Kent Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/autofs4/waitq.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8285027fc479949a7a166bc1b26ce57e894878a7 Author: Sudip Mukherjee Date: Fri Jun 24 14:50:24 2016 -0700 mm/page_owner: avoid null pointer dereference We have dereferenced page_ext before checking it. Lets check it first and then used it. Fixes: f86e4271978b ("mm: check the return value of lookup_page_ext for all call sites") Link: http://lkml.kernel.org/r/1465249059-7883-1-git-send-email-sudipm.mukherjee@gmail.com Signed-off-by: Sudip Mukherjee Acked-by: Vlastimil Babka Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_owner.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7c5b7239465932400ee0825bcc90624717c1af19 Author: Colin Ian King Date: Fri Jun 24 14:50:21 2016 -0700 tools/vm/slabinfo: fix spelling mistake: "Ocurrences" -> "Occurrences" trivial fix to spelling mistake Link: http://lkml.kernel.org/r/1466672144-831-1-git-send-email-colin.king@canonical.com Signed-off-by: Colin Ian King Acked-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/vm/slabinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63d2f95d63396059200c391ca87161897b99e74a Author: Torsten Hilbrich Date: Fri Jun 24 14:50:18 2016 -0700 fs/nilfs2: fix potential underflow in call to crc32_le The value `bytes' comes from the filesystem which is about to be mounted. We cannot trust that the value is always in the range we expect it to be. Check its value before using it to calculate the length for the crc32_le call. It value must be larger (or equal) sumoff + 4. This fixes a kernel bug when accidentially mounting an image file which had the nilfs2 magic value 0x3434 at the right offset 0x406 by chance. The bytes 0x01 0x00 were stored at 0x408 and were interpreted as a s_bytes value of 1. This caused an underflow when substracting sumoff + 4 (20) in the call to crc32_le. BUG: unable to handle kernel paging request at ffff88021e600000 IP: crc32_le+0x36/0x100 ... Call Trace: nilfs_valid_sb.part.5+0x52/0x60 [nilfs2] nilfs_load_super_block+0x142/0x300 [nilfs2] init_nilfs+0x60/0x390 [nilfs2] nilfs_mount+0x302/0x520 [nilfs2] mount_fs+0x38/0x160 vfs_kern_mount+0x67/0x110 do_mount+0x269/0xe00 SyS_mount+0x9f/0x100 entry_SYSCALL_64_fastpath+0x16/0x71 Link: http://lkml.kernel.org/r/1466778587-5184-2-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Torsten Hilbrich Tested-by: Torsten Hilbrich Signed-off-by: Ryusuke Konishi Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/nilfs2/the_nilfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74070542099c66d87aebeacd7b54dc0e8b6a73f9 Author: Michal Hocko Date: Fri Jun 24 14:50:16 2016 -0700 oom, suspend: fix oom_reaper vs. oom_killer_disable race Tetsuo has reported the following potential oom_killer_disable vs. oom_reaper race: (1) freeze_processes() starts freezing user space threads. (2) Somebody (maybe a kenrel thread) calls out_of_memory(). (3) The OOM killer calls mark_oom_victim() on a user space thread P1 which is already in __refrigerator(). (4) oom_killer_disable() sets oom_killer_disabled = true. (5) P1 leaves __refrigerator() and enters do_exit(). (6) The OOM reaper calls exit_oom_victim(P1) before P1 can call exit_oom_victim(P1). (7) oom_killer_disable() returns while P1 not yet finished (8) P1 perform IO/interfere with the freezer. This situation is unfortunate. We cannot move oom_killer_disable after all the freezable kernel threads are frozen because the oom victim might depend on some of those kthreads to make a forward progress to exit so we could deadlock. It is also far from trivial to teach the oom_reaper to not call exit_oom_victim() because then we would lose a guarantee of the OOM killer and oom_killer_disable forward progress because exit_mm->mmput might block and never call exit_oom_victim. It seems the easiest way forward is to workaround this race by calling try_to_freeze_tasks again after oom_killer_disable. This will make sure that all the tasks are frozen or it bails out. Fixes: 449d777d7ad6 ("mm, oom_reaper: clear TIF_MEMDIE for all tasks queued for oom_reaper") Link: http://lkml.kernel.org/r/1466597634-16199-1-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Reported-by: Tetsuo Handa Cc: "Rafael J. Wysocki" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/power/process.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 7186ee06b66313dae0d34ec5241fda7c4a537cb9 Author: Gang He Date: Fri Jun 24 14:50:13 2016 -0700 ocfs2: disable BUG assertions in reading blocks According to some high-load testing, these two BUG assertions were encountered, this led system panic. Actually, there were some discussions about removing these two BUG() assertions, it would not bring any side effect. Then, I did the the following changes, 1) use the existing macro CATCH_BH_JBD_RACES to wrap BUG() in the ocfs2_read_blocks_sync function like before. 2) disable the macro CATCH_BH_JBD_RACES in Makefile by default. Link: http://lkml.kernel.org/r/1466574294-26863-1-git-send-email-ghe@suse.com Signed-off-by: Gang He Cc: Mark Fasheh Cc: Joel Becker Cc: Junxiao Bi Cc: Joseph Qi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/ocfs2/Makefile | 2 -- fs/ocfs2/buffer_head_io.c | 5 +++++ 2 files changed, 5 insertions(+), 2 deletions(-) commit a4f04f2c6955aff5e2c08dcb40aca247ff4d7370 Author: David Rientjes Date: Fri Jun 24 14:50:10 2016 -0700 mm, compaction: abort free scanner if split fails If the memory compaction free scanner cannot successfully split a free page (only possible due to per-zone low watermark), terminate the free scanner rather than continuing to scan memory needlessly. If the watermark is insufficient for a free page of order <= cc->order, then terminate the scanner since all future splits will also likely fail. This prevents the compaction freeing scanner from scanning all memory on very large zones (very noticeable for zones > 128GB, for instance) when all splits will likely fail while holding zone->lock. compaction_alloc() iterating a 128GB zone has been benchmarked to take over 400ms on some systems whereas any free page isolated and ready to be split ends up failing in split_free_page() because of the low watermark check and thus the iteration continues. The next time compaction occurs, the freeing scanner will likely start at the end of the zone again since no success was made previously and we get the same lengthy iteration until the zone is brought above the low watermark. All thp page faults can take >400ms in such a state without this fix. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1606211820350.97086@chino.kir.corp.google.com Signed-off-by: David Rientjes Acked-by: Vlastimil Babka Cc: Minchan Kim Cc: Joonsoo Kim Cc: Mel Gorman Cc: Hugh Dickins Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/compaction.c | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) commit 5c335fe020ea287b2b49cc4dfca9f6756b88bb71 Author: Dmitry Vyukov Date: Fri Jun 24 14:50:07 2016 -0700 mm: prevent KASAN false positives in kmemleak When kmemleak dumps contents of leaked objects it reads whole objects regardless of user-requested size. This upsets KASAN. Disable KASAN checks around object dump. Link: http://lkml.kernel.org/r/1466617631-68387-1-git-send-email-dvyukov@google.com Signed-off-by: Dmitry Vyukov Acked-by: Catalin Marinas Cc: Andrey Ryabinin Cc: Alexander Potapenko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kmemleak.c | 2 ++ 1 file changed, 2 insertions(+) commit c8cc708a340cc7c5445565079fd4d1c28898d7a2 Author: Gerald Schaefer Date: Fri Jun 24 14:50:04 2016 -0700 mm/hugetlb: clear compound_mapcount when freeing gigantic pages While working on s390 support for gigantic hugepages I ran into the following "Bad page state" warning when freeing gigantic pages: BUG: Bad page state in process bash pfn:580001 page:000003d116000040 count:0 mapcount:0 mapping:ffffffff00000000 index:0x0 flags: 0x7fffc0000000000() page dumped because: non-NULL mapping This is because page->compound_mapcount, which is part of a union with page->mapping, is initialized with -1 in prep_compound_gigantic_page(), and not cleared again during destroy_compound_gigantic_page(). Fix this by clearing the compound_mapcount in destroy_compound_gigantic_page() before clearing compound_head. Interestingly enough, the warning will not show up on x86_64, although this should not be architecture specific. Apparently there is an endianness issue, combined with the fact that the union contains both a 64 bit ->mapping pointer and a 32 bit atomic_t ->compound_mapcount as members. The resulting bogus page->mapping on x86_64 therefore contains 00000000ffffffff instead of ffffffff00000000 on s390, which will falsely trigger the PageAnon() check in free_pages_prepare() because page->mapping & PAGE_MAPPING_ANON is true on little-endian architectures like x86_64 in this case (the page is not compound anymore, ->compound_head was already cleared before). As a result, page->mapping will be cleared before doing the checks in free_pages_check(). Not sure if the bogus "PageAnon() returning true" on x86_64 for the first tail page of a gigantic page (at this stage) has other theoretical implications, but they would also be fixed with this patch. Link: http://lkml.kernel.org/r/1466612719-5642-1-git-send-email-gerald.schaefer@de.ibm.com Signed-off-by: Gerald Schaefer Reviewed-by: Mike Kravetz Cc: Luiz Capitulino Cc: Naoya Horiguchi Cc: Hillf Danton Cc: "Kirill A . Shutemov" Cc: Dave Hansen Cc: Paul Gortmaker Cc: "Aneesh Kumar K . V" Cc: Martin Schwidefsky Cc: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 1 + 1 file changed, 1 insertion(+) commit 8f182270dfec432e93fae14f9208a6b9af01009f Author: Lukasz Odzioba Date: Fri Jun 24 14:50:01 2016 -0700 mm/swap.c: flush lru pvecs on compound page arrival Currently we can have compound pages held on per cpu pagevecs, which leads to a lot of memory unavailable for reclaim when needed. In the systems with hundreads of processors it can be GBs of memory. On of the way of reproducing the problem is to not call munmap explicitly on all mapped regions (i.e. after receiving SIGTERM). After that some pages (with THP enabled also huge pages) may end up on lru_add_pvec, example below. void main() { #pragma omp parallel { size_t size = 55 * 1000 * 1000; // smaller than MEM/CPUS void *p = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS , -1, 0); if (p != MAP_FAILED) memset(p, 0, size); //munmap(p, size); // uncomment to make the problem go away } } When we run it with THP enabled it will leave significant amount of memory on lru_add_pvec. This memory will be not reclaimed if we hit OOM, so when we run above program in a loop: for i in `seq 100`; do ./a.out; done many processes (95% in my case) will be killed by OOM. The primary point of the LRU add cache is to save the zone lru_lock contention with a hope that more pages will belong to the same zone and so their addition can be batched. The huge page is already a form of batched addition (it will add 512 worth of memory in one go) so skipping the batching seems like a safer option when compared to a potential excess in the caching which can be quite large and much harder to fix because lru_add_drain_all is way to expensive and it is not really clear what would be a good moment to call it. Similarly we can reproduce the problem on lru_deactivate_pvec by adding: madvise(p, size, MADV_FREE); after memset. This patch flushes lru pvecs on compound page arrival making the problem less severe - after applying it kill rate of above example drops to 0%, due to reducing maximum amount of memory held on pvec from 28MB (with THP) to 56kB per CPU. Suggested-by: Michal Hocko Link: http://lkml.kernel.org/r/1466180198-18854-1-git-send-email-lukasz.odzioba@intel.com Signed-off-by: Lukasz Odzioba Acked-by: Michal Hocko Cc: Kirill Shutemov Cc: Andrea Arcangeli Cc: Vladimir Davydov Cc: Ming Li Cc: Minchan Kim Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit ea3a9645866e12d2b198434f03df3c3e96fb86ce Author: Tejun Heo Date: Fri Jun 24 14:49:58 2016 -0700 memcg: css_alloc should return an ERR_PTR value on error mem_cgroup_css_alloc() was returning NULL on failure while cgroup core expected it to return an ERR_PTR value leading to the following NULL deref after a css allocation failure. Fix it by return ERR_PTR(-ENOMEM) instead. I'll also update cgroup core so that it can handle NULL returns. mkdir: page allocation failure: order:6, mode:0x240c0c0(GFP_KERNEL|__GFP_COMP|__GFP_ZERO) CPU: 0 PID: 8738 Comm: mkdir Not tainted 4.7.0-rc3+ #123 ... Call Trace: dump_stack+0x68/0xa1 warn_alloc_failed+0xd6/0x130 __alloc_pages_nodemask+0x4c6/0xf20 alloc_pages_current+0x66/0xe0 alloc_kmem_pages+0x14/0x80 kmalloc_order_trace+0x2a/0x1a0 __kmalloc+0x291/0x310 memcg_update_all_caches+0x6c/0x130 mem_cgroup_css_alloc+0x590/0x610 cgroup_apply_control_enable+0x18b/0x370 cgroup_mkdir+0x1de/0x2e0 kernfs_iop_mkdir+0x55/0x80 vfs_mkdir+0xb9/0x150 SyS_mkdir+0x66/0xd0 do_syscall_64+0x53/0x120 entry_SYSCALL64_slow_path+0x25/0x25 ... BUG: unable to handle kernel NULL pointer dereference at 00000000000000d0 IP: init_and_link_css+0x37/0x220 PGD 34b1e067 PUD 3a109067 PMD 0 Oops: 0002 [#1] SMP Modules linked in: CPU: 0 PID: 8738 Comm: mkdir Not tainted 4.7.0-rc3+ #123 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.2-20160422_131301-anatol 04/01/2014 task: ffff88007cbc5200 ti: ffff8800666d4000 task.ti: ffff8800666d4000 RIP: 0010:[] [] init_and_link_css+0x37/0x220 RSP: 0018:ffff8800666d7d90 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffffffff810f2499 RSI: 0000000000000000 RDI: 0000000000000008 RBP: ffff8800666d7db8 R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: ffff88005a5fb400 R13: ffffffff81f0f8a0 R14: ffff88005a5fb400 R15: 0000000000000010 FS: 00007fc944689700(0000) GS:ffff88007fc00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f3aed0d2b80 CR3: 000000003a1e8000 CR4: 00000000000006f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: cgroup_apply_control_enable+0x1ac/0x370 cgroup_mkdir+0x1de/0x2e0 kernfs_iop_mkdir+0x55/0x80 vfs_mkdir+0xb9/0x150 SyS_mkdir+0x66/0xd0 do_syscall_64+0x53/0x120 entry_SYSCALL64_slow_path+0x25/0x25 Code: 89 f5 48 89 fb 49 89 d4 48 83 ec 08 8b 05 72 3b d8 00 85 c0 0f 85 60 01 00 00 4c 89 e7 e8 72 f7 ff ff 48 8d 7b 08 48 89 d9 31 c0 <48> c7 83 d0 00 00 00 00 00 00 00 48 83 e7 f8 48 29 f9 81 c1 d8 RIP init_and_link_css+0x37/0x220 RSP CR2: 00000000000000d0 ---[ end trace a2d8836ae1e852d1 ]--- Link: http://lkml.kernel.org/r/20160621165740.GJ3262@mtj.duckdns.org Signed-off-by: Tejun Heo Reported-by: Johannes Weiner Reviewed-by: Vladimir Davydov Acked-by: Johannes Weiner Acked-by: Michal Hocko Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d93c4130a7d049b234b5d5a15808eaf5406f2789 Author: Tejun Heo Date: Fri Jun 24 14:49:54 2016 -0700 memcg: mem_cgroup_migrate() may be called with irq disabled mem_cgroup_migrate() uses local_irq_disable/enable() but can be called with irq disabled from migrate_page_copy(). This ends up enabling irq while holding a irq context lock triggering the following lockdep warning. Fix it by using irq_save/restore instead. ================================= [ INFO: inconsistent lock state ] 4.7.0-rc1+ #52 Tainted: G W --------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. kcompactd0/151 [HC0[0]:SC0[0]:HE1:SE1] takes: (&(&ctx->completion_lock)->rlock){+.?.-.}, at: [<000000000038fd96>] aio_migratepage+0x156/0x1e8 {IN-SOFTIRQ-W} state was registered at: __lock_acquire+0x5b6/0x1930 lock_acquire+0xee/0x270 _raw_spin_lock_irqsave+0x66/0xb0 aio_complete+0x98/0x328 dio_complete+0xe4/0x1e0 blk_update_request+0xd4/0x450 scsi_end_request+0x48/0x1c8 scsi_io_completion+0x272/0x698 blk_done_softirq+0xca/0xe8 __do_softirq+0xc8/0x518 irq_exit+0xee/0x110 do_IRQ+0x6a/0x88 io_int_handler+0x11a/0x25c __mutex_unlock_slowpath+0x144/0x1d8 __mutex_unlock_slowpath+0x140/0x1d8 kernfs_iop_permission+0x64/0x80 __inode_permission+0x9e/0xf0 link_path_walk+0x6e/0x510 path_lookupat+0xc4/0x1a8 filename_lookup+0x9c/0x160 user_path_at_empty+0x5c/0x70 SyS_readlinkat+0x68/0x140 system_call+0xd6/0x270 irq event stamp: 971410 hardirqs last enabled at (971409): migrate_page_move_mapping+0x3ea/0x588 hardirqs last disabled at (971410): _raw_spin_lock_irqsave+0x3c/0xb0 softirqs last enabled at (970526): __do_softirq+0x460/0x518 softirqs last disabled at (970519): irq_exit+0xee/0x110 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&ctx->completion_lock)->rlock); lock(&(&ctx->completion_lock)->rlock); *** DEADLOCK *** 3 locks held by kcompactd0/151: #0: (&(&mapping->private_lock)->rlock){+.+.-.}, at: aio_migratepage+0x42/0x1e8 #1: (&ctx->ring_lock){+.+.+.}, at: aio_migratepage+0x5a/0x1e8 #2: (&(&ctx->completion_lock)->rlock){+.?.-.}, at: aio_migratepage+0x156/0x1e8 stack backtrace: CPU: 20 PID: 151 Comm: kcompactd0 Tainted: G W 4.7.0-rc1+ #52 Call Trace: show_trace+0xea/0xf0 show_stack+0x72/0xf0 dump_stack+0x9a/0xd8 print_usage_bug.part.27+0x2d4/0x2e8 mark_lock+0x17e/0x758 mark_held_locks+0xa2/0xd0 trace_hardirqs_on_caller+0x140/0x1c0 mem_cgroup_migrate+0x266/0x370 aio_migratepage+0x16a/0x1e8 move_to_new_page+0xb0/0x260 migrate_pages+0x8f4/0x9f0 compact_zone+0x4dc/0xdc8 kcompactd_do_work+0x1aa/0x358 kcompactd+0xba/0x2c8 kthread+0x10a/0x110 kernel_thread_starter+0x6/0xc kernel_thread_starter+0x0/0xc INFO: lockdep is turned off. Link: http://lkml.kernel.org/r/20160620184158.GO3262@mtj.duckdns.org Link: http://lkml.kernel.org/g/5767CFE5.7080904@de.ibm.com Fixes: 74485cf2bc85 ("mm: migrate: consolidate mem_cgroup_migrate() calls") Signed-off-by: Tejun Heo Reported-by: Christian Borntraeger Acked-by: Johannes Weiner Acked-by: Michal Hocko Reviewed-by: Vladimir Davydov Cc: [4.5+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c17b1f42594eb71b8d3eb5a6dfc907a7eb88a51d Author: Kirill A. Shutemov Date: Fri Jun 24 14:49:51 2016 -0700 hugetlb: fix nr_pmds accounting with shared page tables We account HugeTLB's shared page table to all processes who share it. The accounting happens during huge_pmd_share(). If somebody populates pud entry under us, we should decrease pagetable's refcount and decrease nr_pmds of the process. By mistake, I increase nr_pmds again in this case. :-/ It will lead to "BUG: non-zero nr_pmds on freeing mm: 2" on process' exit. Let's fix this by increasing nr_pmds only when we're sure that the page table will be used. Link: http://lkml.kernel.org/r/20160617122506.GC6534@node.shutemov.name Fixes: dc6c9a35b66b ("mm: account pmd page tables to the process") Signed-off-by: Kirill A. Shutemov Reported-by: zhongjiang Reviewed-by: Mike Kravetz Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 06d8fbc7cfd655d202cfac9870bd79c18c2db698 Author: Kirill A. Shutemov Date: Fri Jun 24 14:49:48 2016 -0700 Revert "mm: disable fault around on emulated access bit architecture" This reverts commit d0834a6c2c5b0c76cfb806bd7dba6556d8b4edbb. After revert of 5c0a85fad949 ("mm: make faultaround produce old ptes") faultaround doesn't have dependencies on hardware accessed bit, so let's revert this one too. Link: http://lkml.kernel.org/r/1465893750-44080-3-git-send-email-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reported-by: "Huang, Ying" Cc: Linus Torvalds Cc: Rik van Riel Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Cc: Vinayak Menon Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memory.c | 8 -------- 1 file changed, 8 deletions(-) commit 315d09bf30c2b436a1fdac86d31c24380cd56c4f Author: Kirill A. Shutemov Date: Fri Jun 24 14:49:45 2016 -0700 Revert "mm: make faultaround produce old ptes" This reverts commit 5c0a85fad949212b3e059692deecdeed74ae7ec7. The commit causes ~6% regression in unixbench. Let's revert it for now and consider other solution for reclaim problem later. Link: http://lkml.kernel.org/r/1465893750-44080-2-git-send-email-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov Reported-by: "Huang, Ying" Cc: Linus Torvalds Cc: Rik van Riel Cc: Mel Gorman Cc: Michal Hocko Cc: Minchan Kim Cc: Vinayak Menon Cc: Dave Hansen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/mm.h | 2 +- mm/filemap.c | 2 +- mm/memory.c | 23 +++++------------------ 3 files changed, 7 insertions(+), 20 deletions(-) commit 1f08fe266560fc2d1383fd9c8c08fdd432ea302b Author: Antoine Tenart Date: Fri Jun 24 14:49:42 2016 -0700 mailmap: add Boris Brezillon's email There are different versions of Boris' name and email in the log, and one typo. Add his emails in mailmap to have all of his contributions under the same name/email tuple. Link: http://lkml.kernel.org/r/20160609130323.27706-2-antoine.tenart@free-electrons.com Signed-off-by: Antoine Tenart Acked-by: Boris Brezillon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 3 +++ 1 file changed, 3 insertions(+) commit a8a47ff53462c3043778c04b3ba7230a39c476bf Author: Antoine Tenart Date: Fri Jun 24 14:49:39 2016 -0700 mailmap: add Antoine Tenart's email I used "Antoine Ténart" at first but then moved to a name without accent as this cause some issues from time to time... Add my email in the mailmap file to have a consistent shortlog output. Link: http://lkml.kernel.org/r/20160609130323.27706-1-antoine.tenart@free-electrons.com Signed-off-by: Antoine Tenart Cc: Antoine Tenart Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds .mailmap | 1 + 1 file changed, 1 insertion(+) commit e838a45f9392a5bd2be1cd3ab0b16ae85857461c Author: Mel Gorman Date: Fri Jun 24 14:49:37 2016 -0700 mm, sl[au]b: add __GFP_ATOMIC to the GFP reclaim mask Commit d0164adc89f6 ("mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd") modified __GFP_WAIT to explicitly identify the difference between atomic callers and those that were unwilling to sleep. Later the definition was removed entirely. The GFP_RECLAIM_MASK is the set of flags that affect watermark checking and reclaim behaviour but __GFP_ATOMIC was never added. Without it, atomic users of the slab allocator strip the __GFP_ATOMIC flag and cannot access the page allocator atomic reserves. This patch addresses the problem. The user-visible impact depends on the workload but potentially atomic allocations unnecessarily fail without this path. Link: http://lkml.kernel.org/r/20160610093832.GK2527@techsingularity.net Signed-off-by: Mel Gorman Reported-by: Marcin Wojtas Acked-by: Vlastimil Babka Acked-by: Michal Hocko Cc: [4.4+] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9b75a867cc9ddbafcaf35029358ac500f2635ff3 Author: Andrey Ryabinin Date: Fri Jun 24 14:49:34 2016 -0700 mm: mempool: kasan: don't poot mempool objects in quarantine Currently we may put reserved by mempool elements into quarantine via kasan_kfree(). This is totally wrong since quarantine may really free these objects. So when mempool will try to use such element, use-after-free will happen. Or mempool may decide that it no longer need that element and double-free it. So don't put object into quarantine in kasan_kfree(), just poison it. Rename kasan_kfree() to kasan_poison_kfree() to respect that. Also, we shouldn't use kasan_slab_alloc()/kasan_krealloc() in kasan_unpoison_element() because those functions may update allocation stacktrace. This would be wrong for the most of the remove_element call sites. (The only call site where we may want to update alloc stacktrace is in mempool_alloc(). Kmemleak solves this by calling kmemleak_update_trace(), so we could make something like that too. But this is out of scope of this patch). Fixes: 55834c59098d ("mm: kasan: initial memory quarantine implementation") Link: http://lkml.kernel.org/r/575977C3.1010905@virtuozzo.com Signed-off-by: Andrey Ryabinin Reported-by: Kuthonuzo Luruo Acked-by: Alexander Potapenko Cc: Dmitriy Vyukov Cc: Kostya Serebryany Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds include/linux/kasan.h | 11 +++++++---- mm/kasan/kasan.c | 6 +++--- mm/mempool.c | 12 ++++-------- 3 files changed, 14 insertions(+), 15 deletions(-) commit a6921c2974a09bfe8d039980c0b14a305644930b Author: Jon Mason Date: Fri Jun 24 14:49:31 2016 -0700 MAINTAINERS: update Calgary IOMMU Update the contact info for Muli, clean-up my name, and update the mailing list to the IOMMU mailing list. Link: http://lkml.kernel.org/r/1465493059-11840-2-git-send-email-jdmason@kudzu.us Signed-off-by: Jon Mason Cc: Muli Ben-Yehuda Cc: Greg Kroah-Hartman Cc: Krzysztof Kozlowski Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Bartlomiej Zolnierkiewicz Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f2db19719a4e789a58ac024b43f12eeb9e458074 Author: Michal Hocko Date: Fri Jun 24 14:49:28 2016 -0700 jbd2: get rid of superfluous __GFP_REPEAT jbd2_alloc is explicit about its allocation preferences wrt. the allocation size. Sub page allocations go to the slab allocator and larger are using either the page allocator or vmalloc. This is all good but the logic is unnecessarily complex. 1) as per Ted, the vmalloc fallback is a left-over: : jbd2_alloc is only passed in the bh->b_size, which can't be PAGE_SIZE, so : the code path that calls vmalloc() should never get called. When we : conveted jbd2_alloc() to suppor sub-page size allocations in commit : d2eecb039368, there was an assumption that it could be called with a size : greater than PAGE_SIZE, but that's certaily not true today. Moreover vmalloc allocation might even lead to a deadlock because the callers expect GFP_NOFS context while vmalloc is GFP_KERNEL. 2) __GFP_REPEAT for requests <= PAGE_ALLOC_COSTLY_ORDER is ignored since the flag was introduced. Let's simplify the code flow and use the slab allocator for sub-page requests and the page allocator for others. Even though order > 0 is not currently used as per above leave that option open. Link: http://lkml.kernel.org/r/1464599699-30131-18-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Reviewed-by: Jan Kara Cc: "Theodore Ts'o" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds fs/jbd2/journal.c | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) commit a830627b01b26452a13abb7e7b37d39365be4b05 Author: Michal Hocko Date: Fri Jun 24 14:49:25 2016 -0700 unicore32: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. PGALLOC_GFP uses __GFP_REPEAT but it is only used in pte_alloc_one, pte_alloc_one_kernel which does order-0 request. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-17-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Guan Xuetao Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/unicore32/include/asm/pgalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f45eebc25e78991ef6a6d784ab54151d3003cfdf Author: Michal Hocko Date: Fri Jun 24 14:49:22 2016 -0700 tile: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. pgtable_alloc_one uses __GFP_REPEAT flag for L2_USER_PGTABLE_ORDER but the order is either 0 or 3 if L2_KERNEL_PGTABLE_SHIFT for HPAGE_SHIFT. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-16-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Chris Metcalf [for tile] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/tile/mm/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 884ed4cb8aa19ccff32f5c5586257c56e56f91a4 Author: Michal Hocko Date: Fri Jun 24 14:49:20 2016 -0700 sh: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. PGALLOC_GFP uses __GFP_REPEAT but {pgd,pmd}_alloc allocate from {pgd,pmd}_cache but both caches are allocating up to PAGE_SIZE objects. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-15-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Yoshinori Sato Cc: Rich Felker Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sh/mm/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10d58bf297e2cba0cfa2cd143d4f0df26e129040 Author: Michal Hocko Date: Fri Jun 24 14:49:17 2016 -0700 s390: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. page_table_alloc then uses the flag for a single page allocation. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-14-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Heiko Carstens Cc: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/s390/mm/pgalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45eeff260d40ff02af3d5b8e2919033ee59f9ff6 Author: Michal Hocko Date: Fri Jun 24 14:49:14 2016 -0700 sparc: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. {pud,pmd}_alloc_one is using __GFP_REPEAT but it always allocates from pgtable_cache which is initialzed to PAGE_SIZE objects. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-13-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: David S. Miller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/sparc/include/asm/pgalloc_64.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2379a23e34b58520dfc8f4909f116a08393138e4 Author: Michal Hocko Date: Fri Jun 24 14:49:12 2016 -0700 powerpc: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. {pud,pmd}_alloc_one are allocating from {PGT,PUD}_CACHE initialized in pgtable_cache_init which doesn't have larger than sizeof(void *) << 12 size and that fits into !costly allocation request size. PGALLOC_GFP is used only in radix__pgd_alloc which uses either order-0 or order-4 requests. The first one doesn't need the flag while the second does. Drop __GFP_REPEAT from PGALLOC_GFP and add it for the order-4 one. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-12-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/powerpc/include/asm/book3s/64/pgalloc.h | 10 ++++------ arch/powerpc/include/asm/nohash/64/pgalloc.h | 6 ++---- arch/powerpc/mm/hugetlbpage.c | 2 +- 3 files changed, 7 insertions(+), 11 deletions(-) commit a4135b93898fe38ea4136c6b03b29b746e08c83a Author: Michal Hocko Date: Fri Jun 24 14:49:09 2016 -0700 score: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. pte_alloc_one{_kernel} allocate PTE_ORDER which is 0. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-11-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Chen Liqin Cc: Lennox Wu Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/score/include/asm/pgalloc.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit aade311a50b0be5d5ee93bac7ebc2da9a16556d7 Author: Michal Hocko Date: Fri Jun 24 14:49:06 2016 -0700 parisc: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. pmd_alloc_one allocate PMD_ORDER which is 1. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-10-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: "James E.J. Bottomley" Cc: Helge Deller Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/parisc/include/asm/pgalloc.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 565299d03363c71d5bcf7edabb41b2b36a9ea36e Author: Michal Hocko Date: Fri Jun 24 14:49:04 2016 -0700 nios2: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. pte_alloc_one{_kernel} allocate PTE_ORDER which is 0. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-9-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Ley Foon Tan Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/nios2/include/asm/pgalloc.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 65f84656ff7c24177c43652bc88cc2a06f9a48b1 Author: Michal Hocko Date: Fri Jun 24 14:49:01 2016 -0700 mips: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. pte_alloc_one{_kernel}, pmd_alloc_one allocate PTE_ORDER resp. PMD_ORDER but both are not larger than 1. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-8-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: John Crispin Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/mips/include/asm/pgalloc.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 54d87d600adbe9889bccaff38420cec02250993b Author: Michal Hocko Date: Fri Jun 24 14:48:58 2016 -0700 arc: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. pte_alloc_one_kernel uses __get_order_pte but this is obviously always zero because BITS_FOR_PTE is not larger than 9 yet the page size is always larger than 4K. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-7-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Vineet Gupta Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arc/include/asm/pgalloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f3610a6aff7dd70b788364255c0cbc128488ef72 Author: Michal Hocko Date: Fri Jun 24 14:48:56 2016 -0700 arm64: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. {pte,pmd,pud}_alloc_one{_kernel}, late_pgtable_alloc use PGALLOC_GFP for __get_free_page (aka order-0). pgd_alloc is slightly more complex because it allocates from pgd_cache if PGD_SIZE != PAGE_SIZE and PGD_SIZE depends on the configuration (CONFIG_ARM64_VA_BITS, PAGE_SHIFT and CONFIG_PGTABLE_LEVELS). As per config PGTABLE_LEVELS int default 2 if ARM64_16K_PAGES && ARM64_VA_BITS_36 default 2 if ARM64_64K_PAGES && ARM64_VA_BITS_42 default 3 if ARM64_64K_PAGES && ARM64_VA_BITS_48 default 3 if ARM64_4K_PAGES && ARM64_VA_BITS_39 default 3 if ARM64_16K_PAGES && ARM64_VA_BITS_47 default 4 if !ARM64_64K_PAGES && ARM64_VA_BITS_48 we should have the following options CONFIG_ARM64_VA_BITS:48 CONFIG_PGTABLE_LEVELS:4 PAGE_SIZE:4k size:4096 pages:1 CONFIG_ARM64_VA_BITS:48 CONFIG_PGTABLE_LEVELS:4 PAGE_SIZE:16k size:16 pages:1 CONFIG_ARM64_VA_BITS:48 CONFIG_PGTABLE_LEVELS:3 PAGE_SIZE:64k size:512 pages:1 CONFIG_ARM64_VA_BITS:47 CONFIG_PGTABLE_LEVELS:3 PAGE_SIZE:16k size:16384 pages:1 CONFIG_ARM64_VA_BITS:42 CONFIG_PGTABLE_LEVELS:2 PAGE_SIZE:64k size:65536 pages:1 CONFIG_ARM64_VA_BITS:39 CONFIG_PGTABLE_LEVELS:3 PAGE_SIZE:4k size:4096 pages:1 CONFIG_ARM64_VA_BITS:36 CONFIG_PGTABLE_LEVELS:2 PAGE_SIZE:16k size:16384 pages:1 All of them fit into a single page (aka order-0). This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-6-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Will Deacon Cc: Catalin Marinas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/arm64/include/asm/pgalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f58f230a832ba8220a64f44aaafcce4b7358d826 Author: Michal Hocko Date: Fri Jun 24 14:48:53 2016 -0700 x86/efi: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. efi_alloc_page_tables uses __GFP_REPEAT but it allocates an order-0 page. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-4-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Acked-by: Matt Fleming Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/platform/efi/efi_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3a9a59d206779dc0c4ca5a6de6a2ff40382732b Author: Michal Hocko Date: Fri Jun 24 14:48:50 2016 -0700 x86: get rid of superfluous __GFP_REPEAT __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. PGALLOC_GFP uses __GFP_REPEAT but none of the allocation which uses this flag is for more than order-0. This means that this flag has never been actually useful here because it has always been used only for PAGE_ALLOC_COSTLY requests. Link: http://lkml.kernel.org/r/1464599699-30131-3-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Andy Lutomirski Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/x86/kernel/espfix_64.c | 2 +- arch/x86/mm/pgtable.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 32d6bd9059f265f617f6502c68dfbcae7e515add Author: Michal Hocko Date: Fri Jun 24 14:48:47 2016 -0700 tree wide: get rid of __GFP_REPEAT for order-0 allocations part I This is the third version of the patchset previously sent [1]. I have basically only rebased it on top of 4.7-rc1 tree and dropped "dm: get rid of superfluous gfp flags" which went through dm tree. I am sending it now because it is tree wide and chances for conflicts are reduced considerably when we want to target rc2. I plan to send the next step and rename the flag and move to a better semantic later during this release cycle so we will have a new semantic ready for 4.8 merge window hopefully. Motivation: While working on something unrelated I've checked the current usage of __GFP_REPEAT in the tree. It seems that a majority of the usage is and always has been bogus because __GFP_REPEAT has always been about costly high order allocations while we are using it for order-0 or very small orders very often. It seems that a big pile of them is just a copy&paste when a code has been adopted from one arch to another. I think it makes some sense to get rid of them because they are just making the semantic more unclear. Please note that GFP_REPEAT is documented as * __GFP_REPEAT: Try hard to allocate the memory, but the allocation attempt * _might_ fail. This depends upon the particular VM implementation. while !costly requests have basically nofail semantic. So one could reasonably expect that order-0 request with __GFP_REPEAT will not loop for ever. This is not implemented right now though. I would like to move on with __GFP_REPEAT and define a better semantic for it. $ git grep __GFP_REPEAT origin/master | wc -l 111 $ git grep __GFP_REPEAT | wc -l 36 So we are down to the third after this patch series. The remaining places really seem to be relying on __GFP_REPEAT due to large allocation requests. This still needs some double checking which I will do later after all the simple ones are sorted out. I am touching a lot of arch specific code here and I hope I got it right but as a matter of fact I even didn't compile test for some archs as I do not have cross compiler for them. Patches should be quite trivial to review for stupid compile mistakes though. The tricky parts are usually hidden by macro definitions and thats where I would appreciate help from arch maintainers. [1] http://lkml.kernel.org/r/1461849846-27209-1-git-send-email-mhocko@kernel.org This patch (of 19): __GFP_REPEAT has a rather weak semantic but since it has been introduced around 2.6.12 it has been ignored for low order allocations. Yet we have the full kernel tree with its usage for apparently order-0 allocations. This is really confusing because __GFP_REPEAT is explicitly documented to allow allocation failures which is a weaker semantic than the current order-0 has (basically nofail). Let's simply drop __GFP_REPEAT from those places. This would allow to identify place which really need allocator to retry harder and formulate a more specific semantic for what the flag is supposed to do actually. Link: http://lkml.kernel.org/r/1464599699-30131-2-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Cc: "David S. Miller" Cc: "H. Peter Anvin" Cc: "James E.J. Bottomley" Cc: "Theodore Ts'o" Cc: Andy Lutomirski Cc: Benjamin Herrenschmidt Cc: Catalin Marinas Cc: Chen Liqin Cc: Chris Metcalf [for tile] Cc: Guan Xuetao Cc: Heiko Carstens Cc: Helge Deller Cc: Ingo Molnar Cc: Jan Kara Cc: John Crispin Cc: Lennox Wu Cc: Ley Foon Tan Cc: Martin Schwidefsky Cc: Matt Fleming Cc: Ralf Baechle Cc: Rich Felker Cc: Russell King Cc: Thomas Gleixner Cc: Vineet Gupta Cc: Will Deacon Cc: Yoshinori Sato Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds arch/alpha/include/asm/pgalloc.h | 4 ++-- arch/arm/include/asm/pgalloc.h | 2 +- arch/avr32/include/asm/pgalloc.h | 6 +++--- arch/cris/include/asm/pgalloc.h | 4 ++-- arch/frv/mm/pgalloc.c | 6 +++--- arch/hexagon/include/asm/pgalloc.h | 4 ++-- arch/m68k/include/asm/mcf_pgalloc.h | 4 ++-- arch/m68k/include/asm/motorola_pgalloc.h | 4 ++-- arch/m68k/include/asm/sun3_pgalloc.h | 4 ++-- arch/metag/include/asm/pgalloc.h | 5 ++--- arch/microblaze/include/asm/pgalloc.h | 4 ++-- arch/microblaze/mm/pgtable.c | 3 +-- arch/mn10300/mm/pgtable.c | 6 +++--- arch/openrisc/include/asm/pgalloc.h | 2 +- arch/openrisc/mm/ioremap.c | 2 +- arch/parisc/include/asm/pgalloc.h | 4 ++-- arch/powerpc/include/asm/book3s/64/pgalloc.h | 2 +- arch/powerpc/include/asm/nohash/64/pgalloc.h | 2 +- arch/powerpc/mm/pgtable_32.c | 4 ++-- arch/powerpc/mm/pgtable_64.c | 3 +-- arch/sh/include/asm/pgalloc.h | 4 ++-- arch/sparc/mm/init_64.c | 6 ++---- arch/um/kernel/mem.c | 4 ++-- arch/x86/include/asm/pgalloc.h | 4 ++-- arch/x86/xen/p2m.c | 2 +- arch/xtensa/include/asm/pgalloc.h | 2 +- drivers/block/aoe/aoecmd.c | 2 +- 27 files changed, 47 insertions(+), 52 deletions(-) commit b9b4bb26af017dbe930cd4df7f9b2fc3a0497bfe Author: Anthony Romano Date: Fri Jun 24 14:48:43 2016 -0700 tmpfs: don't undo fallocate past its last page When fallocate is interrupted it will undo a range that extends one byte past its range of allocated pages. This can corrupt an in-use page by zeroing out its first byte. Instead, undo using the inclusive byte range. Fixes: 1635f6a74152f1d ("tmpfs: undo fallocation on failure") Link: http://lkml.kernel.org/r/1462713387-16724-1-git-send-email-anthony.romano@coreos.com Signed-off-by: Anthony Romano Cc: Vlastimil Babka Cc: Hugh Dickins Cc: Brandon Philips Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/shmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7b50abc90afb2e3c27e1bd212643cc53eaf0b60 Author: Mike Kravetz Date: Fri Jun 24 14:48:40 2016 -0700 selftests/vm/compaction_test: fix write to restore nr_hugepages The write at the end of the test to restore nr_hugepages to its previous value is failing. This is because it is trying to write the number of bytes in the char array as opposed to the number of bytes in the string. Link: http://lkml.kernel.org/r/1465331205-3284-1-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Cc: Shuah Khan Cc: Sri Jayaramappa Cc: Eric B Munson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds tools/testing/selftests/vm/compaction_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9df10fb7b80bc2f540956ba01b5e7ee1012001a5 Author: Tetsuo Handa Date: Fri Jun 24 14:48:38 2016 -0700 oom_reaper: avoid pointless atomic_inc_not_zero usage. Since commit 36324a990cf5 ("oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space") changed to use find_lock_task_mm() for finding a mm_struct to reap, it is guaranteed that mm->mm_users > 0 because find_lock_task_mm() returns a task_struct with ->mm != NULL. Therefore, we can safely use atomic_inc(). Link: http://lkml.kernel.org/r/1465024759-8074-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 491a1c65ae498dea0e39b24a46e528a78a8532ed Author: Tetsuo Handa Date: Fri Jun 24 14:48:35 2016 -0700 mm,oom_reaper: don't call mmput_async() without atomic_inc_not_zero() Commit e2fe14564d33 ("oom_reaper: close race with exiting task") reduced frequency of needlessly selecting next OOM victim, but was calling mmput_async() when atomic_inc_not_zero() failed. Link: http://lkml.kernel.org/r/1464423365-5555-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa Acked-by: Michal Hocko Cc: Arnd Bergmann Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 1 + 1 file changed, 1 insertion(+) commit 9c46a6df3ba770162deb7abc95427fa1ddf28763 Merge: 7f1a00b 9996537 Author: Linus Torvalds Date: Fri Jun 24 17:22:27 2016 -0700 Merge tag 'nfsd-4.7-2' of git://linux-nfs.org/~bfields/linux Pull nfsd bugfixes from Bruce Fields: "Fix missing server-side permission checks on setting NFS ACLs" * tag 'nfsd-4.7-2' of git://linux-nfs.org/~bfields/linux: nfsd: check permissions when setting ACLs posix_acl: Add set_posix_acl commit 7f1a00b6fcd0e3c19beba2e92d157dc0c2cf3494 Author: Linus Torvalds Date: Fri Jun 24 17:07:33 2016 -0700 fix up initial thread stack pointer vs thread_info confusion The INIT_TASK() initializer was similarly confused about the stack vs thread_info allocation that the allocators had, and that were fixed in commit b235beea9e99 ("Clarify naming of thread info/stack allocators"). The task ->stack pointer only incidentally ends up having the same value as the thread_info, and in fact that will change. So fix the initial task struct initializer to point to 'init_stack' instead of 'init_thread_info', and make sure the ia64 definition for that exists. This actually makes the ia64 tsk->stack pointer be sensible for the initial task, but not for any other task. As mentioned in commit b235beea9e99, that whole pointer isn't actually used on ia64, since task_stack_page() there just points to the (single) allocation. All the other architectures seem to have copied the 'init_stack' definition, even if it tended to be generally unusued. Signed-off-by: Linus Torvalds arch/ia64/kernel/init_task.c | 1 + include/linux/init_task.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) commit 7e8b3dfef16375dbfeb1f36a83eb9f27117c51fd Author: Alan Stern Date: Thu Jun 23 14:54:37 2016 -0400 USB: EHCI: declare hostpc register as zero-length array The HOSTPC extension registers found in some EHCI implementations form a variable-length array, with one element for each port. Therefore the hostpc field in struct ehci_regs should be declared as a zero-length array, not a single-element array. This fixes a problem reported by UBSAN. Signed-off-by: Alan Stern Reported-by: Wilfried Klaebe Tested-by: Wilfried Klaebe CC: Signed-off-by: Greg Kroah-Hartman include/linux/usb/ehci_def.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1a34c4d0ae888b229b8ffd99835be254b0024f88 Merge: 3641fde 04e59a0 Author: Greg Kroah-Hartman Date: Fri Jun 24 17:01:43 2016 -0700 Merge tag 'phy-for-4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.7-rc5 *) Fix in sun4i-usb phy driver to properly handle the return value of gpiod_to_irq *) Fix a sparse warning in sun4i-usb phy driver *) Fix bcm-ns-usb2 phy driver to check the correct variable *) Fix spurious interrupts during VBUS change in rcar-gen3-usb2 phy driver Signed-off-by: Kishon Vijay Abraham I commit 3641fdeb17a84a170b2259a5a38d9bfd106c5a6e Merge: 33688ab ea1d39a Author: Greg Kroah-Hartman Date: Fri Jun 24 17:00:49 2016 -0700 Merge tag 'usb-ci-v4.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/peter.chen/usb into usb-linus Peter writes: One fix for module support in OTG FSM commit aca9c293d098292579e345b2b39b394778d41526 Author: Linus Torvalds Date: Fri Jun 24 16:55:53 2016 -0700 x86: fix up a few misc stack pointer vs thread_info confusions As the actual pointer value is the same for the thread stack allocation and the thread_info, code that confused the two worked fine, but will break when the thread info is moved away from the stack allocation. It also looks very confusing. For example, the kprobe code wanted to know the current top of stack. To do that, it used this: (unsigned long)current_thread_info() + THREAD_SIZE which did indeed give the correct value. But it's not only a fairly nonsensical expression, it's also rather complex, especially since we actually have this: static inline unsigned long current_top_of_stack(void) which not only gives us the value we are interested in, but happens to be how "current_thread_info()" is currently defined as: (struct thread_info *)(current_top_of_stack() - THREAD_SIZE); so using current_thread_info() to figure out the top of the stack really is a very round-about thing to do. The other cases are just simpler confusion about task_thread_info() vs task_stack_page(), which currently return the same pointer - but if you want the stack page, you really should be using the latter one. And there was one entirely unused assignment of the current stack to a thread_info pointer. All cleaned up to make more sense today, and make it easier to move the thread_info away from the stack in the future. No semantic changes. Signed-off-by: Linus Torvalds arch/x86/include/asm/kprobes.h | 11 +++++------ arch/x86/kernel/dumpstack.c | 2 +- arch/x86/kernel/irq_32.c | 2 -- 3 files changed, 6 insertions(+), 9 deletions(-) commit b235beea9e996a4d36fed6cfef4801a3e7d7a9a5 Author: Linus Torvalds Date: Fri Jun 24 15:09:37 2016 -0700 Clarify naming of thread info/stack allocators We've had the thread info allocated together with the thread stack for most architectures for a long time (since the thread_info was split off from the task struct), but that is about to change. But the patches that move the thread info to be off-stack (and a part of the task struct instead) made it clear how confused the allocator and freeing functions are. Because the common case was that we share an allocation with the thread stack and the thread_info, the two pointers were identical. That identity then meant that we would have things like ti = alloc_thread_info_node(tsk, node); ... tsk->stack = ti; which certainly _worked_ (since stack and thread_info have the same value), but is rather confusing: why are we assigning a thread_info to the stack? And if we move the thread_info away, the "confusing" code just gets to be entirely bogus. So remove all this confusion, and make it clear that we are doing the stack allocation by renaming and clarifying the function names to be about the stack. The fact that the thread_info then shares the allocation is an implementation detail, and not really about the allocation itself. This is a pure renaming and type fix: we pass in the same pointer, it's just that we clarify what the pointer means. The ia64 code that actually only has one single allocation (for all of task_struct, thread_info and kernel thread stack) now looks a bit odd, but since "tsk->stack" is actually not even used there, that oddity doesn't matter. It would be a separate thing to clean that up, I intentionally left the ia64 changes as a pure brute-force renaming and type change. Acked-by: Andy Lutomirski Signed-off-by: Linus Torvalds arch/Kconfig | 4 +-- arch/ia64/Kconfig | 2 +- arch/ia64/include/asm/thread_info.h | 8 +++--- arch/mn10300/include/asm/thread_info.h | 2 +- arch/mn10300/kernel/kgdb.c | 3 +- arch/tile/include/asm/thread_info.h | 2 +- arch/tile/kernel/process.c | 3 +- include/linux/sched.h | 2 +- init/main.c | 4 +-- kernel/fork.c | 50 +++++++++++++++++----------------- 10 files changed, 41 insertions(+), 39 deletions(-) commit e753f3050935ff5a52069fef802bee72ab19c098 Merge: 0d37189 3c67a82 Author: Rafael J. Wysocki Date: Fri Jun 24 23:37:23 2016 +0200 Merge branches 'pm-devfreq-fixes' and 'pm-cpufreq-fixes' * pm-devfreq-fixes: PM / devfreq: Send the DEVFREQ_POSTCHANGE notification when target() is failed PM / devfreq: fix initialization of current frequency in last status PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check PM / devfreq: remove double put_device PM / devfreq: fix double call put_device PM / devfreq: fix duplicated kfree on devfreq pointer PM / devfreq: devm_kzalloc to have dev pointer more precisely * pm-cpufreq-fixes: cpufreq: pcc-cpufreq: Fix doorbell.access_width commit 2605b98109100f70398115a473ea190ce93fda5e Merge: 33688ab 2f38b1b Author: Rafael J. Wysocki Date: Fri Jun 24 23:36:20 2016 +0200 Merge branch 'acpica-fixes' * acpica-fixes: ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading commit 45e8a2583d97ca758a55c608f78c4cef562644d1 Author: Steve French Date: Wed Jun 22 21:07:32 2016 -0500 File names with trailing period or space need special case conversion POSIX allows files with trailing spaces or a trailing period but SMB3 does not, so convert these using the normal Services For Mac mapping as we do for other reserved characters such as : < > | ? * This is similar to what Macs do for the same problem over SMB3. CC: Stable Signed-off-by: Steve French Acked-by: Pavel Shilovsky fs/cifs/cifs_unicode.c | 33 +++++++++++++++++++++++++++++---- fs/cifs/cifs_unicode.h | 2 ++ 2 files changed, 31 insertions(+), 4 deletions(-) commit 4fcd1813e6404dd4420c7d12fb483f9320f0bf93 Author: Steve French Date: Wed Jun 22 20:12:05 2016 -0500 Fix reconnect to not defer smb3 session reconnect long after socket reconnect Azure server blocks clients that open a socket and don't do anything on it. In our reconnect scenarios, we can reconnect the tcp session and detect the socket is available but we defer the negprot and SMB3 session setup and tree connect reconnection until the next i/o is requested, but this looks suspicous to some servers who expect SMB3 negprog and session setup soon after a socket is created. In the echo thread, reconnect SMB3 sessions and tree connections that are disconnected. A later patch will replay persistent (and resilient) handle opens. CC: Stable Signed-off-by: Steve French Acked-by: Pavel Shilovsky fs/cifs/connect.c | 4 +++- fs/cifs/smb2pdu.c | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) commit 999653786df6954a31044528ac3f7a5dadca08f4 Author: Ben Hutchings Date: Wed Jun 22 19:43:35 2016 +0100 nfsd: check permissions when setting ACLs Use set_posix_acl, which includes proper permission checks, instead of calling ->set_acl directly. Without this anyone may be able to grant themselves permissions to a file by setting the ACL. Lock the inode to make the new checks atomic with respect to set_acl. (Also, nfsd was the only caller of set_acl not locking the inode, so I suspect this may fix other races.) This also simplifies the code, and ensures our ACLs are checked by posix_acl_valid. The permission checks and the inode locking were lost with commit 4ac7249e, which changed nfsd to use the set_acl inode operation directly instead of going through xattr handlers. Reported-by: David Sinquin [agreunba@redhat.com: use set_posix_acl] Fixes: 4ac7249e Cc: Christoph Hellwig Cc: Al Viro Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs2acl.c | 20 ++++++++++---------- fs/nfsd/nfs3acl.c | 16 +++++++--------- fs/nfsd/nfs4acl.c | 16 ++++++++-------- 3 files changed, 25 insertions(+), 27 deletions(-) commit 485e71e8fb6356c08c7fc6bcce4bf02c9a9a663f Author: Andreas Gruenbacher Date: Wed Jun 22 23:57:25 2016 +0200 posix_acl: Add set_posix_acl Factor out part of posix_acl_xattr_set into a common function that takes a posix_acl, which nfsd can also call. The prototype already exists in include/linux/posix_acl.h. Signed-off-by: Andreas Gruenbacher Cc: stable@vger.kernel.org Cc: Christoph Hellwig Cc: Al Viro Signed-off-by: J. Bruce Fields fs/posix_acl.c | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) commit 4995734e973a2c2e9c6f6413cbad9913fc4df0dc Author: Dan Williams Date: Fri Jun 24 09:07:39 2016 -0700 acpi, nfit: fix acpi_check_dsm() vs zero functions implemented QEMU 2.6 implements nascent support for nvdimm DSMs. Depending on configuration it may only implement the function0 dsm to indicate that no other DSMs are available. Commit 31eca76ba2fc "nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism" breaks QEMU, but QEMU is spec compliant. Per the spec the way to indicate that no functions are supported is: If Function Index is zero, the return is a buffer containing one bit for each function index, starting with zero. Bit 0 indicates whether there is support for any functions other than function 0 for the specified UUID and Revision ID. If set to zero, no functions are supported (other than function zero) for the specified UUID and Revision ID. Update the nfit driver to determine the family (interface UUID) without requiring the implementation to define any other functions, i.e. short-circuit acpi_check_dsm() to succeed per the spec. The nfit driver appears to be the only user passing funcs==0 to acpi_check_dsm(), so this behavior change of the common routine should be limited to the probing done by the nfit driver. Cc: Len Brown Cc: Jerry Hoemann Acked-by: "Rafael J. Wysocki" Fixes: 31eca76ba2fc ("nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism") Reported-by: Xiao Guangrong Tested-by: Xiao Guangrong Signed-off-by: Dan Williams drivers/acpi/nfit.c | 6 +++--- drivers/acpi/utils.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 1b982ea2ca398bdaeab6cf2aba459a9ca808f1f3 Author: Trond Myklebust Date: Fri Jun 17 16:48:29 2016 -0400 NFS: Fix an unused variable warning Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 2 -- 1 file changed, 2 deletions(-) commit 916ec34d0bafe95b977908acd8b3153c9df6f9d6 Author: Trond Myklebust Date: Fri Jun 17 16:48:28 2016 -0400 NFS: Fix potential race in nfs_fhget() If we don't set the mode correctly in nfs_init_locked(), then there is potential for a race with a second call to nfs_fhget that will cause inode aliasing. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/inode.c | 1 + 1 file changed, 1 insertion(+) commit d8fdb47fae5febc02e62da121f85625244b98b2e Author: Trond Myklebust Date: Fri Jun 17 16:48:27 2016 -0400 NFS: Don't let readdirplus revalidate an inode that was marked as stale Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/dir.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 2d148c7e84962429a79092a56d3736a8d984f595 Author: Trond Myklebust Date: Fri Jun 17 16:48:26 2016 -0400 NFSv4.1/pnfs: Mark the layout stateid invalid when all segments are removed According to RFC5661, section 12.5.3. the layout stateid is no longer valid once the client no longer holds any layout segments. Ensure that we mark it invalid. Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/pnfs.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit cbebaf897e5c4862567eb799dc84acc5d7ee2678 Author: Trond Myklebust Date: Fri Jun 17 16:48:25 2016 -0400 NFS: Fix a double page unlock Since commit 0bcbf039f6b2, nfs_readpage_release() has been used to unlock the page in the read code. Fixes: 0bcbf039f6b2 ("nfs: handle request add failure properly") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5e3a98883e7ebdd1440f829a9e9dd5c3d2c5903b Author: Weston Andros Adamson Date: Fri Jun 17 16:48:24 2016 -0400 pnfs_nfs: fix _cancel_empty_pagelist pnfs_generic_commit_cancel_empty_pagelist calls nfs_commitdata_release, but that is wrong: nfs_commitdata_release puts the open context, something that isn't valid until nfs_init_commit is called, which is never the case when pnfs_generic_commit_cancel_empty_pagelist is called. This was introduced in "nfs: avoid race that crashes nfs_init_commit". Signed-off-by: Weston Andros Adamson Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/pnfs_nfs.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit cea7f829d3ea6e87a67220bc417260b858e278ff Author: Oleg Drokin Date: Fri Jun 17 16:48:23 2016 -0400 nfs4: Fix potential use after free of state in nfs4_do_reclaim. Commit e8d975e73e5f ("fixing infinite OPEN loop in 4.0 stateid recovery") introduced access to state after it was just potentially freed by nfs4_put_open_state leading to a random data corruption somewhere. BUG: unable to handle kernel paging request at ffff88004941ee40 IP: [] nfs4_do_reclaim+0x461/0x740 PGD 3501067 PUD 3504067 PMD 6ff37067 PTE 800000004941e060 Oops: 0002 [#1] SMP DEBUG_PAGEALLOC Modules linked in: loop rpcsec_gss_krb5 acpi_cpufreq tpm_tis joydev i2c_piix4 pcspkr tpm virtio_console nfsd ttm drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops floppy serio_raw virtio_blk drm CPU: 6 PID: 2161 Comm: 192.168.10.253- Not tainted 4.7.0-rc1-vm-nfs+ #112 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 task: ffff8800463dcd00 ti: ffff88003ff48000 task.ti: ffff88003ff48000 RIP: 0010:[] [] nfs4_do_reclaim+0x461/0x740 RSP: 0018:ffff88003ff4bd68 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffffffff81a49900 RCX: 00000000000000e8 RDX: 00000000000000e8 RSI: ffff8800418b9930 RDI: ffff880040c96c88 RBP: ffff88003ff4bdf8 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000000 R12: ffff880040c96c98 R13: ffff88004941ee20 R14: ffff88004941ee40 R15: ffff88004941ee00 FS: 0000000000000000(0000) GS:ffff88006d000000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff88004941ee40 CR3: 0000000060b0b000 CR4: 00000000000006e0 Stack: ffffffff813baad5 ffff8800463dcd00 ffff880000000001 ffffffff810e6b68 ffff880043ddbc88 ffff8800418b9800 ffff8800418b98c8 ffff88004941ee48 ffff880040c96c90 ffff880040c96c00 ffff880040c96c20 ffff880040c96c40 Call Trace: [] ? nfs4_do_reclaim+0x35/0x740 [] ? trace_hardirqs_on_caller+0x128/0x1b0 [] nfs4_run_state_manager+0x5ed/0xa40 [] ? nfs4_do_reclaim+0x740/0x740 [] ? nfs4_do_reclaim+0x740/0x740 [] kthread+0x101/0x120 [] ? trace_hardirqs_on_caller+0x128/0x1b0 [] ret_from_fork+0x1f/0x40 [] ? kthread_create_on_node+0x250/0x250 Code: 65 80 4c 8b b5 78 ff ff ff e8 fc 88 4c 00 48 8b 7d 88 e8 13 67 d2 ff 49 8b 47 40 a8 02 0f 84 d3 01 00 00 4c 89 ff e8 7f f9 ff ff 41 80 26 7f 48 8b 7d c8 e8 b1 84 4c 00 e9 39 fd ff ff 3d e6 RIP [] nfs4_do_reclaim+0x461/0x740 RSP CR2: ffff88004941ee40 Signed-off-by: Oleg Drokin Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker fs/nfs/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d2a7de0b34cd255f23d4b7a7f065677f4b1c15f2 Author: Trond Myklebust Date: Fri Jun 17 16:48:22 2016 -0400 NFS: Fix up O_DIRECT results if we read or wrote something, we must report it Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/direct.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit dd1beb3d16f6a10683b84b89a4644065c43910f3 Author: Trond Myklebust Date: Fri Jun 17 16:48:21 2016 -0400 NFS/pnfs: handle bad delegation stateids in nfs4_layoutget_handle_exception We must call nfs4_handle_exception() on BAD_STATEID errors. The only exception is if the stateid argument turns out to be a layout stateid that is declared invalid. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e5241e43883058b61a955b4bbd677fe4ffd3ae4e Author: Trond Myklebust Date: Fri Jun 17 16:48:20 2016 -0400 NFSv4.1/pnfs: Add sparse lock annotations for pnfs_find_alloc_layout Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/pnfs.c | 2 ++ 1 file changed, 2 insertions(+) commit 67a3b721462c9b3bdc36ad6a583f41706402b3ea Author: Trond Myklebust Date: Fri Jun 17 16:48:19 2016 -0400 NFSv4.1/pnfs: Layout stateids start out as being invalid Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/pnfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bc23676caf54c9b6e2521ef065dfddf6c50211de Author: Trond Myklebust Date: Fri Jun 17 16:48:18 2016 -0400 NFSv4.1/pnfs: Ensure we handle delegation errors in nfs4_proc_layoutget() nfs4_handle_exception() relies on the caller setting the 'inode' field in the struct nfs4_exception argument when the error applies to a delegation. Signed-off-by: Trond Myklebust Reviewed-by: Jeff Layton Signed-off-by: Anna Schumaker fs/nfs/nfs4proc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d5dbbe6569481bf12dcbe3e12cff72c5f78d272c Author: Takashi Iwai Date: Fri Jun 24 15:15:26 2016 +0200 ALSA: dummy: Fix a use-after-free at closing syzkaller fuzzer spotted a potential use-after-free case in snd-dummy driver when hrtimer is used as backend: > ================================================================== > BUG: KASAN: use-after-free in rb_erase+0x1b17/0x2010 at addr ffff88005e5b6f68 > Read of size 8 by task syz-executor/8984 > ============================================================================= > BUG kmalloc-192 (Not tainted): kasan: bad access detected > ----------------------------------------------------------------------------- > > Disabling lock debugging due to kernel taint > INFO: Allocated in 0xbbbbbbbbbbbbbbbb age=18446705582212484632 > .... > [< none >] dummy_hrtimer_create+0x49/0x1a0 sound/drivers/dummy.c:464 > .... > INFO: Freed in 0xfffd8e09 age=18446705496313138713 cpu=2164287125 pid=-1 > [< none >] dummy_hrtimer_free+0x68/0x80 sound/drivers/dummy.c:481 > .... > Call Trace: > [] __asan_report_load8_noabort+0x3e/0x40 mm/kasan/report.c:333 > [< inline >] rb_set_parent include/linux/rbtree_augmented.h:111 > [< inline >] __rb_erase_augmented include/linux/rbtree_augmented.h:218 > [] rb_erase+0x1b17/0x2010 lib/rbtree.c:427 > [] timerqueue_del+0x78/0x170 lib/timerqueue.c:86 > [] __remove_hrtimer+0x90/0x220 kernel/time/hrtimer.c:903 > [< inline >] remove_hrtimer kernel/time/hrtimer.c:945 > [] hrtimer_try_to_cancel+0x22a/0x570 kernel/time/hrtimer.c:1046 > [] hrtimer_cancel+0x22/0x40 kernel/time/hrtimer.c:1066 > [] dummy_hrtimer_stop+0x91/0xb0 sound/drivers/dummy.c:417 > [] dummy_pcm_trigger+0x17f/0x1e0 sound/drivers/dummy.c:507 > [] snd_pcm_do_stop+0x160/0x1b0 sound/core/pcm_native.c:1106 > [] snd_pcm_action_single+0x76/0x120 sound/core/pcm_native.c:956 > [] snd_pcm_action+0x231/0x290 sound/core/pcm_native.c:974 > [< inline >] snd_pcm_stop sound/core/pcm_native.c:1139 > [] snd_pcm_drop+0x12d/0x1d0 sound/core/pcm_native.c:1784 > [] snd_pcm_common_ioctl1+0xfae/0x2150 sound/core/pcm_native.c:2805 > [] snd_pcm_capture_ioctl1+0x2a1/0x5e0 sound/core/pcm_native.c:2976 > [] snd_pcm_kernel_ioctl+0x11c/0x160 sound/core/pcm_native.c:3020 > [] snd_pcm_oss_sync+0x3a4/0xa30 sound/core/oss/pcm_oss.c:1693 > [] snd_pcm_oss_release+0x1ad/0x280 sound/core/oss/pcm_oss.c:2483 > ..... A workaround is to call hrtimer_cancel() in dummy_hrtimer_sync() which is called certainly before other blocking ops. Reported-by: Dmitry Vyukov Tested-by: Dmitry Vyukov Cc: Signed-off-by: Takashi Iwai sound/drivers/dummy.c | 1 + 1 file changed, 1 insertion(+) commit 0f087ee3f3b86a4507db4ff1d2d5a3880e4cfd16 Author: Jaroslav Kysela Date: Fri Jun 24 15:13:16 2016 +0200 ALSA: hda / realtek - add two more Thinkpad IDs (5050,5053) for tpt460 fixup See: https://bugzilla.redhat.com/show_bug.cgi?id=1349539 See: https://bugzilla.kernel.org/show_bug.cgi?id=120961 Signed-off-by: Jaroslav Kysela Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 2 ++ 1 file changed, 2 insertions(+) commit d2bd05d88d245c13b64c3bf9c8927a1c56453d8c Author: Jan Beulich Date: Fri Jun 24 03:13:34 2016 -0600 xen-pciback: return proper values during BAR sizing Reads following writes with all address bits set to 1 should return all changeable address bits as one, not the BAR size (nor, as was the case for the upper half of 64-bit BARs, the high half of the region's end address). Presumably this didn't cause any problems so far because consumers use the value to calculate the size (usually via val & -val), and do nothing else with it. But also consider the exception here: Unimplemented BARs should always return all zeroes. And finally, the check for whether to return the sizing address on read for the ROM BAR should ignore all non-address bits, not just the ROM Enable one. Signed-off-by: Jan Beulich Reviewed-by: Boris Ostrovsky Signed-off-by: David Vrabel drivers/xen/xen-pciback/conf_space_header.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit f83c32925d45926cd0e0f18bf28e6039116c4486 Author: Woodrow Shen Date: Fri Jun 24 15:58:34 2016 +0800 ALSA: hda - Fix the headset mic jack detection on Dell machine The new Dell laptop with codec 3246 can't detect headset mic when headset was inserted on the machine. So adding pin configurations into quirk table makes headset mic work correctly. Codec: Realtek ALC3246 Vendor Id: 0x10ec0256 Subsystem Id: 0x10280781 Signed-off-by: Woodrow Shen Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+) commit 93a2001bdfd5376c3dc2158653034c20392d15c5 Author: Scott Bauer Date: Thu Jun 23 08:59:47 2016 -0600 HID: hiddev: validate num_values for HIDIOCGUSAGES, HIDIOCSUSAGES commands This patch validates the num_values parameter from userland during the HIDIOCGUSAGES and HIDIOCSUSAGES commands. Previously, if the report id was set to HID_REPORT_ID_UNKNOWN, we would fail to validate the num_values parameter leading to a heap overflow. Cc: stable@vger.kernel.org Signed-off-by: Scott Bauer Signed-off-by: Jiri Kosina drivers/hid/usbhid/hiddev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit feb245e304f343cf5e4f9123db36354144dce8a4 Author: Tejun Heo Date: Thu Jun 16 15:35:04 2016 -0400 sched/core: Allow kthreads to fall back to online && !active cpus During CPU hotplug, CPU_ONLINE callbacks are run while the CPU is online but not active. A CPU_ONLINE callback may create or bind a kthread so that its cpus_allowed mask only allows the CPU which is being brought online. The kthread may start executing before the CPU is made active and can end up in select_fallback_rq(). In such cases, the expected behavior is selecting the CPU which is coming online; however, because select_fallback_rq() only chooses from active CPUs, it determines that the task doesn't have any viable CPU in its allowed mask and ends up overriding it to cpu_possible_mask. CPU_ONLINE callbacks should be able to put kthreads on the CPU which is coming online. Update select_fallback_rq() so that it follows cpu_online() rather than cpu_active() for kthreads. Reported-by: Gautham R Shenoy Tested-by: Gautham R. Shenoy Signed-off-by: Tejun Heo Signed-off-by: Peter Zijlstra (Intel) Cc: Abdul Haleem Cc: Aneesh Kumar Cc: Linus Torvalds Cc: Michael Ellerman Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: kernel-team@fb.com Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20160616193504.GB3262@mtj.duckdns.org Signed-off-by: Ingo Molnar kernel/sched/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 754bd598be9bbc953bc709a9e8ed7f3188bfb9d7 Author: Konstantin Khlebnikov Date: Thu Jun 16 15:57:15 2016 +0300 sched/fair: Do not announce throttled next buddy in dequeue_task_fair() Hierarchy could be already throttled at this point. Throttled next buddy could trigger a NULL pointer dereference in pick_next_task_fair(). Signed-off-by: Konstantin Khlebnikov Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Ben Segall Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/146608183552.21905.15924473394414832071.stgit@buzz Signed-off-by: Ingo Molnar kernel/sched/fair.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 094f469172e00d6ab0a3130b0e01c83b3cf3a98d Author: Konstantin Khlebnikov Date: Thu Jun 16 15:57:01 2016 +0300 sched/fair: Initialize throttle_count for new task-groups lazily Cgroup created inside throttled group must inherit current throttle_count. Broken throttle_count allows to nominate throttled entries as a next buddy, later this leads to null pointer dereference in pick_next_task_fair(). This patch initialize cfs_rq->throttle_count at first enqueue: laziness allows to skip locking all rq at group creation. Lazy approach also allows to skip full sub-tree scan at throttling hierarchy (not in this patch). Signed-off-by: Konstantin Khlebnikov Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: bsegall@google.com Link: http://lkml.kernel.org/r/146608182119.21870.8439834428248129633.stgit@buzz Signed-off-by: Ingo Molnar kernel/sched/fair.c | 20 ++++++++++++++++++++ kernel/sched/sched.h | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) commit 4c5ea0a9cd02d6aa8adc86e100b2a4cff8d614ff Author: Paolo Bonzini Date: Tue Jun 21 18:52:17 2016 +0200 locking/static_key: Fix concurrent static_key_slow_inc() The following scenario is possible: CPU 1 CPU 2 static_key_slow_inc() atomic_inc_not_zero() -> key.enabled == 0, no increment jump_label_lock() atomic_inc_return() -> key.enabled == 1 now static_key_slow_inc() atomic_inc_not_zero() -> key.enabled == 1, inc to 2 return ** static key is wrong! jump_label_update() jump_label_unlock() Testing the static key at the point marked by (**) will follow the wrong path for jumps that have not been patched yet. This can actually happen when creating many KVM virtual machines with userspace LAPIC emulation; just run several copies of the following program: #include #include #include #include int main(void) { for (;;) { int kvmfd = open("/dev/kvm", O_RDONLY); int vmfd = ioctl(kvmfd, KVM_CREATE_VM, 0); close(ioctl(vmfd, KVM_CREATE_VCPU, 1)); close(vmfd); close(kvmfd); } return 0; } Every KVM_CREATE_VCPU ioctl will attempt a static_key_slow_inc() call. The static key's purpose is to skip NULL pointer checks and indeed one of the processes eventually dereferences NULL. As explained in the commit that introduced the bug: 706249c222f6 ("locking/static_keys: Rework update logic") jump_label_update() needs key.enabled to be true. The solution adopted here is to temporarily make key.enabled == -1, and use go down the slow path when key.enabled <= 0. Reported-by: Dmitry Vyukov Signed-off-by: Paolo Bonzini Signed-off-by: Peter Zijlstra (Intel) Cc: # v4.3+ Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 706249c222f6 ("locking/static_keys: Rework update logic") Link: http://lkml.kernel.org/r/1466527937-69798-1-git-send-email-pbonzini@redhat.com [ Small stylistic edits to the changelog and the code. ] Signed-off-by: Ingo Molnar include/linux/jump_label.h | 16 +++++++++++++--- kernel/jump_label.c | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 46 insertions(+), 6 deletions(-) commit 63c04ee7d3b7c8d8e2726cb7c5f8a5f6fcc1e3b2 Merge: 0bf0ea4 4ac1c17 Author: Linus Torvalds Date: Thu Jun 23 22:48:48 2016 -0700 Merge tag 'upstream-4.7-rc5' of git://git.infradead.org/linux-ubifs Pull UBI/UBIFS fixes from Richard Weinberger: "This contains fixes for two critical bugs in UBI and UBIFS: - fix the possibility of losing data upon a power cut when UBI tries to recover from a write error - fix page migration on UBIFS. It turned out that the default page migration function is not suitable for UBIFS" * tag 'upstream-4.7-rc5' of git://git.infradead.org/linux-ubifs: UBIFS: Implement ->migratepage() mm: Export migrate_page_move_mapping and migrate_page_copy ubi: Make recover_peb power cut aware gpio: make library immune to error pointers gpio: make sure gpiod_to_irq() returns negative on NULL desc gpio: 104-idi-48: Fix missing spin_lock_init for ack_lock commit a6b6befbb2806697461962edb044e3376a771ebb Author: Luis de Bethencourt Date: Wed Jun 8 17:02:32 2016 +0100 cifs: check hash calculating succeeded calc_lanman_hash() could return -ENOMEM or other errors, we should check that everything went fine before using the calculated key. Signed-off-by: Luis de Bethencourt Signed-off-by: Steve French fs/cifs/sess.c | 2 ++ 1 file changed, 2 insertions(+) commit b8da344b74c822e966c6d19d6b2321efe82c5d97 Author: Jerome Marchand Date: Thu May 26 11:52:25 2016 +0200 cifs: dynamic allocation of ntlmssp blob In sess_auth_rawntlmssp_authenticate(), the ntlmssp blob is allocated statically and its size is an "empirical" 5*sizeof(struct _AUTHENTICATE_MESSAGE) (320B on x86_64). I don't know where this value comes from or if it was ever appropriate, but it is currently insufficient: the user and domain name in UTF16 could take 1kB by themselves. Because of that, build_ntlmssp_auth_blob() might corrupt memory (out-of-bounds write). The size of ntlmssp_blob in SMB2_sess_setup() is too small too (sizeof(struct _NEGOTIATE_MESSAGE) + 500). This patch allocates the blob dynamically in build_ntlmssp_auth_blob(). Signed-off-by: Jerome Marchand Signed-off-by: Steve French CC: Stable fs/cifs/ntlmssp.h | 2 +- fs/cifs/sess.c | 76 ++++++++++++++++++++++++++++++------------------------- fs/cifs/smb2pdu.c | 10 ++------ 3 files changed, 45 insertions(+), 43 deletions(-) commit 202d772ba02b1deb8835a631cd8255943d1906a0 Author: Jerome Marchand Date: Thu May 26 11:52:24 2016 +0200 cifs: use CIFS_MAX_DOMAINNAME_LEN when converting the domain name Currently in build_ntlmssp_auth_blob(), when converting the domain name to UTF16, CIFS_MAX_USERNAME_LEN limit is used. It should be CIFS_MAX_DOMAINNAME_LEN. This patch fixes this. Signed-off-by: Jerome Marchand Signed-off-by: Steve French fs/cifs/sess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d22462ae915743f3be5bf1ab3d4a6b72c2bb6c9 Author: Jeff Layton Date: Tue May 24 06:27:44 2016 -0400 cifs: stuff the fl_owner into "pid" field in the lock request Right now, we send the tgid cross the wire. What we really want to send though is a hashed fl_owner_t since samba treats this field as a generic lockowner. It turns out that because we enforce and release locks locally before they are ever sent to the server, this patch makes no difference in behavior. Still, setting OFD locks on the server using the process pid seems wrong, so I think this patch still makes sense. Signed-off-by: Jeff Layton Signed-off-by: Steve French Acked-by: Pavel Shilovsky Acked-by: Sachin Prabhu fs/cifs/cifsfs.c | 3 +++ fs/cifs/cifsglob.h | 1 + fs/cifs/file.c | 14 +++++++++++--- 3 files changed, 15 insertions(+), 3 deletions(-) commit 0bf0ea431f84bcf34facc5b1f792d000f5957565 Merge: 75befb3 81e257e Author: Linus Torvalds Date: Thu Jun 23 21:35:12 2016 -0700 Merge tag 'drm-fixes-for-v4.7-rc5' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This is the drm fixes tree for 4.7-rc5. It's a bit larger than normal, due to fixes for production AMD Polaris GPUs. We only merged support for these in 4.7-rc1 so it would be good if we got all the fixes into final. The changes don't hit any other hardware. Other than the amdgpu Polaris changes: - A single fix for atomic modesetting WARN - Nouveau fix for when fbdev is disabled - i915 fixes for FBC on Haswell and displayport regression - Exynos fix for a display panel regression and some other minor changes - Atmel fixes for scaling and OF graph interaction - Allwiinner build, warning and probing fixes - AMD GPU non-polaris fix for num_rbs and some minor fixes Also I've just moved house, and my new place is Internet challenged due to incompetent incumbent ISPs, hopefully sorted out in a couple of weeks, so I might not be too responsive over the next while. It also helps Daniel is on holidays for those couple of weeks as well" * tag 'drm-fixes-for-v4.7-rc5' of git://people.freedesktop.org/~airlied/linux: (38 commits) drm/atomic: Make drm_atomic_legacy_backoff reset crtc->acquire_ctx drm/nouveau: fix for disabled fbdev emulation drm/i915/fbc: Disable on HSW by default for now drm/i915: Revert DisplayPort fast link training feature drm/amd/powerplay: enable clock stretch feature for polaris drm/amdgpu/gfx8: update golden setting for polaris10 drm/amd/powerplay: enable avfs feature for polaris drm/amdgpu/atombios: add avfs struct for Polaris10/11 drm/amd/powerplay: add avfs related define for polaris drm/amd/powrplay: enable stutter_mode for polaris. drm/amd/powerplay: disable UVD SMU handshake for MCLK. drm/amd/powerplay: initialize variables which were missed. drm/amd/powerplay: enable PowerContainment feature for polaris10/11. drm/amd/powerplay: need to notify system bios pcie device ready drm/amd/powerplay: fix bug that function parameter was incorect. drm/amd/powerplay: fix logic error. drm: atmel-hlcdc: Fix OF graph parsing drm: atmel-hlcdc: actually disable scaling when no scaling is required drm/amdgpu: initialize amdgpu_cgs_acpi_eval_object result value drm/amdgpu: precedence bug in amdgpu_device_init() ... commit 75befb31ec3cfc74bc502b034b67cc07e1eac6f7 Merge: da01e18 ef0dab4 Author: Linus Torvalds Date: Thu Jun 23 20:59:14 2016 -0700 Merge tag 'pci-v4.7-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI fix from Bjorn Helgaas: "Here's a small fix for v4.7. This problem was actually introduced in v4.6 when we unified Kconfig, making PCIe support available everywhere including sparc, where config reads into unaligned buffers cause warnings. This fix is from Dave Miller. As a reminder, any future PCI fixes for v4.7 will probably come from Alex Williamson, since I'll be on vacation for most of the rest of this cycle. I should be back about the time the merge window opens" * tag 'pci-v4.7-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: PCI: Fix unaligned accesses in VC code commit 81e257e964268d050f8e9188becd44d50f241d72 Author: Maarten Lankhorst Date: Thu Jun 23 13:45:06 2016 +0200 drm/atomic: Make drm_atomic_legacy_backoff reset crtc->acquire_ctx Atomic updates may acquire more state than initially locked through drm_modeset_lock_crtc, running with heavy stress can cause a WARN_ON(crtc->acquire_ctx) in drm_modeset_lock_crtc: [ 601.491296] ------------[ cut here ]------------ [ 601.491366] WARNING: CPU: 0 PID: 2411 at drivers/gpu/drm/drm_modeset_lock.c:191 drm_modeset_lock_crtc+0xeb/0xf0 [drm] [ 601.491369] Modules linked in: drm i915 drm_kms_helper [ 601.491414] CPU: 0 PID: 2411 Comm: kms_cursor_lega Tainted: G U 4.7.0-rc4-patser+ #4798 [ 601.491417] Hardware name: Intel Corporation Skylake Client [ 601.491420] 0000000000000000 ffff88044d153c98 ffffffff812ead28 0000000000000000 [ 601.491425] 0000000000000000 ffff88044d153cd8 ffffffff810868e6 000000bf58058030 [ 601.491431] ffff880088b415e8 ffff880458058030 ffff88008a271548 ffff88008a271568 [ 601.491436] Call Trace: [ 601.491443] [] dump_stack+0x4d/0x65 [ 601.491447] [] __warn+0xc6/0xe0 [ 601.491452] [] warn_slowpath_null+0x18/0x20 [ 601.491472] [] drm_modeset_lock_crtc+0xeb/0xf0 [drm] [ 601.491491] [] drm_mode_cursor_common+0x66/0x180 [drm] [ 601.491509] [] drm_mode_cursor_ioctl+0x3c/0x40 [drm] [ 601.491524] [] drm_ioctl+0x14d/0x530 [drm] [ 601.491540] [] ? drm_mode_setcrtc+0x520/0x520 [drm] [ 601.491545] [] ? handle_mm_fault+0x106b/0x1430 [ 601.491550] [] ? stop_one_cpu+0x61/0x70 [ 601.491556] [] do_vfs_ioctl+0x8d/0x570 [ 601.491560] [] ? security_file_ioctl+0x3e/0x60 [ 601.491565] [] SyS_ioctl+0x74/0x80 [ 601.491571] [] ? posix_get_monotonic_raw+0xc/0x10 [ 601.491576] [] entry_SYSCALL_64_fastpath+0x13/0x8f [ 601.491581] ---[ end trace 56f3d3d85f000d00 ]--- For good measure, test mode_config.acquire_ctx too, although this should never happen. Testcase: kms_cursor_legacy Signed-off-by: Maarten Lankhorst Reviewed-by: Daniel Vetter Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie drivers/gpu/drm/drm_atomic.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit f939a5f432981872f89d4dfe506e959f49cc161a Merge: c65c3de 270d013 Author: Dave Airlie Date: Fri Jun 24 10:51:12 2016 +1000 Merge branch 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes A bit bigger than I would normally like, but most of the large changes are for polaris support and since polaris went upstream in 4.7, I'd like to get the fixes in so it's in good shape when the hw becomes available. The major changes only touch the polaris code so there is little chance for regressions on other asics. The rest are just the usual collection of bug fixes. * 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: enable clock stretch feature for polaris drm/amdgpu/gfx8: update golden setting for polaris10 drm/amd/powerplay: enable avfs feature for polaris drm/amdgpu/atombios: add avfs struct for Polaris10/11 drm/amd/powerplay: add avfs related define for polaris drm/amd/powrplay: enable stutter_mode for polaris. drm/amd/powerplay: disable UVD SMU handshake for MCLK. drm/amd/powerplay: initialize variables which were missed. drm/amd/powerplay: enable PowerContainment feature for polaris10/11. drm/amd/powerplay: need to notify system bios pcie device ready drm/amd/powerplay: fix bug that function parameter was incorect. drm/amd/powerplay: fix logic error. drm/amdgpu: initialize amdgpu_cgs_acpi_eval_object result value drm/amdgpu: precedence bug in amdgpu_device_init() drm/amdgpu: fix num_rbs exposed to userspace (v2) drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state() commit 1ee6667cd8d183b2fed12f97285f184431d2caf9 Author: Dan Williams Date: Thu Jun 23 17:50:39 2016 -0700 libnvdimm, pfn, dax: fix initialization vs autodetect for mode + alignment The updated ndctl unit tests discovered that if a pfn configuration with a 4K alignment is read from the namespace, that alignment will be ignored in favor of the default 2M alignment. The result is that the configuration will fail initialization with a message like: dax6.1: bad offset: 0x22000 dax disabled align: 0x200000 Fix this by allowing the alignment read from the info block to override the default which is 2M not 0 in the autodetect path. This also fixes a similar problem with the mode and alignment settings silently being overwritten by the kernel when userspace has changed it. We now will either overwrite the info block if userspace changes the uuid or fail and warn if a live setting disagrees with the info block. Cc: Cc: Micah Parrish Cc: Toshi Kani Signed-off-by: Dan Williams drivers/nvdimm/pfn_devs.c | 51 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 11 deletions(-) commit 60842ef8128e7bf58c024814cd0dc14319232b6c Author: Sinclair Yeh Date: Thu Jun 23 17:37:34 2016 -0700 Input: vmmouse - remove port reservation The VMWare EFI BIOS will expose port 0x5658 as an ACPI resource. This causes the port to be reserved by the APCI module as the system comes up, making it unavailable to be reserved again by other drivers, thus preserving this VMWare port for special use in a VMWare guest. This port is designed to be shared among multiple VMWare services, such as the VMMOUSE. Because of this, VMMOUSE should not try to reserve this port on its own. The VMWare non-EFI BIOS does not do this to preserve compatibility with existing/legacy VMs. It is known that there is small chance a VM may be configured such that these ports get reserved by other non-VMWare devices, and if this ever happens, the result is undefined. Signed-off-by: Sinclair Yeh Reviewed-by: Thomas Hellstrom Cc: # 4.1- Signed-off-by: Dmitry Torokhov drivers/input/mouse/vmmouse.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit c65c3de673785c58c33e9d3f8d1203ba30efb595 Merge: 59b0b70 41abbf5 Author: Dave Airlie Date: Fri Jun 24 10:35:03 2016 +1000 Merge branch 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes Since HW trigger mode was suppoted we have faced with a issue that Display panel didn't work correctly when trigger mode was changed in booting time. For this, we keep trigger mode with SW trigger mode in default mode like we did before. However, we will need to consider PSR(Panel Self Reflash) mode to resolve this issue fundamentally later. * 'exynos-drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: use logical AND in exynos_drm_plane_check_size() drm/exynos: remove superfluous inclusions of fbdev header drm/exynos: g2d: drop the _REG postfix from the stride defines drm/exynos: don't use HW trigger for Exynos5420/5422/5800 drm/exynos: fimd: don't set .has_hw_trigger in s3c6400 driver data drm/exynos: dp: Fix NULL pointer dereference due uninitialized connector commit 59b0b70f51c1d7f22cdc4f8905cad15f19ed60ff Merge: f762bfd 0b1e1eb Author: Dave Airlie Date: Fri Jun 24 10:34:49 2016 +1000 Merge tag 'drm-atmel-hlcdc-fixes/for-4.7-rc5' of github.com:bbrezillon/linux-at91 into drm-fixes Two bug fixes for the atmel-hlcdc driver. * tag 'drm-atmel-hlcdc-fixes/for-4.7-rc5' of github.com:bbrezillon/linux-at91: drm: atmel-hlcdc: Fix OF graph parsing drm: atmel-hlcdc: actually disable scaling when no scaling is required commit f762bfda2b81db4c3397a31e92f819818cf04efb Merge: c38e801 13fef09 Author: Dave Airlie Date: Fri Jun 24 10:34:35 2016 +1000 Merge tag 'sunxi-drm-fixes-for-4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into drm-fixes Allwinner sun4i DRM driver fixes A bunch of fixes that address: - Compilation errors in various corner cases - Move to helpers - Fix the pixel clock computation - Fix our panel probe * tag 'sunxi-drm-fixes-for-4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: drm: sun4i: do cleanup if RGB output init fails drm/sun4i: Convert to connector register helpers drm/sun4i: remove simplefb at probe drm/sun4i: rgb: panel is an error pointer drm/sun4i: defer only if we didn't find our panel drm/sun4i: rgb: Validate the clock rate drm/sun4i: request exact rates to our parents drm: sun4i: fix probe error handling drm: sun4i: print DMA address correctly drm/sun4i: add COMMON_CLK dependency commit c38e80169befdea4a9438cc6c513794d7c50e88f Merge: 718cc66 1e3fa0a Author: Dave Airlie Date: Fri Jun 24 10:32:30 2016 +1000 Merge tag 'drm-intel-fixes-2016-06-22' of git://anongit.freedesktop.org/drm-intel into drm-fixes Hi Dave, just a couple of display fixes, both stable stuff. Maybe we'll be able to enable fbc by default one day. * tag 'drm-intel-fixes-2016-06-22' of git://anongit.freedesktop.org/drm-intel: drm/i915/fbc: Disable on HSW by default for now drm/i915: Revert DisplayPort fast link training feature commit 718cc664792c4ce436f221fe0e0a26a605308d4b Merge: 33688ab 52dfcc5 Author: Dave Airlie Date: Fri Jun 24 10:16:37 2016 +1000 Merge branch 'linux-4.7' of git://github.com/skeggsb/linux into drm-fixes * 'linux-4.7' of git://github.com/skeggsb/linux: drm/nouveau: fix for disabled fbdev emulation commit 52dfcc5ccfbb6697ac3cac7f7ff1e712760e1216 Author: Dmitrii Tcvetkov Date: Mon Jun 20 13:52:14 2016 +0300 drm/nouveau: fix for disabled fbdev emulation Hello, after this commit: commit f045f459d925138fe7d6193a8c86406bda7e49da Author: Ben Skeggs Date: Thu Jun 2 12:23:31 2016 +1000 drm/nouveau/fbcon: fix out-of-bounds memory accesses kernel started to oops when loading nouveau module when using GTX 780 Ti video adapter. This patch fixes the problem. Bug report: https://bugzilla.kernel.org/show_bug.cgi?id=120591 Signed-off-by: Dmitrii Tcvetkov Suggested-by: Ilia Mirkin Fixes: f045f459d925 ("nouveau_fbcon_init()") Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nouveau_fbcon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 82d6489d0fed2ec8a8c48c19e8d8a04ac8e5bb26 Author: Daniel Bristot de Oliveira Date: Wed Jun 22 17:28:41 2016 -0300 cgroup: Disable IRQs while holding css_set_lock While testing the deadline scheduler + cgroup setup I hit this warning. [ 132.612935] ------------[ cut here ]------------ [ 132.612951] WARNING: CPU: 5 PID: 0 at kernel/softirq.c:150 __local_bh_enable_ip+0x6b/0x80 [ 132.612952] Modules linked in: (a ton of modules...) [ 132.612981] CPU: 5 PID: 0 Comm: swapper/5 Not tainted 4.7.0-rc2 #2 [ 132.612981] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.2-20150714_191134- 04/01/2014 [ 132.612982] 0000000000000086 45c8bb5effdd088b ffff88013fd43da0 ffffffff813d229e [ 132.612984] 0000000000000000 0000000000000000 ffff88013fd43de0 ffffffff810a652b [ 132.612985] 00000096811387b5 0000000000000200 ffff8800bab29d80 ffff880034c54c00 [ 132.612986] Call Trace: [ 132.612987] [] dump_stack+0x63/0x85 [ 132.612994] [] __warn+0xcb/0xf0 [ 132.612997] [] ? push_dl_task.part.32+0x170/0x170 [ 132.612999] [] warn_slowpath_null+0x1d/0x20 [ 132.613000] [] __local_bh_enable_ip+0x6b/0x80 [ 132.613008] [] _raw_write_unlock_bh+0x1a/0x20 [ 132.613010] [] _raw_spin_unlock_bh+0xe/0x10 [ 132.613015] [] put_css_set+0x5c/0x60 [ 132.613016] [] cgroup_free+0x7f/0xa0 [ 132.613017] [] __put_task_struct+0x42/0x140 [ 132.613018] [] dl_task_timer+0xca/0x250 [ 132.613027] [] ? push_dl_task.part.32+0x170/0x170 [ 132.613030] [] __hrtimer_run_queues+0xee/0x270 [ 132.613031] [] hrtimer_interrupt+0xa8/0x190 [ 132.613034] [] local_apic_timer_interrupt+0x38/0x60 [ 132.613035] [] smp_apic_timer_interrupt+0x3d/0x50 [ 132.613037] [] apic_timer_interrupt+0x8c/0xa0 [ 132.613038] [] ? native_safe_halt+0x6/0x10 [ 132.613043] [] default_idle+0x1e/0xd0 [ 132.613044] [] arch_cpu_idle+0xf/0x20 [ 132.613046] [] default_idle_call+0x2a/0x40 [ 132.613047] [] cpu_startup_entry+0x2e7/0x340 [ 132.613048] [] start_secondary+0x155/0x190 [ 132.613049] ---[ end trace f91934d162ce9977 ]--- The warn is the spin_(lock|unlock)_bh(&css_set_lock) in the interrupt context. Converting the spin_lock_bh to spin_lock_irq(save) to avoid this problem - and other problems of sharing a spinlock with an interrupt. Cc: Tejun Heo Cc: Li Zefan Cc: Johannes Weiner Cc: Juri Lelli Cc: Steven Rostedt Cc: cgroups@vger.kernel.org Cc: stable@vger.kernel.org # 4.5+ Cc: linux-kernel@vger.kernel.org Reviewed-by: Rik van Riel Reviewed-by: "Luis Claudio R. Goncalves" Signed-off-by: Daniel Bristot de Oliveira Acked-by: Zefan Li Signed-off-by: Tejun Heo kernel/cgroup.c | 142 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 74 insertions(+), 68 deletions(-) commit 0d37189e80163c653771916afe28fae1a8d14daa Author: Chanwoo Choi Date: Thu Jun 23 11:18:43 2016 +0900 PM / devfreq: Send the DEVFREQ_POSTCHANGE notification when target() is failed This patch sends the DEVFREQ_POSTCHANGE notification when devfreq->profile->targer() is failed. The PRECHANGE/POSTCHANGE should be paired. Fixes: 0fe3a66410a3 (PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier) Reported-by: Lin Huang Signed-off-by: Chanwoo Choi Signed-off-by: Rafael J. Wysocki drivers/devfreq/devfreq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3c67a829bd45f99b5c03580bb898c99fcc023356 Author: Mike Galbraith Date: Thu Jun 23 08:45:42 2016 +0200 cpufreq: pcc-cpufreq: Fix doorbell.access_width Commit 920de6ebfab8 (ACPICA: Hardware: Enhance acpi_hw_validate_register() with access_width/bit_offset awareness) apparently exposed a latent bug, doorbell.access_width is initialized to 64, but per Lv Zheng, it should be 4, and indeed, making that change does bring pcc-cpufreq back to life. Fixes: 920de6ebfab8 (ACPICA: Hardware: Enhance acpi_hw_validate_register() with access_width/bit_offset awareness) Suggested-by: Lv Zheng Signed-off-by: Mike Galbraith Signed-off-by: Rafael J. Wysocki drivers/cpufreq/pcc-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 226ba707744a51acb4244724e09caacb1d96aed9 Author: Dmitry Torokhov Date: Tue Jun 21 16:09:00 2016 -0700 Input: elantech - add more IC body types to the list The touchpad in HP Pavilion 14-ab057ca reports it's version as 12 and according to Elan both 11 and 12 are valid IC types and should be identified as hw_version 4. Reported-by: Patrick Lessard Tested-by: Patrick Lessard Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/mouse/elantech.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 9e72ac7492149a229ce9039c680849cb682d7092 Author: Ping Cheng Date: Thu Jun 23 10:55:11 2016 -0700 Input: wacom_w8001 - ignore invalid pen data packets ThinkPad X60 Tablet PC (pen only device) sometime posts packets that are larger than W8001_PKTLEN_TPCPEN. Reported-by: Chris J Arges Tested-by: Chris J Arges Signed-off-by: Ping Cheng Reviewed-by: Peter Hutterer Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/wacom_w8001.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c40e4096bf0a12a76c349cbc4d1b2aa40a3d68cd Author: Or Gerlitz Date: Tue Jun 21 16:36:06 2016 +0300 MAINTAINERS: Update Mellanox's mlx4 Eth NIC driver entry Tariq Toukan is replacing Eugenia (Jenny) Emantayev as the mlx4 Ethernet driver maintainer, thanks to Jenny and good luck to him. Signed-off-by: Or Gerlitz Signed-off-by: David S. Miller MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00e8cb00bc72f5279fde9d014b47f36dc4805dd8 Merge: efeb226 034fdd4 Author: David S. Miller Date: Thu Jun 23 15:22:31 2016 -0400 Merge tag 'wireless-drivers-for-davem-2016-06-21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.7 iwlwifi * fix the scan timeout for long scans * fix an RCU splat caused when updating the TKIP key * fix a potential NULL-derefence introduced recently * fix a IGTK key bug that has existed since the MVM driver was introduced * fix some fw capabilities checks that got accidentally inverted rtl8xxxu * fix typo on variable name ath10k * fix deadlock when peer cannot be created * fix crash related to printing features * fix deadlock while processing rx_in_ord_ind ath9k * fix GPIO mask regression for AR9462 and AR9565 ==================== Signed-off-by: David S. Miller commit da01e18a37a57f360222d3a123b8f6994aa1ad14 Author: Linus Torvalds Date: Thu Jun 23 12:20:01 2016 -0700 x86: avoid avoid passing around 'thread_info' in stack dumping code None of the code actually wants a thread_info, it all wants a task_struct, and it's just converting to a thread_info pointer much too early. No semantic change. Signed-off-by: Linus Torvalds arch/x86/include/asm/stacktrace.h | 6 +++--- arch/x86/kernel/dumpstack.c | 22 ++++++++++------------ arch/x86/kernel/dumpstack_32.c | 4 +--- arch/x86/kernel/dumpstack_64.c | 8 +++----- 4 files changed, 17 insertions(+), 23 deletions(-) commit efeb2267bba8aa893afdadfc9bae4790777c600c Author: Haishuang Yan Date: Tue Jun 21 16:26:49 2016 +0800 geneve: fix tx_errors statistics Tx errors present summation of errors encountered while transmitting packets. Signed-off-by: Haishuang Yan Signed-off-by: David S. Miller drivers/net/geneve.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 52fe705b493d40b472b9e7220a71bdca8537c6b2 Author: Chris Packham Date: Tue Jun 21 15:39:43 2016 +1200 net: vrf: replace hard tab with space in assignment The assignment of rth->dst.output in vrf_rt6_create() and vrf_rtable_create() used a hard tab before the '='. The neighboring assignments did not. Make the assignment of rth->dst.output consistent with the surrounding code. Signed-off-by: Chris Packham Acked-by: David Ahern Signed-off-by: David S. Miller drivers/net/vrf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6720a305df74ca30bcc10fc316881641b6ff0c80 Author: Linus Torvalds Date: Thu Jun 23 12:11:17 2016 -0700 locking: avoid passing around 'thread_info' in mutex debugging code None of the code actually wants a thread_info, it all wants a task_struct, and it's just converting back and forth between the two ("ti->task" to get the task_struct from the thread_info, and "task_thread_info(task)" to go the other way). No semantic change. Acked-by: Peter Zijlstra Signed-off-by: Linus Torvalds kernel/locking/mutex-debug.c | 12 ++++++------ kernel/locking/mutex-debug.h | 4 ++-- kernel/locking/mutex.c | 6 +++--- kernel/locking/mutex.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) commit 21de12ee5568fd1aec47890c72967abf791ac80a Author: Eric Dumazet Date: Mon Jun 20 15:00:43 2016 -0700 netem: fix a use after free If the packet was dropped by lower qdisc, then we must not access it later. Save qdisc_pkt_len(skb) in a temp variable. Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Signed-off-by: Eric Dumazet Cc: WANG Cong Cc: Jamal Hadi Salim Cc: Stephen Hemminger Signed-off-by: David S. Miller net/sched/sch_netem.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 12afb34400eb2b301f06b2aa3535497d14faee59 Author: Ping Cheng Date: Thu Jun 23 10:54:17 2016 -0700 Input: wacom_w8001 - w8001_MAX_LENGTH should be 13 Somehow the patch that added two-finger touch support forgot to update W8001_MAX_LENGTH from 11 to 13. Signed-off-by: Ping Cheng Reviewed-by: Peter Hutterer Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/touchscreen/wacom_w8001.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0812a945fbb814e7946fbe6ddcc81d054c8b6c91 Author: Rex Zhu Date: Wed Jun 22 21:00:09 2016 +0800 drm/amd/powerplay: Update CKS on/ CKS off voltage offset calculation CKS on/off voltage offset calculation algorithm takes in a few coefficients. We need to update them for polaris to latest coefficients to align with BB. Signed-off-by: Rex Zhu Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) commit 83a7af6dcfd2d84066c6d19bf2bd837f7be4a5ca Author: Rex Zhu Date: Thu Jun 23 11:05:00 2016 +0800 drm/amd/powerplay: disable FFC. SMC need use VBI signal for MCLK switching Send 2 x frame time as vbi timeout Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 26 +++++++++++++++++----- .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 ++ 3 files changed, 24 insertions(+), 5 deletions(-) commit 02bae045f3b3bc5681f075be0a8b1313147d1df2 Author: Rex Zhu Date: Thu Jun 23 10:58:26 2016 +0800 drm/amd/powerplay: add some definition for FFC feature on polaris. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/polaris10_ppsmc.h | 2 ++ drivers/gpu/drm/amd/powerplay/inc/smu74_discrete.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit b7f67055d2df9b8f68f02e49d256ee3973999bd2 Author: Chandan Rajendra Date: Thu Jun 23 15:16:44 2016 +0530 Btrfs: Force stripesize to the value of sectorsize Btrfs code currently assumes stripesize to be same as sectorsize. However Btrfs-progs (until commit df05c7ed455f519e6e15e46196392e4757257305) has been setting btrfs_super_block->stripesize to a value of 4096. This commit makes sure that the value of btrfs_super_block->stripesize is a power of 2. Later, it unconditionally sets btrfs_root->stripesize to sectorsize. Signed-off-by: Chandan Rajendra Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/disk-io.c | 6 ++---- fs/btrfs/volumes.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) commit c0d2f6104e8ab2eb75e58e72494ad4b69c5227f8 Author: Wang Xiaoguang Date: Wed Jun 22 09:57:01 2016 +0800 btrfs: fix disk_i_size update bug when fallocate() fails When doing truncate operation, btrfs_setsize() will first call truncate_setsize() to set new inode->i_size, but if later btrfs_truncate() fails, btrfs_setsize() will call "i_size_write(inode, BTRFS_I(inode)->disk_i_size)" to reset the inmemory inode size, now bug occurs. It's because for truncate case btrfs_ordered_update_i_size() directly uses inode->i_size to update BTRFS_I(inode)->disk_i_size, indeed we should use the "offset" argument to update disk_i_size. Here is the call graph: ==>btrfs_truncate() ====>btrfs_truncate_inode_items() ======>btrfs_ordered_update_i_size(inode, last_size, NULL); Here btrfs_ordered_update_i_size()'s offset argument is last_size. And below test case can reveal this bug: dd if=/dev/zero of=fs.img bs=$((1024*1024)) count=100 dev=$(losetup --show -f fs.img) mkdir -p /mnt/mntpoint mkfs.btrfs -f $dev mount $dev /mnt/mntpoint cd /mnt/mntpoint echo "workdir is: /mnt/mntpoint" blocksize=$((128 * 1024)) dd if=/dev/zero of=testfile bs=$blocksize count=1 sync count=$((17*1024*1024*1024/blocksize)) echo "file size is:" $((count*blocksize)) for ((i = 1; i <= $count; i++)); do i=$((i + 1)) dst_offset=$((blocksize * i)) xfs_io -f -c "reflink testfile 0 $dst_offset $blocksize"\ testfile > /dev/null done sync truncate --size 0 testfile ls -l testfile du -sh testfile exit In this case, truncate operation will fail for enospc reason and "du -sh testfile" returns value greater than 0, but testfile's size is 0, we need to reflect correct inode->i_size. Signed-off-by: Wang Xiaoguang Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/ordered-data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 415b35a55b57a701afe7391d32a6bb0193b7d3da Author: Liu Bo Date: Fri Jun 17 19:16:21 2016 -0700 Btrfs: fix error handling in map_private_extent_buffer map_private_extent_buffer() can return -EINVAL in two different cases, 1. when the requested contents span two pages if nodesize is larger than pagesize, 2. when it detects something insane. The 2nd one used to be only a WARN_ON(1), and we decided to return a error to callers, but we didn't fix up all its callers, which will be addressed by this patch. Without this, btrfs may end up with 'general protection', ie. reading invalid memory. Reported-by: Vegard Nossum Signed-off-by: Liu Bo Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/ctree.c | 6 +++++- fs/btrfs/extent_io.c | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) commit 04e1b65af2085d4102b2b5d2fd1e050f8ee63092 Author: Wei Yongjun Date: Fri Jun 17 17:20:40 2016 +0000 Btrfs: fix error return code in btrfs_init_test_fs() Fix to return a negative error code from the kern_mount() error handling case instead of 0(ret is set to 0 by register_filesystem), as done elsewhere in this function. Signed-off-by: Wei Yongjun Reviewed-by: Omar Sandoval Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/tests/btrfs-tests.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c7f1429389ec1aa25e042bb13451385fbb596f8c Author: Cameron Gutman Date: Thu Jun 23 10:24:42 2016 -0700 Input: xpad - fix oops when attaching an unknown Xbox One gamepad Xbox One controllers have multiple interfaces which all have the same class, subclass, and protocol. One of the these interfaces has only a single endpoint. When Xpad attempts to bind to this interface, it causes an oops when trying initialize the output URB by trying to access the second endpoint's descriptor. This situation was avoided for known Xbox One devices by checking the XTYPE constant associated with the VID and PID tuple. However, this breaks when new or previously unknown Xbox One controllers are attached to the system. This change addresses the problem by deriving the XTYPE for Xbox One controllers based on the interface protocol before checking the interface number. Fixes: 1a48ff81b391 ("Input: xpad - add support for Xbox One controllers") Signed-off-by: Cameron Gutman Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov drivers/input/joystick/xpad.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 33cdcee04be3b4482be97393167e7561b2584e1e Author: Boris Brezillon Date: Wed Jun 22 09:25:14 2016 +0200 pwm: Fix pwm_apply_args() Commit 5ec803edcb70 ("pwm: Add core infrastructure to allow atomic updates"), implemented pwm_disable() as a wrapper around pwm_apply_state(), and then, commit ef2bf4997f7d ("pwm: Improve args checking in pwm_apply_state()") added missing checks on the ->period value in pwm_apply_state() to ensure we were not passing inappropriate values to the ->config() or ->apply() methods. The conjunction of these 2 commits led to a case where pwm_disable() was no longer succeeding, thus preventing the polarity setting done in pwm_apply_args(). Set a valid period in pwm_apply_args() to ensure polarity setting won't be rejected. Signed-off-by: Boris Brezillon Reported-by: Geert Uytterhoeven Suggested-by: Brian Norris Fixes: 5ec803edcb70 ("pwm: Add core infrastructure to allow atomic updates") Tested-by: Geert Uytterhoeven Reviewed-by: Brian Norris Signed-off-by: Thierry Reding include/linux/pwm.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 9903fd1374e913f5086b58af09d4e3fd6e9e86fe Merge: c0cf451 c755f4a 7748e49 cbc9355 Author: Doug Ledford Date: Thu Jun 23 12:22:33 2016 -0400 Merge branches '4.7-rc-misc', 'hfi1-fixes', 'i40iw-rc-fixes' and 'mellanox-rc-fixes' into k.o/for-4.7-rc commit c0cf4512a31eb3cec70b066bc36ed55f7d05b8c0 Author: Bart Van Assche Date: Thu Jun 23 09:35:48 2016 +0200 IB/srpt: Reduce QP buffer size The memory needed for the send and receive queues associated with a QP is proportional to the max_sge parameter. The current value of that parameter is such that with an mlx4 HCA the QP buffer size is 8 MB. Since DMA is used for communication between HCA and CPU that buffer either has to be allocated coherently or map_single() must succeed for that buffer. Since large contiguous allocations are fragile and since the maximum segment size for e.g. swiotlb is 256 KB, reduce the max_sge parameter. This patch avoids that the following text appears on the console after SRP logout and relogin on a system equipped with multiple IB HCAs: mlx4_core 0000:05:00.0: swiotlb buffer is full (sz: 8388608 bytes) swiotlb: coherent allocation failed for device 0000:05:00.0 size=8388608 CPU: 11 PID: 148 Comm: kworker/11:1 Not tainted 4.7.0-rc4-dbg+ #1 Call Trace: [] dump_stack+0x67/0x92 [] swiotlb_alloc_coherent+0x141/0x150 [] x86_swiotlb_alloc_coherent+0x3e/0x50 [] mlx4_buf_direct_alloc.isra.5+0x9a/0x120 [mlx4_core] [] mlx4_buf_alloc+0x165/0x1a0 [mlx4_core] [] create_qp_common.isra.29+0x57d/0xff0 [mlx4_ib] [] mlx4_ib_create_qp+0x12a/0x3f0 [mlx4_ib] [] ib_create_qp+0x3a/0x250 [ib_core] [] srpt_cm_handler+0x4bb/0xcad [ib_srpt] [] cm_process_work+0x20/0xf0 [ib_cm] [] cm_work_handler+0x1ac0/0x2059 [ib_cm] [] process_one_work+0x19d/0x490 [] worker_thread+0x49/0x490 [] kthread+0xea/0x100 [] ret_from_fork+0x1f/0x40 Fixes: b99f8e4d7bcd ("IB/srpt: convert to the generic RDMA READ/WRITE API") Signed-off-by: Bart Van Assche Cc: Laurence Oberman Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/ulp/srpt/ib_srpt.c | 3 +-- drivers/infiniband/ulp/srpt/ib_srpt.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) commit 817e9f2c5c262b2716f5d77020d118ad53315f3e Author: WANG Cong Date: Mon Jun 20 13:37:19 2016 -0700 act_ife: acquire ife_mod_lock before reading ifeoplist Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_ife.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit 067a7cd06f7bf860f2e3415394b065b9a0983802 Author: WANG Cong Date: Mon Jun 20 13:37:18 2016 -0700 act_ife: only acquire tcf_lock for existing actions Alexey reported that we have GFP_KERNEL allocation when holding the spinlock tcf_lock. Actually we don't have to take that spinlock for all the cases, especially for the new one we just create. To modify the existing actions, we still need this spinlock to make sure the whole update is atomic. For net-next, we can get rid of this spinlock because we already hold the RTNL lock on slow path, and on fast path we can use RCU to protect the metalist. Joint work with Jamal. Reported-by: Alexey Khoroshilov Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller include/net/tc_act/tc_ife.h | 6 ++--- net/sched/act_ife.c | 55 +++++++++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 27 deletions(-) commit 962fcef33b03395051367181a0549d29d109d9a4 Author: Herbert Xu Date: Sat Jun 18 13:03:36 2016 +0800 esp: Fix ESN generation under UDP encapsulation Blair Steven noticed that ESN in conjunction with UDP encapsulation is broken because we set the temporary ESP header to the wrong spot. This patch fixes this by first of all using the right spot, i.e., 4 bytes off the real ESP header, and then saving this information so that after encryption we can restore it properly. Fixes: 7021b2e1cddd ("esp4: Switch to new AEAD interface") Reported-by: Blair Steven Signed-off-by: Herbert Xu Acked-by: Steffen Klassert Signed-off-by: David S. Miller net/ipv4/esp4.c | 52 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 20 deletions(-) commit 7748e4990de42ea796543c0ffd34118c3a5e6a98 Author: Shiraz Saleem Date: Tue Jun 14 16:54:19 2016 -0500 i40iw: Enable level-1 PBL for fast memory registration Set the chunk_size to enable level-1 PBL support when the fast memory page count is more than one. Signed-off-by: Shiraz Saleem Signed-off-by: Faisal Latif Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw.h | 1 + drivers/infiniband/hw/i40iw/i40iw_verbs.c | 5 +++++ 2 files changed, 6 insertions(+) commit 0477e18145c565f9ca74c6df4112f818f673fcaa Author: Faisal Latif Date: Tue Jun 14 16:54:18 2016 -0500 i40iw: Return correct max_fast_reg_page_list_len Return correct value for max_fast_reg_page_list_len from i40iw_query_device(). Signed-off-by: Faisal Latif Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw.h | 1 + drivers/infiniband/hw/i40iw/i40iw_verbs.c | 1 + 2 files changed, 2 insertions(+) commit ee23abd75c5076e51061c275e8f659d754a63c9d Author: Faisal Latif Date: Tue Jun 14 16:54:17 2016 -0500 i40iw: Correct status check on i40iw_get_pble i40iw_get_pble returns 0 on success. Correct the check on return code. Signed-off-by: Faisal Latif Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 747f1c6d9be749a29612fc78c321b97099906008 Author: Shiraz Saleem Date: Tue Jun 14 16:54:16 2016 -0500 i40iw: Correct CQ arming CQ is armed for solicited events only, ignoring other notification flags. Correct this by arming for next and arming for solicited event if IB_CQ_SOLICITED is set. Also protect CQ shadow area update with spinlock. Signed-off-by: Shiraz Saleem Signed-off-by: Doug Ledford drivers/infiniband/hw/i40iw/i40iw_verbs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit c755f4afa66ad3ed98870bd3254f37c47fb2c800 Author: Mike Marciniszyn Date: Wed Jun 22 13:29:33 2016 -0700 IB/rdmavt: Correct qp_priv_alloc() return value test The current drivers return errors from this calldown wrapped in an ERR_PTR(). The rdmavt code incorrectly tests for NULL. The code is fixed to use IS_ERR() and change ret according to the driver return value. Cc: Stable # 4.6+ Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 4 +++- include/rdma/rdma_vt.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) commit 8ae84f7c56044ee17ef6b700cb34d11ad9428a2e Author: Ashutosh Dixit Date: Fri Jun 17 19:17:54 2016 -0700 IB/hfi1: Don't zero out qp->s_ack_queue in rvt_reset_qp Since rvt_reset_qp already zero's out qp->s_ack_queue head and tail pointers, there is no need to zero out qp->s_ack_queue itself. Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Signed-off-by: Ashutosh Dixit Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 6 ------ 1 file changed, 6 deletions(-) commit 2aee309d3e01447c55fdf89cef05a0e2be372655 Author: Mike Marciniszyn Date: Fri Jun 17 19:17:49 2016 -0700 IB/hfi1: Fix deadlock with txreq allocation slow path A failure in the get_txreq() inline will result in a slow path retry using __get_txreq(). __get_txreq() attempts to procure the qp s_lock, which is already held in all callers. Fix by deleting the s_lock maintenance in __get_txreq() and add sparse syntax hooks to future proof the code. Cc: Stable # 4.6+ Reviewed-by: Dennis Dalessandro Signed-off-by: Mike Marciniszyn Signed-off-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/verbs_txreq.c | 4 +--- drivers/infiniband/hw/hfi1/verbs_txreq.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) commit cbc9355a939b90263c58beb855f8151b56634c42 Author: Chuck Lever Date: Wed Jun 22 17:27:32 2016 +0300 IB/mlx4: Prevent cross page boundary allocation Prevent cross page boundary allocation by allocating new page, this is required to be aligned with ConnectX-3 HW requirements. Not doing that might cause to "RDMA read local protection" error. Fixes: 1b2cd0fc673c ('IB/mlx4: Support the new memory registration API') Suggested-by: Christoph Hellwig Signed-off-by: Chuck Lever Reviewed-by: Sagi Grimberg Signed-off-by: Yishai Hadas Signed-off-by: Leon Romanovsky Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mlx4_ib.h | 2 +- drivers/infiniband/hw/mlx4/mr.c | 34 +++++++++++++++++----------------- 2 files changed, 18 insertions(+), 18 deletions(-) commit 5b420d9cf7382c6e1512e96e02d18842d272049c Author: Dotan Barak Date: Wed Jun 22 17:27:31 2016 +0300 IB/mlx4: Fix memory leak if QP creation failed When RC, UC, or RAW QPs are created, a qp object is allocated (kzalloc). If at a later point (in procedure create_qp_common) the qp creation fails, this qp object must be freed. Fixes: 1ffeb2eb8be99 ("IB/mlx4: SR-IOV IB context objects and proxy/tunnel SQP support") Signed-off-by: Dotan Barak Signed-off-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5533c18ab02b17a7f2ac11908e2d97d4b421617d Author: Yishai Hadas Date: Wed Jun 22 17:27:30 2016 +0300 IB/mlx4: Verify port number in flow steering create flow In procedure mlx4_ib_create_flow, passing an invalid port number will cause an out-of-bounds array access. Data passed to this procedure can come from user-space. Therefore, need to validate port number before proceeding onwards. Note that we check against the number of physical ports declared at the verbs (ib core) level; When bonding is active, the verbs level sees one physical port, even though the low-level driver sees two ports. Fixes: f77c0162a339 ("IB/mlx4: Add receive flow steering support") Signed-off-by: Yishai Hadas Reviewed-by: Jack Morgenstein Reviewed-by: Moni Shoua Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 3 +++ 1 file changed, 3 insertions(+) commit a6100603a4a87fc436199362bdb81cb849faaf6e Author: Yishai Hadas Date: Wed Jun 22 17:27:29 2016 +0300 IB/mlx4: Fix error flow when sending mads under SRIOV Fix mad send error flow to prevent double freeing address handles, and leaking tx_ring entries when SRIOV is active. If ib_mad_post_send fails, the address handle pointer in the tx_ring entry must be set to NULL (or there will be a double-free) and tx_tail must be incremented (or there will be a leak of tx_ring entries). The tx_ring is handled the same way in the send-completion handler. Fixes: 37bfc7c1e83f ("IB/mlx4: SR-IOV multiplex and demultiplex MADs") Signed-off-by: Yishai Hadas Reviewed-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/mad.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit f2940e2c76bb554a7fbdd28ca5b90904117a9e96 Author: Yishai Hadas Date: Wed Jun 22 17:27:28 2016 +0300 IB/mlx4: Fix the SQ size of an RC QP When calculating the required size of an RC QP send queue, leave enough space for masked atomic operations, which require more space than "regular" atomic operation. Fixes: 6fa8f719844b ("IB/mlx4: Add support for masked atomic operations") Signed-off-by: Yishai Hadas Reviewed-by: Jack Morgenstein Reviewed-by: Eran Ben Elisha Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 00bf534fce23048aa0e6fd8dbceedf097ee65508 Author: Talat Batheesh Date: Wed Jun 22 17:27:27 2016 +0300 IB/mlx5: Fix wrong naming of port_rcv_data counter port_xmit_data is written instead of port_rcv_data. Fixes: 3efd9a11212d ('IB/mlx5: Modify MAD reading counters method to use counter registers') Signed-off-by: Talat Batheesh Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/mad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9b254955b9f8814966f5dabd34c39d0e0a2b437 Author: Eli Cohen Date: Wed Jun 22 17:27:26 2016 +0300 IB/mlx5: Fix post send fence logic If the caller specified IB_SEND_FENCE in the send flags of the work request and no previous work request stated that the successive one should be fenced, the work request would be executed without a fence. This could result in RDMA read or atomic operations failure due to a MR being invalidated. Fix this by adding the mlx5 enumeration for fencing RDMA/atomic operations and fix the logic to apply this. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 7 ++++--- include/linux/mlx5/qp.h | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) commit b57141c1abe41e26c09b1b1b7ece463464ba6de2 Author: Maor Gottlieb Date: Wed Jun 22 17:27:25 2016 +0300 IB/uverbs: Initialize ib_qp_init_attr with zeros Initialize ib_qp_init_attr with zeros in order to avoid from garbage in fields that won't be set with user values. Fixes: a060b5629ab06 ('IB/core: generic RDMA READ/WRITE API') Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/uverbs_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3556005c5f319285610e3eae88b4078e1a4d3bc Author: Eli Cohen Date: Wed Jun 22 17:27:24 2016 +0300 IB/core: Fix false search of the IB_SA_WELL_KNOWN_GUID When virtualziation is supported, VFs may send SA MADs to a GID formed by the concatenation of the subnet prefix with the IB_SA_WELL_KNOWN_GUID. When a response is required, the current code will search the local HCA's port for the received GID to figure out the GID index of the entry containing this GID. However, since this is not a real GID it will not be found and error will be printed. We change the logic to check if the destination GID is this special GID and avoid lookup in this case and use GID index 0. Fixes: a0c1b2a35087 ('IB/core: Support accessing SA in virtualized environment') Signed-off-by: Eli Cohen Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/verbs.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit c65f6c5a3650876a69d1041a9d3c90986e9ca233 Author: Alex Vesker Date: Wed Jun 22 17:27:23 2016 +0300 IB/core: Fix RoCE v1 multicast join logic issue During multicast join of RoCEv1, IGMP join state and max hop limit were updated incorrectly. IGMP join should be sent and marked as joined only on RoCEv2 after a successful join. Max hops should be updated to the hop limit on RoCEv2 regardless of the join state. Fixes: bee3c3c91865 ('IB/cma: Join and leave multicast groups...') Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f336ae03149725bb5844166c7b04f7f65f17eec9 Author: Talat Batheesh Date: Wed Jun 22 17:27:22 2016 +0300 IB/core: Fix no default GIDs when netdevice reregisters Currently, when the netdevice returned by get_netdev is unregistered, we delete all GIDs (including the default GIDs) and reset their attributes. Therefore, when we re-register it, no default GIDs will be assigned (as their "default GID") attribute will be reset. Fixing this by keeping "default GID" attribute. Fixes: 03db3a2d81e6 ('IB/core: Add RoCE GID table management') Signed-off-by: Talat Batheesh Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d6b186c1e2d852a92c43f090d0d8fad4704d51ef Author: David Vrabel Date: Tue May 17 15:54:50 2016 +0100 x86/xen: avoid m2p lookup when setting early page table entries When page tables entries are set using xen_set_pte_init() during early boot there is no page fault handler that could handle a fault when performing an M2P lookup. In 64 bit guests (usually dom0) early_ioremap() would fault in xen_set_pte_init() because an M2P lookup faults because the MFN is in MMIO space and not mapped in the M2P. This lookup is done to see if the PFN in in the range used for the initial page table pages, so that the PTE may be set as read-only. The M2P lookup can be avoided by moving the check (and clear of RW) earlier when the PFN is still available. Reported-by: Kevin Moraga Signed-off-by: David Vrabel Reviewed-by: Boris Ostrovsky Reviewed-by: Juergen Gross arch/x86/xen/mmu.c | 72 +++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 41 deletions(-) commit 5ce91714b0d8c0a3ff9b858966721f508351cf4c Author: Pali Rohár Date: Sat Jun 18 00:54:47 2016 +0200 hwmon: (dell-smm) Cache fan_type() calls and change fan detection On more Dell machines (e.g. Dell Precision M3800) fan_type() call is too expensive (CPU is too long in SMM mode) and cause kernel to hang. This is bug in Dell SMM or BIOS. This patch caches type for each fan (as it should not change) and changes the way how fan presense is detected. First it try function fan_status() as was before commit f989e55452c7 ("i8k: Add support for fan labels"). And if that fails fallback to fan_type(). *_status() functions can fail in case fan is not currently accessible (e.g. present on GPU which is currently turned off). Reported-by: Tolga Cakir Signed-off-by: Pali Rohár Link: https://bugzilla.kernel.org/show_bug.cgi?id=112021 Cc: stable@vger.kernel.org # v4.0+, will need backport Tested-by: Tolga Cakir Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) commit 492a19ef8bbfe03b03ca82635555ea1e2803ff91 Merge: 33688ab 8d39fc0 Author: Rafael J. Wysocki Date: Thu Jun 23 14:48:41 2016 +0200 Merge branch 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq into pm-devfreq Pull devfreq fixes for v4.7 from MyungJoo Ham. * 'fixes' of https://git.kernel.org/pub/scm/linux/kernel/git/mzx/devfreq: PM / devfreq: fix initialization of current frequency in last status PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check PM / devfreq: remove double put_device PM / devfreq: fix double call put_device PM / devfreq: fix duplicated kfree on devfreq pointer PM / devfreq: devm_kzalloc to have dev pointer more precisely commit 62131e5d735226074cba53095545d76b491e5003 Author: Liping Zhang Date: Wed Jun 8 20:20:10 2016 +0800 netfilter: nft_meta: set skb->nf_trace appropriately When user add a nft rule to set nftrace to zero, for example: # nft add rule ip filter input nftrace set 0 We should set nf_trace to zero also. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nft_meta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6cafaf4764a32597c2195aa5411b87728e1fde8a Author: Liping Zhang Date: Mon Jun 20 21:11:45 2016 +0800 netfilter: nf_tables: fix memory leak if expr init fails If expr init fails then we need to free it. So when the user add a nft rule as follows: # nft add rule filter input tcp dport 22 flow table ssh \ { ip saddr limit rate 0/second } memory leak will happen. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 02ef871ecac290919ea0c783d05da7eedeffc10e Author: Andrey Grodzovsky Date: Tue Jun 21 14:26:36 2016 -0400 xen/pciback: Fix conf_space read/write overlap check. Current overlap check is evaluating to false a case where a filter field is fully contained (proper subset) of a r/w request. This change applies classical overlap check instead to include all the scenarios. More specifically, for (Hilscher GmbH CIFX 50E-DP(M/S)) device driver the logic is such that the entire confspace is read and written in 4 byte chunks. In this case as an example, CACHE_LINE_SIZE, LATENCY_TIMER and PCI_BIST are arriving together in one call to xen_pcibk_config_write() with offset == 0xc and size == 4. With the exsisting overlap check the LATENCY_TIMER field (offset == 0xd, length == 1) is fully contained in the write request and hence is excluded from write, which is incorrect. Signed-off-by: Andrey Grodzovsky Reviewed-by: Boris Ostrovsky Reviewed-by: Jan Beulich Cc: Signed-off-by: David Vrabel drivers/xen/xen-pciback/conf_space.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 1cf38741308c64d08553602b3374fb39224eeb5a Author: Juergen Gross Date: Thu Jun 23 07:12:27 2016 +0200 x86/xen: fix upper bound of pmd loop in xen_cleanhighmap() xen_cleanhighmap() is operating on level2_kernel_pgt only. The upper bound of the loop setting non-kernel-image entries to zero should not exceed the size of level2_kernel_pgt. Reported-by: Linus Torvalds Signed-off-by: Juergen Gross Signed-off-by: David Vrabel arch/x86/xen/mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 842775f1509054ea969f1787f38d6a0ec2ccfaba Author: Ross Lagerwall Date: Tue May 10 10:27:54 2016 +0100 xen/balloon: Fix declared-but-not-defined warning Fix a declared-but-not-defined warning when building with XEN_BALLOON_MEMORY_HOTPLUG=n. This fixes a regression introduced by commit dfd74a1edfab ("xen/balloon: Fix crash when ballooning on x86 32 bit PAE"). Signed-off-by: Ross Lagerwall Acked-by: Juergen Gross Signed-off-by: David Vrabel drivers/xen/balloon.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 055ddaace03580455a7b7dbea8e93d62acee61fc Author: Mathias Krause Date: Wed Jun 22 20:29:37 2016 +0200 crypto: user - re-add size check for CRYPTO_MSG_GETALG Commit 9aa867e46565 ("crypto: user - Add CRYPTO_MSG_DELRNG") accidentally removed the minimum size check for CRYPTO_MSG_GETALG netlink messages. This allows userland to send a truncated CRYPTO_MSG_GETALG message as short as a netlink header only making crypto_report() operate on uninitialized memory by accessing data beyond the end of the netlink message. Fix this be re-adding the minimum required size of CRYPTO_MSG_GETALG messages to the crypto_msg_min[] array. Fixes: 9aa867e46565 ("crypto: user - Add CRYPTO_MSG_DELRNG") Cc: stable@vger.kernel.org # v4.2 Signed-off-by: Mathias Krause Cc: Steffen Klassert Signed-off-by: Herbert Xu crypto/crypto_user.c | 1 + 1 file changed, 1 insertion(+) commit 71873a9b38d1cc6c93e2962149a7bb7272a7cb66 Author: Jimmy Assarsson Date: Thu Jun 23 07:57:21 2016 +0200 can: kvaser_usb: Add support for more Kvaser Leaf v2 devices This patch adds support for Kvaser Leaf Light HS v2 OEM, Mini PCI Express 2xHS and USBcan Light 2xHS. Signed-off-by: Jimmy Assarsson Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/Kconfig | 2 ++ drivers/net/can/usb/kvaser_usb.c | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) commit b41aa4f8476545e2b663b1549759a8c3a66f47b0 Author: Cristina Ciocan Date: Wed Jun 22 14:17:19 2016 +0300 pinctrl: baytrail: Fix mingled clock pins Fix plt clock 3, 4 and 5 pins, which were not in the proper order. Signed-off-by: Cristina Ciocan Acked-by: Mika Westerberg Signed-off-by: Linus Walleij drivers/pinctrl/intel/pinctrl-baytrail.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 25e1ed6e64f52a692ba3191c4fde650aab3ecc07 Author: Oliver Hartkopp Date: Tue Jun 21 15:45:47 2016 +0200 can: fix oops caused by wrong rtnl dellink usage For 'real' hardware CAN devices the netlink interface is used to set CAN specific communication parameters. Real CAN hardware can not be created nor removed with the ip tool ... This patch adds a private dellink function for the CAN device driver interface that does just nothing. It's a follow up to commit 993e6f2fd ("can: fix oops caused by wrong rtnl newlink usage") but for dellink. Reported-by: ajneu Signed-off-by: Oliver Hartkopp Cc: Signed-off-by: Marc Kleine-Budde drivers/net/can/dev.c | 6 ++++++ 1 file changed, 6 insertions(+) commit bce271f255dae8335dc4d2ee2c4531e09cc67f5a Author: Oliver Hartkopp Date: Tue Jun 21 12:14:07 2016 +0200 can: fix handling of unmodifiable configuration options fix With upstream commit bb208f144cf3f59 (can: fix handling of unmodifiable configuration options) a new can_validate() function was introduced. When invoking 'ip link set can0 type can' without any configuration data can_validate() tries to validate the content without taking into account that there's totally no content. This patch adds a check for missing content. Reported-by: ajneu Signed-off-by: Oliver Hartkopp Cc: Signed-off-by: Marc Kleine-Budde drivers/net/can/dev.c | 3 +++ 1 file changed, 3 insertions(+) commit fefb62455f6becc87d2d8f25ba2df961add5d06c Author: Andy Shevchenko Date: Tue Jun 21 01:52:36 2016 +0300 MAINTAINERS: belong Documentation/pinctrl.txt properly I'm pretty sure that Documentation/pinctrl.txt would be better maintained by pinctrl subsystem. Signed-off-by: Andy Shevchenko Signed-off-by: Linus Walleij MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c6887cd11149d7325328749f06719071e6c725c6 Author: Josef Bacik Date: Fri Mar 25 13:26:00 2016 -0400 Btrfs: don't do nocow check unless we have to Before we write into prealloc/nocow space we have to make sure that there are no references to the extents we are writing into, which means checking the extent tree and csum tree in the case of nocow. So we don't want to do the nocow dance unless we can't reserve data space, since it's a serious drag on performance. With the following sequence fallocate -l10737418240 /mnt/btrfs-test/file cp --reflink /mnt/btrfs-test/file /mnt/btrfs-test/link fio --name=randwrite --rw=randwrite --bs=4k --filename=/mnt/btrfs-test/file \ --end_fsync=1 we get the worst case scenario where we have to fall back on to doing the check anyway. Without this patch lat (usec): min=5, max=111598, avg=27.65, stdev=124.51 write: io=10240MB, bw=126876KB/s, iops=31718, runt= 82646msec With this patch lat (usec): min=3, max=91210, avg=14.09, stdev=110.62 write: io=10240MB, bw=212753KB/s, iops=53188, runt= 49286msec We get twice the throughput, half of the runtime, and half of the average latency. Thanks, Signed-off-by: Josef Bacik [ PAGE_CACHE_ removal related fixups ] Signed-off-by: David Sterba Signed-off-by: Chris Mason fs/btrfs/file.c | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 0f873eca82a0bee45f38862e0ea2ac7b1c2a31bd Author: Chris Mason Date: Wed Apr 27 09:59:38 2016 -0400 btrfs: fix deadlock in delayed_ref_async_start "Btrfs: track transid for delayed ref flushing" was deadlocking on btrfs_attach_transaction because its not safe to call from the async delayed ref start code. This commit brings back btrfs_join_transaction instead and checks for a blocked commit. Signed-off-by: Josef Bacik Signed-off-by: Chris Mason fs/btrfs/extent-tree.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 31b9655f439a26856edca0f3f8daa368a61f16d5 Author: Josef Bacik Date: Mon Apr 11 17:37:40 2016 -0400 Btrfs: track transid for delayed ref flushing Using the offwakecputime bpf script I noticed most of our time was spent waiting on the delayed ref throttling. This is what is supposed to happen, but sometimes the transaction can commit and then we're waiting for throttling that doesn't matter anymore. So change this stuff to be a little smarter by tracking the transid we were in when we initiated the throttling. If the transaction we get is different then we can just bail out. This resulted in a 50% speedup in my fs_mark test, and reduced the amount of time spent throttling by 60 seconds over the entire run (which is about 30 minutes). Thanks, Signed-off-by: Josef Bacik Signed-off-by: Chris Mason fs/btrfs/ctree.h | 2 +- fs/btrfs/extent-tree.c | 15 ++++++++++++--- fs/btrfs/inode.c | 1 + fs/btrfs/transaction.c | 3 ++- 4 files changed, 16 insertions(+), 5 deletions(-) commit 844e3be47693f92a108cb1fb3b0606bf25e9c7a6 Author: Naveen N. Rao Date: Wed Jun 22 21:55:01 2016 +0530 powerpc/bpf/jit: Disable classic BPF JIT on ppc64le Classic BPF JIT was never ported completely to work on little endian powerpc. However, it can be enabled and will crash the system when used. As such, disable use of BPF JIT on ppc64le. Fixes: 7c105b63bd98 ("powerpc: Add CONFIG_CPU_LITTLE_ENDIAN kernel config option.") Reported-by: Thadeu Lima de Souza Cascardo Signed-off-by: Naveen N. Rao Acked-by: Thadeu Lima de Souza Cascardo Signed-off-by: Michael Ellerman arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e914ee629c411d9c6d160399ce7d3472d2c0ec7 Author: Michael Ellerman Date: Mon Jun 20 19:23:43 2016 +1000 powerpc: Fix faults caused by radix patching of SLB miss handler As part of the Radix MMU support we added some feature sections in the SLB miss handler. These are intended to catch the case that we incorrectly take an SLB miss when Radix is enabled, and instead of crashing weirdly they bail out to a well defined exit path and trigger an oops. However the way they were written meant the bailout case was enabled by default until we did CPU feature patching. On powermacs the early debug prints in setup_system() can cause an SLB miss, which happens before code patching, and so the SLB miss handler would incorrectly bailout and crash during boot. Fix it by inverting the sense of the feature section, so that the code which is in place at boot is correct for the hash case. Once we determine we are using Radix - which will never happen on a powermac - only then do we patch in the bailout case which unconditionally jumps. Fixes: caca285e5ab4 ("powerpc/mm/radix: Use STD_MMU_64 to properly isolate hash related code") Reported-by: Denis Kirjanov Tested-by: Denis Kirjanov Reviewed-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/kernel/exceptions-64s.S | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4ac1c17b2044a1b4b2fbed74451947e905fc2992 Author: Kirill A. Shutemov Date: Thu Jun 16 23:26:15 2016 +0200 UBIFS: Implement ->migratepage() During page migrations UBIFS might get confused and the following assert triggers: [ 213.480000] UBIFS assert failed in ubifs_set_page_dirty at 1451 (pid 436) [ 213.490000] CPU: 0 PID: 436 Comm: drm-stress-test Not tainted 4.4.4-00176-geaa802524636-dirty #1008 [ 213.490000] Hardware name: Allwinner sun4i/sun5i Families [ 213.490000] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 213.490000] [] (show_stack) from [] (dump_stack+0x8c/0xa0) [ 213.490000] [] (dump_stack) from [] (ubifs_set_page_dirty+0x44/0x50) [ 213.490000] [] (ubifs_set_page_dirty) from [] (try_to_unmap_one+0x10c/0x3a8) [ 213.490000] [] (try_to_unmap_one) from [] (rmap_walk+0xb4/0x290) [ 213.490000] [] (rmap_walk) from [] (try_to_unmap+0x64/0x80) [ 213.490000] [] (try_to_unmap) from [] (migrate_pages+0x328/0x7a0) [ 213.490000] [] (migrate_pages) from [] (alloc_contig_range+0x168/0x2f4) [ 213.490000] [] (alloc_contig_range) from [] (cma_alloc+0x170/0x2c0) [ 213.490000] [] (cma_alloc) from [] (__alloc_from_contiguous+0x38/0xd8) [ 213.490000] [] (__alloc_from_contiguous) from [] (__dma_alloc+0x23c/0x274) [ 213.490000] [] (__dma_alloc) from [] (arm_dma_alloc+0x54/0x5c) [ 213.490000] [] (arm_dma_alloc) from [] (drm_gem_cma_create+0xb8/0xf0) [ 213.490000] [] (drm_gem_cma_create) from [] (drm_gem_cma_create_with_handle+0x1c/0xe8) [ 213.490000] [] (drm_gem_cma_create_with_handle) from [] (drm_gem_cma_dumb_create+0x3c/0x48) [ 213.490000] [] (drm_gem_cma_dumb_create) from [] (drm_ioctl+0x12c/0x444) [ 213.490000] [] (drm_ioctl) from [] (do_vfs_ioctl+0x3f4/0x614) [ 213.490000] [] (do_vfs_ioctl) from [] (SyS_ioctl+0x34/0x5c) [ 213.490000] [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x34) UBIFS is using PagePrivate() which can have different meanings across filesystems. Therefore the generic page migration code cannot handle this case correctly. We have to implement our own migration function which basically does a plain copy but also duplicates the page private flag. UBIFS is not a block device filesystem and cannot use buffer_migrate_page(). Cc: stable@vger.kernel.org Signed-off-by: Kirill A. Shutemov [rw: Massaged changelog, build fixes, etc...] Signed-off-by: Richard Weinberger Acked-by: Christoph Hellwig fs/ubifs/file.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 1118dce773d84f39ebd51a9fe7261f9169cb056e Author: Richard Weinberger Date: Thu Jun 16 23:26:14 2016 +0200 mm: Export migrate_page_move_mapping and migrate_page_copy Export these symbols such that UBIFS can implement ->migratepage. Cc: stable@vger.kernel.org Signed-off-by: Richard Weinberger Acked-by: Christoph Hellwig mm/migrate.c | 2 ++ 1 file changed, 2 insertions(+) commit 972228d87445dc46c0a01f5f3de673ac017626f7 Author: Richard Weinberger Date: Tue Jun 21 00:31:50 2016 +0200 ubi: Make recover_peb power cut aware recover_peb() was never power cut aware, if a power cut happened right after writing the VID header upon next attach UBI would blindly use the new partial written PEB and all data from the old PEB is lost. In order to make recover_peb() power cut aware, write the new VID with a proper crc and copy_flag set such that the UBI attach process will detect whether the new PEB is completely written or not. We cannot directly use ubi_eba_atomic_leb_change() since we'd have to unlock the LEB which is facing a write error. Cc: stable@vger.kernel.org Reported-by: Jörg Pfähler Reviewed-by: Jörg Pfähler Signed-off-by: Richard Weinberger drivers/mtd/ubi/eba.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit c0a1ecb9f4e208f4b75d88fa9669748e3fd705ab Author: Linus Walleij Date: Thu Jun 16 11:55:55 2016 +0200 gpio: make library immune to error pointers Most functions that take a GPIO descriptor in need to check the descriptor for IS_ERR(). We do this mostly in the VALIDATE_DESC() macro except for the gpiod_to_irq() function which needs special handling. Cc: stable@vger.kernel.org Reported-by: Grygorii Strashko Reviewed-by: Grygorii Strashko Acked-by: Alexandre Courbot Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 39243ee771666e02201ba89c1d76fdc28e9cf681 Author: Linus Walleij Date: Wed Jun 15 22:57:38 2016 +0200 gpio: make sure gpiod_to_irq() returns negative on NULL desc commit 54d77198fdfbc4f0fe11b4252c1d9c97d51a3264 ("gpio: bail out silently on NULL descriptors") doesn't work for gpiod_to_irq(): drivers assume that NULL descriptors will give negative IRQ numbers in return. It has been pointed out that returning 0 is NO_IRQ and that drivers should be amended to treat this as an error, but that is for the longer term: now let us repair the semantics. Cc: Maxime Ripard Reported-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 0b305ccc1b545d3389068ddc3548cbc877513b97 Author: Axel Lin Date: Mon Jun 13 13:48:53 2016 +0800 gpio: 104-idi-48: Fix missing spin_lock_init for ack_lock Fixes: 9ae482104cb9 ("gpio: 104-idi-48: Clear pending interrupt once in IRQ handler") Signed-off-by: Axel Lin Acked-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idi-48.c | 1 + 1 file changed, 1 insertion(+) commit f9020d17416ae62f1b1c6459d61e65abb4af79b5 Merge: 144b5ae 695e9df Author: Linus Torvalds Date: Wed Jun 22 14:11:24 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull userns fix from Eric Biederman: "This contains just a single small patch that fixes a tiny hole in the logic of allowing unprivileged mounting of proc and sysfs. In practice I don't think anyone is affected because having MNT_RDONLY clear in mnt->mnt_flags but MS_RDONLY set in sb->s_flags is very weird for a filesystem, and weirder for proc and sysfs. However if it happens let's handle it correctly and then no one has to to worry about this crazy case" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: mnt: Account for MS_RDONLY in fs_fully_visible commit acd43fe85b2d1dbad55ce211b8817e6d6687246f Merge: 27777da 9d76931 Author: David S. Miller Date: Wed Jun 22 16:38:17 2016 -0400 Merge branch 'mlx4-fixes' Tariq Toukan says: ==================== mlx4_en fixes for 4.7-rc This small patchset includes two small fixes for mlx4_en driver. One allows a clean shutdown even when clients do not release their netdev reference. The other adds error return values to the VLAN VID add/kill functions. ==================== Signed-off-by: David S. Miller commit 9d76931180557270796f9631e2c79b9c7bb3c9fb Author: Eran Ben Elisha Date: Tue Jun 21 14:20:03 2016 +0300 net/mlx4_en: Avoid unregister_netdev at shutdown flow This allows a clean shutdown, even if some netdev clients do not release their reference from this netdev. It is enough to release the HW resources only as the kernel is shutting down. Fixes: 2ba5fbd62b25 ('net/mlx4_core: Handle AER flow properly') Signed-off-by: Eran Ben Elisha Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 17 +++++++++++++++-- drivers/net/ethernet/mellanox/mlx4/main.c | 5 ++++- include/linux/mlx4/device.h | 1 + 3 files changed, 20 insertions(+), 3 deletions(-) commit 93c098af09455ea7bdc6f0f6b08f6ac14fa06cf4 Author: Kamal Heib Date: Tue Jun 21 14:20:02 2016 +0300 net/mlx4_en: Fix the return value of a failure in VLAN VID add/kill Modify mlx4_en_vlan_rx_[add/kill]_vid to return error value in case of failure. Fixes: 8e586137e6b6 ('net: make vlan ndo_vlan_rx_[add/kill]_vid return error value') Signed-off-by: Kamal Heib Signed-off-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) commit 27777daa8b6df0c19aaf591d1536a586b3eb5e36 Author: Jon Paul Maloy Date: Mon Jun 20 09:20:46 2016 -0400 tipc: unclone unbundled buffers before forwarding When extracting an individual message from a received "bundle" buffer, we just create a clone of the base buffer, and adjust it to point into the right position of the linearized data area of the latter. This works well for regular message reception, but during periods of extremely high load it may happen that an extracted buffer, e.g, a connection probe, is reversed and forwarded through an external interface while the preceding extracted message is still unhandled. When this happens, the header or data area of the preceding message will be partially overwritten by a MAC header, leading to unpredicatable consequences, such as a link reset. We now fix this by ensuring that the msg_reverse() function never returns a cloned buffer, and that the returned buffer always contains sufficient valid head and tail room to be forwarded. Reported-by: Erik Hugne Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/msg.c | 6 ++++++ net/tipc/msg.h | 11 ----------- 2 files changed, 6 insertions(+), 11 deletions(-) commit d19af0a76444fde629667ecb823c0ee28f9f67d8 Author: Jiri Slaby Date: Mon Jun 20 11:36:28 2016 +0200 kcm: fix /proc memory leak Every open of /proc/net/kcm leaks 16 bytes of memory as is reported by kmemleak: unreferenced object 0xffff88059c0e3458 (size 192): comm "cat", pid 1401, jiffies 4294935742 (age 310.720s) hex dump (first 32 bytes): 28 45 71 96 05 88 ff ff 00 10 00 00 00 00 00 00 (Eq............. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace: [] kmem_cache_alloc_trace+0x16e/0x230 [] seq_open+0x79/0x1d0 [] kcm_seq_open+0x0/0x30 [kcm] [] seq_open+0x79/0x1d0 [] __seq_open_private+0x2f/0xa0 [] seq_open_net+0x38/0xa0 ... It is caused by a missing free in the ->release path. So fix it by providing seq_release_net as the ->release method. Signed-off-by: Jiri Slaby Fixes: cd6e111bf5 (kcm: Add statistics and proc interfaces) Cc: "David S. Miller" Cc: Tom Herbert Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller net/kcm/kcmproc.c | 1 + 1 file changed, 1 insertion(+) commit 942f64c4c2be19a1b4a0c4295182b42d153899bf Author: Ido Schimmel Date: Mon Jun 20 11:53:20 2016 +0300 team: Fix possible deadlock during team enslave Both dev_uc_sync_multiple() and dev_mc_sync_multiple() require the source device to be locked by netif_addr_lock_bh(), but this is missing in team's enslave function, so add it. This fixes the following lockdep warning: Possible interrupt unsafe locking scenario: CPU0 CPU1 ---- ---- lock(_xmit_ETHER/1); local_irq_disable(); lock(&(&mc->mca_lock)->rlock); lock(&team_netdev_addr_lock_key); lock(&(&mc->mca_lock)->rlock); *** DEADLOCK *** Fixes: cb41c997d444 ("team: team should sync the port's uc/mc addrs when add a port") Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller drivers/net/team/team.c | 2 ++ 1 file changed, 2 insertions(+) commit 6b65ca06e1af38ea90074a47fcb5748ee9309b94 Merge: ab522fd f155d9c Author: David S. Miller Date: Wed Jun 22 16:29:17 2016 -0400 Merge tag 'linux-can-fixes-for-4.7-20160620' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can Marc Kleine-Budde says: ==================== pull-request: can 2016-06-20 this is a pull request of 3 patches for the upcoming linux-4.7 release. The first patch is by Thor Thayer for the c_can/d_can driver. It fixes the registar access on Altera Cyclone devices, which caused CAN frames to have 0x0 in the first two bytes incorrectly. Wolfgang Grandegger's patch for the at91 driver fixes a hanging driver under high bus load situations. A patch for the gs_usb driver by Maximilian Schneider adds support for the bytewerk.org candleLight interface. ==================== Signed-off-by: David S. Miller commit 144b5ae3e343f193a6a7edef8f30aab4fad2d12b Merge: 67016f6 bfbbe44 Author: Linus Torvalds Date: Wed Jun 22 10:13:25 2016 -0700 Merge tag 'gpio-v4.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "More GPIO fixes. Most prominent the gpiod_to_irq() fix brought to my attention by Hans de Goede. The hardening patch is a consequence of the reasoning around that bug. - It was discovered that too many parts of the kernel does not respect gpiod_to_irq() returning zero for an invalid IRQ. While this gets fixed, we need to make it return negative errorcodes again. - Harden the library a bit when passed error pointers. It is a bug to use these, but let's be helpful and warn the users. - Fix an uninitialized spinlock in the 104-idi-48 driver" * tag 'gpio-v4.7-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: make library immune to error pointers gpio: make sure gpiod_to_irq() returns negative on NULL desc gpio: 104-idi-48: Fix missing spin_lock_init for ack_lock commit df013212a1b6557f071609983cab0612f71fd99b Merge: 33688ab f4070a1 Author: Greg Kroah-Hartman Date: Wed Jun 22 09:57:28 2016 -0700 Merge tag 'iio-fixes-for-4.7b' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: Second set of IIO fixes for the 4.7 cycle. This includes one tracked regression (Arnd's patch for the ad7606). The other two have I think always been broken. * inv_mpu6050 - Fix a use after free in the ACPI code. * ad5933 - The code for setting the cycles had a bug that meant it was simply wrong. * ad7606_spi - Fix a regression that got introduced in a buggy cleanup of a sparse warning. commit 19b5a91764fddcc51b2f8e54a81d4ef231980181 Author: Axel Lin Date: Sat Jun 4 14:35:56 2016 +0800 pinctrl: tegra: Fix build dependency I got below build error: ERROR: "tegra_xusb_padctl_legacy_probe" [drivers/phy/tegra/phy-tegra-xusb.ko] undefined! with below build configuration: CONFIG_ARCH_TEGRA=y CONFIG_PINCTRL_TEGRA_XUSB=y CONFIG_PHY_TEGRA_XUSB=y The problem is below line in drivers/pinctrl/Makefile obj-$(CONFIG_PINCTRL_TEGRA) += tegra/ So even CONFIG_PINCTRL_TEGRA_XUSB=y is set, kbuild still does not compile the code in drivers/pinctrl/tegra folder if !CONFIG_PINCTRL_TEGRA. phy-tegra-xusb.c does not use any symbol from pinctrl-tegra.c, so build pinctrl-tegra.c only when CONFIG_PINCTRL_TEGRA is set. Signed-off-by: Axel Lin Acked-by: Jon Hunter Signed-off-by: Linus Walleij drivers/pinctrl/Makefile | 2 +- drivers/pinctrl/tegra/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9ee8ff4867d07a6429991a0b748fa9c1586a7764 Author: Thierry Reding Date: Mon Jun 6 18:56:27 2016 +0200 gpio: tegra: Make lockdep class file-scoped Commit b546be0db955 ("gpio: tegra: Get rid of all file scoped global variables") moved all file scoped variables into the driver-private structure to allow potentially multiple instances of the driver. The change also included turning the lockdep class into a driver-private field, which doesn't work and produces error messages such as this: [ 0.142310] BUG: key ffff8000fb3f7ab0 not in .data! Make the lockdep class file-scoped again to fix this issue. Signed-off-by: Thierry Reding Signed-off-by: Linus Walleij drivers/gpio/gpio-tegra.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0ac3c0a4025f41748a083bdd4970cb3ede802b15 Author: Tony Lindgren Date: Tue May 31 14:17:06 2016 -0700 pinctrl: single: Fix missing flush of posted write for a wakeirq With many repeated suspend resume cycles, the pin specific wakeirq may not always work on omaps. This is because the write to enable the pin interrupt may not have reached the device over the interconnect before suspend happens. Let's fix the issue with a flush of posted write with a readback. Cc: stable@vger.kernel.org Reported-by: Nishanth Menon Signed-off-by: Tony Lindgren Signed-off-by: Linus Walleij drivers/pinctrl/pinctrl-single.c | 3 +++ 1 file changed, 3 insertions(+) commit ba562d5e54fd3136bfea0457add3675850247774 Author: Alexander Shiyan Date: Wed Jun 1 22:21:53 2016 +0300 pinctrl: imx: Do not treat a PIN without MUX register as an error Some PINs do not have a MUX register, it is not an error. It is necessary to allow the continuation of the PINs configuration, otherwise the whole PIN-group will be configured incorrectly. Cc: stable@vger.kernel.org Signed-off-by: Alexander Shiyan Signed-off-by: Linus Walleij drivers/pinctrl/freescale/pinctrl-imx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d74b4e4f1a6dbe27acce723e071c86a6ed154bf2 Author: James Morse Date: Wed Jun 22 10:06:13 2016 +0100 arm64: hibernate: Don't hibernate on systems with stuck CPUs Hibernate relies on cpu hotplug to prevent secondary cores executing the kernel text while it is being restored. Add a call to cpus_are_stuck_in_kernel() to determine if there are CPUs not counted by 'num_online_cpus()', and prevent hibernate in this case. Fixes: 82869ac57b5 ("arm64: kernel: Add support for hibernate/suspend-to-disk") Acked-by: Mark Rutland Signed-off-by: James Morse Signed-off-by: Will Deacon arch/arm64/kernel/hibernate.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 5c492c3f5255bd34f7ff8867515ecf98dcba2a2e Author: James Morse Date: Wed Jun 22 10:06:12 2016 +0100 arm64: smp: Add function to determine if cpus are stuck in the kernel kernel/smp.c has a fancy counter that keeps track of the number of CPUs it marked as not-present and left in cpu_park_loop(). If there are any CPUs spinning in here, features like kexec or hibernate may release them by overwriting this memory. This problem also occurs on machines using spin-tables to release secondary cores. After commit 44dbcc93ab67 ("arm64: Fix behavior of maxcpus=N") we bring all known cpus into the secondary holding pen, meaning this memory can't be re-used by kexec or hibernate. Add a function cpus_are_stuck_in_kernel() to determine if either of these cases have occurred. Signed-off-by: James Morse Acked-by: Mark Rutland Reviewed-by: Suzuki K Poulose Signed-off-by: Will Deacon arch/arm64/include/asm/smp.h | 12 ++++++++++++ arch/arm64/kernel/smp.c | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) commit c9058d43d99404986133112393be1d1a4daf1b69 Author: Ben Dooks Date: Tue Jun 21 19:18:32 2016 +0100 ALSA: hda/tegra: iomem fixups for sparse warnings The readl/writel are not being passed __iomem annotated variables, so fix the following sparse warnings by adding __iomem in: sound/pci/hda/hda_tegra.c:120:9: warning: incorrect type in argument 2 (different address spaces) sound/pci/hda/hda_tegra.c:120:9: expected void volatile [noderef] *addr sound/pci/hda/hda_tegra.c:120:9: got unsigned int [usertype] *addr sound/pci/hda/hda_tegra.c:125:16: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:125:16: expected void const volatile [noderef] *addr sound/pci/hda/hda_tegra.c:125:16: got unsigned int [usertype] *addr sound/pci/hda/hda_tegra.c:134:13: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:134:13: expected void const volatile [noderef] *addr sound/pci/hda/hda_tegra.c:134:13: got void *dword_addr sound/pci/hda/hda_tegra.c:137:9: warning: incorrect type in argument 2 (different address spaces) sound/pci/hda/hda_tegra.c:137:9: expected void volatile [noderef] *addr sound/pci/hda/hda_tegra.c:137:9: got void *dword_addr sound/pci/hda/hda_tegra.c:146:13: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:146:13: expected void const volatile [noderef] *addr sound/pci/hda/hda_tegra.c:146:13: got void *dword_addr sound/pci/hda/hda_tegra.c:156:13: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:156:13: expected void const volatile [noderef] *addr sound/pci/hda/hda_tegra.c:156:13: got void *dword_addr sound/pci/hda/hda_tegra.c:159:9: warning: incorrect type in argument 2 (different address spaces) sound/pci/hda/hda_tegra.c:159:9: expected void volatile [noderef] *addr sound/pci/hda/hda_tegra.c:159:9: got void *dword_addr sound/pci/hda/hda_tegra.c:168:13: warning: incorrect type in argument 1 (different address spaces) sound/pci/hda/hda_tegra.c:168:13: expected void const volatile [noderef] *addr sound/pci/hda/hda_tegra.c:168:13: got void *dword_addr sound/pci/hda/hda_tegra.c:173:23: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) sound/pci/hda/hda_tegra.c:173:23: expected void ( *reg_writel )( ... ) sound/pci/hda/hda_tegra.c:173:23: got void ( static [toplevel] * )( ... ) sound/pci/hda/hda_tegra.c:174:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces)) sound/pci/hda/hda_tegra.c:174:22: expected unsigned int ( *reg_readl )( ... ) sound/pci/hda/hda_tegra.c:174:22: got unsigned int ( static [toplevel] * )( ... ) sound/pci/hda/hda_tegra.c:175:23: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) sound/pci/hda/hda_tegra.c:175:23: expected void ( *reg_writew )( ... ) sound/pci/hda/hda_tegra.c:175:23: got void ( static [toplevel] * )( ... ) sound/pci/hda/hda_tegra.c:176:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces)) sound/pci/hda/hda_tegra.c:176:22: expected unsigned short ( *reg_readw )( ... ) sound/pci/hda/hda_tegra.c:176:22: got unsigned short ( static [toplevel] * )( ... ) sound/pci/hda/hda_tegra.c:177:23: warning: incorrect type in initializer (incompatible argument 2 (different address spaces)) sound/pci/hda/hda_tegra.c:177:23: expected void ( *reg_writeb )( ... ) sound/pci/hda/hda_tegra.c:177:23: got void ( static [toplevel] * )( ... ) sound/pci/hda/hda_tegra.c:178:22: warning: incorrect type in initializer (incompatible argument 1 (different address spaces)) sound/pci/hda/hda_tegra.c:178:22: expected unsigned char ( *reg_readb )( ... ) sound/pci/hda/hda_tegra.c:178:22: got unsigned char ( static [toplevel] * )( ... ) Signed-off-by: Ben Dooks Acked-by: Thierry Reding Signed-off-by: Takashi Iwai sound/pci/hda/hda_tegra.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit b3b630b26ae87a54e2f396b459aab0cd2286fc77 Author: Hans de Goede Date: Mon Jun 20 22:57:22 2016 +0200 ARM: dts: sunxi: Add pll3 to simplefb nodes clocks lists Now that we've a clock node describing pll3 we must add it to the simplefb nodes clocks lists to avoid it getting turned off when simplefb is used. This fixes the screen going black when using simplefb. Signed-off-by: Hans de Goede Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun4i-a10.dtsi | 21 ++++++++++++--------- arch/arm/boot/dts/sun5i-a10s.dtsi | 11 ++++++----- arch/arm/boot/dts/sun7i-a20.dtsi | 11 ++++++----- 3 files changed, 24 insertions(+), 19 deletions(-) commit 04e59a0211ff012ba60c00baca673482570784e9 Author: Hans de Goede Date: Sat Jun 18 11:31:33 2016 +0200 phy-sun4i-usb: Fix irq free conditions to match request conditions commit 5cf700ac9d50 ("phy: phy-sun4i-usb: Fix optional gpios failing probe") changed the condition under which irqs are requested, but omitted matching changes to sun4i_usb_phy_remove(). This commit fixes this. Fixes: 5cf700ac9d50 ("phy: phy-sun4i-usb: Fix optional gpios failing probe") Signed-off-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8d39fc085d268a56486066a3deca94745f804f2d Author: Lukasz Luba Date: Tue May 31 11:25:09 2016 +0100 PM / devfreq: fix initialization of current frequency in last status Some systems need current frequency from last_status for calculation but it is zeroed during initialization. When the device starts there is no history, but we can assume that the last frequency was the same as the initial frequency (which is also used in 'previous_freq'). The log shows the result of this misinterpreted value. [ 2.042847] ... Failed to get voltage for frequency 0: -34 Signed-off-by: Lukasz Luba Reviewed-by: Javi Merino Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 1 + 1 file changed, 1 insertion(+) commit 674789dd2c4b53ed368dc81ae22d72ac4fdb92ec Author: Dan Carpenter Date: Thu May 26 09:45:42 2016 +0300 PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check Smatch complains because platform_get_resource() returns NULL on error and not an error pointer so the check is wrong. Julia Lawall pointed out that normally we don't check these, because devm_ioremap_resource() has a check for NULL. Signed-off-by: Dan Carpenter Reviewed-by: Julia Lawall Signed-off-by: MyungJoo Ham drivers/devfreq/event/exynos-nocp.c | 3 --- 1 file changed, 3 deletions(-) commit 67ffdb529b4ec9833f73947dec01eaa78dd53c3d Author: MyungJoo Ham Date: Mon May 16 11:41:57 2016 +0900 PM / devfreq: remove double put_device When device_register() returns with error, it has already done put_device() on the input device pointer. Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 1 - 1 file changed, 1 deletion(-) commit a5e9b937fa91b3f404618b5281c3239bd1f09c7b Author: Cai Zhiyong Date: Sat May 14 14:13:30 2016 +0800 PM / devfreq: fix double call put_device 1295 */ 1296 void device_unregister(struct device *dev) 1297 { 1298 pr_debug("device: '%s': %s\n", dev_name(dev), __func__); 1299 device_del(dev); 1300 put_device(dev); 1301 } 1302 EXPORT_SYMBOL_GPL(device_unregister); 1303 device_unregister is called put_device, there is no need to call put_device(&devfreq->dev) again. Signed-off-by: Cai Zhiyong Reviewed-by: Chanwoo Choi Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 1 - 1 file changed, 1 deletion(-) commit ac4b281176a54d17dd3f91b7fb4a4656471d8730 Author: MyungJoo Ham Date: Fri Oct 2 12:48:54 2015 +0900 PM / devfreq: fix duplicated kfree on devfreq pointer device_unregister() calls kfree already. Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 1 - 1 file changed, 1 deletion(-) commit 3e1d7fb0d279fea19eb4e36cc9bddf89264ba03f Author: MyungJoo Ham Date: Fri Oct 2 12:39:23 2015 +0900 PM / devfreq: devm_kzalloc to have dev pointer more precisely devm_kzalloc of devfreq's statistics data structure has been using its parent device as the dev allocated for. If a device's devfreq is disabled in run-time, such allocated memory won't be freed. Desginating more precisely with the devfreq device pointer fixes the issue. Signed-off-by: MyungJoo Ham drivers/devfreq/devfreq.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2f38b1b16d9280689e5cfa47a4c50956bf437f0d Author: Lv Zheng Date: Tue Jun 21 12:34:15 2016 +0800 ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading The new module-level code (MLC) approach invokes MLC on the per-table basis, but the dynamic loading support of this is incorrect because of the lock order: acpi_ns_evaluate acpi_ex_enter_intperter acpi_ns_load_table (triggered by Load opcode) acpi_ns_exec_module_code_list acpi_ex_enter_intperter The regression is introduced by the following commit: Commit: 2785ce8d0da1cac9d8f78615e116cf929e9a9123 ACPICA Commit: 071eff738c59eda1792ac24b3b688b61691d7e7c Subject: ACPICA: Add per-table execution of module-level code This patch fixes this regression by unlocking the interpreter lock before invoking MLC. However, the unlocking is done to the acpi_ns_load_table(), in which the interpreter lock should be locked by acpi_ns_parse_table() but it wasn't. Fixes: 2785ce8d0da1 (ACPICA: Add per-table execution of module-level code) Reported-by: Mika Westerberg Tested-by: Mika Westerberg Signed-off-by: Lv Zheng Cc: 4.5+ # 4.5+ [ rjw : Subject ] Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/exconfig.c | 2 ++ drivers/acpi/acpica/nsparse.c | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) commit 20c27a4270c775d7ed661491af8ac03264d60fc6 Author: Shaokun Zhang Date: Tue Jun 21 15:32:57 2016 +0800 arm64: mm: remove page_mapping check in __sync_icache_dcache __sync_icache_dcache unconditionally skips the cache maintenance for anonymous pages, under the assumption that flushing is only required in the presence of D-side aliases [see 7249b79f6b4cc ("arm64: Do not flush the D-cache for anonymous pages")]. Unfortunately, this breaks migration of anonymous pages holding self-modifying code, where userspace cannot be reasonably expected to reissue maintenance instructions in response to a migration. This patch fixes the problem by removing the broken page_mapping(page) check from the cache syncing code, otherwise we may end up fetching and executing stale instructions from the PoU. Cc: Catalin Marinas Cc: Will Deacon Cc: Mark Rutland Cc: Reviewed-by: Catalin Marinas Signed-off-by: Shaokun Zhang Signed-off-by: Will Deacon arch/arm64/mm/flush.c | 4 ---- 1 file changed, 4 deletions(-) commit 9ca4e58c20d5cb2a5bc378238188c71317aceac5 Author: Masahiro Yamada Date: Tue Jun 21 10:44:00 2016 +0900 arm64: fix boot image dependencies to not generate invalid images I fixed boot image dependencies for arch/arm in commit 3939f3345050 ("ARM: 8418/1: add boot image dependencies to not generate invalid images"). I see a similar problem for arch/arm64; "make -jN Image Image.gz" would sometimes end up generating bad images where N > 1. Fix the dependency in arch/arm64/Makefile to avoid the race between "make Image" and "make Image.*". Acked-by: Catalin Marinas Signed-off-by: Masahiro Yamada Signed-off-by: Will Deacon arch/arm64/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f7e0efc9b50266f5317b50732efff98d40fc879a Author: Jean-Philippe Brucker Date: Fri Jun 17 18:33:00 2016 +0100 arm64: update ASID limit During a rollover, we mark the active ASID on each CPU as reserved, before allocating a new ID for the task that caused the rollover. This means that with N CPUs, we can only guarantee the new task to obtain a valid ASID if we have at least N+1 ASIDs. Update this limit in the initcall check. Note that this restriction was introduced by commit 8e648066 on the arch/arm side, which disallow re-using the previously active ASID on the local CPU, as it would introduce a TLB race. In addition, we only dispose of NUM_USER_ASIDS-1, since ASID 0 is reserved. Add this restriction as well. Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon arch/arm64/mm/context.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1e3fa0acfec677e915d7de5ac6e1f18cfa4f805b Author: Lyude Date: Thu Jun 9 11:58:15 2016 -0400 drm/i915/fbc: Disable on HSW by default for now >From https://bugs.freedesktop.org/show_bug.cgi?id=96461 : This was kind of a difficult bug to track down. If you're using a Haswell system running GNOME and you have fbc completely enabled and working, playing videos can result in video artifacts. Steps to reproduce: - Run GNOME - Ensure FBC is enabled and active - Download a movie, I used the ogg version of Big Buck Bunny for this - Run `gst-launch-1.0 filesrc location='some_movie.ogg' ! decodebin ! glimagesink` in a terminal - Watch for about over a minute, you'll see small horizontal lines go down the screen. For the time being, disable FBC for Haswell by default. Stefan Richter reported kernel freezes (no video artifacts) when fbc is on. (E3-1245 v3 with HD P4600; openbox and some KDE and LXDE applications, thread begins at https://lkml.org/lkml/2016/4/26/813). We also got reports from Steven Honeyman on openbox+roxterm. v2 (From Paulo): - Add extra information to the commit message - Add Fixes tag - Rebase Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96461 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96464 Fixes: a98ee79317b4 ("drm/i915/fbc: enable FBC by default on HSW and BDW") Cc: stable@vger.kernel.org Reviewed-by: Paulo Zanoni Signed-off-by: Lyude Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1465487895-7401-1-git-send-email-cpaul@redhat.com (cherry picked from commit c7f7e2feffb0294302041507dfd5fc15f01afccc) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_fbc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 34511dce4b35685d3988d5c8b100d11a068db5bd Author: Mika Kahola Date: Mon Jun 20 11:10:26 2016 +0300 drm/i915: Revert DisplayPort fast link training feature It has been found out that in some HW combination the DisplayPort fast link training feature caused screen flickering. Let's revert this feature for now until we can ensure that the feature works for all platforms. This is a manual revert of commits 5fa836a9d859 ("drm/i915: DP link training optimization") and 4e96c97742f4 ("drm/i915: eDP link training optimization"). Fixes: 5fa836a9d859 ("drm/i915: DP link training optimization") Fixes: 4e96c97742f4 ("drm/i915: eDP link training optimization") Cc: # v4.2+ Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91393 Reviewed-by: Jani Nikula Signed-off-by: Mika Kahola Signed-off-by: Jani Nikula Link: http://patchwork.freedesktop.org/patch/msgid/1466410226-19543-1-git-send-email-mika.kahola@intel.com (cherry picked from commit 91df09d92ad82c8778ca218097bf827f154292ca) drivers/gpu/drm/i915/intel_dp.c | 3 --- drivers/gpu/drm/i915/intel_dp_link_training.c | 26 ++------------------------ drivers/gpu/drm/i915/intel_drv.h | 2 -- 3 files changed, 2 insertions(+), 29 deletions(-) commit 270d013659ddab52a6fd0eacae452c422d08aa39 Author: Rex Zhu Date: Tue Jun 7 18:39:06 2016 +0800 drm/amd/powerplay: enable clock stretch feature for polaris Power saving feature which reduces the amount of voltage needed for specific engine clocks. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 120 ++++----------------- 1 file changed, 23 insertions(+), 97 deletions(-) commit 92d1576859577b94eafaea9b64f78ab99fe20a78 Author: Rex Zhu Date: Tue Jun 7 14:09:56 2016 +0800 drm/amdgpu/gfx8: update golden setting for polaris10 Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 432c3a3ca794bd2301425cb58bf097fc26690c17 Author: Rex Zhu Date: Wed Jun 8 19:39:42 2016 +0800 drm/amd/powerplay: enable avfs feature for polaris avfs feature is for voltage control based on gpu system clock on polaris10 Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 90 +++++++++++++++++++++- .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.h | 3 + .../drm/amd/powerplay/hwmgr/polaris10_thermal.c | 6 +- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 43 +++++++++++ drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h | 32 ++++++++ .../gpu/drm/amd/powerplay/inc/polaris10_ppsmc.h | 1 + .../drm/amd/powerplay/smumgr/polaris10_smumgr.c | 50 ++++++++---- 7 files changed, 208 insertions(+), 17 deletions(-) commit c11cb70483c33404d1c0cf9aa48e7627eecbe14d Author: Rex Zhu Date: Wed Jun 8 19:17:31 2016 +0800 drm/amdgpu/atombios: add avfs struct for Polaris10/11 Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/atombios.h | 72 ++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 31b21243776e1f41813f40ce16c465bf03acd9ba Author: Rex Zhu Date: Tue Jun 7 18:38:39 2016 +0800 drm/amd/powerplay: add avfs related define for polaris Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/inc/smu74.h | 75 +++++++++++++++++++--- drivers/gpu/drm/amd/powerplay/inc/smu74_discrete.h | 42 ++++++++---- 2 files changed, 98 insertions(+), 19 deletions(-) commit 9a3c1b342be28a14006f644528dd9baad43db443 Author: Rex Zhu Date: Wed Jun 8 19:42:48 2016 +0800 drm/amd/powrplay: enable stutter_mode for polaris. To minimize the dram power expenditure during static -screen Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 40787ef21c2889fc3d96a11775fa412e715d7d48 Author: Rex Zhu Date: Wed Jun 8 19:41:00 2016 +0800 drm/amd/powerplay: disable UVD SMU handshake for MCLK. sync up with internal programming recommendations. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit a2fb4934e960b11e4430dccc08d606c99910b447 Author: Rex Zhu Date: Mon Jun 13 17:46:31 2016 +0800 drm/amd/powerplay: initialize variables which were missed. Missing pcie dpm settings. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Ken Wang Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 1 + drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 1 + 3 files changed, 4 insertions(+) commit 919e334dec283294acd99951d016e59ad725c9a7 Author: Rex Zhu Date: Wed May 11 17:04:07 2016 +0800 drm/amd/powerplay: enable PowerContainment feature for polaris10/11. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0a4fef559b69ae2e682c98f31d53a225fbda78bd Author: Rex Zhu Date: Tue Jun 14 18:36:36 2016 +0800 drm/amd/powerplay: need to notify system bios pcie device ready before request performance state. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Ken Wang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/pp_acpi.c | 16 +++++++++++++++- drivers/gpu/drm/amd/powerplay/inc/pp_acpi.h | 1 + 2 files changed, 16 insertions(+), 1 deletion(-) commit 576b4401b1971fe40be4cfd379430a61cd8426b2 Author: Rex Zhu Date: Mon Jun 13 17:39:19 2016 +0800 drm/amd/powerplay: fix bug that function parameter was incorect. Wrong value passed to acpi_pcie_perf_request. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Reviewed-by: Ken Wang Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/pp_acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d7b84d12af8312b52316029f1fa0fa4eac3c9e4 Author: Rex Zhu Date: Fri Jun 17 18:21:01 2016 +0800 drm/amd/powerplay: fix logic error. the error lead powerplay can't get display info in DGPU case. store_cc6_data just implement in APU. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 0b1e1eb76220afa043b2733dfe61f5927cf0e458 Author: Boris Brezillon Date: Fri Jun 3 09:17:36 2016 +0200 drm: atmel-hlcdc: Fix OF graph parsing atmel_hlcdc_create_outputs() iterates over OF graph nodes and releases the node (using of_node_put()) after each iteration, which is wrong since for_each_endpoint_of_node() is already taking care of that. Move the of_node_put() call in the error path. Signed-off-by: Boris Brezillon Reviewed-by: Nicolas Ferre Fixes: 17a8e03e7e97 ("drm: atmel-hlcdc: rework the output code to support drm bridges") drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1b7e38b92b0bbd363369f5160f13f4d26140972d Author: Boris Brezillon Date: Fri May 27 16:09:25 2016 +0200 drm: atmel-hlcdc: actually disable scaling when no scaling is required The driver is only enabling scaling, but never disabling it, thus, if you enable the scaling feature once it stays enabled forever. Signed-off-by: Boris Brezillon Reported-by: Alex Vazquez Reviewed-by: Nicolas Ferre Fixes: 1a396789f65a ("drm: add Atmel HLCDC Display Controller support") Cc: drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 2 ++ 1 file changed, 2 insertions(+) commit 086347705be7530feabb6274a3ad81dd545e7914 Merge: a5e9b85 62d0e71d Author: Stephen Boyd Date: Mon Jun 20 17:01:45 2016 -0700 Merge tag 'v4.7-rockchip-clk-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-fixes A bunch of fixes. Some for the newly added rk3399 clock tree, some concerning error handling and initialization and a revert of the mmc-phase clock initialization, as this could conflict with the bootloader setting of this clock and a real solution to initing the phase correctly from dw_mmc went in as fix for 4.7 through the mmc tree. * tag 'v4.7-rockchip-clk-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: release io resource when failing to init clk on rk3399 clk: rockchip: fix cpuclk registration error handling clk: rockchip: Revert "clk: rockchip: reset init state before mmc card initialization" clk: rockchip: fix incorrect parent for rk3399's {c,g}pll_aclk_perihp_src clk: rockchip: mark rk3399 GIC clocks as critical clk: rockchip: initialize flags of clk_init_data in mmc-phase clock commit a5e9b85a6540df6c4074d3a56674f6fb6c5fc830 Author: Wei Yongjun Date: Fri Jun 17 17:24:23 2016 +0000 clk: Fix return value check in oxnas_stdclk_probe() In case of error, the function syscon_node_to_regmap() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR(). Signed-off-by: Wei Yongjun Acked-by: Neil Armstrong Fixes: 0bbd72b4c64f ("clk: Add Oxford Semiconductor OXNAS Standard Clocks") Signed-off-by: Stephen Boyd drivers/clk/clk-oxnas.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ebaaa80e8f20ff2cbbccd6823f73a99565487502 Author: Al Viro Date: Mon Jun 6 20:55:34 2016 -0400 lockless next_positive() Signed-off-by: Al Viro fs/libfs.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) commit 4f42c1b5b9c27b6228e6b9c57eee4beb3118b6b0 Author: Al Viro Date: Mon Jun 6 19:37:13 2016 -0400 libfs.c: new helper - next_positive() Return nth positive child after given or NULL if there's less than n left. dcache_readdir() and dcache_dir_lseek() switched to it. Signed-off-by: Al Viro fs/libfs.c | 77 ++++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 30 deletions(-) commit 274f5b041d3c9c0974a7dd1f66b67c33bb5b0f42 Author: Al Viro Date: Mon Jun 6 18:55:57 2016 -0400 dcache_{readdir,dir_lseek}(): don't bother with nested ->d_lock Make sure that directory is locked shared in dcache_dir_lseek(); for dcache_readdir() it's already tru, and that's enough to make simple_positive() stable. Signed-off-by: Al Viro fs/libfs.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 29b9c528b8c295911e8b1e515273e89a2b7fa2d8 Author: Nicolas Iooss Date: Sat Jun 18 22:55:00 2016 +0200 drm/amdgpu: initialize amdgpu_cgs_acpi_eval_object result value amdgpu_cgs_acpi_eval_object() returned the value of variable "result" without initializing it first. This bug has been found by compiling the kernel with clang. The compiler complained: drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c:972:14: error: variable 'result' is used uninitialized whenever 'for' loop exits because its condition is false [-Werror,-Wsometimes-uninitialized] for (i = 0; i < count; i++) { ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c:1011:9: note: uninitialized use occurs here return result; ^~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c:972:14: note: remove the condition if it is always true for (i = 0; i < count; i++) { ^~~~~~~~~ drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c:864:12: note: initialize the variable 'result' to silence this warning int result; ^ = 0 Fixes: 3f1d35a03b3c ("drm/amdgpu: implement new cgs interface for acpi function") Signed-off-by: Nicolas Iooss Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48a70e1ca85e3b484791e100bb403c05ef9d37c8 Author: Dan Carpenter Date: Sat Jun 18 11:38:44 2016 +0300 drm/amdgpu: precedence bug in amdgpu_device_init() ! has higher precedence than bitwise & so we need to add parenthesis for this to work as intended. Fixes: 048765ad5af7 ('amdgpu: fix asic initialization for virtualized environments (v2)') Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef0dab4aae14e25efddf1577736f8450132800c5 Author: David Miller Date: Sat Jun 18 23:52:25 2016 -0700 PCI: Fix unaligned accesses in VC code The save/restore buffers for VC state is first composed of a 2-byte control register, then a bunch of 4-byte words. This causes unaligned accesses which trap on platform such as sparc. This is easy to fix by simply moving the buffer pointer forward by 4 bytes instead of 2 after dealing with the control register. The length adjustment needs to be changed likewise as well. Fixes: 5f8fc43217a0 ("PCI: Include pci/pcie/Kconfig directly from pci/Kconfig") Reported-by: Meelis Roos Reported-by: Anatoly Pugachev Signed-off-by: David S. Miller Signed-off-by: Bjorn Helgaas CC: stable@vger.kernel.org # v4.6+ drivers/pci/vc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 67016f6cdfd079e632bbc49e33178b2d558c120a Merge: f780f00 e7d6ef9 Author: Linus Torvalds Date: Mon Jun 20 10:41:51 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "A couple more of d_walk()/d_subdirs reordering fixes (stable fodder; ought to solve that crap for good) and a fix for a brown paperbag bug in d_alloc_parallel() (this cycle)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix idiotic braino in d_alloc_parallel() autofs races much milder d_walk() race commit f780f00d723d991353b2a97a8a844ffefbc40505 Merge: 97f78c7 0ded517 Author: Linus Torvalds Date: Mon Jun 20 10:35:48 2016 -0700 Merge tag 'trace-v4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fixes from Steven Rostedt: "Two fixes for the tracing system: - When trace_printk() is used with a non constant format descriptor, it adds a NULL pointer into the trace format section, and the code isn't prepared to deal with it. This bug appeared by a change that was added in v3.5. - The ftracetest (selftests section) can't handle testing histograms when histograms are not configured. Currently it shows that they fail the test, when they should state that they are unsupported. This bug was added in the 4.7 merge window with the addition of the historgram code" * tag 'trace-v4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftracetest: Fix hist unsupported result in hist selftests tracing: Handle NULL formats in hold_module_trace_bprintk_format() commit 97f78c7de8ae38c007fec406d40df99ae62b36de Merge: 4e183d7 9254e70 Author: Linus Torvalds Date: Mon Jun 20 10:18:58 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Two more bugs fixes for 4.7: - a KVM regression introduced with the pgtable.c code split - a perf issue with two hardware PMUs using a shared event context" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/cpum_cf: use perf software context for hardware counters KVM: s390/mm: Fix CMMA reset during reboot commit 4e183d7add15e8bdd131aa14976e26ca3d71a889 Merge: 33688ab 2744d2f Author: Linus Torvalds Date: Mon Jun 20 10:04:12 2016 -0700 Merge tag 'hwmon-for-linus-v4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: "Two stability fixes plus a security fix for the dell-smm driver" * tag 'hwmon-for-linus-v4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (dell-smm) Disallow fan_type() calls on broken machines hwmon: (dell-smm) Restrict fan control and serial number to CAP_SYS_ADMIN by default hwmon: (dell-smm) Fail in ioctl I8K_BIOS_VERSION when bios version is not a number commit 40f0fd372a623e8d32bae0b9361d2a7453ae7a2e Author: Chris J Arges Date: Thu Jun 9 15:31:29 2016 -0500 ecryptfs: fix spelling mistakes Noticed some minor spelling errors when looking through the code. Signed-off-by: Chris J Arges Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 4 ++-- fs/ecryptfs/file.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5f9f2c2abd16fcea6cf7cf87791a24687e2fc345 Author: Wei Yuan Date: Wed Feb 17 14:50:10 2016 +0800 eCryptfs: fix typos in comment Signed-off-by: Weiyuan Signed-off-by: Tyler Hicks fs/ecryptfs/crypto.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c39341cf0d08357f448f4c2fffe2ebcc9495fd01 Author: Julia Lawall Date: Sun Sep 13 14:15:21 2015 +0200 ecryptfs: drop null test before destroy functions Remove unneeded NULL test. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; @@ -if (x != NULL) \(kmem_cache_destroy\|mempool_destroy\|dma_pool_destroy\)(x); // Signed-off-by: Julia Lawall Signed-off-by: Tyler Hicks fs/ecryptfs/main.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit e7d6ef9790bc281f5c29d0132b68031248523fe8 Author: Al Viro Date: Mon Jun 20 01:35:59 2016 -0400 fix idiotic braino in d_alloc_parallel() Check for d_unhashed() while searching in in-lookup hash was absolutely wrong. Worse, it masked a deadlock on dget() done under bitlock that nests inside ->d_lock. Thanks to J. R. Okajima for spotting it. Spotted-by: "J. R. Okajima" Wearing-brown-paperbag: Al Viro Signed-off-by: Al Viro fs/dcache.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 0ded5174e976e2b2a354fe38abf1ebf4492c6dc3 Author: Steven Rostedt (Red Hat) Date: Mon May 23 15:06:30 2016 -0400 ftracetest: Fix hist unsupported result in hist selftests When histograms are not configured in the kernel, the ftracetest histogram selftests should return "unsupported" and not "Failed". To detect this, the test scripts have: FEATURE=`grep hist events/sched/sched_process_fork/trigger` if [ -z "$FEATURE" ]; then echo "hist trigger is not supported" exit_unsupported fi The problem is that '-e' is in effect and any error will cause the program to terminate. The grep for 'hist' fails, because it is not compiled it (thus unsupported), but because grep has an error code for failing to find the string, it causes the program to terminate, and is marked as a failed test. Namhyung Kim recommended to test for the "hist" file located in events/sched/sched_process_fork/hist instead, as it is more inline with the other checks. As the hist file is only created if the histogram feature is enabled, that is a valid check. Link: http://lkml.kernel.org/r/20160523151538.4ea9ce0c@gandalf.local.home Suggested-by: Namhyung Kim Acked-by: Namhyung Kim Acked-by: Masami Hiramatsu Fixes: 76929ab51f0ee ("kselftests/ftrace: Add hist trigger testcases") Signed-off-by: Steven Rostedt .../testing/selftests/ftrace/test.d/trigger/trigger-hist-mod.tc | 9 ++++----- tools/testing/selftests/ftrace/test.d/trigger/trigger-hist.tc | 9 ++++----- .../testing/selftests/ftrace/test.d/trigger/trigger-multihist.tc | 9 ++++----- 3 files changed, 12 insertions(+), 15 deletions(-) commit 70c8217acd4383e069fe1898bbad36ea4fcdbdcc Author: Steven Rostedt (Red Hat) Date: Fri Jun 17 16:10:42 2016 -0400 tracing: Handle NULL formats in hold_module_trace_bprintk_format() If a task uses a non constant string for the format parameter in trace_printk(), then the trace_printk_fmt variable is set to NULL. This variable is then saved in the __trace_printk_fmt section. The function hold_module_trace_bprintk_format() checks to see if duplicate formats are used by modules, and reuses them if so (saves them to the list if it is new). But this function calls lookup_format() that does a strcmp() to the value (which is now NULL) and can cause a kernel oops. This wasn't an issue till 3debb0a9ddb ("tracing: Fix trace_printk() to print when not using bprintk()") which added "__used" to the trace_printk_fmt variable, and before that, the kernel simply optimized it out (no NULL value was saved). The fix is simply to handle the NULL pointer in lookup_format() and have the caller ignore the value if it was NULL. Link: http://lkml.kernel.org/r/1464769870-18344-1-git-send-email-zhengjun.xing@intel.com Reported-by: xingzhen Acked-by: Namhyung Kim Fixes: 3debb0a9ddb ("tracing: Fix trace_printk() to print when not using bprintk()") Cc: stable@vger.kernel.org # v3.5+ Signed-off-by: Steven Rostedt kernel/trace/trace_printk.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 8974189222159154c55f24ddad33e3613960521a Author: Peter Zijlstra Date: Thu Jun 16 10:50:40 2016 +0200 sched/fair: Fix cfs_rq avg tracking underflow As per commit: b7fa30c9cc48 ("sched/fair: Fix post_init_entity_util_avg() serialization") > the code generated from update_cfs_rq_load_avg(): > > if (atomic_long_read(&cfs_rq->removed_load_avg)) { > s64 r = atomic_long_xchg(&cfs_rq->removed_load_avg, 0); > sa->load_avg = max_t(long, sa->load_avg - r, 0); > sa->load_sum = max_t(s64, sa->load_sum - r * LOAD_AVG_MAX, 0); > removed_load = 1; > } > > turns into: > > ffffffff81087064: 49 8b 85 98 00 00 00 mov 0x98(%r13),%rax > ffffffff8108706b: 48 85 c0 test %rax,%rax > ffffffff8108706e: 74 40 je ffffffff810870b0 > ffffffff81087070: 4c 89 f8 mov %r15,%rax > ffffffff81087073: 49 87 85 98 00 00 00 xchg %rax,0x98(%r13) > ffffffff8108707a: 49 29 45 70 sub %rax,0x70(%r13) > ffffffff8108707e: 4c 89 f9 mov %r15,%rcx > ffffffff81087081: bb 01 00 00 00 mov $0x1,%ebx > ffffffff81087086: 49 83 7d 70 00 cmpq $0x0,0x70(%r13) > ffffffff8108708b: 49 0f 49 4d 70 cmovns 0x70(%r13),%rcx > > Which you'll note ends up with sa->load_avg -= r in memory at > ffffffff8108707a. So I _should_ have looked at other unserialized users of ->load_avg, but alas. Luckily nikbor reported a similar /0 from task_h_load() which instantly triggered recollection of this here problem. Aside from the intermediate value hitting memory and causing problems, there's another problem: the underflow detection relies on the signed bit. This reduces the effective width of the variables, IOW its effectively the same as having these variables be of signed type. This patch changes to a different means of unsigned underflow detection to not rely on the signed bit. This allows the variables to use the 'full' unsigned range. And it does so with explicit LOAD - STORE to ensure any intermediate value will never be visible in memory, allowing these unserialized loads. Note: GCC generates crap code for this, might warrant a look later. Note2: I say 'full' above, if we end up at U*_MAX we'll still explode; maybe we should do clamping on add too. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrey Ryabinin Cc: Chris Wilson Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yuyang Du Cc: bsegall@google.com Cc: kernel@kyup.com Cc: morten.rasmussen@arm.com Cc: pjt@google.com Cc: steve.muckle@linaro.org Fixes: 9d89c257dfb9 ("sched/fair: Rewrite runnable load and utilization average tracking") Link: http://lkml.kernel.org/r/20160617091948.GJ30927@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/fair.c | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) commit f155d9c0a138463c3c9380d35e54e433c1477336 Author: Maximilian Schneider Date: Wed Jun 8 18:00:26 2016 +0000 can: gs_usb: Add Basic support for the bytewerk.org candleLight interface This patchs adds basic support for the bytewerk.org candleLight interface, a open hardware (CERN OHL) USB CAN adapter. Signed-off-by: Hubert Denkmair Signed-off-by: Maximilian Schneider Signed-off-by: Marc Kleine-Budde drivers/net/can/usb/Kconfig | 3 ++- drivers/net/can/usb/gs_usb.c | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) commit 43200a4480cbbe660309621817f54cbb93907108 Author: Wolfgang Grandegger Date: Mon Jun 13 15:44:19 2016 +0200 can: at91_can: RX queue could get stuck at high bus load At high bus load it could happen that "at91_poll()" enters with all RX message boxes filled up. If then at the end the "quota" is exceeded as well, "rx_next" will not be reset to the first RX mailbox and hence the interrupts remain disabled. Signed-off-by: Wolfgang Grandegger Tested-by: Amr Bekhit Cc: Signed-off-by: Marc Kleine-Budde drivers/net/can/at91_can.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 427460c83cdf55069eee49799a0caef7dde8df69 Author: Thor Thayer Date: Thu Jun 16 11:10:19 2016 -0500 can: c_can: Update D_CAN TX and RX functions to 32 bit - fix Altera Cyclone access When testing CAN write floods on Altera's CycloneV, the first 2 bytes are sometimes 0x00, 0x00 or corrupted instead of the values sent. Also observed bytes 4 & 5 were corrupted in some cases. The D_CAN Data registers are 32 bits and changing from 16 bit writes to 32 bit writes fixes the problem. Testing performed on Altera CycloneV (D_CAN). Requesting tests on other C_CAN & D_CAN platforms. Reported-by: Richard Andrysek Signed-off-by: Thor Thayer Cc: Signed-off-by: Marc Kleine-Budde drivers/net/can/c_can/c_can.c | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) commit 33688abb2802ff3a230bd2441f765477b94cc89e Author: Linus Torvalds Date: Sun Jun 19 21:30:02 2016 -0700 Linux 4.7-rc4 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab522fd68bc78f3f81f6c553f785dae3462859fa Merge: 5c3da57 b639f19 Author: David S. Miller Date: Sun Jun 19 10:47:33 2016 -0700 Merge branch 'qed-fixes' Yuval Mintz says: ==================== qed*: Fixes series This series contains several small fixes to driver behavior [4th patch is the only one containing a 'fatal' fix, but the error is only theoretical for qede; if would require another protocol driver yet unsubmitted to reach it]. ==================== Signed-off-by: David S. Miller commit b639f197210d37905a6018ae4297659eb3f48f8f Author: Yuval Mintz Date: Sun Jun 19 15:18:15 2016 +0300 qed: Add missing port-mode The 'MODULE_FIBER' value replaced several other FIBER values in newer management firmware images, so existing code would fail to properly reflect its mode. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_hsi.h | 1 + drivers/net/ethernet/qlogic/qed/qed_main.c | 1 + 2 files changed, 2 insertions(+) commit db511c37d4eb2b4e7312791eb8f9b34ed867445e Author: Yuval Mintz Date: Sun Jun 19 15:18:14 2016 +0300 qed: Fix returning unlimited SPQ entries Driver has 2 sets of entries for handling ramrod configurations toward firmware - a regular pre-allocated set of entires and a possible 'unlimited' list of additional pending entries. In most scenarios the 'unlimited' list would not be used, but when it does the handling of the ramrod completion doesn't properly handle the release of the entry. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_spq.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit a0d26d5a4fc8e13993279f788deeb08069e73b69 Author: Yuval Mintz Date: Sun Jun 19 15:18:13 2016 +0300 qed*: Don't reset statistics on inner reload Several user APIs can cause driver to perform an inner-reload. Currently, doing this would cause the HW/FW statistics of the adapter to reset, which isn't the expected behavior [statistics should only reset on explicit unloads]. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 3 ++- drivers/net/ethernet/qlogic/qede/qede_main.c | 7 ++++--- include/linux/qed/qed_eth_if.h | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) commit 326439883e17fca029f4ed05307480bdb6369877 Author: Yuval Mintz Date: Sun Jun 19 15:18:12 2016 +0300 qed: Prevent VF from Tx-switching 'promisc' Internal loopback in driver is based on two things - first is the willingness of transmitter to use it [in case of VFs, this can be forced based on VEPA/VEB] and secondly on another vport classification configuration which should match the packet's destination. Current code allows non-linux VFs to configure a 'promisc' mode on Tx, meaning all traffic sent by VF would be loopbacked internally by firmware; This isn't considered a valid mode and as such should be prevented by PF. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 4 ---- 1 file changed, 4 deletions(-) commit e6bd89232b4a4c9282da1ac8bdd798c2a30d9a46 Author: Yuval Mintz Date: Sun Jun 19 15:18:11 2016 +0300 qed: Correct default vlan behavior When no vlan filter is configured, firmware has a configurable default on whether to pass only untagged packets or all packets regardless of their tagging. Driver currently doesn't set this field in the necessary ramrod, causing the default to always be 'receive all'. Signed-off-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/qlogic/qed/qed_l2.c | 1 + 1 file changed, 1 insertion(+) commit c3695331f3a326a468bd6a5b6f05b481b399726b Merge: 9af1f5d b9d8905 Author: Linus Torvalds Date: Sun Jun 19 07:05:14 2016 -1000 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF fixes and a reiserfs fix from Jan Kara: "A couple of udf fixes (most notably a bug in parsing UDF partitions which led to inability to mount recent Windows installation media) and a reiserfs fix for handling kstrdup failure" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: reiserfs: check kstrdup failure udf: Use correct partition reference number for metadata udf: Use IS_ERR when loading metadata mirror file entry udf: Don't BUG on missing metadata partition descriptor commit 9af1f5d8f20f97884da55817ab80a6fcd170f296 Merge: 049a40c 5156463 Author: Linus Torvalds Date: Sun Jun 19 06:52:20 2016 -1000 Merge tag 'dmaengine-fix-4.7-rc4' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine fixes from Vinod Koul: "Some fixes has piled up, so time to send them upstream. These fixes include: - at_xdmac fixes for residue and other stuff - update MAINTAINERS for dma dt bindings - mv_xor fix for incorrect offset" * tag 'dmaengine-fix-4.7-rc4' of git://git.infradead.org/users/vkoul/slave-dma: dmaengine: mv_xor: Fix incorrect offset in dma_map_page() dmaengine: at_xdmac: double FIFO flush needed to compute residue dmaengine: at_xdmac: fix residue corruption dmaengine: at_xdmac: align descriptors on 64 bits MAINTAINERS: Add file patterns for dma device tree bindings commit 5abe9b26847c65a698f38744a52635b287514294 Author: Luis R. Rodriguez Date: Tue Jun 7 16:52:27 2016 -0700 i2c: remove __init from i2c_register_board_info() As of next-20160607 with allyesconfig we get this linker failure: MODPOST vmlinux.o WARNING: vmlinux.o(.text+0x21bc0d): Section mismatch in reference from the function intel_scu_devices_create() to the function .init.text:i2c_register_board_info() This is caused by the fact that intel_scu_devices_create() calls i2c_register_board_info() and intel_scu_devices_create() is not annotated with __init. This typically involves manual code inspection and if one is certain this is correct we would just peg intel_scu_devices_create() with a __ref annotation. In this case this would be wrong though as the intel_scu_devices_create() call is exported, and used in the ipc_probe() on drivers/platform/x86/intel_scu_ipc.c. The issue is that even though builtin_pci_driver(ipc_driver) is used this just exposes the probe routine, which can occur at any point in time if this bus supports hotplug. A race can happen between kernel_init_freeable() that calls the init calls (in this case registeres the intel_scu_ipc.c driver, and later free_initmem(), which would free the i2c_register_board_info(). If a probe happens later in boot i2c_register_board_info() would not be present and we should get a page fault. Signed-off-by: Luis R. Rodriguez [wsa: made function declaration a one-liner] Signed-off-by: Wolfram Sang drivers/i2c/i2c-boardinfo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 049a40c0a2d4b458583161ec1b9ce109408cb1aa Merge: c141afd 8fd0976 Author: Linus Torvalds Date: Sat Jun 18 20:36:17 2016 -1000 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "Another batch of fixes for ARM SoC platforms. Most are smaller fixes. Two areas that are worth pointing out are: - OMAP had a handful of changes to voltage specs that caused a bit of churn, most of volume of change in this branch is due to this. - There are a couple of _rcuidle fixes from Paul that touch common code and came in through the OMAP tree since they were the ones who saw the problems. The rest is smaller changes across a handful of platforms" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (36 commits) ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes ARM: dts: am437x-sk-evm: Reduce i2c0 bus speed for tps65218 ARM: OMAP2+: timer: add probe for clocksources ARM: OMAP1: fix ams-delta FIQ handler to work with sparse IRQ memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing arm: Use _rcuidle for smp_cross_call() tracepoints MAINTAINERS: Add myself as reviewer of ARM FSL/NXP ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_mem_ret ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_logic_ret ARM: OMAP: DRA7: powerdomain data: Set L3init and L4per to ON ARM: imx6ul: Fix Micrel PHY mask ARM: OMAP2+: Select OMAP_INTERCONNECT for SOC_AM43XX ARM: dts: DRA74x: fix DSS PLL2 addresses ARM: OMAP2: Enable Errata 430973 for OMAP3 ARM: dts: socfpga: Add missing PHY phandle ARM: dts: exynos: Fix port nodes names for Exynos5420 Peach Pit board ARM: dts: exynos: Fix port nodes names for Exynos5250 Snow board ARM: dts: sun6i: yones-toptech-bs1078-v2: Drop constraints on dc1sw regulator ARM: dts: sun6i: primo81: Drop constraints on dc1sw regulator ARM: dts: sunxi: Add OLinuXino Lime2 eMMC to the Makefile ... commit 8fd0976702f05042c776848819e5fd2a835f23c9 Merge: 58935f2 8f50b8e Author: Olof Johansson Date: Sat Jun 18 22:59:07 2016 -0700 Merge tag 'gpmc-omap-fixes-for-v4.7' of https://github.com/rogerq/linux into fixes OMAP-GPMC: Fixes for for v4.7-rc cycle: - Fix omap gpmc EXTRADELAY timing. The DT provided timings were wrongly used causing devices requiring extra delay timing to fail. * tag 'gpmc-omap-fixes-for-v4.7' of https://github.com/rogerq/linux: memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing + Linux 4.7-rc3 Signed-off-by: Olof Johansson commit 58935f24a996cb55595c29dd5303bd9b778c8b00 Merge: 9503427 6b41d44 Author: Olof Johansson Date: Sat Jun 18 22:57:48 2016 -0700 Merge tag 'omap-for-v4.7/fixes-powedomain' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps for v4.7-rc cycle: - Fix dra7 for hardware issues limiting L4Per and L3init power domains to on state. Without this the devices may not work correctly after some time of use because of asymmetric aging. And related to this, let's also remove the unusable states. - Always select omap interconnect for am43x as otherwise the am43x only configurations will not boot properly. This can happen easily for any product kernels that leave out other SoCs to save memory. - Fix DSS PLL2 addresses that have gone unused for now - Select erratum 430973 for omap3, this is now safe to do and can save quite a bit of debugging time for people who may have left it out. * tag 'omap-for-v4.7/fixes-powedomain' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_mem_ret ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_logic_ret ARM: OMAP: DRA7: powerdomain data: Set L3init and L4per to ON ARM: OMAP2+: Select OMAP_INTERCONNECT for SOC_AM43XX ARM: dts: DRA74x: fix DSS PLL2 addresses ARM: OMAP2: Enable Errata 430973 for OMAP3 + Linux 4.7-rc2 Signed-off-by: Olof Johansson commit 41abbf5afa51136bcb2aeefc80bf5c3a005d0aa3 Author: Tobias Jakobi Date: Wed May 25 14:30:07 2016 +0200 drm/exynos: use logical AND in exynos_drm_plane_check_size() The current bitwise AND should result in the same assembler but this is what the code is actually supposed to do. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0fcf43f285cdbc1bbc372919d68aea0cf4483d6 Author: Tobias Jakobi Date: Wed May 25 14:35:41 2016 +0200 drm/exynos: remove superfluous inclusions of fbdev header Neither of these files issue any fbdev related calls. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos7_drm_decon.c | 1 - drivers/gpu/drm/exynos/exynos_drm_core.c | 1 - drivers/gpu/drm/exynos/exynos_drm_fimd.c | 1 - 3 files changed, 3 deletions(-) commit ed4dc2718d3510f0fa5e6794f47b98549848f656 Author: Tobias Jakobi Date: Wed May 25 14:42:56 2016 +0200 drm/exynos: g2d: drop the _REG postfix from the stride defines This makes the defines consistent with the rest. Signed-off-by: Tobias Jakobi Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_g2d.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit e0d7461ceb5bb9b50e534262eb23e92deaaae6f1 Author: Javier Martinez Canillas Date: Thu Jun 2 10:20:10 2016 -0400 drm/exynos: don't use HW trigger for Exynos5420/5422/5800 Commit a6f75aa161c5 ("drm/exynos: fimd: add HW trigger support") added hardware trigger support to the FIMD controller driver. But this broke the display in at least the Exynos5800 Peach Pi Chromebook. So until the issue is fixed, avoid using HW trigger for the Exynos5420 based boards and use SW trigger as it was before the mentioned commit. Signed-off-by: Javier Martinez Canillas Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fimd.c | 3 --- 1 file changed, 3 deletions(-) commit 5e0b37634cbb6bae69b7b15e1ea5f054dfaaa413 Author: Javier Martinez Canillas Date: Mon May 30 20:20:22 2016 -0400 drm/exynos: fimd: don't set .has_hw_trigger in s3c6400 driver data The field value is only checked in fimd_setup_trigger() if .trg_type is I80_HW_TRG so there's no point in setting this field for the s3c6400 if is never going to be used since .trg_type is not set. Signed-off-by: Javier Martinez Canillas Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_drm_fimd.c | 1 - 1 file changed, 1 deletion(-) commit d90efc9ee0df3f13f248aaf47086b1e0ed6035ae Author: Yakir Yang Date: Wed Jun 8 10:13:27 2016 -0400 drm/exynos: dp: Fix NULL pointer dereference due uninitialized connector Commit 3424e3a4f844 ("drm: bridge: analogix/dp: split exynos dp driver to bridge directory") split the Exynos DP core driver into a core driver and a bridge driver for the Analogix chip since that is also used by Rockchip. But the change introduced a regression causing a NULL pointer dereference when trying to access an uninitialized connector in the driver .get_modes: Fix this by instead of having a connector struct for both the Exynos and Analogix drivers, just use the connector initialized in the bridge driver. Fixes: 3424e3a4f844 ("drm: bridge: analogix/dp: split exynos dp driver to bridge directory") Reported-by: Marc Zyngier Signed-off-by: Yakir Yang Tested-by: Marc Zyngier Signed-off-by: Inki Dae drivers/gpu/drm/exynos/exynos_dp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9503427e916aea7ec2cc429504f82d7200ab4bcd Merge: 0e289e5 d279f7a Author: Olof Johansson Date: Sat Jun 18 22:21:52 2016 -0700 Merge tag 'fixes-rcu-fiq-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Fixes for omaps for v4.7-rc cycle: - Two boot warning fixes from the RCU tree that should have gotten merged several weeks ago already but did not because of issues with who merges them. Paul has now split the RCU warning fixes into sets for various maintainers. - Fix ams-delta FIQ regression caused by omap1 sparse IRQ changes - Fix PM for omap3 boards using timer12 and gptimer, like the original beagleboard - Fix hangs on am437x-sk-evm by lowering the I2C bus speed * tag 'fixes-rcu-fiq-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: am437x-sk-evm: Reduce i2c0 bus speed for tps65218 ARM: OMAP2+: timer: add probe for clocksources ARM: OMAP1: fix ams-delta FIQ handler to work with sparse IRQ arm: Use _rcuidle for smp_cross_call() tracepoints arm: Use _rcuidle tracepoint to allow use from idle Signed-off-by: Olof Johansson commit 0e289e534af1b20417a1940c8eba549588671cd8 Author: Lee Jones Date: Fri Jun 17 13:44:18 2016 +0200 ARM: dts: STi: stih407-family: Disable reserved-memory co-processor nodes This patch fixes a non-booting issue in Mainline. When booting with a compressed kernel, we need to be careful how we populate memory close to DDR start. AUTO_ZRELADDR is enabled by default in multi-arch enabled configurations, which place some restrictions on where the kernel is placed and where it will be uncompressed to on boot. AUTO_ZRELADDR takes the decompressor code's start address and masks out the bottom 28 bits to obtain an address to uncompress the kernel to (thus a load address of 0x42000000 means that the kernel will be uncompressed to 0x40000000 i.e. DDR START on this platform). Even changing the load address to after the co-processor's shared memory won't render a booting platform, since the AUTO_ZRELADDR algorithm still ensures the kernel is uncompressed into memory shared with the first co-processor (0x40000000). Another option would be to move loading to 0x4A000000, since this will mean the decompressor will decompress the kernel to 0x48000000. However, this would mean a large chunk (0x44000000 => 0x48000000 (64MB)) of memory would essentially be wasted for no good reason. Until we can work with ST to find a suitable memory location to relocate co-processor shared memory, let's disable the shared memory nodes. This will ensure a working platform in the mean time. NB: The more observant of you will notice that we're leaving the DMU shared memory node enabled; this is because a) it is the only one in active use at the time of this writing and b) it is not affected by the current default behaviour which is causing issues. Fixes: fe135c6 (ARM: dts: STiH407: Move over to using the 'reserved-memory' API for obtaining DMA memory) Signed-off-by: Lee Jones Reviewed-by Peter Griffin Signed-off-by: Maxime Coquelin Signed-off-by: Olof Johansson arch/arm/boot/dts/stih407-family.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit 7752b0d5dcfdb6dcaffb8c83b1ba2af2ef81a81d Merge: a011064 20c1522 Author: Olof Johansson Date: Sat Jun 18 22:18:45 2016 -0700 Merge tag 'imx-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes The i.MX fixes for 4.7: - Correct Micrel PHY mask to fix the issue that i.MX6UL ethernet works in U-Boot but not in kernel. * tag 'imx-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx6ul: Fix Micrel PHY mask Signed-off-by: Olof Johansson commit 5c3da57d70f1ef1d9b60900b84a74d77a9cf0774 Author: Joshua Houghton Date: Sat Jun 18 15:46:31 2016 +0000 net: rds: fix coding style issues Fix coding style issues in the following files: ib_cm.c: add space loop.c: convert spaces to tabs sysctl.c: add space tcp.h: convert spaces to tabs tcp_connect.c:remove extra indentation in switch statement tcp_recv.c: convert spaces to tabs tcp_send.c: convert spaces to tabs transport.c: move brace up one line on for statement Signed-off-by: Joshua Houghton Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/ib_cm.c | 2 +- net/rds/loop.c | 5 +++-- net/rds/sysctl.c | 3 ++- net/rds/tcp.h | 2 +- net/rds/tcp_connect.c | 26 +++++++++++++------------- net/rds/tcp_recv.c | 2 +- net/rds/tcp_send.c | 14 +++++++------- net/rds/transport.c | 3 +-- 8 files changed, 29 insertions(+), 28 deletions(-) commit 4a7d99ea1b27734558feb6833f180cd38a159940 Author: Basil Gunn Date: Thu Jun 16 09:42:30 2016 -0700 AX.25: Close socket connection on session completion A socket connection made in ax.25 is not closed when session is completed. The heartbeat timer is stopped prematurely and this is where the socket gets closed. Allow heatbeat timer to run to close socket. Symptom occurs in kernels >= 4.2.0 Originally sent 6/15/2016. Resend with distribution list matching scripts/maintainer.pl output. Signed-off-by: Basil Gunn Signed-off-by: David S. Miller net/ax25/af_ax25.c | 3 ++- net/ax25/ax25_ds_timer.c | 5 ++++- net/ax25/ax25_std_timer.c | 5 ++++- net/ax25/ax25_subr.c | 3 ++- 4 files changed, 12 insertions(+), 4 deletions(-) commit 30172936eefb70c27fade1bc912a25fc90827b76 Author: Pali Rohár Date: Sat Jun 18 17:47:38 2016 -0700 MAINTAINERS: add Pali Rohár as reviewer of ALPS PS/2 touchpad driver Signed-off-by: Pali Rohár Signed-off-by: Dmitry Torokhov MAINTAINERS | 4 ++++ 1 file changed, 4 insertions(+) commit c141afd1a28793c08c88325aa64b773be6f79ccf Merge: e80dac1 56530f5 Author: Linus Torvalds Date: Sat Jun 18 15:20:15 2016 -1000 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fixes from Russell King: "A couple of fixes for pmd_mknotpresent()/pmd_present() for LPAE systems" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8579/1: mm: Fix definition of pmd_mknotpresent ARM: 8578/1: mm: ensure pmd_present only checks the valid bit commit 6ea24cf79e055f0a62a64baa8587e2254a493c7b Merge: 540c260 4883269 Author: Dmitry Torokhov Date: Sat Jun 18 17:25:08 2016 -0700 Merge branch 'cec-defines' into for-linus Let's bring in HDMI CEC defines to ease merging CEC support in the next merge window. commit 2744d2fde00dc8bcc3679eb72c81a63058e90faa Author: Pali Rohár Date: Sat Jun 18 00:54:46 2016 +0200 hwmon: (dell-smm) Disallow fan_type() calls on broken machines Some Dell machines have especially broken SMM or BIOS which cause that once fan_type() is called then CPU fan speed going randomly up and down. And for fixing this behaviour reboot is required. So this patch creates fan_type blacklist of affected Dell machines and disallow fan_type() call on them to prevent that erratic behaviour. Old blacklist which disabled loading driver on some machines added in commits a4b45b25f18d ("hwmon: (dell-smm) Blacklist Dell Studio XPS 8100") and 6220f4ebd7b4 ("hwmon: (dell-smm) Blacklist Dell Studio XPS 8000") were moved to FAN_TYPE blacklist. Reported-by: Jan C Peters Signed-off-by: Pali Rohár Link: https://bugzilla.kernel.org/show_bug.cgi?id=100121 Cc: stable@vger.kernel.org # v4.0+, will need backport Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) commit 7613663cc186f8f3c50279390ddc60286758001c Author: Pali Rohár Date: Sat Jun 18 00:54:45 2016 +0200 hwmon: (dell-smm) Restrict fan control and serial number to CAP_SYS_ADMIN by default For security reasons ordinary user must not be able to control fan speed via /proc/i8k by default. Some malicious software running under "nobody" user could be able to turn fan off and cause HW problems. So this patch changes default value of "restricted" parameter to 1. Also restrict reading of DMI_PRODUCT_SERIAL from /proc/i8k via "restricted" parameter. It is because non root user cannot read DMI_PRODUCT_SERIAL from sysfs file /sys/class/dmi/id/product_serial. Old non secure behaviour of file /proc/i8k can be achieved by loading this module with "restricted" parameter set to 0. Note that this patch has effects only for kernels compiled with CONFIG_I8K and only for file /proc/i8k. Hwmon interface provided by this driver was not changed and root access for setting fan speed was needed also before. Reported-by: Mario Limonciello Signed-off-by: Pali Rohár Cc: stable@vger.kernel.org # will need backport Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) commit 053ea640818812313892ec4f370f5cfac42fd355 Author: Pali Rohár Date: Sat Jun 18 00:54:44 2016 +0200 hwmon: (dell-smm) Fail in ioctl I8K_BIOS_VERSION when bios version is not a number ABI of I8K_BIOS_VERSION ioctl can return only number. But new BIOS versions contain also other characters, which does not fit into that ABI. So in case of non digit values return -EINVAL. Reported-by: Mario Limonciello Signed-off-by: Pali Rohár Signed-off-by: Guenter Roeck drivers/hwmon/dell-smm-hwmon.c | 5 +++++ 1 file changed, 5 insertions(+) commit 951d77fd5a541d68eeb7372e72cd4757e3058517 Merge: 27ea13e 8beb330 Author: James Bottomley Date: Sat Jun 18 11:59:01 2016 -0700 Merge remote-tracking branch 'mkp-scsi/4.7/scsi-fixes' into fixes commit 488326947cd1f038da8d2c9068a0d07b913b7983 Author: Kamil Debski Date: Sat Jun 18 10:10:56 2016 -0700 Input: add HDMI CEC specific keycodes Add HDMI CEC specific keycodes to the keycodes definition. Signed-off-by: Kamil Debski Signed-off-by: Hans Verkuil Signed-off-by: Dmitry Torokhov include/uapi/linux/input-event-codes.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 3720b69bafe9ccb989b9a8604f3e3f89b3610685 Author: Hans Verkuil Date: Sat Jun 18 10:10:26 2016 -0700 Input: add BUS_CEC type Inputs can come in over the HDMI CEC bus, so add a new type for this. Signed-off-by: Hans Verkuil Signed-off-by: Dmitry Torokhov include/uapi/linux/input.h | 1 + 1 file changed, 1 insertion(+) commit d4f56c7773483b8829e89cfc739b7a5a071f6da0 Author: Sricharan R Date: Fri Jun 10 23:38:20 2016 +0530 i2c: qup: Fix wrong value of index variable index gets incremented during check to determine if the messages can be transferred with dma. But not reset after that, resulting in wrong start value in subsequent loop, causing failure. Fix it. Signed-off-by: Sricharan R Signed-off-by: Wolfram Sang Cc: stable@kernel.org drivers/i2c/busses/i2c-qup.c | 2 ++ 1 file changed, 2 insertions(+) commit e80dac114c63dd54398c3c785a6431622c320e87 Merge: a50094a 083d5ad Author: Linus Torvalds Date: Sat Jun 18 06:06:49 2016 -1000 Merge tag 'usb-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB fixes from Greg KH: "Here are a bunch (65) of USB fixes for 4.7-rc4. Sorry about the quantity, I've been slow in getting these out. The majority are the "normal" gadget, musb, and xhci fixes, that we all are used to. There are also a few other tiny fixes resolving a number of reported issues that showed up in 4.7-rc1. All of these have been in linux-next" * tag 'usb-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (65 commits) usbip: rate limit get_frame_number message usb: musb: sunxi: Remove bogus "Frees glue" comment usb: musb: sunxi: Fix NULL ptr deref when gadget is registered before musb usb: echi-hcd: Add ehci_setup check before echi_shutdown usb: host: ehci-msm: Conditionally call ehci suspend/resume MAINTAINERS: Add file patterns for usb device tree bindings usb: host: ehci-tegra: Avoid getting the same reset twice usb: host: ehci-tegra: Grab the correct UTMI pads reset USB: mos7720: delete parport USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails phy: ti-pipe3: Program the DPLL even if it was already locked usb: musb: Stop bulk endpoint while queue is rotated usb: musb: Ensure rx reinit occurs for shared_fifo endpoints usb: musb: host: correct cppi dma channel for isoch transfer usb: musb: only restore devctl when session was set in backup usb: phy: Check initial state for twl6030 usb: musb: Use normal module_init for 2430 glue usb: musb: Remove pm_runtime_set_irq_safe usb: musb: Remove extra PM runtime calls from 2430 glue layer usb: musb: Return error value from musb_mailbox ... commit a50094a4813443a7ca605f86019061905ba697c4 Merge: 607117a bc8201e Author: Linus Torvalds Date: Sat Jun 18 06:05:28 2016 -1000 Merge tag 'staging-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull IIO and staging fixes from Greg KH: "Here are a number of IIO and staging bugfixes for 4.7-rc4. Nothing huge, the normal amount of iio driver fixes, and some small staging driver bugfixes for some reported problems (2 are reverts of patches that went into 4.7-rc1). All have been in linux-next with no reported issues" * tag 'staging-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (24 commits) Revert "Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type." Revert "Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)" staging: lustre: lnet: Don't access NULL NI on failure path iio: hudmidity: hdc100x: fix incorrect shifting and scaling iio: light apds9960: Add the missing dev.parent iio: Fix error handling in iio_trigger_attach_poll_func iio: st_sensors: Disable DRDY at init time iio: st_sensors: Init trigger before irq request iio: st_sensors: switch to a threaded interrupt iio: light: bh1780: assign a static name iio: bh1780: dereference the client properly iio: humidity: hdc100x: fix IIO_TEMP channel reporting iio:st_pressure: fix sampling gains (bring inline with ABI) iio: proximity: as3935: fix buffer stack trashing iio: proximity: as3935: remove triggered buffer processing iio: proximity: as3935: correct IIO_CHAN_INFO_RAW output max44000: Remove scale from proximity iio: humidity: am2315: Remove a stray unlock iio: humidity: hdc100x: correct humidity integration time mask iio: pressure: bmp280: fix error message for wrong chip id ... commit 607117a1533d8ef41b34aa170363ae4415b3d524 Merge: 07b5ca2 5e25db8 Author: Linus Torvalds Date: Sat Jun 18 06:04:01 2016 -1000 Merge tag 'driver-core-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core fixes from Greg KH: "Here are a small number of debugfs, ISA, and one driver core fix for 4.7-rc4. All of these resolve reported issues. The ISA ones have spent the least amount of time in linux-next, sorry about that, I didn't realize they were regressions that needed to get in now (thanks to Thorsten for the prodding!) but they do all pass the 0-day bot tests. The others have been in linux-next for a while now. Full details about them are in the shortlog below" * tag 'driver-core-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: isa: Dummy isa_register_driver should return error code isa: Call isa_bus_init before dependent ISA bus drivers register watchdog: ebc-c384_wdt: Allow build for X86_64 iio: stx104: Allow build for X86_64 gpio: Allow PC/104 devices on X86_64 isa: Allow ISA-style drivers on modern systems base: make module_create_drivers_dir race-free debugfs: open_proxy_open(): avoid double fops release debugfs: full_proxy_open(): free proxy on ->open() failure kernel/kcov: unproxify debugfs file's fops commit 07b5ca22a1e6268c5193f9606ad5b746853ace40 Merge: 4c6459f 5014e90 Author: Linus Torvalds Date: Sat Jun 18 06:02:37 2016 -1000 Merge tag 'char-misc-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc driver fixes from Greg KH: "Here are a small number of char and misc driver fixes for 4.7-rc4. They resolve some minor issues that have been reported, and have all been in linux-next" * tag 'char-misc-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: coresight: Handle build path error coresight: Fix erroneous memset in tmc_read_unprepare_etr coresight: Fix tmc_read_unprepare_etr coresight: Fix NULL pointer dereference in _coresight_build_path extcon: palmas: Fix boot up state of VBUS when using GPIO detection mcb: Acquire reference to carrier module in core mcb: Acquire reference to device in probe mei: don't use wake_up_interruptible for wr_ctrl commit 4c6459f945c7c64123c4aec0667d196090213d53 Merge: d9e6614 de18c16 Author: Linus Torvalds Date: Sat Jun 18 05:57:59 2016 -1000 Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "The most user visible change here is a fix for our recent superblock validation checks that were causing problems on non-4k pagesized systems" * 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: btrfs_check_super_valid: Allow 4096 as stripesize btrfs: remove build fixup for qgroup_account_snapshot btrfs: use new error message helper in qgroup_account_snapshot btrfs: avoid blocking open_ctree from cleaner_kthread Btrfs: don't BUG_ON() in btrfs_orphan_add btrfs: account for non-CoW'd blocks in btrfs_abort_transaction Btrfs: check if extent buffer is aligned to sectorsize btrfs: Use correct format specifier commit d9e66146c1da8e771378b078b958057024d8f604 Merge: 057868e 46577e6 Author: Linus Torvalds Date: Fri Jun 17 20:22:37 2016 -1000 Merge tag 'acpi-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Revert a recent ACPICA commit that introduced a suspend-to-RAM regression on one system due to incorrect information in its ACPI tables that had not been taken into consideration at all before (and everything worked), but the commit in question started to use it" * tag 'acpi-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()" commit 057868ea15bf93912925c4843c65dbaf305c60ed Merge: 6be28d3 9d066a2 Author: Linus Torvalds Date: Fri Jun 17 20:08:00 2016 -1000 Merge tag 'pm-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Fixes for two recent regressions that may lead to degraded performance (operating performance points framework, intel_pstate). Specifics: - Fix a recent regression in the intel_pstate driver that may lead to degraded performance on some systems due to missing turbo state entry in the table returned by the ACPI _PSS object (Srinivas Pandruvada). - Fix a recent regression in the OPP (operating performance points) framework that may lead to degraded performance on some systems where the OPP table is created too early (Viresh Kumar)" * tag 'pm-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / OPP: Add 'UNKNOWN' status for shared_opp in struct opp_table cpufreq: intel_pstate: Adjust _PSS[0] freqeuency if needed commit 3bb549ae4c51028c1930528ae9fcd6eca0474724 Author: Sowmini Varadhan Date: Fri Jun 17 16:12:12 2016 -0400 RDS: TCP: rds_tcp_accept_one() should transition socket from RESETTING to UP The state of the rds_connection after rds_tcp_reset_callbacks() would be RDS_CONN_RESETTING and this is the value that should be passed by rds_tcp_accept_one() to rds_connect_path_complete() to transition the socket to RDS_CONN_UP. Fixes: b5c21c0947c1 ("RDS: TCP: fix race windows in send-path quiescence by rds_tcp_accept_one()") Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/tcp_listen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9836cbb5fc885d3b8f3b91b2d47525f7269dec1 Author: Arnd Bergmann Date: Fri Jun 17 18:15:30 2016 +0200 net: tilegx: use correct timespec64 type The conversion to the 64-bit time based ptp methods left two instances of 'struct timespec' in place. This is harmless because 64-bit architectures define timespec64 as timespec, and this driver is not used on 32-bit machines. However, using 'struct timespec64' directly is obviously the right thing to do, and will help us remove 'struct timespec' in the future. Signed-off-by: Arnd Bergmann Fixes: b9acf24f779c ("ptp: tilegx: convert to the 64 bit get/set time methods.") Acked-by: Richard Cochran Signed-off-by: David S. Miller drivers/net/ethernet/tile/tilegx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6be28d33874998e1523df818173dacfed180b792 Merge: 9cbbef4 a80e803 Author: Linus Torvalds Date: Fri Jun 17 19:27:12 2016 -1000 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID subsystem fixes from Jiri Kosina: - kernel panic fix in hid-elo from Oliver Neukum - Surface Pro 3 device quirk from Benjamin Tissoires * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: multitouch: Add MT_QUIRK_NOT_SEEN_MEANS_UP to Surface Pro 3 HID: elo: kill not flush the work commit b47ac27a1dbebc559156f92a0807dc957bb12731 Merge: f1d048f 4e239fa Author: David S. Miller Date: Fri Jun 17 21:57:54 2016 -0700 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: couple of fixes Couple of slowpath tx stats fixes for Spectrum and SwitchX-2. ==================== Signed-off-by: David S. Miller commit 4e239fac7c6b9d703e83c81b52ec9fec00c50129 Author: Nogah Frankel Date: Fri Jun 17 15:09:06 2016 +0200 mlxsw: switchx2: Don't count internal TX header bytes to stats Stop the SW TX counter from counting the TX header bytes since they are not being sent out. Fixes: e577516b9db3 ("mlxsw: Fix use-after-free bug in mlxsw_sx_port_xmit") Signed-off-by: Nogah Frankel Reviewed-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 63dcdd35c1552ca0c911e98ba3389a0729a457f4 Author: Nogah Frankel Date: Fri Jun 17 15:09:05 2016 +0200 mlxsw: spectrum: Don't count internal TX header bytes to stats Stop the SW TX counter from counting the TX header bytes since they are not being sent out. Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC") Reviewed-by: Ido Schimmel Signed-off-by: Nogah Frankel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit f1d048f24e66ba85d3dabf3d076cefa5f2b546b0 Author: Jon Paul Maloy Date: Fri Jun 17 06:35:57 2016 -0400 tipc: fix socket timer deadlock We sometimes observe a 'deadly embrace' type deadlock occurring between mutually connected sockets on the same node. This happens when the one-hour peer supervision timers happen to expire simultaneously in both sockets. The scenario is as follows: CPU 1: CPU 2: -------- -------- tipc_sk_timeout(sk1) tipc_sk_timeout(sk2) lock(sk1.slock) lock(sk2.slock) msg_create(probe) msg_create(probe) unlock(sk1.slock) unlock(sk2.slock) tipc_node_xmit_skb() tipc_node_xmit_skb() tipc_node_xmit() tipc_node_xmit() tipc_sk_rcv(sk2) tipc_sk_rcv(sk1) lock(sk2.slock) lock((sk1.slock) filter_rcv() filter_rcv() tipc_sk_proto_rcv() tipc_sk_proto_rcv() msg_create(probe_rsp) msg_create(probe_rsp) tipc_sk_respond() tipc_sk_respond() tipc_node_xmit_skb() tipc_node_xmit_skb() tipc_node_xmit() tipc_node_xmit() tipc_sk_rcv(sk1) tipc_sk_rcv(sk2) lock((sk1.slock) lock((sk2.slock) ===> DEADLOCK ===> DEADLOCK Further analysis reveals that there are three different locations in the socket code where tipc_sk_respond() is called within the context of the socket lock, with ensuing risk of similar deadlocks. We now solve this by passing a buffer queue along with all upcalls where sk_lock.slock may potentially be held. Response or rejected message buffers are accumulated into this queue instead of being sent out directly, and only sent once we know we are safely outside the slock context. Reported-by: GUNA Acked-by: Ying Xue Signed-off-by: Jon Maloy Signed-off-by: David S. Miller net/tipc/socket.c | 54 ++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 42 insertions(+), 12 deletions(-) commit 5e25db870ec983be138b343a3d04c79a5c1f1703 Author: William Breathitt Gray Date: Mon May 9 09:39:50 2016 -0400 isa: Dummy isa_register_driver should return error code The inline isa_register_driver stub simply allows compilation on systems with CONFIG_ISA disabled; the dummy isa_register_driver does not register an isa_driver at all. The inline isa_register_driver should return -ENODEV to indicate lack of support when attempting to register an isa_driver on such a system with CONFIG_ISA disabled. Cc: Matthew Wilcox Reported-by: Sasha Levin Tested-by: Ye Xiaolong Signed-off-by: William Breathitt Gray Signed-off-by: Greg Kroah-Hartman include/linux/isa.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 32a5a0c047343b11f581f663a2309cf43d13466f Author: William Breathitt Gray Date: Wed May 11 17:01:40 2016 -0400 isa: Call isa_bus_init before dependent ISA bus drivers register The isa_bus_init function must be called before drivers which utilize the ISA bus driver are registered. A race condition for initilization exists if device_initcall is used (the isa_bus_init callback is placed in the same initcall level as dependent drivers which use module_init). This patch ensures that isa_bus_init is called first by utilizing postcore_initcall in favor of device_initcall. Fixes: a5117ba7da37 ("[PATCH] Driver model: add ISA bus") Cc: Rene Herman Signed-off-by: William Breathitt Gray Signed-off-by: Greg Kroah-Hartman drivers/base/isa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b87b8ff760d51b33b4e23d7f3a42ded55a668735 Author: William Breathitt Gray Date: Fri May 27 18:09:27 2016 -0400 watchdog: ebc-c384_wdt: Allow build for X86_64 With the introduction of the ISA_BUS_API Kconfig option, ISA-style drivers may be built for X86_64 architectures. This patch changes the ISA Kconfig option dependency of the WinSystems EBC-C384 watchdog timer driver to ISA_BUS_API, thus allowing it to build for X86_64 as it is expected to. Cc: Wim Van Sebroeck Reviewed-by: Guenter Roeck Signed-off-by: William Breathitt Gray Signed-off-by: Greg Kroah-Hartman drivers/watchdog/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 75897b7c5ee9f9a23ec7863d4f8758bc041ba656 Author: William Breathitt Gray Date: Fri May 27 18:09:08 2016 -0400 iio: stx104: Allow build for X86_64 With the introduction of the ISA_BUS_API Kconfig option, ISA-style drivers may be built for X86_64 architectures. This patch changes the ISA Kconfig option dependency of the Apex Embedded Systems STX104 DAC driver to ISA_BUS_API, thus allowing it to build for X86_64 as it is expected to. Cc: Hartmut Knaack Cc: Lars-Peter Clausen Cc: Peter Meerwald-Stadler Reviewed-by: Guenter Roeck Signed-off-by: William Breathitt Gray Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman drivers/iio/dac/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f4ae916912b4969916ebb275995c745b01cb432c Author: William Breathitt Gray Date: Fri May 27 18:08:56 2016 -0400 gpio: Allow PC/104 devices on X86_64 With the introduction of the ISA_BUS_API Kconfig option, ISA-style drivers may be built for X86_64 architectures. This patch changes the ISA Kconfig option dependency of the PC/104 drivers to ISA_BUS_API, thus allowing them to build for X86_64 as they are expected to. Cc: Alexandre Courbot Reviewed-by: Guenter Roeck Signed-off-by: William Breathitt Gray Acked-by: Linus Walleij Signed-off-by: Greg Kroah-Hartman drivers/gpio/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3a4955111ad46a022f05b51f91306d864f989625 Author: William Breathitt Gray Date: Fri May 27 18:08:27 2016 -0400 isa: Allow ISA-style drivers on modern systems Several modern devices, such as PC/104 cards, are expected to run on modern systems via an ISA bus interface. Since ISA is a legacy interface for most modern architectures, ISA support should remain disabled in general. Support for ISA-style drivers should be enabled on a per driver basis. To allow ISA-style drivers on modern systems, this patch introduces the ISA_BUS_API and ISA_BUS Kconfig options. The ISA bus driver will now build conditionally on the ISA_BUS_API Kconfig option, which defaults to the legacy ISA Kconfig option. The ISA_BUS Kconfig option allows the ISA_BUS_API Kconfig option to be selected on architectures which do not enable ISA (e.g. X86_64). The ISA_BUS Kconfig option is currently only implemented for X86 architectures. Other architectures may have their own ISA_BUS Kconfig options added as required. Reviewed-by: Guenter Roeck Signed-off-by: William Breathitt Gray Acked-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman arch/Kconfig | 3 +++ arch/x86/Kconfig | 9 +++++++++ drivers/base/Makefile | 2 +- include/linux/isa.h | 2 +- 4 files changed, 14 insertions(+), 2 deletions(-) commit 695ef16cd0510f3bc963967fd73a360989fe4ebf Merge: ce449ba 1463847 Author: David S. Miller Date: Fri Jun 17 19:50:04 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are rather small patches but fixing several outstanding bugs in nf_conntrack and nf_tables, as well as minor problems with missing SYNPROXY header uapi installation: 1) Oneliner not to leak conntrack kmemcache on module removal, this problem was introduced in the previous merge window, patch from Florian Westphal. 2) Two fixes for insufficient ruleset loop validation, one due to incorrect flag check in nf_tables_bind_set() and another related to silly wrong generation mask logic from the walk path, from Liping Zhang. 3) Fix double-free of anonymous sets on error, this fix simplifies the code to let the abort path take care of releasing the set object, also from Liping Zhang. 4) The introduction of helper function for transactions broke the skip inactive rules logic from the nft_do_chain(), again from Liping Zhang. 5) Two patches to install uapi xt_SYNPROXY.h header and calm down kbuild robot due to missing #include . ==================== Signed-off-by: David S. Miller commit 083d5ad1a924e79ecf92be37cce9f1efa5c1d240 Author: Greg Kroah-Hartman Date: Tue Jun 14 13:41:07 2016 -0700 usbip: rate limit get_frame_number message It's annoying to constantly see the same "Not yet implemented" message over and over with nothing able to be done about it, so rate limit it for now to keep user's logs "clean". Reported-by: Lars Täuber Tested-by: Lars Täuber Signed-off-by: Greg Kroah-Hartman drivers/usb/usbip/vhci_hcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 34d351f8ddf6dee24d739c4b00a4404e48089a04 Author: Sebastian Sanchez Date: Thu Jun 9 07:52:03 2016 -0700 IB/hfi1: Send a pkey change event on driver pkey update Swapping a cable from a "Mgmt Allowed=No" switch port to a "Mgmt Allowed=Yes" switch port doesn't send a pkey change notification. Therefore, the link doesn't become active as the oib_utils layer uses an old pkey table cache. Fix by ensuring the pkey change notification is sent when the table is changed both explicitly by the FM and implicitly by the driver via a cable swap. Reviewed-by: Mike Marciniszyn Signed-off-by: Sebastian Sanchez Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 2 ++ drivers/infiniband/hw/hfi1/mad.c | 19 ++++++++++++------- drivers/infiniband/hw/hfi1/mad.h | 2 ++ 3 files changed, 16 insertions(+), 7 deletions(-) commit 3ec5fa28c9ea54fb172859d2612a0be6526e4dc1 Author: Sebastian Sanchez Date: Thu Jun 9 07:51:57 2016 -0700 IB/hfi1: Remove FULL_MGMT_P_KEY from pkey table at link up FULL_MGMT_P_KEY doesn't get cleared from the pkey table at link bounce because the link down and link bounce code paths are different when moving a QSFP cable on a switch. This causes an HFI unit connected to a switch to try to be initialized to an FM node when the QSFP cable is moved from a MgmtAllowed=NO port to a MgmtAllowed=YES port and back to a MgmtAllowed=NO port. Remove FULL_MGMT_P_KEY from pkey table at link up. Reviewed-by: Dean Luick Signed-off-by: Sebastian Sanchez Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) commit c078f0dd01b73c70b92a660cb1ce3dfc3cbf2903 Author: Tadeusz Struk Date: Thu Jun 9 07:51:51 2016 -0700 IB/hfi1: Fix potential buffer overflow This fixes potential buffer overflow because the sprintf function doesn't check buffer boundaries. Use snprintf instead. Reviewed-by: Dennis Dalessandro Signed-off-by: Tadeusz Struk Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/qsfp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 93dd0a097859a174817ea94ec55bfc29c5706454 Author: Tadeusz Struk Date: Thu Jun 9 07:51:45 2016 -0700 IB/hfi1: Fix potential NULL ptr dereference This fixes potential NULL ptr dereference because IS_ERR(dd) doesn't handle NULL. Fix the issue by initializing the pointer with a not NULL error code. Reviewed-by: Dennis Dalessandro Signed-off-by: Tadeusz Struk Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e9ef24619486213223053678eb9175630ef6bf9 Author: Ira Weiny Date: Thu Jun 9 07:51:39 2016 -0700 IB/qib: Prevent context loss If a context has already been assigned to an FD, prevent another assignment. Reviewed-by: Dennis Dalessandro Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/hw/qib/qib_file_ops.c | 5 +++++ 1 file changed, 5 insertions(+) commit ca2f30a0a6786e6b08eeb8abb2bbb8df58709d6e Author: Ira Weiny Date: Thu Jun 9 07:51:33 2016 -0700 IB/hfi1: Prevent context loss If a context has already been assigned to an FD, prevent another assignment. Reviewed-by: Dennis Dalessandro Signed-off-by: Ira Weiny Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/file_ops.c | 3 +++ 1 file changed, 3 insertions(+) commit c3c64a951cbdb6096d02dcc339a9c807ce1e976a Author: Jubin John Date: Thu Jun 9 07:51:27 2016 -0700 IB/hfi1: Increase packet egress timeout The current value of 500us for the packet egress timeout is too small which causes the host to declare failure on draining packets too early and unnecessarily bounces the link. Increase this to 50ms taking into account the switch packet discard timer default and the worst case per-VL package drainage rate. Reviewed-by: Dean Luick Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/pio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 501edc42446e89fa67fb6ef2c9afb50792c310c0 Author: Brian Welty Date: Thu Jun 9 07:51:20 2016 -0700 IB/rdmavt: Correct warning during QPN allocation Correct calculation of the low order bits which should be unset based on use of qos_shift parameter when assigning QPN. Reviewed-by: Dennis Dalessandro Signed-off-by: Brian Welty Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96605672a4172f6e31f31ce29ee27fef68011de0 Author: Brian Welty Date: Thu Jun 9 07:51:14 2016 -0700 IB/rdmavt: Correct required callback functions for MODIFY_QP Functions required for MODIFY_PORT were incorrectly being required for MODIFY_QP. Reviewed-by: Dennis Dalessandro Signed-off-by: Brian Welty Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/vt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b4ba6633ea153266429f16614029ab1578815390 Author: Jubin John Date: Thu Jun 9 07:51:08 2016 -0700 IB/hfi1: Fix credit return threshold adjustment The credit return threshold adjustment on mtu change algorithm does not take into account all the kernel send contexts that are assigned per VL. Use the pio send context map to adjust the credit return thresholds for all the allocated and assigned kernel send contexts based on the MTU adjustment per VL. The pio send context map can be changed dynamically based on the actual number of operational vls which is set by the fabric manager. When this happens update the credit return threshold values for all the remapped kernel send contexts. Reviewed-by: Dennis Dalessandro Reviewed-by: Mike Marciniszyn Reviewed-by: Jianxin Xiong Signed-off-by: Jubin John Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 7 +++++-- drivers/infiniband/hw/hfi1/pio.c | 24 ++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) commit 37e07cdafc111dfb7ce27e70e73d900d7cf2920c Author: Bart Van Assche Date: Fri Jun 10 11:08:25 2016 -0700 IB/cma: Make the code easier to verify Static source code analysis tools like smatch cannot handle functions that lock or not lock a mutex depending on the value of the arguments. Hence inline the function cma_disable_callback(). Additionally, this patch realizes a small performance optimization by reducing the number of mutex_lock() and mutex_unlock() calls in the modified functions. With this patch applied smatch no longer complains about source file cma.c. Without this patch smatch reports the following for this source file: drivers/infiniband/core/cma.c:1959: cma_req_handler() warn: inconsistent returns 'mutex:&listen_id->handler_mutex'. Locked on: line 1880 line 1959 Unlocked on: line 1941 drivers/infiniband/core/cma.c:2112: iw_conn_req_handler() warn: inconsistent returns 'mutex:&listen_id->handler_mutex'. Locked on: line 2048 Unlocked on: line 2112 Signed-off-by: Bart Van Assche Cc: Sean Hefty Cc: Steve Wise Cc: Leon Romanovsky Acked-by: Sean Hefty Reviewed-by: Steve Wise Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cma.c | 54 +++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 28 deletions(-) commit 46577e6a052ff5add7577ac748fb8628b3c3c7c9 Merge: 5edb564 da4e792 Author: Rafael J. Wysocki Date: Sat Jun 18 01:55:55 2016 +0200 Merge branch 'acpica-fixes' * acpica-fixes: Revert "ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()" commit 9d066a252786e1a18484a6283f82614d42a9f4ac Merge: 79ee2e8 b00345d Author: Rafael J. Wysocki Date: Sat Jun 18 01:55:13 2016 +0200 Merge branches 'pm-opp' and 'pm-cpufreq-fixes' * pm-opp: PM / OPP: Add 'UNKNOWN' status for shared_opp in struct opp_table * pm-cpufreq-fixes: cpufreq: intel_pstate: Adjust _PSS[0] freqeuency if needed commit 8c5122e45a10a9262f872b53f151a592e870f905 Author: Jason Gunthorpe Date: Wed Jun 8 17:28:29 2016 -0600 IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs When this code was reworked for IBoE support the order of assignments for the sl_tclass_flowlabel got flipped around resulting in TClass & FlowLabel being permanently set to 0 in the packet headers. This breaks IB routers that rely on these headers, but only affects kernel users - libmlx4 does this properly for user space. Cc: stable@vger.kernel.org Fixes: fa417f7b520e ("IB/mlx4: Add support for IBoE") Signed-off-by: Jason Gunthorpe Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/ah.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b10029d826ed8c18a5f9d2f4abfa415d15cd1d3 Author: Alex Deucher Date: Fri Jun 17 10:17:17 2016 -0400 drm/amdgpu: fix num_rbs exposed to userspace (v2) This was accidently broken for harvest cards when the code was refactored for Polaris support. v2: multiply by shader engines. Noticed by Nicolai. Reviewed-by: Nicolai Hähnle Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bc8201e3e1885614a5cd3a5f70a79d08f99152fd Author: Hans de Goede Date: Sun Jun 5 21:01:19 2016 +0200 Revert "Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type." This reverts commit b5e12ec38331 ("Staging: rtl8188eu: rtw_efuse: Use sizeof type *pointer instead of sizeof type."). This commit is wrong, the rtw_malloc2d helper function takes the size of the array elements as its 3th argument, whereas sizeof(*eFuseWord) gives the size of a pointer instead of the size of a u16. Since sizeof(void *) > sizeof(u16) this has no adverse effects, but it is still wrong. Cc: Sandhya Bankar Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/core/rtw_efuse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6982f867e058f0c6c8d3eeb4ef305efd7d7f4c8c Author: Hans de Goede Date: Sun Jun 5 21:01:18 2016 +0200 Revert "Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)" This reverts commit 99aded71b52c ("Staging: drivers: rtl8188eu: use sizeof(*ptr) instead of sizeof(struct)"). This commit is wrong, as adapt->HalData has a type of "void *", so now we are allocating a much to small struct, which causes the driver to overwrite random memory which leads to a non working driver and various system crashes. Cc: Jacky Boen Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman drivers/staging/rtl8188eu/hal/usb_halinit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 041bf0225552044b85ce7ee7981e790d987d6ceb Author: Dan Carpenter Date: Thu Jun 16 11:30:23 2016 +0300 drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state() There is no limit on high "idx" can go. It should be less than ARRAY_SIZE(data.states) which is 16. The "data" variable wasn't declared in that scope so I shifted the code around a bit to make it work. Also I made "idx" unsigned. Fixes: f3898ea12fc1 ('drm/amd/powerplay: add some sysfs interfaces for powerplay.') Acked-by: Christian König Signed-off-by: Dan Carpenter Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 9cbbef4efb7cfb6962da57c9e17f5ce4280c14ca Merge: 8c25615 0d15ef6 Author: Linus Torvalds Date: Fri Jun 17 07:19:13 2016 -1000 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fixes from Will Deacon: "The main things are getting kgdb up and running with upstream GDB after a protocol change was reverted and fixing our spin_unlock_wait and spin_is_locked implementations after doing some similar work with PeterZ on the qspinlock code last week. Whilst we haven't seen any failures in practice, it's still worth getting this fixed. Summary: - Plug the ongoing spin_unlock_wait/spin_is_locked mess - KGDB protocol fix to sync w/ GDB - Fix MIDR-based PMU probing for old 32-bit SMP systems (OMAP4/Realview) - Minor tweaks to the fault handling path" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: kgdb: Match pstate size with gdbserver protocol arm64: spinlock: Ensure forward-progress in spin_unlock_wait arm64: spinlock: fix spin_unlock_wait for LSE atomics arm64: spinlock: order spin_{is_locked,unlock_wait} against local locks arm: pmu: Fix non-devicetree probing arm64: mm: mark fault_info table const arm64: fix dump_instr when PAN and UAO are in use commit 8c2561557415a298965f50d4de2ca99c7d1f1b2c Merge: 7af9a17 a4c34ff Author: Linus Torvalds Date: Fri Jun 17 07:15:43 2016 -1000 Merge tag 'iommu-fixes-v4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU fixes from Joerg Roedel: "Three patches queued up: - Fix for ARM-SMMU to add a missing iommu-ops callback which is required by common iommu code - Fix for the rockchip iommu where the wrong MMUs got the commands - A regression fix for the Intel VT-d driver. The regression only showed up on X58 chipsets with more than one iommu. These chipsets seem to require that QI is enabled on all IOMMUs before it can be used" * tag 'iommu-fixes-v4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/vt-d: Enable QI on all IOMMUs before setting root entry iommu/rockchip: Fix zap cache during device attach iommu/arm-smmu: Wire up map_sg for arm-smmu-v3 commit 7af9a17034ffc13117834d60b4a6f2c757e3c0b4 Merge: bb96727 5ab92a7 Author: Linus Torvalds Date: Fri Jun 17 07:06:57 2016 -1000 Merge tag 'for-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED fixes from Jacek Anaszewski: - Fix brightness setting upon hardware blinking enabled - Handle suspend/resume in heartbeat trigger * tag 'for-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: handle suspend/resume in heartbeat trigger leds: core: Fix brightness setting upon hardware blinking enabled commit de18c165509edb36bde42ca6ff930854f85e21ea Merge: 719da39 dd5c931 Author: Chris Mason Date: Fri Jun 17 10:04:57 2016 -0700 Merge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.7 commit dd5c93111dc9d26e038ac437f7a403d617e82c62 Author: Chandan Rajendra Date: Thu Jun 16 22:07:58 2016 +0530 Btrfs: btrfs_check_super_valid: Allow 4096 as stripesize Older btrfs-progs/mkfs.btrfs sets 4096 as the stripesize. Hence restricting stripesize to be equal to sectorsize would cause super block validation to return an error on architectures where PAGE_SIZE is not equal to 4096. Hence as a workaround, this commit allows stripesize to be set to 4096 bytes. Signed-off-by: Chandan Rajendra Signed-off-by: David Sterba fs/btrfs/disk-io.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 89c5a5441d703ba068699524ae59f7806e9b173d Author: David Sterba Date: Thu Jun 16 17:34:28 2016 +0200 btrfs: remove build fixup for qgroup_account_snapshot Introduced in 2c1984f244838477aab ("btrfs: build fixup for qgroup_account_snapshot") as temporary bisectability build fixup. Signed-off-by: David Sterba fs/btrfs/transaction.c | 5 ----- 1 file changed, 5 deletions(-) commit f7af3934c2bccba261972261ac8ebcbf92a346b2 Author: David Sterba Date: Fri Jun 17 18:15:25 2016 +0200 btrfs: use new error message helper in qgroup_account_snapshot We've renamed btrfs_std_error, this one is left from last merge. Signed-off-by: David Sterba fs/btrfs/transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 90c711ab380d633bf85249bd5d819edb601feda7 Author: Zygo Blaxell Date: Sun Jun 12 23:39:58 2016 -0400 btrfs: avoid blocking open_ctree from cleaner_kthread This fixes a problem introduced in commit 2f3165ecf103599f82bf0ea254039db335fb5005 "btrfs: don't force mounts to wait for cleaner_kthread to delete one or more subvolumes". open_ctree eventually calls btrfs_replay_log which in turn calls btrfs_commit_super which tries to lock the cleaner_mutex, causing a recursive mutex deadlock during mount. Instead of playing whack-a-mole trying to keep up with all the functions that may want to lock cleaner_mutex, put all the cleaner_mutex lockers back where they were, and attack the problem more directly: keep cleaner_kthread asleep until the filesystem is mounted. When filesystems are mounted read-only and later remounted read-write, open_ctree did not set fs_info->open and neither does anything else. Set this flag in btrfs_remount so that neither btrfs_delete_unused_bgs nor cleaner_kthread get confused by the common case of "/" filesystem read-only mount followed by read-write remount. Signed-off-by: Zygo Blaxell Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/disk-io.c | 25 ++++++++++--------------- fs/btrfs/super.c | 2 ++ 2 files changed, 12 insertions(+), 15 deletions(-) commit 3b6571c180da85e43550c608e954ab7b2a31d954 Author: Josef Bacik Date: Fri May 27 13:03:04 2016 -0400 Btrfs: don't BUG_ON() in btrfs_orphan_add This is just a screwup for developers, so change it to an ASSERT() so developers notice when things go wrong and deal with the error appropriately if ASSERT() isn't enabled. Thanks, Signed-off-by: Josef Bacik Reviewed-by: Mark Fasheh Signed-off-by: David Sterba fs/btrfs/inode.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 64c12921e11b3a0c10d088606e328c58e29274d8 Author: Jeff Mahoney Date: Wed Jun 8 00:36:38 2016 -0400 btrfs: account for non-CoW'd blocks in btrfs_abort_transaction The test for !trans->blocks_used in btrfs_abort_transaction is insufficient to determine whether it's safe to drop the transaction handle on the floor. btrfs_cow_block, informed by should_cow_block, can return blocks that have already been CoW'd in the current transaction. trans->blocks_used is only incremented for new block allocations. If an operation overlaps the blocks in the current transaction entirely and must abort the transaction, we'll happily let it clean up the trans handle even though it may have modified the blocks and will commit an incomplete operation. In the long-term, I'd like to do closer tracking of when the fs is actually modified so we can still recover as gracefully as possible, but that approach will need some discussion. In the short term, since this is the only code using trans->blocks_used, let's just switch it to a bool indicating whether any blocks were used and set it when should_cow_block returns false. Cc: stable@vger.kernel.org # 3.4+ Signed-off-by: Jeff Mahoney Reviewed-by: Filipe Manana Signed-off-by: David Sterba fs/btrfs/ctree.c | 5 ++++- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/super.c | 2 +- fs/btrfs/transaction.h | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) commit c871b0f2fd27e7f9097d507f47de5270f88003b9 Author: Liu Bo Date: Mon Jun 6 12:01:23 2016 -0700 Btrfs: check if extent buffer is aligned to sectorsize Thanks to fuzz testing, we can pass an invalid bytenr to extent buffer via alloc_extent_buffer(). An unaligned eb can have more pages than it should have, which ends up extent buffer's leak or some corrupted content in extent buffer. This adds a warning to let us quickly know what was happening. Now that alloc_extent_buffer() no more returns NULL, this changes its caller and callers of its caller to match with the new error handling. Signed-off-by: Liu Bo Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/ctree.c | 2 ++ fs/btrfs/disk-io.c | 8 ++++---- fs/btrfs/extent-tree.c | 10 ++++++---- fs/btrfs/extent_io.c | 15 ++++++++++++--- fs/btrfs/tree-log.c | 4 ++-- fs/btrfs/volumes.c | 4 ++-- 6 files changed, 28 insertions(+), 15 deletions(-) commit 16ff4b454f1b56e8d89a9075feed0dd6ac510c3d Author: Heinrich Schuchardt Date: Sat Jun 11 18:11:10 2016 +0200 btrfs: Use correct format specifier Component mirror_num of struct btrfsic_block is defined as unsigned int. Use %u as format specifier. Signed-off-by: Heinrich Schuchardt Reviewed-by: David Sterba Signed-off-by: David Sterba fs/btrfs/check-integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 76bf3441ad6584ddc3aea1501927f21b21ba3a3a Author: Ben Dooks Date: Tue Jun 7 17:49:09 2016 +0100 ata: sata_mv: fix mis-conversion in mv_write_cached_reg() Fix the signed issue in mv_write_cached_reg() where the laddr is assigned from a (long)addr instead of (unsigned long)addr. Fixes the following warnings: drivers/ata/sata_mv.c:989:26: warning: cast removes address space of expression drivers/ata/sata_mv.c:989:26: warning: cast removes address space of expression drivers/ata/sata_mv.c:989:26: warning: cast removes address space of expression drivers/ata/sata_mv.c:989:26: warning: cast removes address space of expression Signed-off-by: Ben Dooks Signed-off-by: Tejun Heo drivers/ata/sata_mv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bfbbe44daf64d0ccf2de123179817f3557fb9237 Author: Linus Walleij Date: Thu Jun 16 11:55:55 2016 +0200 gpio: make library immune to error pointers Most functions that take a GPIO descriptor in need to check the descriptor for IS_ERR(). We do this mostly in the VALIDATE_DESC() macro except for the gpiod_to_irq() function which needs special handling. Cc: stable@vger.kernel.org Reported-by: Grygorii Strashko Reviewed-by: Grygorii Strashko Acked-by: Alexandre Courbot Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 79bb71bd1d93197ce227fa167b450b633f30a52b Author: Linus Walleij Date: Wed Jun 15 22:57:38 2016 +0200 gpio: make sure gpiod_to_irq() returns negative on NULL desc commit 54d77198fdfbc4f0fe11b4252c1d9c97d51a3264 ("gpio: bail out silently on NULL descriptors") doesn't work for gpiod_to_irq(): drivers assume that NULL descriptors will give negative IRQ numbers in return. It has been pointed out that returning 0 is NO_IRQ and that drivers should be amended to treat this as an error, but that is for the longer term: now let us repair the semantics. Cc: Maxime Ripard Reported-by: Hans de Goede Tested-by: Hans de Goede Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 6c081ff6fd5abd621797570be43d5e3c6acfcd58 Author: Dan Carpenter Date: Tue May 10 11:01:33 2016 +0300 phy: bcm-ns-usb2: checking the wrong variable We intended to test "usb2->phy" here instead of "dev". Fixes: d3feb4067335 ('phy: bcm-ns-usb2: new driver for USB 2.0 PHY on Northstar') Signed-off-by: Dan Carpenter Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-bcm-ns-usb2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d99cb37828a2fe344ecc95d1fad570bbe447cc06 Author: Ben Dooks Date: Tue Jun 7 18:14:56 2016 +0100 phy-sun4i-usb: fix missing __iomem * Fix the missing __iomem attribute in sun4i_usb_phy_write() function. This fixes the following sparse warnings: drivers/phy/phy-sun4i-usb.c:178:39: warning: incorrect type in initializer (different address spaces) drivers/phy/phy-sun4i-usb.c:178:39: expected void *phyctl drivers/phy/phy-sun4i-usb.c:178:39: got void [noderef] * drivers/phy/phy-sun4i-usb.c:185:17: warning: incorrect type in argument 2 (different address spaces) drivers/phy/phy-sun4i-usb.c:185:17: expected void volatile [noderef] *addr drivers/phy/phy-sun4i-usb.c:185:17: got void *phyctl drivers/phy/phy-sun4i-usb.c:189:24: warning: incorrect type in argument 1 (different address spaces) drivers/phy/phy-sun4i-usb.c:189:24: expected void const volatile [noderef] *addr drivers/phy/phy-sun4i-usb.c:189:24: got void *phyctl drivers/phy/phy-sun4i-usb.c:196:17: warning: incorrect type in argument 2 (different address spaces) drivers/phy/phy-sun4i-usb.c:196:17: expected void volatile [noderef] *addr drivers/phy/phy-sun4i-usb.c:196:17: got void *phyctl drivers/phy/phy-sun4i-usb.c:199:24: warning: incorrect type in argument 1 (different address spaces) drivers/phy/phy-sun4i-usb.c:199:24: expected void const volatile [noderef] *addr drivers/phy/phy-sun4i-usb.c:199:24: got void *phyctl drivers/phy/phy-sun4i-usb.c:205:17: warning: incorrect type in argument 2 (different address spaces) drivers/phy/phy-sun4i-usb.c:205:17: expected void volatile [noderef] *addr drivers/phy/phy-sun4i-usb.c:205:17: got void *phyctl drivers/phy/phy-sun4i-usb.c:208:24: warning: incorrect type in argument 1 (different address spaces) drivers/phy/phy-sun4i-usb.c:208:24: expected void const volatile [noderef] *addr drivers/phy/phy-sun4i-usb.c:208:24: got void *phyctl drivers/phy/phy-sun4i-usb.c:210:17: warning: incorrect type in argument 2 (different address spaces) drivers/phy/phy-sun4i-usb.c:210:17: expected void volatile [noderef] *addr drivers/phy/phy-sun4i-usb.c:210:17: got void *phyctl drivers/phy/phy-sun4i-usb.c:212:24: warning: incorrect type in argument 1 (different address spaces) drivers/phy/phy-sun4i-usb.c:212:24: expected void const volatile [noderef] *addr drivers/phy/phy-sun4i-usb.c:212:24: got void *phyctl drivers/phy/phy-sun4i-usb.c:214:17: warning: incorrect type in argument 2 (different address spaces) drivers/phy/phy-sun4i-usb.c:214:17: expected void volatile [noderef] *addr drivers/phy/phy-sun4i-usb.c:214:17: got void *phyctl Signed-off-by: Ben Dooks Acked-by: Hans de Goede Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5cf700ac9d50353dc5b8194a57c6f40bf1fc4424 Author: Quentin Schulz Date: Mon Jun 13 13:45:48 2016 +0200 phy: phy-sun4i-usb: Fix optional gpios failing probe The interrupt 0 is not a valid interrupt number. In the event where the retrieval of the vbus-det gpio would return null, the gpiod_to_irq callback would return 0, while the current code makes the assumption that it is a valid interrupt, and would go on calling request_irq. Obviously, this would fail, preventing the driver from probing properly, while the vbus and id gpios are optional. Signed-off-by: Quentin Schulz Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-sun4i-usb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 075adb8046532d9642f411a92b4f385d04ced24d Author: Wei Yongjun Date: Mon Jun 13 23:31:47 2016 +0000 phy: rockchip-dp: fix return value check in rockchip_dp_phy_probe() In case of error, the function devm_kzalloc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun Reviewed-by: Heiko Stuebner Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-rockchip-dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6762925df4642aec5629f7971ba477d6930f53f7 Author: Yoshihiro Shimoda Date: Tue May 31 21:47:17 2016 +0900 phy: rcar-gen3-usb2: fix unexpected repeat interrupts of VBUS change This patch fixes an issue that the driver is possible to cause unexpected repeat interrupts if a board condition is wrong (e.g. even if the ID pin is as function, a board supplies the VBUS.) The reason why unexpected repeat interrupts happen is: 1) The driver changed the mode to function if it detected the ID pin is high and the VBUS is high. 2) After the driver changed function mode, it disabled the "VBUS control" feature. Then, the VBUS signal will be low. 3) Since the VBUS change interruption happened, the driver checked the ID pin and VBUS. 4) Since VBUS was low, the driver changed the mode to host and enabled the "VBUS control" feature. Then the VBUS signal will be high. 5) Since the VBUS change interruption happened, the driver did 1) above. So, this patch modified the condition in rcar_gen3_device_recognition() to check the ID pin only. Fixes: 1114e2d (phy: rcar-gen3-usb2: change the mode to OTG on the combined channel) Cc: # v4.5+ Reported-by: Simon Horman Signed-off-by: Yoshihiro Shimoda Signed-off-by: Kishon Vijay Abraham I drivers/phy/phy-rcar-gen3-usb2.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) commit 8198868f0a283eb23e264951632ce61ec2f82228 Author: Jaroslav Kysela Date: Fri Jun 17 13:35:56 2016 +0200 ALSA: hdac_regmap - fix the register access for runtime PM Call path: 1) snd_hdac_power_up_pm() 2) snd_hdac_power_up() 3) pm_runtime_get_sync() 4) __pm_runtime_resume() 5) rpm_resume() The rpm_resume() returns 1 when the device is already active. Because the return value is unmodified, the hdac regmap read/write functions should allow this value for the retry I/O operation, too. Signed-off-by: Jaroslav Kysela Cc: Signed-off-by: Takashi Iwai sound/hda/hdac_regmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1463847e93fe693e89c52b03ab4ede6800d717c1 Author: Pablo Neira Ayuso Date: Fri Jun 17 12:54:18 2016 +0200 netfilter: xt_SYNPROXY: include missing ./usr/include/linux/netfilter/xt_SYNPROXY.h:11: found __[us]{8,16,32,64} type without #include Reported-by: kbuild test robot Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/xt_SYNPROXY.h | 2 ++ 1 file changed, 2 insertions(+) commit 8f45927c3cae4db85887700e5415286f766cbaf9 Author: Pablo Neira Ayuso Date: Fri Jun 17 12:54:18 2016 +0200 netfilter: xt_SYNPROXY: add missing header to Kbuild Matt Whitlock says: Without this line, the file xt_SYNPROXY.h does not get installed in /usr/include/linux/netfilter/, and thus user-space programs cannot make use of it. Reported-by: Matt Whitlock Signed-off-by: Pablo Neira Ayuso include/uapi/linux/netfilter/Kbuild | 1 + 1 file changed, 1 insertion(+) commit 86c0ae7cde7a8699116b365a5e3016753f0cd92a Author: Janusz Krzysztofik Date: Thu Jun 16 22:04:35 2016 +0200 ASoC: cx20442: set tty->receiver_room in v253_open Commit 79901317ce80 ("n_tty: Don't flush buffer when closing ldisc"), introduced in v3.10, revealed a bug in the cx20442 codec driver which has never been setting tty->receive_room on line discipline open as it should from the beginning. Fix it. Created and tested on Amstrad Delta against Linux-4.7-rc3 Signed-off-by: Janusz Krzysztofik Signed-off-by: Mark Brown sound/soc/codecs/cx20442.c | 1 + 1 file changed, 1 insertion(+) commit dcd2d1f78664fdc75eadaaf65257834e24383d01 Author: Geert Uytterhoeven Date: Thu Jun 16 14:34:30 2016 +0200 ASoC: ak4613: Enable cache usage to fix crashes on resume During system resume: kernel BUG at drivers/base/regmap/regcache.c:347! ... PC is at regcache_sync+0x1c/0x128 LR is at ak4613_resume+0x28/0x34 The ak4613 driver is using a regmap cache sync to restore the configuration of the chip on resume but does not actually define a register cache which means that the resume is never going to work and we trigger asserts in regmap. Fix this by enabling caching. Based on commit d3030d11961a8c10 ("ASoC: ak4642: Enable cache usage to fix crashes on resume") by Mark Brown . Signed-off-by: Geert Uytterhoeven Signed-off-by: Mark Brown sound/soc/codecs/ak4613.c | 1 + 1 file changed, 1 insertion(+) commit 50c7a0ef2d97e56c7ce2f1ea5fe1d8e25aadc1bb Author: Geert Uytterhoeven Date: Thu Jun 16 14:34:32 2016 +0200 ASoC: wm8940: Enable cache usage to fix crashes on resume The wm8940 driver is using a regmap cache sync to restore the configuration of the chip when switching from OFF to STANDBY, but does not actually define a register cache which means that the restore is never going to work and we trigger asserts in regmap. Fix this by enabling caching. Based on commit d3030d11961a8c10 ("ASoC: ak4642: Enable cache usage to fix crashes on resume") by Mark Brown . Signed-off-by: Geert Uytterhoeven Acked-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm8940.c | 1 + 1 file changed, 1 insertion(+) commit 8a092e682f20f193f2070dba2ea1904e95814126 Author: Mika Båtsman Date: Fri Jun 17 13:31:37 2016 +0300 regulator: anatop: allow regulator to be in bypass mode Bypass support was added in commit d38018f2019c ("regulator: anatop: Add bypass support to digital LDOs"). A check for valid voltage selectors was added in commit da0607c8df5c ("regulator: anatop: Fail on invalid voltage selector") but it also discards all regulators that are in bypass mode. Add check for the bypass setting. Errors below were seen on a Variscite mx6 board. anatop_regulator 20c8000.anatop:regulator-vddcore@140: Failed to read a valid default voltage selector. anatop_regulator: probe of 20c8000.anatop:regulator-vddcore@140 failed with error -22 anatop_regulator 20c8000.anatop:regulator-vddsoc@140: Failed to read a valid default voltage selector. anatop_regulator: probe of 20c8000.anatop:regulator-vddsoc@140 failed with error -22 Fixes: da0607c8df5c ("regulator: anatop: Fail on invalid voltage selector") Signed-off-by: Mika Båtsman Signed-off-by: Mark Brown drivers/regulator/anatop-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d279f7a7e95af6bb4b5eaea3527d1f85a28c5cf6 Author: Dave Gerlach Date: Wed Jun 15 11:45:28 2016 +0530 ARM: dts: am437x-sk-evm: Reduce i2c0 bus speed for tps65218 Based on the latest timing specifications for the TPS65218 from the data sheet, http://www.ti.com/lit/ds/symlink/tps65218.pdf, document SLDS206 from November 2014, we must change the i2c bus speed to better fit within the minimum high SCL time required for proper i2c transfer. When running at 400khz, measurements show that SCL spends 0.8125 uS/1.666 uS high/low which violates the requirement for minimum high period of SCL provided in datasheet Table 7.6 which is 1 uS. Switching to 100khz gives us 5 uS/5 uS high/low which both fall above the minimum given values for 100 khz, 4.0 uS/4.7 uS high/low. Without this patch occasionally a voltage set operation from the kernel will appear to have worked but the actual voltage reflected on the PMIC will not have updated, causing problems especially with cpufreq that may update to a higher OPP without actually raising the voltage on DCDC2, leading to a hang. Signed-off-by: Dave Gerlach Signed-off-by: Nishanth Menon Signed-off-by: Franklin S Cooper Jr Signed-off-by: Aparna Balasubramanian Signed-off-by: Keerthy Signed-off-by: Tony Lindgren arch/arm/boot/dts/am437x-sk-evm.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3aa256b7258b3d19f8b44557cc64525a993b941 Author: Gavin Shan Date: Fri Jun 17 13:05:11 2016 +1000 powerpc/eeh: Fix invalid cached PE primary bus The PE primary bus cannot be got from its child devices when having full hotplug in error recovery. The PE primary bus is cached, which is done in commit <05ba75f84864> ("powerpc/eeh: Fix stale cached primary bus"). In eeh_reset_device(), the flag (EEH_PE_PRI_BUS) is cleared before the PCI hot remove. eeh_pe_bus_get() then returns NULL as the PE primary bus in pnv_eeh_reset() and it crashes the kernel eventually. This fixes the issue by clearing the flag (EEH_PE_PRI_BUS) before the PCI hot add. With it, the PowerNV EEH reset backend (pnv_eeh_reset()) can get valid PE primary bus through eeh_pe_bus_get(). Fixes: 67086e32b564 ("powerpc/eeh: powerpc/eeh: Support error recovery for VF PE") Reported-by: Pridhiviraj Paidipeddi Signed-off-by: Gavin Shan Signed-off-by: Michael Ellerman arch/powerpc/kernel/eeh_driver.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b23d9c5b9c83c05e013aa52460f12a8365062cf4 Author: Aneesh Kumar K.V Date: Fri Jun 17 11:40:36 2016 +0530 powerpc/mm/radix: Update Radix tree size as per ISA 3.0 ISA 3.0 updated it to be encoded as Radix tree size = 2^(RTS + 31). We have it encoded as 2^(RTS + 28). Add a helper with the correct encoding and use it instead of opencoding. Fixes: 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routines") Reviewed-by: Balbir Singh Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/radix.h | 15 +++++++++++++++ arch/powerpc/mm/mmu_context_book3s64.c | 2 +- arch/powerpc/mm/pgtable-radix.c | 9 +++------ 3 files changed, 19 insertions(+), 7 deletions(-) commit e568006b9d828403397668864d9797dc4bfefd28 Author: Aneesh Kumar K.V Date: Fri Jun 17 11:32:00 2016 +0530 powerpc/mm/hash: Don't add memory coherence if cache inhibited is set H_ENTER hcall handling in qemu had assumptions that a cache inhibited hpte entry won't have memory conference set. Also older kernel mentioned that some version of pHyp required this (the code removed by the below commit says: /* Make pHyp happy */ if ((rflags & _PAGE_NO_CACHE) && !(rflags & _PAGE_WRITETHRU)) hpte_r &= ~HPTE_R_M; But with older kernel we had some inconsistent memory conherence mapping. We always enabled memory conherence in the page fault path and removed memory conherence is _PAGE_NO_CACHE was set when we mapped the page via htab_bolt_mapping. The commit mentioned below tried to consolidate that by always enabling memory conherence. But as mentioned above that breaks Qemu H_ENTER handling. This patch update this such that we enable memory conherence only if cache inhibited is not set and bring fault handling, lpar and bolt mapping in sync. Fixes: commit 30bda41aba4e("powerpc/mm: Drop WIMG in favour of new constant") Reported-by: Darrick J. Wong Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_utils_64.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit 970f9091d25df14e9540ec7ff48a2f709e284cd1 Author: Tero Kristo Date: Thu Jun 16 15:25:18 2016 +0300 ARM: OMAP2+: timer: add probe for clocksources A few platforms are currently missing clocksource_probe() completely in their time_init functionality. On OMAP3430 for example, this is causing cpuidle to be pretty much dead, as the counter32k is not going to be registered and instead a gptimer is used as a clocksource. This will tick in periodic mode, preventing any deeper idle states. While here, also drop one unnecessary check for populated DT before existing clocksource_probe() call. Signed-off-by: Tero Kristo Signed-off-by: Tony Lindgren arch/arm/mach-omap2/timer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ef5bdccf6d4363fd934035e0b1ca8445975e1d89 Author: Janusz Krzysztofik Date: Thu Jun 16 21:56:30 2016 +0200 ARM: OMAP1: fix ams-delta FIQ handler to work with sparse IRQ After OMAP1 IRQ definitions have been changed by commit 685e2d08c54b ("ARM: OMAP1: Change interrupt numbering for sparse IRQ") introduced in v4.2, ams-delta FIQ handler which depends on them no longer works as expected. Fix it. Created and tested on Amstrad Delta against Linux-4.7-rc3 Signed-off-by: Janusz Krzysztofik Signed-off-by: Tony Lindgren arch/arm/mach-omap1/ams-delta-fiq-handler.S | 6 +++--- arch/arm/mach-omap1/ams-delta-fiq.c | 5 +++-- arch/arm/mach-omap1/include/mach/ams-delta-fiq.h | 2 ++ 3 files changed, 8 insertions(+), 5 deletions(-) commit a4c34ff1c029e90e7d5f8dd8d29b0a93b31c3cb2 Author: Joerg Roedel Date: Fri Jun 17 11:29:48 2016 +0200 iommu/vt-d: Enable QI on all IOMMUs before setting root entry This seems to be required on some X58 chipsets on systems with more than one IOMMU. QI does not work until it is enabled on all IOMMUs in the system. Reported-by: Dheeraj CVR Tested-by: Dheeraj CVR Fixes: 5f0a7f7614a9 ('iommu/vt-d: Make root entry visible for hardware right after allocation') Cc: stable@vger.kernel.org Signed-off-by: Joerg Roedel drivers/iommu/intel-iommu.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit ce449ba77a2271dce9771fb1f3eb37e4be6a8b81 Author: Jakub Kicinski Date: Thu Jun 16 14:42:50 2016 +0100 nfp: use correct index to mask link state irq We were using an incorrect define to get the irq vector number. NFP_NET_CFG_LSC is a control BAR offset, LSC interrupt vector index is called NFP_NET_IRQ_LSC_IDX. For machines with less than 30 CPUs this meant that we were disabling/enabling IRQ 0. For bigger hosts we were just playing with the 31st RX/TX interrupt. Fixes: 0ba40af963f0 ("nfp: move link state interrupt request/free calls") Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller drivers/net/ethernet/netronome/nfp/nfp_net_common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bb967271c0317de8eed56b20aae978d31507b033 Merge: 2668bc7 cc51846 Author: Linus Torvalds Date: Thu Jun 16 17:33:51 2016 -1000 Merge tag 'pwm/for-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm fixes from Thierry Reding: "These changes fix a bit of fallout from the introduction of the atomic API" * tag 'pwm/for-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: atmel-hlcdc: Fix default PWM polarity pwm: sysfs: Get return value from pwm_apply_state() pwm: Improve args checking in pwm_apply_state() commit 2668bc77a102866549784f87693c24e693b195df Merge: 41ef721 a005219 Author: Linus Torvalds Date: Thu Jun 16 17:29:53 2016 -1000 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Paolo Bonzini: - miscellaneous fixes for MIPS and s390 - one new kvm_stat for s390 - correctly disable VT-d posted interrupts with the rest of posted interrupts - "make randconfig" fix for x86 AMD - off-by-one in irq route check (the "good" kind that errors out a bit too early!) * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: kvm: vmx: check apicv is active before using VT-d posted interrupt kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES kvm: svm: Do not support AVIC if not CONFIG_X86_LOCAL_APIC kvm: svm: Fix implicit declaration for __default_cpu_present_to_apicid() MIPS: KVM: Fix CACHE triggered exception emulation MIPS: KVM: Don't unwind PC when emulating CACHE MIPS: KVM: Include bit 31 in segment matches MIPS: KVM: Fix modular KVM under QEMU KVM: s390: Add stats for PEI events KVM: s390: ignore IBC if zero commit 41ef72181a9fde78f13d0966e3019fb37f6058e4 Merge: 9c514bed 8c7245a Author: Linus Torvalds Date: Thu Jun 16 17:25:52 2016 -1000 Merge tag 'nfsd-4.7-1' of git://linux-nfs.org/~bfields/linux Pull nfsd bugfixes from Bruce Fields: "Oleg Drokin found and fixed races in the nfsd4 state code that go back to the big nfs4_lock_state removal around 3.17 (but that were also probably hard to reproduce before client changes in 3.20 allowed the client to perform parallel opens). Also fix a 4.1 backchannel crash due to rpc multipath changes in 4.6. Trond acked the client-side rpc fixes going through my tree" * tag 'nfsd-4.7-1' of git://linux-nfs.org/~bfields/linux: nfsd: Make init_open_stateid() a bit more whole nfsd: Extend the mutex holding region around in nfsd4_process_open2() nfsd: Always lock state exclusively. rpc: share one xps between all backchannels nfsd4/rpc: move backchannel create logic into rpc code SUNRPC: fix xprt leak on xps allocation failure nfsd: Fix NFSD_MDS_PR_KEY on 32-bit by adding ULL postfix commit 9c514bedbe6948f31d29c53aceb9234c1484ae69 Merge: 3832742 d0e13f5 Author: Linus Torvalds Date: Thu Jun 16 17:16:56 2016 -1000 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs fixes from Miklos Szeredi: "This contains two regression fixes: one for the xattr API update and one for using the mounter's creds in file creation in overlayfs. There's also a fix for a bug in handling hard linked AF_UNIX sockets that's been there from day one. This fix is overlayfs only despite the fact that it touches code outside the overlay filesystem: d_real() is an identity function for all except overlay dentries" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: fix uid/gid when creating over whiteout ovl: xattr filter fix af_unix: fix hard linked sockets on overlay vfs: add d_real_inode() helper commit 38327424b40bcebe2de92d07312c89360ac9229a Author: Dan Carpenter Date: Thu Jun 16 15:48:57 2016 +0100 KEYS: potential uninitialized variable If __key_link_begin() failed then "edit" would be uninitialized. I've added a check to fix that. This allows a random user to crash the kernel, though it's quite difficult to achieve. There are three ways it can be done as the user would have to cause an error to occur in __key_link(): (1) Cause the kernel to run out of memory. In practice, this is difficult to achieve without ENOMEM cropping up elsewhere and aborting the attempt. (2) Revoke the destination keyring between the keyring ID being looked up and it being tested for revocation. In practice, this is difficult to time correctly because the KEYCTL_REJECT function can only be used from the request-key upcall process. Further, users can only make use of what's in /sbin/request-key.conf, though this does including a rejection debugging test - which means that the destination keyring has to be the caller's session keyring in practice. (3) Have just enough key quota available to create a key, a new session keyring for the upcall and a link in the session keyring, but not then sufficient quota to create a link in the nominated destination keyring so that it fails with EDQUOT. The bug can be triggered using option (3) above using something like the following: echo 80 >/proc/sys/kernel/keys/root_maxbytes keyctl request2 user debug:fred negate @t The above sets the quota to something much lower (80) to make the bug easier to trigger, but this is dependent on the system. Note also that the name of the keyring created contains a random number that may be between 1 and 10 characters in size, so may throw the test off by changing the amount of quota used. Assuming the failure occurs, something like the following will be seen: kfree_debugcheck: out of range ptr 6b6b6b6b6b6b6b68h ------------[ cut here ]------------ kernel BUG at ../mm/slab.c:2821! ... RIP: 0010:[] kfree_debugcheck+0x20/0x25 RSP: 0018:ffff8804014a7de8 EFLAGS: 00010092 RAX: 0000000000000034 RBX: 6b6b6b6b6b6b6b68 RCX: 0000000000000000 RDX: 0000000000040001 RSI: 00000000000000f6 RDI: 0000000000000300 RBP: ffff8804014a7df0 R08: 0000000000000001 R09: 0000000000000000 R10: ffff8804014a7e68 R11: 0000000000000054 R12: 0000000000000202 R13: ffffffff81318a66 R14: 0000000000000000 R15: 0000000000000001 ... Call Trace: kfree+0xde/0x1bc assoc_array_cancel_edit+0x1f/0x36 __key_link_end+0x55/0x63 key_reject_and_link+0x124/0x155 keyctl_reject_key+0xb6/0xe0 keyctl_negate_key+0x10/0x12 SyS_keyctl+0x9f/0xe7 do_syscall_64+0x63/0x13a entry_SYSCALL64_slow_path+0x25/0x25 Fixes: f70e2e06196a ('KEYS: Do preallocation for __key_link()') Signed-off-by: Dan Carpenter Signed-off-by: David Howells cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds security/keys/key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d5d8760b78d0cfafe292f965f599988138b06a70 Author: Simon Horman Date: Thu Jun 16 17:06:19 2016 +0900 sit: correct IP protocol used in ipip6_err Since 32b8a8e59c9c ("sit: add IPv4 over IPv4 support") ipip6_err() may be called for packets whose IP protocol is IPPROTO_IPIP as well as those whose IP protocol is IPPROTO_IPV6. In the case of IPPROTO_IPIP packets the correct protocol value is not passed to ipv4_update_pmtu() or ipv4_redirect(). This patch resolves this problem by using the IP protocol of the packet rather than a hard-coded value. This appears to be consistent with the usage of the protocol of a packet by icmp_socket_deliver() the caller of ipip6_err(). I was able to exercise the redirect case by using a setup where an ICMP redirect was received for the destination of the encapsulated packet. However, it appears that although incorrect the protocol field is not used in this case and thus no problem manifests. On inspection it does not appear that a problem will manifest in the fragmentation needed/update pmtu case either. In short I believe this is a cosmetic fix. None the less, the use of IPPROTO_IPV6 seems wrong and confusing. Reviewed-by: Dinan Gunawardena Signed-off-by: Simon Horman Acked-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller net/ipv6/sit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8fa3b8d689a54d6d04ff7803c724fb7aca6ce98e Author: Tejun Heo Date: Thu May 26 15:42:13 2016 -0400 cgroup: set css->id to -1 during init If percpu_ref initialization fails during css_create(), the free path can end up trying to free css->id of zero. As ID 0 is unused, it doesn't cause a critical breakage but it does trigger a warning message. Fix it by setting css->id to -1 from init_and_link_css(). Signed-off-by: Tejun Heo Cc: Wenwei Tao Fixes: 01e586598b22 ("cgroup: release css->id after css_free") Cc: stable@vger.kernel.org # v4.0+ Signed-off-by: Tejun Heo kernel/cgroup.c | 1 + 1 file changed, 1 insertion(+) commit a547224dceed4645139f7eff72ff51adb9938bcb Author: Alexander Duyck Date: Wed Jun 15 14:42:11 2016 -0700 mlx4e: Do not attempt to offload VXLAN ports that are unrecognized The mlx4e driver does not support more than one port for VXLAN offload. As such expecting the hardware to offload other ports is invalid since it appears the parsing logic is used to perform Tx checksum and segmentation offloads. Use the vxlan_port number to determine in which cases we can apply the offload and in which cases we can not. Signed-off-by: Alexander Duyck Reviewed-by: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 17471c7ba5115ed724d624577b21c166d2194272 Author: Arnd Bergmann Date: Wed Jun 15 22:31:10 2016 +0200 net: sfc: avoid -Wtype-limits warning When building with -Wextra, we get a harmless warning from the EFX_EXTRACT_OWORD32 macro: ethernet/sfc/farch.c: In function 'efx_farch_test_registers': ethernet/sfc/farch.c:119:30: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] ethernet/sfc/farch.c:124:144: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] ethernet/sfc/farch.c:124:392: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] ethernet/sfc/farch.c:124:731: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] The macro and the caller are both correct, but we can avoid the warning by changing the index variable to a signed type. Signed-off-by: Arnd Bergmann Acked-by: Bert Kenward Signed-off-by: David S. Miller drivers/net/ethernet/sfc/farch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d945b5e9f0e35cb56a3783d849b5f0f37da0a7f1 Author: Peter Zijlstra Date: Thu Jun 16 14:38:42 2016 +0200 workqueue: Fix setting affinity of unbound worker threads With commit e9d867a67fd03ccc ("sched: Allow per-cpu kernel threads to run on online && !active"), __set_cpus_allowed_ptr() expects that only strict per-cpu kernel threads can have affinity to an online CPU which is not yet active. This assumption is currently broken in the CPU_ONLINE notification handler for the workqueues where restore_unbound_workers_cpumask() calls set_cpus_allowed_ptr() when the first cpu in the unbound worker's pool->attr->cpumask comes online. Since set_cpus_allowed_ptr() is called with pool->attr->cpumask in which only one CPU is online which is not yet active, we get the following WARN_ON during an CPU online operation. ------------[ cut here ]------------ WARNING: CPU: 40 PID: 248 at kernel/sched/core.c:1166 __set_cpus_allowed_ptr+0x228/0x2e0 Modules linked in: CPU: 40 PID: 248 Comm: cpuhp/40 Not tainted 4.6.0-autotest+ #4 <..snip..> Call Trace: [c000000f273ff920] [c00000000010493c] __set_cpus_allowed_ptr+0x2cc/0x2e0 (unreliable) [c000000f273ffac0] [c0000000000ed4b0] workqueue_cpu_up_callback+0x2c0/0x470 [c000000f273ffb70] [c0000000000f5c58] notifier_call_chain+0x98/0x100 [c000000f273ffbc0] [c0000000000c5ed0] __cpu_notify+0x70/0xe0 [c000000f273ffc00] [c0000000000c6028] notify_online+0x38/0x50 [c000000f273ffc30] [c0000000000c5214] cpuhp_invoke_callback+0x84/0x250 [c000000f273ffc90] [c0000000000c562c] cpuhp_up_callbacks+0x5c/0x120 [c000000f273ffce0] [c0000000000c64d4] cpuhp_thread_fun+0x184/0x1c0 [c000000f273ffd20] [c0000000000fa050] smpboot_thread_fn+0x290/0x2a0 [c000000f273ffd80] [c0000000000f45b0] kthread+0x110/0x130 [c000000f273ffe30] [c000000000009570] ret_from_kernel_thread+0x5c/0x6c ---[ end trace 00f1456578b2a3b2 ]--- This patch fixes this by limiting the mask to the intersection of the pool affinity and online CPUs. Changelog-cribbed-from: Gautham R. Shenoy Reported-by: Abdul Haleem Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Tejun Heo kernel/workqueue.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 0d15ef677839dab8313fbb86c007c3175b638d03 Author: Daniel Thompson Date: Thu Jun 16 16:51:52 2016 +0100 arm64: kgdb: Match pstate size with gdbserver protocol Current versions of gdb do not interoperate cleanly with kgdb on arm64 systems because gdb and kgdb do not use the same register description. This patch modifies kgdb to work with recent releases of gdb (>= 7.8.1). Compatibility with gdb (after the patch is applied) is as follows: gdb-7.6 and earlier Ok gdb-7.7 series Works if user provides custom target description gdb-7.8(.0) Works if user provides custom target description gdb-7.8.1 and later Ok When commit 44679a4f142b ("arm64: KGDB: Add step debugging support") was introduced it was paired with a gdb patch that made an incompatible change to the gdbserver protocol. This patch was eventually merged into the gdb sources: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=a4d9ba85ec5597a6a556afe26b712e878374b9dd The change to the protocol was mostly made to simplify big-endian support inside the kernel gdb stub. Unfortunately the gdb project released gdb-7.7.x and gdb-7.8.0 before the protocol incompatibility was identified and reversed: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=bdc144174bcb11e808b4e73089b850cf9620a7ee This leaves us in a position where kgdb still uses the no-longer-used protocol; gdb-7.8.1, which restored the original behaviour, was released on 2014-10-29. I don't believe it is possible to detect/correct the protocol incompatiblity which means the kernel must take a view about which version of the gdb remote protocol is "correct". This patch takes the view that the original/current version of the protocol is correct and that version found in gdb-7.7.x and gdb-7.8.0 is anomalous. Signed-off-by: Daniel Thompson Signed-off-by: Will Deacon arch/arm64/include/asm/kgdb.h | 45 +++++++++++++++++++++++++++++++++++-------- arch/arm64/kernel/kgdb.c | 14 +++++++++++++- 2 files changed, 50 insertions(+), 9 deletions(-) commit 929e604efa3dc0522214e0dc18984be23993e9f0 Author: Thomas Petazzoni Date: Thu Jun 16 15:42:27 2016 +0200 ARM: dts: armada-38x: fix MBUS_ID for crypto SRAM on Armada 385 Linksys When the support for the Marvell crypto engine was added in the Device Tree of the various Armada 385 Device Tree files in commit d716f2e837ac6 ("ARM: mvebu: define crypto SRAM ranges for all armada-38x boards"), a typo was made in the MBus window attributes for the Armada 385 Linksys board: 0x09/0x05 are used instead of 0x19/0x15. This commit fixes this typo, which makes the CESA engines operational on Armada 385 Linksys boards. Reported-by: Terry Stockert Cc: Terry Stockert Cc: Imre Kaloz Cc: Boris Brezillon Cc: Fixes: d716f2e837ac6 ("ARM: mvebu: define crypto SRAM ranges for all armada-38x boards") Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm/boot/dts/armada-385-linksys.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6a02734d420fca778554878d03017017537d92e1 Author: Thomas Petazzoni Date: Thu Jun 16 15:42:26 2016 +0200 ARM: mvebu: map PCI I/O regions strongly ordered In order for HW I/O coherency to work on Cortex-A9 based Marvell SoCs, all MMIO registers must be mapped strongly ordered. In commit 1c8c3cf0b5239 ("ARM: 8060/1: mm: allow sub-architectures to override PCI I/O memory type") we implemented a new function, pci_ioremap_set_mem_type(), that allow sub-architecture code to override the memory type used to map PCI I/O regions. In the discussion around this patch series [1], Arnd Bergmann made the comment that maybe all PCI I/O regions should be mapped strongly-ordered, which would have made our proposal to add pci_ioremap_set_mem_type() irrelevant. So, we submitted a patch [2] that did what Arnd suggested. However, Russell in the end merged our initial proposal to add pci_ioremap_set_mem_type(), but it was never used anywhere. Further discussion with Arnd and other folks on IRC lead to the conclusion that in fact using strongly-ordered for all platforms was maybe not desirable, and therefore, using pci_ioremap_set_mem_type() was the most appropriate solution. As a consequence, this commit finally adds the pci_ioremap_set_mem_type() call in the mach-mvebu platform code, which was originally part of our initial patch series [3] and is necessary for the whole mechanism to work. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256565.html [2] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256755.html [3] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/256563.html Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm/mach-mvebu/coherency.c | 1 + 1 file changed, 1 insertion(+) commit 034fdd4a17ff089c2428ece18efa65c5396810d2 Merge: c70410c e024111 Author: Kalle Valo Date: Thu Jun 16 17:55:19 2016 +0300 Merge ath-current from ath.git ath.git fixes for 4.7. Major changes: ath9k * fix GPIO mask regression with AR9462 and AR9565 ath10k * fix deadlock while processing rx_in_ord_ind * fix crash related to printing firmware features in debug mode * fix deadlock when peer cannot be created commit c70410cb91de70707a507ee7beef7021a5a89f0d Author: Colin Ian King Date: Thu Jun 9 14:38:50 2016 -0400 rtl8xxxu: fix typo on variable name, compare against correct variable path_b_ok is being assigned but immediately after path_a_ok is being compared to the value 0x03. This appears to be a typo on the variable name, compare path_b_ok instead. Signed-off-by: Colin Ian King Signed-off-by: Jes Sorensen Signed-off-by: Kalle Valo drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_8192e.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5379ba8fccd99d5f99632c789f0393d84a57805 Author: Thomas Petazzoni Date: Thu Jun 16 15:42:25 2016 +0200 ARM: mvebu: fix HW I/O coherency related deadlocks Until now, our understanding for HW I/O coherency to work on the Cortex-A9 based Marvell SoC was that only the PCIe regions should be mapped strongly-ordered. However, we were still encountering some deadlocks, especially when testing the CESA crypto engine. After checking with the HW designers, it was concluded that all the MMIO registers should be mapped as strongly ordered for the HW I/O coherency mechanism to work properly. This fixes some easy to reproduce deadlocks with the CESA crypto engine driver (dmcrypt on a sufficiently large disk partition). Tested-by: Terry Stockert Tested-by: Romain Perier Cc: Terry Stockert Cc: Romain Perier Cc: Signed-off-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT arch/arm/mach-mvebu/coherency.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) commit 362761299eea7dfc3a4870551de36e08758b9254 Author: Marcin Niestroj Date: Tue Jun 14 15:29:24 2016 +0200 power_supply: tps65217-charger: Fix NULL deref during property export This bug leads to: [ 1.906411] Unable to handle kernel NULL pointer dereference at virtual address 0000000c [ 1.914878] pgd = c0004000 [ 1.917786] [0000000c] *pgd=00000000 [ 1.921536] Internal error: Oops: 5 [#1] SMP ARM [ 1.926357] Modules linked in: [ 1.929556] CPU: 0 PID: 14 Comm: kworker/0:1 Not tainted 4.4.5 #18 [ 1.936006] Hardware name: Generic AM33XX (Flattened Device Tree) [ 1.942383] Workqueue: events power_supply_changed_work [ 1.947842] task: de2c41c0 ti: de2c8000 task.ti: de2c8000 [ 1.953483] PC is at tps65217_ac_get_property+0x14/0x28 [ 1.958937] LR is at tps65217_ac_get_property+0x10/0x28 Driver was trying to use drv_data in property get handler. However drv_data was not set, so it caused NULL pointer dereference. This patch properly sets drv_data during probe by power_supply_config parameter, so the property get handler works as desired. Signed-off-by: Marcin Niestroj Fixes: 3636859b280c ("power_supply: Add support for tps65217-charger") Signed-off-by: Sebastian Reichel drivers/power/tps65217_charger.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 79ee2e8f730411a30b271d5f9cdeae189fa66174 Author: Viresh Kumar Date: Thu Jun 16 19:03:11 2016 +0530 PM / OPP: Add 'UNKNOWN' status for shared_opp in struct opp_table dev_pm_opp_get_sharing_cpus() returns 0 even in the case when the OPP core doesn't know whether or not the table is shared. It works on the majority of platforms, where the OPP table is never created before invoking the function and then -ENODEV is returned by it. But in the case of one platform (Jetson TK1) at least, the situation is a bit different. The OPP table has been created (somehow) before dev_pm_opp_get_sharing_cpus() is called and it returns 0. Its caller treats that as 'the CPUs don't share OPPs' and that leads to degraded performance. Fix this by converting 'shared_opp' in struct opp_table to an enum and making dev_pm_opp_get_sharing_cpus() return -EINVAL in case when the value of that field is "access unknown", so that the caller can handle it accordingly (cpufreq-dt considers that as 'all CPUs share the table', for example). Fixes: 6f707daa3833 "PM / OPP: Add dev_pm_opp_get_sharing_cpus()" Reported-and-tested-by: Alexandre Courbot Signed-off-by: Viresh Kumar [ rjw : Subject & changelog ] Signed-off-by: Rafael J. Wysocki drivers/base/power/opp/cpu.c | 12 +++++++++--- drivers/base/power/opp/of.c | 10 ++++++++-- drivers/base/power/opp/opp.h | 8 +++++++- 3 files changed, 24 insertions(+), 6 deletions(-) commit 9254e70c4ef1fee2e5c43feded4433d19cbb6177 Author: Hendrik Brueckner Date: Thu Jun 9 12:28:13 2016 +0200 s390/cpum_cf: use perf software context for hardware counters On s390, there are two different hardware PMUs for counting and sampling. Previously, both PMUs have shared the perf_hw_context which is not correct and, recently, results in this warning: ------------[ cut here ]------------ WARNING: CPU: 5 PID: 1 at kernel/events/core.c:8485 perf_pmu_register+0x420/0x428 Modules linked in: CPU: 5 PID: 1 Comm: swapper/0 Not tainted 4.7.0-rc1+ #2 task: 00000009c5240000 ti: 00000009c5234000 task.ti: 00000009c5234000 Krnl PSW : 0704c00180000000 0000000000220c50 (perf_pmu_register+0x420/0x428) R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3 Krnl GPRS: ffffffffffffffff 0000000000b15ac6 0000000000000000 00000009cb440000 000000000022087a 0000000000000000 0000000000b78fa0 0000000000000000 0000000000a9aa90 0000000000000084 0000000000000005 000000000088a97a 0000000000000004 0000000000749dd0 000000000022087a 00000009c5237cc0 Krnl Code: 0000000000220c44: a7f4ff54 brc 15,220aec 0000000000220c48: 92011000 mvi 0(%r1),1 #0000000000220c4c: a7f40001 brc 15,220c4e >0000000000220c50: a7f4ff12 brc 15,220a74 0000000000220c54: 0707 bcr 0,%r7 0000000000220c56: 0707 bcr 0,%r7 0000000000220c58: ebdff0800024 stmg %r13,%r15,128(%r15) 0000000000220c5e: a7f13fe0 tmll %r15,16352 Call Trace: ([<000000000022087a>] perf_pmu_register+0x4a/0x428) ([<0000000000b2c25c>] init_cpum_sampling_pmu+0x14c/0x1f8) ([<0000000000100248>] do_one_initcall+0x48/0x140) ([<0000000000b25d26>] kernel_init_freeable+0x1e6/0x2a0) ([<000000000072bda4>] kernel_init+0x24/0x138) ([<000000000073495e>] kernel_thread_starter+0x6/0xc) ([<0000000000734958>] kernel_thread_starter+0x0/0xc) Last Breaking-Event-Address: [<0000000000220c4c>] perf_pmu_register+0x41c/0x428 ---[ end trace 0c6ef9f5b771ad97 ]--- Using the perf_sw_context is an option because the cpum_cf PMU does not use interrupts. To make this more clear, initialize the capabilities in the PMU structure. Signed-off-by: Hendrik Brueckner Suggested-by: Peter Zijlstra Acked-by: Heiko Carstens Signed-off-by: Martin Schwidefsky arch/s390/kernel/perf_cpum_cf.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 8f50b8e57442d28e41bb736c173d8a2490549a82 Author: Ocquidant, Sebastien Date: Wed Jun 15 13:47:35 2016 +0200 memory: omap-gpmc: Fix omap gpmc EXTRADELAY timing In the omap gpmc driver it can be noticed that GPMC_CONFIG4_OEEXTRADELAY is overwritten by the WEEXTRADELAY value from the device tree and GPMC_CONFIG4_WEEXTRADELAY is not updated by the value from the device tree. As a consequence, the memory accesses cannot be configured properly when the extra delay are needed for OE and WE. Fix the update of GPMC_CONFIG4_WEEXTRADELAY with the value from the device tree file and prevents GPMC_CONFIG4_OEXTRADELAY being overwritten by the WEXTRADELAY value from the device tree. Cc: stable@vger.kernel.org Signed-off-by: Ocquidant, Sebastien Signed-off-by: Roger Quadros drivers/memory/omap-gpmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5fc39d347267bd029fcc9099c70e2fe2d53130e9 Author: Boris Brezillon Date: Wed Jun 15 13:20:19 2016 +0200 ARM: sunxi/dt: make the CHIP inherit from allwinner,sun5i-a13 The sun4i-timer driver registers its sched_clock only if the machine is compatible with "allwinner,sun5i-a13", "allwinner,sun5i-a10s" or "allwinner,sun4i-a10". Add the missing "allwinner,sun5i-a13" string to the machine compatible. Signed-off-by: Boris Brezillon Fixes: 465a225fb2af ("ARM: sun5i: Add C.H.I.P DTS") Cc: Signed-off-by: Maxime Ripard arch/arm/boot/dts/sun5i-r8-chip.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0052191624e9bf8a8f9dc41b92ab5f252566c3c Author: Yang Zhang Date: Mon Jun 13 09:56:56 2016 +0800 kvm: vmx: check apicv is active before using VT-d posted interrupt VT-d posted interrupt is relying on the CPU side's posted interrupt. Need to check whether VCPU's APICv is active before enabing VT-d posted interrupt. Fixes: d62caabb41f33d96333f9ef15e09cd26e1c12760 Cc: stable@vger.kernel.org Signed-off-by: Yang Zhang Signed-off-by: Shengge Ding Signed-off-by: Paolo Bonzini arch/x86/kvm/vmx.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit caf1ff26e1aa178133df68ac3d40815fed2187d9 Author: Xiubo Li Date: Wed Jun 15 18:00:33 2016 +0800 kvm: Fix irq route entries exceeding KVM_MAX_IRQ_ROUTES These days, we experienced one guest crash with 8 cores and 3 disks, with qemu error logs as bellow: qemu-system-x86_64: /build/qemu-2.0.0/kvm-all.c:984: kvm_irqchip_commit_routes: Assertion `ret == 0' failed. And then we found one patch(bdf026317d) in qemu tree, which said could fix this bug. Execute the following script will reproduce the BUG quickly: irq_affinity.sh ======================================================================== vda_irq_num=25 vdb_irq_num=27 while [ 1 ] do for irq in {1,2,4,8,10,20,40,80} do echo $irq > /proc/irq/$vda_irq_num/smp_affinity echo $irq > /proc/irq/$vdb_irq_num/smp_affinity dd if=/dev/vda of=/dev/zero bs=4K count=100 iflag=direct dd if=/dev/vdb of=/dev/zero bs=4K count=100 iflag=direct done done ======================================================================== The following qemu log is added in the qemu code and is displayed when this bug reproduced: kvm_irqchip_commit_routes: max gsi: 1008, nr_allocated_irq_routes: 1024, irq_routes->nr: 1024, gsi_count: 1024. That's to say when irq_routes->nr == 1024, there are 1024 routing entries, but in the kernel code when routes->nr >= 1024, will just return -EINVAL; The nr is the number of the routing entries which is in of [1 ~ KVM_MAX_IRQ_ROUTES], not the index in [0 ~ KVM_MAX_IRQ_ROUTES - 1]. This patch fix the BUG above. Cc: stable@vger.kernel.org Signed-off-by: Xiubo Li Signed-off-by: Wei Tang Signed-off-by: Zhang Zhuoyu Signed-off-by: Paolo Bonzini virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ca91a65583c73e4be6e9f53323a7ae04e6803ef Author: Arnd Bergmann Date: Wed Jun 15 17:55:23 2016 +0200 clk: sunxi: remove unused variable The only use of the local num_parents variable was remove, so we now get a warning: drivers/clk/sunxi/clk-sun4i-tcon-ch1.c: In function 'tcon_ch1_get_parent': drivers/clk/sunxi/clk-sun4i-tcon-ch1.c:82:6: error: unused variable 'num_parents' [-Werror=unused-variable] This removes the variable. Signed-off-by: Arnd Bergmann Fixes: 4de2d58bc973 ("clk: sunxi: tcon-ch1: Do not return a negative error in get_parent") Signed-off-by: Maxime Ripard drivers/clk/sunxi/clk-sun4i-tcon-ch1.c | 1 - 1 file changed, 1 deletion(-) commit 5014e904681ddbdf663bb20f134eb053ddccb181 Author: Suzuki K Poulose Date: Fri May 6 15:35:50 2016 +0100 coresight: Handle build path error Enabling a component via sysfs (echo 1 > enable_source), would trigger building a path from the enabled sources to the sink. If there is an error in the process (e.g, sink not enabled or the device (CPU corresponding to ETM) is not online), we never report failure, except for leaving a message in the dmesg. Do proper error checking for the build path and return the error. Before: $ echo 0 > /sys/devices/system/cpu/cpu2/online $ echo 1 > /sys/devices/cs_etm/cpu2/enable_source $ echo $? 0 After: $ echo 0 > /sys/devices/system/cpu/cpu2/online $ echo 1 > /sys/devices/cs_etm/cpu2/enable_source -bash: echo: write error: No such device or address Signed-off-by: Suzuki K Poulose Acked-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit f3b8172fe15fbed0d0d33d99780e122213e00684 Author: Suzuki K Poulose Date: Tue Jun 14 11:17:14 2016 -0600 coresight: Fix erroneous memset in tmc_read_unprepare_etr At the end of a trace collection, we try to clear the entire buffer and enable the ETR back if it was already enabled. But, we would have adjusted the drvdata->buf to point to the beginning of the trace data in the trace buffer @drvdata->vaddr. So, the following code which clears the buffer is dangerous and can cause crashes, like below : memset(drvdata->buf, 0, drvdata->size); Unable to handle kernel paging request at virtual address ffffff800a145000 pgd = ffffffc974726000 *pgd=00000009f3e91003, *pud=00000009f3e91003, *pmd=0000000000000000 PREEMPT SMP Modules linked in: CPU: 4 PID: 1692 Comm: dd Not tainted 4.7.0-rc2+ #1721 Hardware name: ARM Juno development board (r0) (DT) task: ffffffc9734a0080 ti: ffffffc974460000 task.ti: ffffffc974460000 PC is at __memset+0x1ac/0x200 LR is at tmc_read_unprepare_etr+0x144/0x1bc pc : [] lr : [] pstate: 200001c5 ... [] __memset+0x1ac/0x200 [] tmc_release+0x90/0x94 [] __fput+0xa8/0x1ec [] ____fput+0xc/0x14 [] task_work_run+0xb0/0xe4 [] do_notify_resume+0x64/0x6c [] work_pending+0x10/0x14 Code: 91010108 54ffff4a 8b040108 cb050042 (d50b7428) Since we clear the buffer anyway in the following call to tmc_etr_enable_hw(), remove the erroneous memset(). Fixes: commit de5461970b3e9e1 ("coresight: tmc: allocating memory when needed") Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 8e215298a15d5b93c6fa22895c406da538769bca Author: Suzuki K Poulose Date: Tue Jun 14 11:17:13 2016 -0600 coresight: Fix tmc_read_unprepare_etr At the end of the trace capture, we free the allocated memory, resetting the drvdata->buf to NULL, to indicate that trace data was collected and the next trace session should allocate the memory in tmc_enable_etr_sink_sysfs. The tmc_enable_etr_sink_sysfs, we only allocate memory if drvdata->vaddr is not NULL (which is not performed at the end of previous session). This can cause, drvdata->vaddr getting assigned NULL and later we do memset() which causes a crash as below : Unable to handle kernel NULL pointer dereference at virtual address 00000000 pgd = ffffffc9747f0000 [00000000] *pgd=00000009f402e003, *pud=00000009f402e003, *pmd=0000000000000000 Internal error: Oops: 96000046 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 1592 Comm: bash Not tainted 4.7.0-rc1+ #1712 Hardware name: ARM Juno development board (r0) (DT) task: ffffffc078fe0080 ti: ffffffc974178000 task.ti: ffffffc974178000 PC is at __memset+0x1ac/0x200 LR is at tmc_enable_etr_sink+0xf8/0x304 pc : [] lr : [] pstate: 400001c5 sp : ffffffc97417bc00 x29: ffffffc97417bc00 x28: ffffffc974178000 Call trace: Exception stack(0xffffffc97417ba40 to 0xffffffc97417bb60) ba40: 0000000000000001 ffffffc974a5d098 ffffffc97417bc00 ffffff80083a002c ba60: ffffffc974a5d118 0000000000000000 0000000000000000 0000000000000000 ba80: 0000000000000001 0000000000000000 ffffff800859bdec 0000000000000040 baa0: ffffff8008b45b58 00000000000001c0 ffffffc97417baf0 ffffff80080eddb4 bac0: 0000000000000003 ffffffc078fe0080 ffffffc078fe0960 ffffffc078fe0940 bae0: 0000000000000000 0000000000000000 00000000007fffc0 0000000000000004 bb00: 0000000000000000 0000000000000040 000000000000003f 0000000000000000 bb20: 0000000000000000 0000000000000000 0000000000000000 0000000000000001 bb40: ffffffc078fe0960 0000000000000018 ffffffffffffffff 0008669628000000 [] __memset+0x1ac/0x200 [] coresight_enable_path+0xa8/0x1dc [] coresight_enable+0x88/0x1b8 [] enable_source_store+0x3c/0x6c [] dev_attr_store+0x18/0x28 [] sysfs_kf_write+0x54/0x64 [] kernfs_fop_write+0x148/0x1d8 [] __vfs_write+0x28/0x110 [] vfs_write+0xa0/0x198 [] SyS_write+0x44/0xa0 [] el0_svc_naked+0x24/0x28 Code: 91010108 54ffff4a 8b040108 cb050042 (d50b7428) This patch fixes the issue by clearing the drvdata->vaddr while we free the allocated buffer at the end of a session, so that we allocate the memory again. Cc: mathieu.poirier@linaro.org Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight-tmc-etr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ec48a1d981fe90ecb5bcfaaf1ae2c69d842cbbbc Author: Suzuki K Poulose Date: Tue Jun 14 11:17:12 2016 -0600 coresight: Fix NULL pointer dereference in _coresight_build_path _coresight_build_path assumes that all the connections of a csdev has the child_dev initialised. This may not be true if the particular component is not supported by the kernel config(e.g TPIU) but is present in the DT. In which case, building a path can cause a crash like this : Unable to handle kernel NULL pointer dereference at virtual address 00000010 pgd = ffffffc9750dd000 [00000010] *pgd=00000009f5e90003, *pud=00000009f5e90003, *pmd=0000000000000000 Internal error: Oops: 96000006 [#1] PREEMPT SMP Modules linked in: CPU: 4 PID: 1348 Comm: bash Not tainted 4.6.0-next-20160517 #1646 Hardware name: ARM Juno development board (r0) (DT) task: ffffffc97517a280 ti: ffffffc9762c4000 task.ti: ffffffc9762c4000 PC is at _coresight_build_path+0x18/0xe4 LR is at _coresight_build_path+0xc0/0xe4 pc : [] lr : [] pstate: 20000145 sp : ffffffc9762c7ba0 [] _coresight_build_path+0x18/0xe4 [] _coresight_build_path+0xc0/0xe4 [] _coresight_build_path+0xc0/0xe4 [] _coresight_build_path+0xc0/0xe4 [] _coresight_build_path+0xc0/0xe4 [] _coresight_build_path+0xc0/0xe4 [] coresight_build_path+0x40/0x68 [] coresight_enable+0x74/0x1bc [] enable_source_store+0x3c/0x6c [] dev_attr_store+0x18/0x28 [] sysfs_kf_write+0x40/0x50 [] kernfs_fop_write+0x140/0x1cc [] __vfs_write+0x28/0x110 [] vfs_write+0xa0/0x174 [] SyS_write+0x44/0xa0 [] el0_svc_naked+0x24/0x28 Cc: Mathieu Poirier Signed-off-by: Suzuki K Poulose Signed-off-by: Mathieu Poirier Signed-off-by: Greg Kroah-Hartman drivers/hwtracing/coresight/coresight.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d74ef24841a972a9abe3742a7eff51cdac73db3a Merge: 4d2ec85 62e6d1e Author: Greg Kroah-Hartman Date: Thu Jun 16 00:10:27 2016 -0700 Merge tag 'extcon-fixes-for-4.7-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/chanwoo/extcon into char-misc-linus Chanwoo writes: Update extcon for v4.7-rc4 This patch fixes the following issue: - In the extcon-palmas.c, fix the state of VBUS when using GPIO detection. If probe funticon don't check the state during probe, the extcon client driver cannot get the state of VBUS gpio until the user detach the connector and attach the connector again. commit 13eab83f9b3566ab425a43bb65b2ba22cb0abbba Merge: 8c08c732 a59e6d8 Author: David S. Miller Date: Wed Jun 15 23:39:18 2016 -0700 Merge branch 'r8152-fixes' Hayes Wang says: ==================== r8152: fix known issues These patches fix some known issues. ==================== Signed-off-by: David S. Miller commit a59e6d815226b70780427648e359da9bbee07171 Author: hayeswang Date: Thu Jun 16 10:55:19 2016 +0800 r8152: correct the rx early size The rx early size should be (agg_buf_sz - packet size) / 8 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 93fe9b1838404fcc3bea320b704bfa461d8e57a6 Author: hayeswang Date: Thu Jun 16 10:55:18 2016 +0800 r8152: reset the bmu Reset the BMU to clear the rx/tx fifo. This avoids that the unexpected data remains in the hw. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 4e384ac19b5be6ad084b215d298b82b3a91ad24b Author: hayeswang Date: Thu Jun 16 10:55:17 2016 +0800 r8152: disable MAC clock speed down Disable MAC clock speed down. It may casue the first control transfer to contain the wrong data, when the power state change from U1 to U0. Signed-off-by: Hayes Wang Signed-off-by: David S. Miller drivers/net/usb/r8152.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 8c08c7325ec36c9d338cedebc4570b567fa9a740 Merge: e582615 ad572d1 Author: David S. Miller Date: Wed Jun 15 23:37:55 2016 -0700 Merge branch 'bpf-fixes' Alexei Starovoitov says: ==================== bpf fixes Fixes for two bpf bugs: 1st bug reported by Sasha Goldshtein here: https://github.com/iovisor/bcc/issues/570 2nd discovered by Daniel Borkmann by manual code analysis. See patches for details. ==================== Signed-off-by: David S. Miller commit ad572d174787daa59e24b8b5c83028c09cdb5ddb Author: Alexei Starovoitov Date: Wed Jun 15 18:25:39 2016 -0700 bpf, trace: check event type in bpf_perf_event_read similar to bpf_perf_event_output() the bpf_perf_event_read() helper needs to check the type of the perf_event before reading the counter. Fixes: a43eec304259 ("bpf: introduce bpf_perf_event_output() helper") Reported-by: Daniel Borkmann Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller kernel/trace/bpf_trace.c | 4 ++++ 1 file changed, 4 insertions(+) commit 19de99f70b87fcc3338da52a89c439b088cbff71 Author: Alexei Starovoitov Date: Wed Jun 15 18:25:38 2016 -0700 bpf: fix matching of data/data_end in verifier The ctx structure passed into bpf programs is different depending on bpf program type. The verifier incorrectly marked ctx->data and ctx->data_end access based on ctx offset only. That caused loads in tracing programs int bpf_prog(struct pt_regs *ctx) { .. ctx->ax .. } to be incorrectly marked as PTR_TO_PACKET which later caused verifier to reject the program that was actually valid in tracing context. Fix this by doing program type specific matching of ctx offsets. Fixes: 969bf05eb3ce ("bpf: direct packet access") Reported-by: Sasha Goldshtein Signed-off-by: Alexei Starovoitov Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/linux/bpf.h | 28 +++++++++++++++++++++++++++- kernel/bpf/verifier.c | 41 +++++++---------------------------------- kernel/trace/bpf_trace.c | 6 ++++-- net/core/filter.c | 16 ++++++++++++++-- 4 files changed, 52 insertions(+), 39 deletions(-) commit d325ea859490511322d1f151dc38577ee9a7c6da Merge: e05d2ba 0ab15bd Author: Linus Torvalds Date: Wed Jun 15 19:54:52 2016 -1000 Merge tag 'drm-fixes-for-v4.7-rc4' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "The main drm fixes pull for rc4: one regression fix in the connector refcounting, and an MST fix. There rest is nouveau, amdkfd, i915, etnaviv, and radeon/amdgpu fixes, mostly regression or black screen fixes" * tag 'drm-fixes-for-v4.7-rc4' of git://people.freedesktop.org/~airlied/linux: (23 commits) drm/etnaviv: initialize iommu domain page size drm/nouveau/iccsense: fix memory leak drm/nouveau/Revert "drm/nouveau/device/pci: set as non-CPU-coherent on ARM64" drm/amd/powerplay: select samu dpm 0 as boot level on polaris. drm/amd/powerplay: update powerplay table parsing drm/dp/mst: Always clear proposed vcpi table for port. drm/crtc: only store the necessary data for set_config rollback drm/crtc: fix connector reference counting mismatch in drm_crtc_helper_set_config drm/i915/ilk: Don't disable SSC source if it's in use Revert "drm/amdgpu: add pipeline sync while vmid switch in same ctx" drm/amdgpu/gfx7: fix broken condition check drm/radeon: fix asic initialization for virtualized environments amdgpu: fix asic initialization for virtualized environments (v2) drm/radeon: don't use fractional dividers on RS[78]80 if SS is enabled drm/radeon: do not hard reset GPU while freezing on r600/r700 family drm/i915: Extract physical display dimensions from VBT drm/i915: Check VBT for port presence in addition to the strap on VLV/CHV drm/i915: Only ignore eDP ports that are connected drm/i915: Silence "unexpected child device config size" for VBT on 845g drm/i915: Fix NULL pointer deference when out of PLLs in IVB ... commit e05d2ba145fc43479bc52eb6dabef69721da39a5 Merge: abd3830 25789f9 Author: Linus Torvalds Date: Wed Jun 15 19:42:19 2016 -1000 Merge tag 'platform-drivers-x86-v4.7-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver fixes from Darren Hart: "Minor kconfig dependency cleanup, trivial mic mute hotkey for ideapad, and a needed improvement in adaptive keyboard detection for thinkpad: platform/x86: - Drop duplicate dependencies on X86 thinkpad_acpi: - Add support for HKEY version 0x200 ideapad_laptop: - Add an event for mic mute hotkey" * tag 'platform-drivers-x86-v4.7-2' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: platform/x86: Drop duplicate dependencies on X86 thinkpad_acpi: Add support for HKEY version 0x200 ideapad_laptop: Add an event for mic mute hotkey commit e582615ad33dbd39623084a02e95567b116e1eea Author: Eric Dumazet Date: Wed Jun 15 06:24:00 2016 -0700 gre: fix error handler 1) gre_parse_header() can be called from gre_err() At this point transport header points to ICMP header, not the inner header. 2) We can not really change transport header as ipgre_err() will later assume transport header still points to ICMP header (using icmp_hdr()) 3) pskb_may_pull() logic in gre_parse_header() really works if we are interested at zone pointed by skb->data 4) As Jiri explained in commit b7f8fe251e46 ("gre: do not pull header in ICMP error processing") we should not pull headers in error handler. So this fix : A) changes gre_parse_header() to use skb->data instead of skb_transport_header() B) Adds a nhs parameter to gre_parse_header() so that we can skip the not pulled IP header from error path. This offset is 0 for normal receive path. C) remove obsolete IPV6 includes Signed-off-by: Eric Dumazet Cc: Tom Herbert Cc: Maciej Żenczykowski Cc: Jiri Benc Signed-off-by: David S. Miller include/net/gre.h | 2 +- net/ipv4/gre_demux.c | 10 +++++----- net/ipv4/ip_gre.c | 12 ++++-------- net/ipv6/ip6_gre.c | 2 +- 4 files changed, 11 insertions(+), 15 deletions(-) commit daddef76c3deaaa7922f9d7b18edbf0a061215c3 Author: Jason A. Donenfeld Date: Wed Jun 15 11:14:53 2016 +0200 net: Don't forget pr_fmt on net_dbg_ratelimited for CONFIG_DYNAMIC_DEBUG The implementation of net_dbg_ratelimited in the CONFIG_DYNAMIC_DEBUG case was added with 2c94b5373 ("net: Implement net_dbg_ratelimited() for CONFIG_DYNAMIC_DEBUG case"). The implementation strategy was to take the usual definition of the dynamic_pr_debug macro, but alter it by adding a call to "net_ratelimit()" in the if statement. This is, in fact, the correct approach. However, while doing this, the author of the commit forgot to surround fmt by pr_fmt, resulting in unprefixed log messages appearing in the console. So, this commit adds back the pr_fmt(fmt) invocation, making net_dbg_ratelimited properly consistent across DEBUG, no DEBUG, and DYNAMIC_DEBUG cases, and bringing parity with the behavior of dynamic_pr_debug as well. Fixes: 2c94b5373 ("net: Implement net_dbg_ratelimited() for CONFIG_DYNAMIC_DEBUG case") Signed-off-by: Jason A. Donenfeld Cc: Tim Bingham Signed-off-by: David S. Miller include/linux/net.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 4a1836701fd59476ee1331379e00a9ab51ba4f61 Author: Arnd Bergmann Date: Wed Jun 15 17:45:51 2016 +0200 net: skfb: remove obsolete -I cflag The skfp driver has been moved to drivers/net/fddi/skfp a long time ago, but we still attempt to include headers from the old location, which causes a warning when building with W=1: cc1: error: /git/arm-soc/drivers/net/skfp: No such file or directory [-Werror=missing-include-dirs] cc1: error: drivers/net/skfp: No such file or directory [-Werror=missing-include-dirs] Clearly this include directive is not needed any more, so we can just remove it now. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller drivers/net/fddi/skfp/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c91522f860bb9dd4178c8280bbebd4f4321b7199 Author: Ying Xue Date: Wed Jun 15 14:11:31 2016 +0800 tipc: eliminate uninitialized variable warning net/tipc/link.c: In function ‘tipc_link_timeout’: net/tipc/link.c:744:28: warning: ‘mtyp’ may be used uninitialized in this function [-Wuninitialized] Fixes: 42b18f605fea ("tipc: refactor function tipc_link_timeout()") Acked-by: Jon Maloy Signed-off-by: Ying Xue Signed-off-by: David S. Miller net/tipc/link.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 66d95b6705a6347f7b2645e042874ec0bb03b726 Author: Ying Xue Date: Wed Jun 15 14:10:57 2016 +0800 tipc: fix suspicious RCU usage When run tipcTS&tipcTC test suite, the following complaint appears: [ 56.926168] =============================== [ 56.926169] [ INFO: suspicious RCU usage. ] [ 56.926171] 4.7.0-rc1+ #160 Not tainted [ 56.926173] ------------------------------- [ 56.926174] net/tipc/bearer.c:408 suspicious rcu_dereference_protected() usage! [ 56.926175] [ 56.926175] other info that might help us debug this: [ 56.926175] [ 56.926177] [ 56.926177] rcu_scheduler_active = 1, debug_locks = 1 [ 56.926179] 3 locks held by swapper/4/0: [ 56.926180] #0: (((&req->timer))){+.-...}, at: [] call_timer_fn+0x5/0x340 [ 56.926203] #1: (&(&req->lock)->rlock){+.-...}, at: [] disc_timeout+0x1b/0xd0 [tipc] [ 56.926212] #2: (rcu_read_lock){......}, at: [] tipc_bearer_xmit_skb+0xb0/0x2e0 [tipc] [ 56.926218] [ 56.926218] stack backtrace: [ 56.926221] CPU: 4 PID: 0 Comm: swapper/4 Not tainted 4.7.0-rc1+ #160 [ 56.926222] Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007 [ 56.926224] 0000000000000000 ffff880016803d28 ffffffff813c4423 ffff8800154252c0 [ 56.926227] 0000000000000001 ffff880016803d58 ffffffff810b7512 ffff8800124d8120 [ 56.926230] ffff880013f8a160 ffff8800132b5ccc ffff8800124d8120 ffff880016803d88 [ 56.926234] Call Trace: [ 56.926235] [] dump_stack+0x67/0x94 [ 56.926250] [] lockdep_rcu_suspicious+0xe2/0x120 [ 56.926256] [] tipc_l2_send_msg+0x131/0x1c0 [tipc] [ 56.926261] [] tipc_bearer_xmit_skb+0x14c/0x2e0 [tipc] [ 56.926266] [] ? tipc_bearer_xmit_skb+0xb0/0x2e0 [tipc] [ 56.926273] [] ? tipc_disc_init_msg+0x1f0/0x1f0 [tipc] [ 56.926278] [] ? tipc_disc_init_msg+0x1f0/0x1f0 [tipc] [ 56.926283] [] disc_timeout+0x56/0xd0 [tipc] [ 56.926288] [] call_timer_fn+0xb8/0x340 [ 56.926291] [] ? call_timer_fn+0x5/0x340 [ 56.926296] [] ? tipc_disc_init_msg+0x1f0/0x1f0 [tipc] [ 56.926300] [] run_timer_softirq+0x23a/0x390 [ 56.926306] [] ? clockevents_program_event+0x7f/0x130 [ 56.926316] [] __do_softirq+0xc3/0x4a2 [ 56.926323] [] irq_exit+0x8a/0xb0 [ 56.926327] [] smp_apic_timer_interrupt+0x46/0x60 [ 56.926331] [] apic_timer_interrupt+0x89/0x90 [ 56.926333] [] ? default_idle+0x2a/0x1a0 [ 56.926340] [] ? default_idle+0x28/0x1a0 [ 56.926342] [] arch_cpu_idle+0xf/0x20 [ 56.926345] [] default_idle_call+0x2f/0x50 [ 56.926347] [] cpu_startup_entry+0x215/0x3e0 [ 56.926353] [] start_secondary+0xf9/0x100 The warning appears as rtnl_dereference() is wrongly used in tipc_l2_send_msg() under RCU read lock protection. Instead the proper usage should be that rcu_dereference_rtnl() is called here. Fixes: 5b7066c3dd24 ("tipc: stricter filtering of packets in bearer layer") Acked-by: Jon Maloy Signed-off-by: Ying Xue Signed-off-by: David S. Miller net/tipc/bearer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abd38301639f4fa2e63dae75346c1f0d847d0dfa Merge: f66c6e6 61edc3f Author: Linus Torvalds Date: Wed Jun 15 16:23:38 2016 -1000 Merge tag 'upstream-4.7-rc4' of git://git.infradead.org/linux-ubifs Pull UBI fixes from Richard Weinberger: "This contains fixes for a regression introduced in rc1" * tag 'upstream-4.7-rc4' of git://git.infradead.org/linux-ubifs: ubi: Don't bypass ->getattr() Revert "mtd: switch open_mtd_by_chdev() to use of vfs_stat()" Revert "mtd: switch ubi_open_volume_path() to vfs_stat()" commit 7e1b1fc4dabd6ec8e28baa0708866e13fa93c9b3 Author: Jiri Slaby Date: Fri Jun 10 10:54:32 2016 +0200 base: make module_create_drivers_dir race-free Modules which register drivers via standard path (driver_register) in parallel can cause a warning: WARNING: CPU: 2 PID: 3492 at ../fs/sysfs/dir.c:31 sysfs_warn_dup+0x62/0x80 sysfs: cannot create duplicate filename '/module/saa7146/drivers' Modules linked in: hexium_gemini(+) mxb(+) ... ... Call Trace: ... [] sysfs_warn_dup+0x62/0x80 [] sysfs_create_dir_ns+0x77/0x90 [] kobject_add_internal+0xb4/0x340 [] kobject_add+0x68/0xb0 [] kobject_create_and_add+0x31/0x70 [] module_add_driver+0xc3/0xd0 [] bus_add_driver+0x154/0x280 [] driver_register+0x60/0xe0 [] __pci_register_driver+0x60/0x70 [] saa7146_register_extension+0x64/0x90 [saa7146] [] hexium_init_module+0x11/0x1000 [hexium_gemini] ... As can be (mostly) seen, driver_register causes this call sequence: -> bus_add_driver -> module_add_driver -> module_create_drivers_dir The last one creates "drivers" directory in /sys/module/<...>. When this is done in parallel, the directory is attempted to be created twice at the same time. This can be easily reproduced by loading mxb and hexium_gemini in parallel: while :; do modprobe mxb & modprobe hexium_gemini wait rmmod mxb hexium_gemini saa7146_vv saa7146 done saa7146 calls pci_register_driver for both mxb and hexium_gemini, which means /sys/module/saa7146/drivers is to be created for both of them. Fix this by a new mutex in module_create_drivers_dir which makes the test-and-create "drivers" dir atomic. I inverted the condition and removed 'return' to avoid multiple unlocks or a goto. Signed-off-by: Jiri Slaby Fixes: fe480a2675ed (Modules: only add drivers/ direcory if needed) Cc: v2.6.21+ Signed-off-by: Greg Kroah-Hartman drivers/base/module.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit f66c6e6a840f94ad175c76fd51dc1af2f2d63cf3 Merge: 78ae255 ae4ea9a Author: Linus Torvalds Date: Wed Jun 15 16:08:31 2016 -1000 Merge tag 'for-linus-4.7-2' of git://git.code.sf.net/p/openipmi/linux-ipmi Pull ipmi bugfix from Corey Minyard: "Fix a fairly significant ipmi list bug This bug could cause lists to be corrupted" * tag 'for-linus-4.7-2' of git://git.code.sf.net/p/openipmi/linux-ipmi: ipmi: Remove smi_msg from waiting_rcv_msgs list before handle_one_recv_msg() commit 8c7245abda877d4689b3371db8ae2a4400d7d9ce Author: Oleg Drokin Date: Tue Jun 14 23:28:06 2016 -0400 nfsd: Make init_open_stateid() a bit more whole Move the state selection logic inside from the caller, always making it return correct stp to use. Signed-off-by: J . Bruce Fields Signed-off-by: Oleg Drokin Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) commit 5cc1fb2a093e254b656c64ff24b0b76bed1d34d9 Author: Oleg Drokin Date: Tue Jun 14 23:28:05 2016 -0400 nfsd: Extend the mutex holding region around in nfsd4_process_open2() To avoid racing entry into nfs4_get_vfs_file(). Make init_open_stateid() return with locked stateid to be unlocked by the caller. Signed-off-by: Oleg Drokin Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit feb9dad5209280085d5b0c094fa67e7a8d75c81a Author: Oleg Drokin Date: Tue Jun 14 23:28:04 2016 -0400 nfsd: Always lock state exclusively. It used to be the case that state had an rwlock that was locked for write by downgrades, but for read for upgrades (opens). Well, the problem is if there are two competing opens for the same state, they step on each other toes potentially leading to leaking file descriptors from the state structure, since access mode is a bitmap only set once. Signed-off-by: Oleg Drokin Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields fs/nfsd/nfs4state.c | 40 ++++++++++++++++++++-------------------- fs/nfsd/state.h | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) commit 78ae255f7891d41fe4ed492f270fe663f4b261af Merge: 90effdc 139ab4d Author: Linus Torvalds Date: Wed Jun 15 15:55:49 2016 -1000 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio docs and tests from Michael Tsirkin: "This merely has some documentation and a new test, seems safe to merge" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: tools/virtio: add noring tool tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu tools/virtio/ringtest: add usage example to README MAINTAINERS: Add file patterns for virtio device tree bindings commit 90effdcd2b8a39927aace655c72088a62911e8e1 Author: Shuah Khan Date: Tue Jun 14 16:30:27 2016 -0600 Update email addresses in MAINTAINERS and .mailmap Updating email addresses in MAINTAINERS and .mailmap files. Cc: stable@vger.kernel.org Signed-off-by: Shuah Khan Signed-off-by: Linus Torvalds .mailmap | 1 + MAINTAINERS | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 5dc8a864be0820677e7fce85d2832d4387c7bb88 Author: Mauro Carvalho Chehab Date: Tue Jun 14 15:17:40 2016 -0300 Update my main e-mails at the Kernel tree For the third time in three years, I'm changing my e-mail at Samsung. That's bad, as it may stop communications with me for a while. So, this time, I'll also add the mchehab@kernel.org e-mail, as it remains stable since ever. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds .mailmap | 1 + CREDITS | 1 + MAINTAINERS | 51 ++++++++++++++++++++++++++------------- drivers/media/v4l2-core/v4l2-mc.c | 2 +- include/media/v4l2-mc.h | 2 +- 5 files changed, 38 insertions(+), 19 deletions(-) commit 0ab15bdeb2943bd6491a35ec4eeb53a9a4436525 Merge: d9724d3 871fd84 Author: Dave Airlie Date: Thu Jun 16 10:24:13 2016 +1000 Merge branch 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes radeon and amdgpu fixes for 4.7. Highlights: - fixes for GPU VM passthrough - fixes for powerplay on Polaris GPUs - pll fixes for rs780/880 * 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux: drm/amd/powerplay: select samu dpm 0 as boot level on polaris. drm/amd/powerplay: update powerplay table parsing Revert "drm/amdgpu: add pipeline sync while vmid switch in same ctx" drm/amdgpu/gfx7: fix broken condition check drm/radeon: fix asic initialization for virtualized environments amdgpu: fix asic initialization for virtualized environments (v2) drm/radeon: don't use fractional dividers on RS[78]80 if SS is enabled drm/radeon: do not hard reset GPU while freezing on r600/r700 family commit 5b8abf1f33ccd9f1cbc4248ade3cd507d9319c48 Author: Suravee Suthikulpanit Date: Wed Jun 15 17:24:36 2016 -0500 kvm: svm: Do not support AVIC if not CONFIG_X86_LOCAL_APIC Add logic to disable AVIC #ifndef CONFIG_X86_LOCAL_APIC. Suggested-by: Paolo Bonzini Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini arch/x86/kvm/svm.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit 7d669f50847481c52faf0656aea7b4be63113210 Author: Suravee Suthikulpanit Date: Wed Jun 15 17:23:45 2016 -0500 kvm: svm: Fix implicit declaration for __default_cpu_present_to_apicid() The commit 8221c1370056 ("svm: Manage vcpu load/unload when enable AVIC") introduces a build error due to implicit function declaration when #ifdef CONFIG_X86_32 and #ifndef CONFIG_X86_LOCAL_APIC (as reported by Kbuild test robot i386-randconfig-x0-06121009). So, this patch introduces kvm_cpu_get_apicid() wrapper around __default_cpu_present_to_apicid() with additional handling if CONFIG_X86_LOCAL_APIC is not defined. Reported-by: kbuild test robot Fixes: commit 8221c1370056 ("svm: Manage vcpu load/unload when enable AVIC") Signed-off-by: Suravee Suthikulpanit Signed-off-by: Paolo Bonzini arch/x86/include/asm/kvm_host.h | 11 +++++++++++ arch/x86/kvm/svm.c | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) commit e4587ea1d748953e17ddee8f30994899ae73b677 Merge: 0ee1362 6052f7f Author: David S. Miller Date: Wed Jun 15 14:47:46 2016 -0700 Merge branch 'macsec-fixes' Sabrina Dubroca says: ==================== macsec fixes Patch 1 adds rcu_barrier() during module unload to prevent possible panics. Patch 2 allocates memory for scattergather lists and the IV on the heap, since they can escape the current function's context during crypto callbacks. Patch 3 fixes a failure to create secure associations. ==================== Signed-off-by: David S. Miller commit 6052f7fbce857e327218a9d8a040e210ea7cc718 Author: Sabrina Dubroca Date: Tue Jun 14 15:25:16 2016 +0200 macsec: fix SA initialization The ASYNC flag prevents initialization on some physical machines. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Sabrina Dubroca Signed-off-by: David S. Miller drivers/net/macsec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d9649b3a524df9ccd15ac25ad6591089260fdbd Author: Sabrina Dubroca Date: Tue Jun 14 15:25:15 2016 +0200 macsec: allocate sg and iv on the heap For the crypto callbacks to work properly, we cannot have sg and iv on the stack. Use kmalloc instead, with a single allocation for aead_request + scatterlist + iv. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/macsec.c | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) commit b196c22af5c3ff784c472c80f6fb4e5fad67b2ac Author: Sabrina Dubroca Date: Tue Jun 14 15:25:14 2016 +0200 macsec: add rcu_barrier() on module exit Without this, the various uses of call_rcu could cause a kernel panic. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver") Signed-off-by: Sabrina Dubroca Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller drivers/net/macsec.c | 1 + 1 file changed, 1 insertion(+) commit 0ee13627f963f9c5c9544ed19d82854836d5e676 Author: Florian Westphal Date: Tue Jun 14 06:16:27 2016 +0200 htb: call qdisc_root with rcu read lock held saw a debug splat: net/include/net/sch_generic.h:287 suspicious rcu_dereference_check() usage! other info that might help us debug this: rcu_scheduler_active = 1, debug_locks = 0 2 locks held by kworker/2:1/710: #0: ("events"){.+.+.+}, at: [] #1: ((&q->work)){+.+...}, at: [] process_one_work+0x14d/0x690 Workqueue: events htb_work_func Call Trace: [] dump_stack+0x85/0xc2 [] lockdep_rcu_suspicious+0xe7/0x120 [] htb_work_func+0x67/0x70 Signed-off-by: Florian Westphal Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_htb.c | 2 ++ 1 file changed, 2 insertions(+) commit ebecaa6662b0a9c3590bd644a4cec6f9d96818b7 Author: Jamal Hadi Salim Date: Mon Jun 13 18:08:42 2016 -0400 net sched actions: bug fix dumping actions directly didnt produce NLMSG_DONE This refers to commands to direct action access as follows: sudo tc actions add action drop index 12 sudo tc actions add action pipe index 10 And then dumping them like so: sudo tc actions ls action gact iproute2 worked because it depended on absence of TCA_ACT_TAB TLV as end of message. This fix has been tested with iproute2 and is backward compatible. Signed-off-by: Jamal Hadi Salim Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9724d3b1d007fa042c768a2eec708f33d70539d Merge: e43fc94 13c34fe Author: Dave Airlie Date: Thu Jun 16 06:27:05 2016 +1000 Merge branch 'drm-etnaviv-fixes' of git://git.pengutronix.de/git/lst/linux into drm-fixes just a single fix for a regression introduced by IOMMU API changes in v4.7. * 'drm-etnaviv-fixes' of git://git.pengutronix.de/git/lst/linux: drm/etnaviv: initialize iommu domain page size commit d15eccea69b96a5116169688dcc9baf6d1ce2751 Author: WANG Cong Date: Mon Jun 13 13:44:14 2016 -0700 act_ipt: fix a bind refcnt leak And avoid calling tcf_hash_check() twice. Fixes: a57f19d30b2d ("net sched: ipt action fix late binding") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Acked-by: Jamal Hadi Salim Signed-off-by: David S. Miller net/sched/act_ipt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 3d7c8257d999bdf8fa77ffd9be775c7b58cc7b69 Author: Eric Dumazet Date: Mon Jun 13 11:33:32 2016 -0700 net_sched: prio: insure proper transactional behavior Now prio_init() can return -ENOMEM, it also has to make sure any allocated qdiscs are freed, since the caller (qdisc_create()) wont call ->destroy() handler for us. More generally, we want a transactional behavior for "tc qdisc change ...", so prio_tune() should not make modifications if any error is returned. It means that we must validate parameters and allocate missing qdisc(s) before taking root qdisc lock exactly once, to not leave the prio qdisc in an intermediate state. Fixes: cbdf45116478 ("net_sched: prio: properly report out of memory errors") Signed-off-by: Eric Dumazet Reported-by: Cong Wang Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_prio.c | 57 +++++++++++++++++++++------------------------------- 1 file changed, 23 insertions(+), 34 deletions(-) commit 0c5ddb51e8f7be7170600f95a4ea92e5a32afad8 Author: Eric Dumazet Date: Mon Jun 13 07:50:25 2016 -0700 net/mlx4_en: initialize cmd.context_lock spinlock earlier Maciej Żenczykowski reported lockdep warning a spinlock was not registered before being held in mlx4_cmd_wake_completions() cmd.context_lock initialization is not at the right place. 1) mlx4_cmd_use_events() can be called multiple times. Calling spin_lock_init() on a live spinlock can lead to hangs. 2) mlx4_cmd_wake_completions() can be called while lock has not been initialized. Lockdep complains, and current logic is not race prone. It seems better to move the initialization earlier in mlx4_load_one() Signed-off-by: Eric Dumazet Reported-by: Maciej Żenczykowski Cc: Eugenia Emantayev Cc: Tariq Toukan Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx4/cmd.c | 1 - drivers/net/ethernet/mellanox/mlx4/main.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) commit f52a4c74efbb61195490535e9d65d964c4ebfee3 Author: Wei Yongjun Date: Tue Jun 14 00:26:49 2016 +0000 ata: fix return value check in ahci_seattle_get_port_info() In case of error, the function devm_kzalloc() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Signed-off-by: Wei Yongjun Acked-by: Brijesh Singh Signed-off-by: Tejun Heo drivers/ata/ahci_seattle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 39a9beab5acb83176e8b9a4f0778749a09341f1f Author: J. Bruce Fields Date: Tue May 17 12:38:21 2016 -0400 rpc: share one xps between all backchannels The spec allows backchannels for multiple clients to share the same tcp connection. When that happens, we need to use the same xprt for all of them. Similarly, we need the same xps. This fixes list corruption introduced by the multipath code. Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields Acked-by: Trond Myklebust include/linux/sunrpc/svc_xprt.h | 1 + include/linux/sunrpc/xprt.h | 1 + net/sunrpc/clnt.c | 18 ++++++++++++++---- net/sunrpc/svc_xprt.c | 2 ++ net/sunrpc/xprtsock.c | 1 + 5 files changed, 19 insertions(+), 4 deletions(-) commit d50039ea5ee63c589b0434baa5ecf6e5075bb6f9 Author: J. Bruce Fields Date: Mon May 16 17:03:42 2016 -0400 nfsd4/rpc: move backchannel create logic into rpc code Also simplify the logic a bit. Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields Acked-by: Trond Myklebust fs/nfsd/nfs4callback.c | 18 +----------------- include/linux/sunrpc/clnt.h | 2 -- net/sunrpc/clnt.c | 12 ++++++++++-- 3 files changed, 11 insertions(+), 21 deletions(-) commit 1208fd569c07ab84aa5d024abd863267c2953b4a Author: J. Bruce Fields Date: Fri May 20 17:07:17 2016 -0400 SUNRPC: fix xprt leak on xps allocation failure Callers of rpc_create_xprt expect it to put the xprt on success and failure. Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields Acked-by: Trond Myklebust net/sunrpc/clnt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit d0e13f5bbe4be7c8f27736fc40503dcec04b7de0 Author: Miklos Szeredi Date: Wed Jun 15 14:18:59 2016 +0200 ovl: fix uid/gid when creating over whiteout Fix a regression when creating a file over a whiteout. The new file/directory needs to use the current fsuid/fsgid, not the ones from the mounter's credentials. The refcounting is a bit tricky: prepare_creds() sets an original refcount, override_creds() gets one more, which revert_cred() drops. So 1) we need to expicitly put the mounter's credentials when overriding with the updated one 2) we need to put the original ref to the updated creds (and this can safely be done before revert_creds(), since we'll still have the ref from override_creds()). Reported-by: Stephen Smalley Fixes: 3fe6e52f0626 ("ovl: override creds with the ones from the superblock mounter") Signed-off-by: Miklos Szeredi fs/overlayfs/dir.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 75f0b68b75dabb3ff551440163fd67b3fc62901a Author: Nicolai Stange Date: Tue May 24 13:08:54 2016 +0200 debugfs: open_proxy_open(): avoid double fops release Debugfs' open_proxy_open(), the ->open() installed at all inodes created through debugfs_create_file_unsafe(), - grabs a reference to the original file_operations instance passed to debugfs_create_file_unsafe() via fops_get(), - installs it at the file's ->f_op by means of replace_fops() - and calls fops_put() on it. Since the semantics of replace_fops() are such that the reference's ownership is transferred, the subsequent fops_put() will result in a double release when the file is eventually closed. Currently, this is not an issue since fops_put() basically does a module_put() on the file_operations' ->owner only and there don't exist any modules calling debugfs_create_file_unsafe() yet. This is expected to change in the future though, c.f. commit c64688081490 ("debugfs: add support for self-protecting attribute file fops"). Remove the call to fops_put() from open_proxy_open(). Fixes: 9fd4dcece43a ("debugfs: prevent access to possibly dead file_operations at file open") Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 1 - 1 file changed, 1 deletion(-) commit b10e3e90485e32e4cea9e35d2295ee7bffaeff73 Author: Nicolai Stange Date: Tue May 24 13:08:53 2016 +0200 debugfs: full_proxy_open(): free proxy on ->open() failure Debugfs' full_proxy_open(), the ->open() installed at all inodes created through debugfs_create_file(), - grabs a reference to the original struct file_operations instance passed to debugfs_create_file(), - dynamically allocates a proxy struct file_operations instance wrapping the original - and installs this at the file's ->f_op. Afterwards, it calls the original ->open() and passes its return value back to the VFS layer. Now, if that return value indicates failure, the VFS layer won't ever call ->release() and thus, neither the reference to the original file_operations nor the memory for the proxy file_operations will get released, i.e. both are leaked. Upon failure of the original fops' ->open(), undo the proxy installation. That is: - Set the struct file ->f_op to what it had been when full_proxy_open() was entered. - Drop the reference to the original file_operations. - Free the memory holding the proxy file_operations. Fixes: 49d200deaa68 ("debugfs: prevent access to removed files' private data") Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman fs/debugfs/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit df4565f9ebdc4d6dc50edc6e8fed08004e328332 Author: Nicolai Stange Date: Tue May 24 14:05:05 2016 +0200 kernel/kcov: unproxify debugfs file's fops Since commit 49d200deaa68 ("debugfs: prevent access to removed files' private data"), a debugfs file's file_operations methods get proxied through lifetime aware wrappers. However, only a certain subset of the file_operations members is supported by debugfs and ->mmap isn't among them -- it appears to be NULL from the VFS layer's perspective. This behaviour breaks the /sys/kernel/debug/kcov file introduced concurrently with commit 5c9a8750a640 ("kernel: add kcov code coverage"). Since that file never gets removed, there is no file removal race and thus, a lifetime checking proxy isn't needed. Avoid the proxying for /sys/kernel/debug/kcov by creating it via debugfs_create_file_unsafe() rather than debugfs_create_file(). Fixes: 49d200deaa68 ("debugfs: prevent access to removed files' private data") Fixes: 5c9a8750a640 ("kernel: add kcov code coverage") Reported-by: Sasha Levin Signed-off-by: Nicolai Stange Signed-off-by: Greg Kroah-Hartman kernel/kcov.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 695e9df010e40f407f4830dc11d53dce957710ba Author: Eric W. Biederman Date: Fri Jun 10 12:21:40 2016 -0500 mnt: Account for MS_RDONLY in fs_fully_visible In rare cases it is possible for s_flags & MS_RDONLY to be set but MNT_READONLY to be clear. This starting combination can cause fs_fully_visible to fail to ensure that the new mount is readonly. Therefore force MNT_LOCK_READONLY in the new mount if MS_RDONLY is set on the source filesystem of the mount. In general both MS_RDONLY and MNT_READONLY are set at the same for mounts so I don't expect any programs to care. Nor do I expect MS_RDONLY to be set on proc or sysfs in the initial user namespace, which further decreases the likelyhood of problems. Which means this change should only affect system configurations by paranoid sysadmins who should welcome the additional protection as it keeps people from wriggling out of their policies. Cc: stable@vger.kernel.org Fixes: 8c6cf9cc829f ("mnt: Modify fs_fully_visible to deal with locked ro nodev and atime") Signed-off-by: "Eric W. Biederman" fs/namespace.c | 4 ++++ 1 file changed, 4 insertions(+) commit c56bdcac153e60d96a619a59c7981f2a78cba598 Author: Will Deacon Date: Thu Jun 2 18:40:07 2016 +0100 arm64: spinlock: Ensure forward-progress in spin_unlock_wait Rather than wait until we observe the lock being free (which might never happen), we can also return from spin_unlock_wait if we observe that the lock is now held by somebody else, which implies that it was unlocked but we just missed seeing it in that state. Furthermore, in such a scenario there is no longer a need to write back the value that we loaded, since we know that there has been a lock hand-off, which is sufficient to publish any stores prior to the unlock_wait because the ARm architecture ensures that a Store-Release instruction is multi-copy atomic when observed by a Load-Acquire instruction. The litmus test is something like: AArch64 { 0:X1=x; 0:X3=y; 1:X1=y; 2:X1=y; 2:X3=x; } P0 | P1 | P2 ; MOV W0,#1 | MOV W0,#1 | LDAR W0,[X1] ; STR W0,[X1] | STLR W0,[X1] | LDR W2,[X3] ; DMB SY | | ; LDR W2,[X3] | | ; exists (0:X2=0 /\ 2:X0=1 /\ 2:X2=0) where P0 is doing spin_unlock_wait, P1 is doing spin_unlock and P2 is doing spin_lock. Signed-off-by: Will Deacon arch/arm64/include/asm/spinlock.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) commit 8fff1722f705ce5023a0d6d77a31a9d013be2a34 Author: Liping Zhang Date: Tue Jun 14 20:13:04 2016 +0800 netfilter: nf_tables: fix a wrong check to skip the inactive rules nft_genmask_cur has already done left-shift operator on the gencursor, so there's no need to do left-shift operator on it again. Fixes: ea4bd995b0f2 ("netfilter: nf_tables: add transaction helper functions") Cc: Patrick McHardy Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a02f424863610a0a7abd80c468839e59cfa4d0d8 Author: Liping Zhang Date: Sat Jun 11 12:20:28 2016 +0800 netfilter: nf_tables: fix wrong destroy anonymous sets if binding fails When we add a nft rule like follows: # nft add rule filter test tcp dport vmap {1: jump test} -ELOOP error will be returned, and the anonymous set will be destroyed. But after that, nf_tables_abort will also try to remove the element and destroy the set, which was already destroyed and freed. If we add a nft wrong rule, nft_tables_abort will do the cleanup work rightly, so nf_tables_set_destroy call here is redundant and wrong, remove it. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 8588ac097b49ce8802f11541d9cd6f6667badb34 Author: Pablo Neira Ayuso Date: Sat Jun 11 12:20:27 2016 +0800 netfilter: nf_tables: reject loops from set element jump to chain Liping Zhang says: "Users may add such a wrong nft rules successfully, which will cause an endless jump loop: # nft add rule filter test tcp dport vmap {1: jump test} This is because before we commit, the element in the current anonymous set is inactive, so osp->walk will skip this element and miss the validate check." To resolve this problem, this patch passes the generation mask to the walk function through the iter container structure depending on the code path: 1) If we're dumping the elements, then we have to check if the element is active in the current generation. Thus, we check for the current bit in the genmask. 2) If we're checking for loops, then we have to check if the element is active in the next generation, as we're in the middle of a transaction. Thus, we check for the next bit in the genmask. Based on original patch from Liping Zhang. Reported-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso Tested-by: Liping Zhang include/net/netfilter/nf_tables.h | 1 + net/netfilter/nf_tables_api.c | 15 +++++++++------ net/netfilter/nft_hash.c | 3 +-- net/netfilter/nft_rbtree.c | 3 +-- 4 files changed, 12 insertions(+), 10 deletions(-) commit a46844021f6182cca7b575295ba33a4734b1b9d9 Author: Liping Zhang Date: Sat Jun 11 12:20:26 2016 +0800 netfilter: nf_tables: fix wrong check of NFT_SET_MAP in nf_tables_bind_set We should check "i" is used as a dictionary or not, "binding" is already checked before. Signed-off-by: Liping Zhang Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_tables_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 775711497202fe376368c25b0c7296ed8803e0ba Author: Florian Westphal Date: Fri Jun 10 17:25:19 2016 +0200 netfilter: conntrack: destroy kmemcache on module removal I forgot to move the kmem_cache_destroy into the exit path. Fixes: 0c5366b3a8c7 ("netfilter: conntrack: use single slab cache) Signed-off-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso net/netfilter/nf_conntrack_core.c | 2 ++ 1 file changed, 2 insertions(+) commit ae8a7910fb0568531033bd6ebe65590f7a4fa6e2 Author: John Keeping Date: Wed Jun 1 16:46:10 2016 +0100 iommu/rockchip: Fix zap cache during device attach rk_iommu_command() takes a struct rk_iommu and iterates over the slave MMUs, so this is doubly wrong in that we're passing in the wrong pointer and talking to MMUs that we shouldn't be. Fixes: cd6438c5f844 ("iommu/rockchip: Reconstruct to support multi slaves") Cc: stable@vger.kernel.org Signed-off-by: John Keeping Tested-by: Heiko Stuebner Reviewed-by: Heiko Stuebner Signed-off-by: Joerg Roedel drivers/iommu/rockchip-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43160ffd12c8d1d331362362eea3c70e04b6f9c4 Author: Axel Lin Date: Wed Jun 15 10:21:34 2016 +0800 regulator: qcom_smd: Remove list_voltage callback for rpm_smps_ldo_ops_fixed Use regulator_list_voltage_linear_range in rpm_smps_ldo_ops_fixed is wrong because it is used for fixed regulator without any linear range. The rpm_smps_ldo_ops_fixed is used for pm8941_lnldo which has fixed_uV set and n_voltages = 1. In this case, regulator_list_voltage() can return rdev->desc->fixed_uV without .list_voltage implementation. Fixes: 3bfbb4d1a480 ("regulator: qcom_smd: add list_voltage callback") Signed-off-by: Axel Lin Signed-off-by: Mark Brown drivers/regulator/qcom_smd-regulator.c | 1 - 1 file changed, 1 deletion(-) commit 13c34fe518624e27589827aa49f68f5f38c95f11 Author: Lucas Stach Date: Mon Jun 13 18:28:42 2016 +0200 drm/etnaviv: initialize iommu domain page size Since d16e0faab91 (iommu: Allow selecting page sizes per domain) the iommu core demands the page size to be set per domain, otherwise any mapping attempts will be dropped. Make sure to set a valid page size for the etnaviv iommu. Signed-off-by: Lucas Stach drivers/gpu/drm/etnaviv/etnaviv_iommu.c | 1 + 1 file changed, 1 insertion(+) commit 3a5facd09da848193f5bcb0dea098a298bc1a29d Author: Will Deacon Date: Wed Jun 8 15:10:57 2016 +0100 arm64: spinlock: fix spin_unlock_wait for LSE atomics Commit d86b8da04dfa ("arm64: spinlock: serialise spin_unlock_wait against concurrent lockers") fixed spin_unlock_wait for LL/SC-based atomics under the premise that the LSE atomics (in particular, the LDADDA instruction) are indivisible. Unfortunately, these instructions are only indivisible when used with the -AL (full ordering) suffix and, consequently, the same issue can theoretically be observed with LSE atomics, where a later (in program order) load can be speculated before the write portion of the atomic operation. This patch fixes the issue by performing a CAS of the lock once we've established that it's unlocked, in much the same way as the LL/SC code. Fixes: d86b8da04dfa ("arm64: spinlock: serialise spin_unlock_wait against concurrent lockers") Signed-off-by: Will Deacon arch/arm64/include/asm/spinlock.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 38b850a73034f075c4088e7511b36ebbef9dce00 Author: Will Deacon Date: Thu Jun 2 15:27:04 2016 +0100 arm64: spinlock: order spin_{is_locked,unlock_wait} against local locks spin_is_locked has grown two very different use-cases: (1) [The sane case] API functions may require a certain lock to be held by the caller and can therefore use spin_is_locked as part of an assert statement in order to verify that the lock is indeed held. For example, usage of assert_spin_locked. (2) [The insane case] There are two locks, where a CPU takes one of the locks and then checks whether or not the other one is held before accessing some shared state. For example, the "optimized locking" in ipc/sem.c. In the latter case, the sequence looks like: spin_lock(&sem->lock); if (!spin_is_locked(&sma->sem_perm.lock)) /* Access shared state */ and requires that the spin_is_locked check is ordered after taking the sem->lock. Unfortunately, since our spinlocks are implemented using a LDAXR/STXR sequence, the read of &sma->sem_perm.lock can be speculated before the STXR and consequently return a stale value. Whilst this hasn't been seen to cause issues in practice, PowerPC fixed the same issue in 51d7d5205d33 ("powerpc: Add smp_mb() to arch_spin_is_locked()") and, although we did something similar for spin_unlock_wait in d86b8da04dfa ("arm64: spinlock: serialise spin_unlock_wait against concurrent lockers") that doesn't actually take care of ordering against local acquisition of a different lock. This patch adds an smp_mb() to the start of our arch_spin_is_locked and arch_spin_unlock_wait routines to ensure that the lock value is always loaded after any other locks have been taken by the current CPU. Reported-by: Peter Zijlstra Signed-off-by: Will Deacon arch/arm64/include/asm/spinlock.h | 7 +++++++ 1 file changed, 7 insertions(+) commit f7a6c1492a2cb596952260a7d5bb0d61ca815173 Author: Mark Salter Date: Tue Jun 7 11:32:21 2016 -0500 arm: pmu: Fix non-devicetree probing There is a problem in the non-devicetree PMU probing where some probe functions may get the number of supported events through smp_call_function_any() using the arm_pmu supported_cpus mask. But at the time the probe function is called, the supported_cpus mask is empty so the call fails. This patch makes sure the mask is set before calling the init function rather than after. Signed-off-by: Mark Salter Signed-off-by: Jeremy Linton Signed-off-by: Will Deacon drivers/perf/arm_pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 62e6d1e59c77316768a663d1328390b4cd33801f Author: Roger Quadros Date: Wed Jun 15 11:12:05 2016 +0300 extcon: palmas: Fix boot up state of VBUS when using GPIO detection If USB cable is connected prior to boot, we don't get any interrupts so we must manually check the VBUS state and report it during probe. If we don't do it then USB controller will never know that peripheral cable was connected till the user unplugs and replugs the cable. Fixes: b7aad8e2685b ("extcon: palmas: Add the support for VBUS detection by using GPIO") Cc: stable@vger.kernel.org Signed-off-by: Roger Quadros Signed-off-by: Chanwoo Choi drivers/extcon/extcon-palmas.c | 2 ++ 1 file changed, 2 insertions(+) commit e43fc9467e96bbaf1b65bb975e6820e0db993469 Merge: fd2d2ba 6aa85f1 Author: Dave Airlie Date: Wed Jun 15 16:58:32 2016 +1000 Merge branch 'linux-4.7' of git://github.com/skeggsb/linux into drm-fixes * 'linux-4.7' of git://github.com/skeggsb/linux: drm/nouveau/iccsense: fix memory leak drm/nouveau/Revert "drm/nouveau/device/pci: set as non-CPU-coherent on ARM64" commit 6aa85f1129b32b5cd19ec262e7cfc2ddc08263c3 Author: Ben Skeggs Date: Thu May 26 17:04:52 2016 +1000 drm/nouveau/iccsense: fix memory leak Signed-off-by: Ben Skeggs drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 539aae6e3af97c7ec1602ff23e805f2852c2611c Author: Robin Murphy Date: Mon Jun 6 16:11:52 2016 +0900 drm/nouveau/Revert "drm/nouveau/device/pci: set as non-CPU-coherent on ARM64" This reverts commit 1733a2ad36741b1812cf8b3f3037c28d0af53f50. There is apparently something amiss with the way the TTM code handles DMA buffers, which the above commit was attempting to work around for arm64 systems with non-coherent PCI. Unfortunately, this completely breaks systems *with* coherent PCI (which appear to be the majority). Booting a plain arm64 defconfig + CONFIG_DRM + CONFIG_DRM_NOUVEAU on a machine with a PCI GPU having coherent dma_map_ops (in this case a 7600GT card plugged into an ARM Juno board) results in a fatal crash: [ 2.803438] nouveau 0000:06:00.0: DRM: allocated 1024x768 fb: 0x9000, bo ffffffc976141c00 [ 2.897662] Unable to handle kernel NULL pointer dereference at virtual address 000001ac [ 2.897666] pgd = ffffff8008e00000 [ 2.897675] [000001ac] *pgd=00000009ffffe003, *pud=00000009ffffe003, *pmd=0000000000000000 [ 2.897680] Internal error: Oops: 96000045 [#1] PREEMPT SMP [ 2.897685] Modules linked in: [ 2.897692] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc5+ #543 [ 2.897694] Hardware name: ARM Juno development board (r1) (DT) [ 2.897699] task: ffffffc9768a0000 ti: ffffffc9768a8000 task.ti: ffffffc9768a8000 [ 2.897711] PC is at __memcpy+0x7c/0x180 [ 2.897719] LR is at OUT_RINGp+0x34/0x70 [ 2.897724] pc : [] lr : [] pstate: 80000045 [ 2.897726] sp : ffffffc9768ab360 [ 2.897732] x29: ffffffc9768ab360 x28: 0000000000000001 [ 2.897738] x27: ffffffc97624c000 x26: 0000000000000000 [ 2.897744] x25: 0000000000000080 x24: 0000000000006c00 [ 2.897749] x23: 0000000000000005 x22: ffffffc97624c010 [ 2.897755] x21: 0000000000000004 x20: 0000000000000004 [ 2.897761] x19: ffffffc9763da000 x18: ffffffc976b2491c [ 2.897766] x17: 0000000000000007 x16: 0000000000000006 [ 2.897771] x15: 0000000000000001 x14: 0000000000000001 [ 2.897777] x13: 0000000000e31b70 x12: ffffffc9768a0080 [ 2.897783] x11: 0000000000000000 x10: fffffffffffffb00 [ 2.897788] x9 : 0000000000000000 x8 : 0000000000000000 [ 2.897793] x7 : 0000000000000000 x6 : 00000000000001ac [ 2.897799] x5 : 00000000ffffffff x4 : 0000000000000000 [ 2.897804] x3 : 0000000000000010 x2 : 0000000000000010 [ 2.897810] x1 : ffffffc97624c010 x0 : 00000000000001ac ... [ 2.898494] Call trace: [ 2.898499] Exception stack(0xffffffc9768ab1a0 to 0xffffffc9768ab2c0) [ 2.898506] b1a0: ffffffc9763da000 0000000000000004 ffffffc9768ab360 ffffff80083465fc [ 2.898513] b1c0: ffffffc976801e00 ffffffc9762b8000 ffffffc9768ab1f0 ffffff80080ec158 [ 2.898520] b1e0: ffffffc9768ab230 ffffff8008496d04 ffffffc975ce6d80 ffffffc9768ab36e [ 2.898527] b200: ffffffc9768ab36f ffffffc9768ab29d ffffffc9768ab29e ffffffc9768a0000 [ 2.898533] b220: ffffffc9768ab250 ffffff80080e70c0 ffffffc9768ab270 ffffff8008496e44 [ 2.898540] b240: 00000000000001ac ffffffc97624c010 0000000000000010 0000000000000010 [ 2.898546] b260: 0000000000000000 00000000ffffffff 00000000000001ac 0000000000000000 [ 2.898552] b280: 0000000000000000 0000000000000000 fffffffffffffb00 0000000000000000 [ 2.898558] b2a0: ffffffc9768a0080 0000000000e31b70 0000000000000001 0000000000000001 [ 2.898566] [] __memcpy+0x7c/0x180 [ 2.898574] [] nv04_fbcon_imageblit+0x1d4/0x2e8 [ 2.898582] [] nouveau_fbcon_imageblit+0xd8/0xe0 [ 2.898591] [] soft_cursor+0x154/0x1d8 [ 2.898598] [] bit_cursor+0x4fc/0x538 [ 2.898605] [] fbcon_cursor+0x134/0x1a8 [ 2.898613] [] hide_cursor+0x38/0xa0 [ 2.898620] [] redraw_screen+0x120/0x228 [ 2.898628] [] fbcon_prepare_logo+0x370/0x3f8 [ 2.898635] [] fbcon_init+0x350/0x560 [ 2.898641] [] visual_init+0xac/0x108 [ 2.898648] [] do_bind_con_driver+0x1c4/0x3a8 [ 2.898655] [] do_take_over_console+0x174/0x1e8 [ 2.898662] [] do_fbcon_takeover+0x74/0x100 [ 2.898669] [] fbcon_event_notify+0x8cc/0x920 [ 2.898680] [] notifier_call_chain+0x50/0x90 [ 2.898685] [] __blocking_notifier_call_chain+0x4c/0x90 [ 2.898691] [] blocking_notifier_call_chain+0x14/0x20 [ 2.898696] [] fb_notifier_call_chain+0x1c/0x28 [ 2.898703] [] register_framebuffer+0x1cc/0x2e0 [ 2.898712] [] drm_fb_helper_initial_config+0x288/0x3e8 [ 2.898719] [] nouveau_fbcon_init+0xe0/0x118 [ 2.898727] [] nouveau_drm_load+0x268/0x890 [ 2.898734] [] drm_dev_register+0xbc/0xc8 [ 2.898740] [] drm_get_pci_dev+0xa0/0x180 [ 2.898747] [] nouveau_drm_probe+0x1a0/0x1e0 [ 2.898755] [] pci_device_probe+0x98/0x110 [ 2.898763] [] driver_probe_device+0x204/0x2b0 [ 2.898770] [] __driver_attach+0xac/0xb0 [ 2.898777] [] bus_for_each_dev+0x60/0xa0 [ 2.898783] [] driver_attach+0x20/0x28 [ 2.898789] [] bus_add_driver+0x1d0/0x238 [ 2.898796] [] driver_register+0x60/0xf8 [ 2.898802] [] __pci_register_driver+0x3c/0x48 [ 2.898809] [] drm_pci_init+0xf4/0x120 [ 2.898818] [] nouveau_drm_init+0x21c/0x230 [ 2.898825] [] do_one_initcall+0x8c/0x190 [ 2.898832] [] kernel_init_freeable+0x14c/0x1f0 [ 2.898839] [] kernel_init+0x10/0x100 [ 2.898845] [] ret_from_fork+0x10/0x40 [ 2.898853] Code: a88120c7 a8c12027 a88120c7 a8c12027 (a88120c7) [ 2.898871] ---[ end trace d5713dcad023ee04 ]--- [ 2.898888] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b In a toss-up between the GPU seeing stale data artefacts on some systems vs. catastrophic kernel crashes on other systems, the latter would seem to take precedence, so revert this change until the real underlying problem can be fixed. Signed-off-by: Robin Murphy Acked-by: Alexandre Courbot [acourbot@nvidia.com: port to Nouveau tree, remove bits in lib/] Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/engine/device/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 871fd8403de10b9ba9c284105475ab52b96be248 Author: Rex Zhu Date: Sun Jun 12 11:18:01 2016 +0800 drm/amd/powerplay: select samu dpm 0 as boot level on polaris. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3ff211270a986f19c7983378ee9c4db2497eaeaf Author: Rex Zhu Date: Wed Jun 8 19:04:35 2016 +0800 drm/amd/powerplay: update powerplay table parsing to handle pptable format change on Polaris boards Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr_ppt.h | 1 + .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 23 ++++-- .../gpu/drm/amd/powerplay/hwmgr/tonga_pptable.h | 16 ++++ .../amd/powerplay/hwmgr/tonga_processpptables.c | 91 +++++++++++++++------- 4 files changed, 97 insertions(+), 34 deletions(-) commit 61e0979a497b07f5a82f3050e37ecc7093e2971d Merge: d1e3728 4100948 Author: David S. Miller Date: Tue Jun 14 22:21:45 2016 -0700 Merge branch 'ovs-notifications' Nicolas Dichtel says: ==================== ovs: fix rtnl notifications on interface deletion There was no rtnl notifications for interfaces (gre, vxlan, geneve) created by ovs. This problem is fixed by adjusting the creation path. v1 -> v2: - add patch #1 and #4 - rework error handling in patch #2 ==================== Acked-by: Pravin B Shelar Signed-off-by: David S. Miller commit 41009481b690493c169ce85f591b9d32c6fd9422 Author: Nicolas Dichtel Date: Mon Jun 13 10:31:07 2016 +0200 ovs/geneve: fix rtnl notifications on iface deletion The function geneve_dev_create_fb() (only used by ovs) never calls rtnl_configure_link(). The consequence is that dev->rtnl_link_state is never set to RTNL_LINK_INITIALIZED. During the deletion phase, the function rollback_registered_many() sends a RTM_DELLINK only if dev->rtnl_link_state is set to RTNL_LINK_INITIALIZED. Fixes: e305ac6cf5a1 ("geneve: Add support to collect tunnel metadata.") CC: Pravin B Shelar CC: Jesse Gross CC: Thomas Graf Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller drivers/net/geneve.c | 4 ++++ 1 file changed, 4 insertions(+) commit da6f1da819d4b9c081a477dec74dc468a0b44290 Author: Nicolas Dichtel Date: Mon Jun 13 10:31:06 2016 +0200 ovs/gre: fix rtnl notifications on iface deletion The function gretap_fb_dev_create() (only used by ovs) never calls rtnl_configure_link(). The consequence is that dev->rtnl_link_state is never set to RTNL_LINK_INITIALIZED. During the deletion phase, the function rollback_registered_many() sends a RTM_DELLINK only if dev->rtnl_link_state is set to RTNL_LINK_INITIALIZED. Fixes: b2acd1dc3949 ("openvswitch: Use regular GRE net_device instead of vport") CC: Thomas Graf CC: Pravin B Shelar Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller net/ipv4/ip_gre.c | 4 ++++ 1 file changed, 4 insertions(+) commit cf5da330bbdd0c06b05c525a3d1d58ccd82c87a6 Author: Nicolas Dichtel Date: Mon Jun 13 10:31:05 2016 +0200 ovs/vxlan: fix rtnl notifications on iface deletion The function vxlan_dev_create() (only used by ovs) never calls rtnl_configure_link(). The consequence is that dev->rtnl_link_state is never set to RTNL_LINK_INITIALIZED. During the deletion phase, the function rollback_registered_many() sends a RTM_DELLINK only if dev->rtnl_link_state is set to RTNL_LINK_INITIALIZED. Note that the function vxlan_dev_create() is moved after the rtnl stuff so that vxlan_dellink() can be called in this function. Fixes: dcc38c033b32 ("openvswitch: Re-add CONFIG_OPENVSWITCH_VXLAN") CC: Thomas Graf CC: Pravin B Shelar Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller drivers/net/vxlan.c | 58 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 24 deletions(-) commit 106da663ff495e0aea3ac15b8317aa410754fcac Author: Nicolas Dichtel Date: Mon Jun 13 10:31:04 2016 +0200 ovs/gre,geneve: fix error path when creating an iface After ipgre_newlink()/geneve_configure() call, the netdev is registered. Fixes: 7e059158d57b ("vxlan, gre, geneve: Set a large MTU on ovs-created tunnel devices") CC: David Wragg Signed-off-by: Nicolas Dichtel Signed-off-by: David S. Miller drivers/net/geneve.c | 10 +++++++--- net/ipv4/ip_gre.c | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) commit 8beb330044d0d1878c7b92290e91c0b889e92633 Author: James Bottomley Date: Mon Jun 13 22:00:07 2016 -0700 53c700: fix BUG on untagged commands The untagged command case in the 53c700 driver has been broken since host wide tags were enabled because the replaced scsi_find_tag() function had a special case for the tag value SCSI_NO_TAG to retrieve sdev->current_cmnd. The replacement function scsi_host_find_tag() has no such special case and returns NULL causing untagged commands to trigger a BUG() in the driver. Inspection shows that the 53c700 is the only driver using this SCSI_NO_TAG case, so a local fix in the driver suffices to fix this problem globally. Fixes: 64d513ac31b - "scsi: use host wide tags by default" Cc: stable@vger.kernel.org # 4.4+ Reported-by: Helge Deller Tested-by: Helge Deller Signed-off-by: James Bottomley Reviewed-by: Johannes Thumshirn Reviewed-by: Ewan D. Milne Acked-by: Christoph Hellwig Signed-off-by: Martin K. Petersen drivers/scsi/53c700.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit fd2d2bac6e79b0be91ab86a6075a0c46ffda658a Author: Andrey Grodzovsky Date: Wed May 25 16:45:43 2016 -0400 drm/dp/mst: Always clear proposed vcpi table for port. Not clearing mst manager's proposed vcpis table for destroyed connectors when the manager is stopped leaves it pointing to unrefernced memory, this causes pagefault when the manager is restarted when plugging back a branch. Fixes: 91a25e463130 ("drm/dp/mst: deallocate payload on port destruction") Signed-off-by: Andrey Grodzovsky Reviewed-by: Lyude Cc: stable@vger.kernel.org Cc: Mykola Lysenko Cc: Alex Deucher drivers/gpu/drm/drm_dp_mst_topology.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 93f55972bc0fef0e394bbed3d46dc06b9afd3d17 Author: Philipp Zabel Date: Thu Jun 2 19:27:52 2016 +0200 drm/crtc: only store the necessary data for set_config rollback drm_crtc_helper_set_config only potentially touches connector->encoder and encoder->crtc, so we only have to store those for all connectors and encoders, respectively. Suggested-by: Daniel Vetter Signed-off-by: Philipp Zabel Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie drivers/gpu/drm/drm_crtc_helper.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit fffc5f59f2c68ca859c3f92b224393ed3adbe1ca Author: Philipp Zabel Date: Thu Jun 2 19:27:51 2016 +0200 drm/crtc: fix connector reference counting mismatch in drm_crtc_helper_set_config Since commit 0955c1250e96 ("drm/crtc: take references to connectors used in a modeset. (v2)"), the reference counts of all connectors in the drm_mode_set given to drm_crtc_helper_set_config are incremented, and then the reference counts of all connectors are decremented on success, but in a temporary copy of the connector structure. This leads to the following error after the first modeset on imx-drm: Unable to handle kernel NULL pointer dereference at virtual address 00000004 pgd = ad8c4000 [00000004] *pgd=3d9c5831, *pte=00000000, *ppte=00000000 Internal error: Oops: 817 [#1] PREEMPT SMP ARM Modules linked in: CPU: 1 PID: 190 Comm: kmsfb-manage Not tainted 4.7.0-rc1+ #657 Hardware name: Freescale i.MX6 Quad/DualLit: [<80506098>] lr : [<80252e94>] psr: 200c0013 sp : adca7ca8 ip : adca7b90 fp : adca7cd4 r10: 00000000 r9 : 00000100 r8 : 00000200 r7 : af3c9800 r6 : aded7848 r5 : aded7800 r4 : 00000000 r3 : af3ca058 r2 : 00000200 r1 : af3ca058 r0 : 00000000 Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 3d8c404a DAC: 00000051 Process kmsfb-manage (pid: 190, stack limit = 0xadca6210) Stack: (0xadca7ca8 to 0xadca8000) 7ca0: 805190e0 aded7800 aded7820 80501a88 8155a290 af3c9c6c 7cc0: adca7ddc 0000000f adca7cec adca7cd8 80519104 80506044 805190e0 aded7800 7ce0: adca7d04 adca7cf0 80501ac0 805190ec aded7820 aded7814 adca7d24 adca7d08 7d00: 804fdb80 80501a94 aded7800 af3ca010 aded7afc af3c9c60 adca7d94 adca7d28 7d20: 804e3518 804fdb20 00000000 af3c9b1c adca7d50 81506f44 00000000 8093c500 7d40: af3c9c6c ae4f2ca8 ae4f2c18 00000000 00000000 ae637f00 00000000 aded7800 7d60: 00000001 af3c9800 af23c300 ae77fcc0 ae4f2c18 00000001 af3c9800 8155a290 7d80: af1af700 adca6000 adca7db4 adca7d98 804fea6c 804e2de4 adca7e50 adb3d940 7da0: 00000001 af3c9800 adca7e24 adca7db8 8050440c 804fea0c ae77fcc0 00000003 7dc0: adca7e24 adb3d940 af1af700 ae77fcc0 ae77fccc ae4f2c18 8083d44c ae77fcc0 7de0: ae4002 80d03040 adca7e64 adca7e40 adca7e50 80503f08 7e40: 7ebd5630 adca7e50 00000068 c06864a2 7ebd5be8 00000000 00000001 00000018 7e60: 00000026 00000000 00000000 00000000 00000001 000115bc 05010500 05a0059f 7e80: 03200000 03360321 00000337 0000003c 00000000 00000040 30383231 30303878 7ea0: 00000000 00000000 00000000 00000000 00000000 00000000 80173058 80172e30 7ec0: 80d77d32 00004000 adf7d900 00000003 00000000 7ebd5630 af342bb0 adfe3b80 7ee0: 80272f50 00000003 adca6000 00000000 adca7f7c adca7f00 802725ec 804f52cc 7f00: 802809cc 80178450 00000000 00000000 80280880 80145904 adb3d8c0 adf7d990 7f20: ffffffff 00000003 00004000 01614c10 c06864a2 00000003 adca6000 00000000 7f40: adca7f6c adca7f50 80280b04 8028088c 000115bc adfe3b81 7ebd5630 adfe3b80 7f60: c06864a2 00000003 adca6000 00000000 adca7fa4 adca7f80 80272f50 80272548 7f80: 000115bc 00017050 00000001 01614c10 00000036 801089e4 00000000 adca7fa8 7fa0: 80108840 80272f18 00017050 00000001 00000003 c06864a2 7ebd5630 000115bc 7fc0: 00017050 00000001 01614c10 00000036 00000003 00000000 00000026 00000018 7fe0: 00016f38 7ebd562c 0000b5e9 76ef31e6 400c0030 00000003 ff5f37db bfe7dd4d Backtrace: [<80506038>] (drm_connector_cleanup) from [<80519104>] (dw_hdmi_connector_destroy+0x24/0x28) r10:0000000f r9:adca7ddc r8:af3c9c6c r7:8155a290 r6:80501a88 r5:aded7820 r4:aded7800 r3:805190e0 [<805190e0>] (dw_hdmi_connector_destroy) from [<80501ac0>] (drm_connector_free+0x38/0x3c) r4:aded7800 nreference) from [<804e3518>] (drm_crtc_helper_set_config+0x740/0xbf4) r6:af3c9c60 r5:aded7afc r4:af3ca010 r3:aded7800 [<804e2dd8>] (drm_crtc_helper_set_config) from [<804fea6c>] (drm_mode_set_config_internal+0x6c/0xf4) r10:adca6000 r9:af1af700 r8:8155a290 r7:af3c9800 r6:00000001 r5:ae4f2c18 r4:ae77fcc0 [<804fea00>] (drm_mode_set_config_internal) from [<8050440c>] (drm_mode_setcrtc+0x504/0x57c) r7:af3c9800 r6:00000001 r5:adb3d940 r4:adca7e50 [<80503f08>] (drm_mode_setcrtc) from [<804f5404>] (drm_ioctl+0x144/0x4dc) r10:ada2e000 r9:000000a2 r8:af3c9800 r7:8155a290 r6:809320b4 r5:00000051 r4:adca7e50 [<804f52c0>] (drm_ioctl) from [<802725ec>] (do_vfs_ioctl+0xb0/0x9d0) r10:00000000 r9:adca6000 r8:00000003 r7:80272f50 r6:adfe3b80 r5:af342bb0 r4:7ebd5630 [<8027253c>] (do_vfs_ioctl) from [<80272f50>] (SyS_ioctl+0x44/0x6c) r10:00000000 r9:adca6000 r8:00000003 r7:c06864a2 r6:adfe3b80 r5:7ebd5630 r4:adfe3b81 [<80272f0c>] (SyS_ioctl) from [<80108840>] (ret_fast_syscall+0x0/0x1c) r8:801089e4 r7:00000036 r6:01614c10 r5:00000001 r4:00017050 r3:000115bc Code: 0a00000c e5932004 e1a01003 e1a0a004 (e5842004) ---[ end trace 9a7257572ccacb16 ]--- Only the reference count of connectors that weren't previously bound to an encoder should be incremented after a call to drm_crtc_helper_set_config. And only the reference count of connectors that were previously bound to an encoder and are unbound afterwards should ever be decremented. The reference counts of the temporary copies in the save_connectors should not be touched at all. This patch fixes the above error by only incrementing the reference count of those connectors in the set that are initially not bound to any encoder, and also by restoring the reference count of only those connectors in the set in the failure case. "Note that this can only be hit when fbdev emulation is disabled, since then the refcount drops from 1 to 0 and we call the connector destroy functions on the backup copy, which eventually results in tears. With fbdev emulation the refcount only goes down from 2 to 1 ever. And since we unconditionally increment the refcount on the real object, the refcount of that will slowly increase. The backup connector's refcount doesn't matter, since we kfree() that either way in the end of drm_crtc_helper_set_config()." Fixes: 0955c1250e96 ("drm/crtc: take references to connectors used in a modeset. (v2)") Signed-off-by: Philipp Zabel Reviewed-by: Daniel Vetter Signed-off-by: Dave Airlie drivers/gpu/drm/drm_crtc_helper.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 902daaacc0e8b4cea979f837873e1f63254f201d Merge: 27bf60d 476490a Author: Dave Airlie Date: Wed Jun 15 10:30:23 2016 +1000 Merge tag 'drm-intel-fixes-2016-06-14' of git://anongit.freedesktop.org/drm-intel into drm-fixes "Pretty much all regression fixes, or black screens." * tag 'drm-intel-fixes-2016-06-14' of git://anongit.freedesktop.org/drm-intel: drm/i915/ilk: Don't disable SSC source if it's in use drm/i915: Extract physical display dimensions from VBT drm/i915: Check VBT for port presence in addition to the strap on VLV/CHV drm/i915: Only ignore eDP ports that are connected drm/i915: Silence "unexpected child device config size" for VBT on 845g drm/i915: Fix NULL pointer deference when out of PLLs in IVB commit da4e792550a856e2f66aa8183d408553f7513a86 Author: Rafael J. Wysocki Date: Wed Jun 15 02:16:13 2016 +0200 Revert "ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()" Revert commit 66b1ed5aa8dd "ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()" that is reported to break suspend-to-RAM (ACPI S3) on one system. The root cause of the failure is a wrong access width value for one of the involved registers provided by the ACPI tables, but before commit 66b1ed5aa8dd that value was not taken into account at all and things worked. Fixes: 66b1ed5aa8dd "ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()" Reported-by: Andrey Skvortsov Signed-off-by: Rafael J. Wysocki drivers/acpi/acpica/hwregs.c | 146 +++---------------------------------------- 1 file changed, 9 insertions(+), 137 deletions(-) commit b00345d1994d588fa2687e1238fcd542f0320cba Author: Srinivas Pandruvada Date: Tue Jun 14 23:12:59 2016 -0700 cpufreq: intel_pstate: Adjust _PSS[0] freqeuency if needed The maximum turbo P-State used by the intel_pstate driver may be limited by ACPI _PSS table entry 0. After commit 9522a2ff9cde (cpufreq: intel_pstate: Enforce _PPC limits), the maximum performance on servers will be capped by the _PSS table entry 0 by default. Even though that is formally correct, it may lead to preformance regressions in some cases. Namely, if the _PSS table entry 0 is not the maximum turbo P-State, performance measured after commit 9522a2ff9cde will not match the performance measured before that commit on the same system. For this reason, modify the code to always use the maximum turbo frequency as the one that corresponds to _PSS table entry 0 if turbo is enabled in the BIOS. This way, the performance levels from before commit 9522a2ff9cde will be restored on the affected systems. Fixes: 9522a2ff9cde (cpufreq: intel_pstate: Enforce _PPC limits) Suggested-by: Rafael J. Wysocki Signed-off-by: Srinivas Pandruvada [ rjw : Changelog ] Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) commit 7c64cc0531fa0d9720f9e15a0a0d97bcad1d1cd1 Author: Paul E. McKenney Date: Tue Apr 26 10:42:25 2016 -0700 arm: Use _rcuidle for smp_cross_call() tracepoints Further testing with false negatives suppressed by commit 293e2421fe25 ("rcu: Remove superfluous versions of rcu_read_lock_sched_held()") identified another unprotected use of RCU from the idle loop. Because RCU actively ignores idle-loop code (for energy-efficiency reasons, among other things), using RCU from the idle loop can result in too-short grace periods, in turn resulting in arbitrary misbehavior. The resulting lockdep-RCU splat is as follows: ------------------------------------------------------------------------ =============================== [ INFO: suspicious RCU usage. ] 4.6.0-rc5-next-20160426+ #1112 Not tainted ------------------------------- include/trace/events/ipi.h:35 suspicious rcu_dereference_check() usage! other info that might help us debug this: RCU used illegally from idle CPU! rcu_scheduler_active = 1, debug_locks = 0 RCU used illegally from extended quiescent state! no locks held by swapper/0/0. stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.6.0-rc5-next-20160426+ #1112 Hardware name: Generic OMAP4 (Flattened Device Tree) [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xb0/0xe4) [] (dump_stack) from [] (smp_cross_call+0xbc/0x188) [] (smp_cross_call) from [] (generic_exec_single+0x9c/0x15c) [] (generic_exec_single) from [] (smp_call_function_single_async+0 x38/0x9c) [] (smp_call_function_single_async) from [] (cpuidle_coupled_poke_others+0x8c/0xa8) [] (cpuidle_coupled_poke_others) from [] (cpuidle_enter_state_coupled+0x26c/0x390) [] (cpuidle_enter_state_coupled) from [] (cpu_startup_entry+0x198/0x3a0) [] (cpu_startup_entry) from [] (start_kernel+0x354/0x3c8) [] (start_kernel) from [<8000807c>] (0x8000807c) ------------------------------------------------------------------------ Reported-by: Tony Lindgren Signed-off-by: Paul E. McKenney Tested-by: Tony Lindgren Tested-by: Guenter Roeck Cc: Russell King Cc: Steven Rostedt Cc: Cc: arch/arm/kernel/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1e37288c9146dccff830e3253e403af8705b51f Author: Su, Xuemin Date: Mon Jun 13 11:02:50 2016 +0800 udp reuseport: fix packet of same flow hashed to different socket There is a corner case in which udp packets belonging to a same flow are hashed to different socket when hslot->count changes from 10 to 11: 1) When hslot->count <= 10, __udp_lib_lookup() searches udp_table->hash, and always passes 'daddr' to udp_ehashfn(). 2) When hslot->count > 10, __udp_lib_lookup() searches udp_table->hash2, but may pass 'INADDR_ANY' to udp_ehashfn() if the sockets are bound to INADDR_ANY instead of some specific addr. That means when hslot->count changes from 10 to 11, the hash calculated by udp_ehashfn() is also changed, and the udp packets belonging to a same flow will be hashed to different socket. This is easily reproduced: 1) Create 10 udp sockets and bind all of them to 0.0.0.0:40000. 2) From the same host send udp packets to 127.0.0.1:40000, record the socket index which receives the packets. 3) Create 1 more udp socket and bind it to 0.0.0.0:44096. The number 44096 is 40000 + UDP_HASH_SIZE(4096), this makes the new socket put into the same hslot as the aformentioned 10 sockets, and makes the hslot->count change from 10 to 11. 4) From the same host send udp packets to 127.0.0.1:40000, and the socket index which receives the packets will be different from the one received in step 2. This should not happen as the socket bound to 0.0.0.0:44096 should not change the behavior of the sockets bound to 0.0.0.0:40000. It's the same case for IPv6, and this patch also fixes that. Signed-off-by: Su, Xuemin Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/ipv4/udp.c | 73 +++++++++++++--------------------------------------------- net/ipv6/udp.c | 71 +++++++++++++------------------------------------------- 2 files changed, 32 insertions(+), 112 deletions(-) commit 476490a945e1f0f6bd58e303058d2d8ca93a974c Author: Lyude Date: Tue Jun 14 11:04:09 2016 -0400 drm/i915/ilk: Don't disable SSC source if it's in use Thanks to Ville Syrjälä for pointing me towards the cause of this issue. Unfortunately one of the sideaffects of having the refclk for a DPLL set to SSC is that as long as it's set to SSC, the GPU will prevent us from powering down any of the pipes or transcoders using it. A couple of BIOSes enable SSC in both PCH_DREF_CONTROL and in the DPLL configurations. This causes issues on the first modeset, since we don't expect SSC to be left on and as a result, can't successfully power down the pipes or the transcoders using it. Here's an example from this Dell OptiPlex 990: [drm:intel_modeset_init] SSC enabled by BIOS, overriding VBT which says disabled [drm:intel_modeset_init] 2 display pipes available. [drm:intel_update_cdclk] Current CD clock rate: 400000 kHz [drm:intel_update_max_cdclk] Max CD clock rate: 400000 kHz [drm:intel_update_max_cdclk] Max dotclock rate: 360000 kHz vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem [drm:intel_crt_reset] crt adpa set to 0xf40000 [drm:intel_dp_init_connector] Adding DP connector on port C [drm:intel_dp_aux_init] registering DPDDC-C bus for card0-DP-1 [drm:ironlake_init_pch_refclk] has_panel 0 has_lvds 0 has_ck505 0 [drm:ironlake_init_pch_refclk] Disabling SSC entirely … later we try committing the first modeset … [drm:intel_dump_pipe_config] [CRTC:26][modeset] config ffff88041b02e800 for pipe A [drm:intel_dump_pipe_config] cpu_transcoder: A … [drm:intel_dump_pipe_config] dpll_hw_state: dpll: 0xc4016001, dpll_md: 0x0, fp0: 0x20e08, fp1: 0x30d07 [drm:intel_dump_pipe_config] planes on this crtc [drm:intel_dump_pipe_config] STANDARD PLANE:23 plane: 0.0 idx: 0 enabled [drm:intel_dump_pipe_config] FB:42, fb = 800x600 format = 0x34325258 [drm:intel_dump_pipe_config] scaler:0 src (0, 0) 800x600 dst (0, 0) 800x600 [drm:intel_dump_pipe_config] CURSOR PLANE:25 plane: 0.1 idx: 1 disabled, scaler_id = 0 [drm:intel_dump_pipe_config] STANDARD PLANE:27 plane: 0.1 idx: 2 disabled, scaler_id = 0 [drm:intel_get_shared_dpll] CRTC:26 allocated PCH DPLL A [drm:intel_get_shared_dpll] using PCH DPLL A for pipe A [drm:ilk_audio_codec_disable] Disable audio codec on port C, pipe A [drm:intel_disable_pipe] disabling pipe A ------------[ cut here ]------------ WARNING: CPU: 1 PID: 130 at drivers/gpu/drm/i915/intel_display.c:1146 intel_disable_pipe+0x297/0x2d0 [i915] pipe_off wait timed out … ---[ end trace 94fc8aa03ae139e8 ]--- [drm:intel_dp_link_down] [drm:ironlake_crtc_disable [i915]] *ERROR* failed to disable transcoder A Later modesets succeed since they reset the DPLL's configuration anyway, but this is enough to get stuck with a big fat warning in dmesg. A better solution would be to add refcounts for the SSC source, but for now leaving the source clock on should suffice. Changes since v4: - Fix calculation of final for systems with LVDS panels (fixes BUG() on CI test suite) Changes since v3: - Move temp variable into loop - Move checks for using_ssc_source to after we've figured out has_ck505 - Add using_ssc_source to debug output Changes since v2: - Fix debug output for when we disable the CPU source Changes since v1: - Leave the SSC source clock on instead of just shutting it off on all of the DPLL configurations. Cc: stable@vger.kernel.org Reviewed-by: Ville Syrjälä Signed-off-by: Lyude Signed-off-by: Daniel Vetter Link: http://patchwork.freedesktop.org/patch/msgid/1465916649-10228-1-git-send-email-cpaul@redhat.com Signed-off-by: Daniel Vetter drivers/gpu/drm/i915/intel_display.c | 48 +++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 14 deletions(-) commit 6c0d54f1897d229748d4f41ef919078db6db2123 Author: Eric Dumazet Date: Sun Jun 12 20:01:25 2016 -0700 net_sched: fix pfifo_head_drop behavior vs backlog When the qdisc is full, we drop a packet at the head of the queue, queue the current skb and return NET_XMIT_CN Now we track backlog on upper qdiscs, we need to call qdisc_tree_reduce_backlog(), even if the qlen did not change. Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Signed-off-by: Eric Dumazet Cc: WANG Cong Cc: Jamal Hadi Salim Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_fifo.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1c4bf5ac6a16d9321b51e91acef481b090e5486b Author: Hans de Goede Date: Tue Jun 14 15:13:06 2016 -0500 usb: musb: sunxi: Remove bogus "Frees glue" comment The comment is wrong, glue is devm_kzalloc-ed mem attached to the "allwinner,sun4i-a10-musb" compatible platform-dev. Where as glue->musb_pdev is a newly created "musb-hdrc" platform-dev. Signed-off-by: Hans de Goede [b-liu@ti.com: revise subject prefix] Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/sunxi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 969a132723434f3723cc0606373785d19c1d2f05 Author: Hans de Goede Date: Tue Jun 14 15:13:05 2016 -0500 usb: musb: sunxi: Fix NULL ptr deref when gadget is registered before musb Stop using the return value of platform_device_register_full() to get to the struct musb in sunxi_musb_work(). If a gadget has been registered (insmod-ed) before the musb driver, then musb_start will get called from the musb_core probe function and sunxi_musb_work() may run before platform_device_register_full() has returned. Instead store a pointer to struct musb in struct sunxi_glue when sunxi_musb_enable gets called. Note that sunxi_musb_enable always gets called before sunxi_musb_work() can run. Signed-off-by: Hans de Goede [b-liu@ti.com: revise subject prefix] Signed-off-by: Bin Liu Signed-off-by: Greg Kroah-Hartman drivers/usb/musb/sunxi.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 881d0327db37ad917a367c77aff1afa1ee41e0a9 Author: Feng Tang Date: Sun Jun 12 17:36:37 2016 +0800 net: alx: Work around the DMA RX overflow issue Commit 26c5f03 uses a new skb allocator to avoid the RFD overflow issue. But from debugging without datasheet, we found the error always happen when the DMA RX address is set to 0x....fc0, which is very likely to be a HW/silicon problem. So one idea is instead of adding a new allocator, why not just hitting the right target by avaiding the error-prone DMA address? This patch will actually * Remove the commit 26c5f03 * Apply rx skb with 64 bytes longer space, and if the allocated skb has a 0x...fc0 address, it will use skb_resever(skb, 64) to advance the address, so that the RX overflow can be avoided. In theory this method should also apply to atl1c driver, which I can't find anyone who can help to test on real devices. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70761 Signed-off-by: Feng Tang Suggested-by: Eric Dumazet Tested-by: Ole Lukoie Acked-by: Eric Dumazet Signed-off-by: David S. Miller drivers/net/ethernet/atheros/alx/alx.h | 4 --- drivers/net/ethernet/atheros/alx/main.c | 61 ++++++++------------------------- 2 files changed, 14 insertions(+), 51 deletions(-) commit b46d9f625b07f843c706c2c7d0210a90ccdf143b Author: Hannes Frederic Sowa Date: Sun Jun 12 12:02:46 2016 +0200 ipv4: fix checksum annotation in udp4_csum_init Reported-by: Cong Wang Cc: Cong Wang Cc: Tom Herbert Fixes: 4068579e1e098fa ("net: Implmement RFC 6936 (zero RX csums for UDP/IPv6") Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv4/udp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit c148d16369ff0095eca950d17968ba1d56a47b53 Author: Hannes Frederic Sowa Date: Sat Jun 11 21:15:37 2016 +0200 ipv6: fix checksum annotation in udp6_csum_init Cc: Tom Herbert Fixes: 4068579e1e098fa ("net: Implmement RFC 6936 (zero RX csums for UDP/IPv6") Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/ip6_checksum.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 5119bd16815d3f0364390a1369392dcc036790e7 Author: Hannes Frederic Sowa Date: Sat Jun 11 20:41:38 2016 +0200 ipv6: tcp: fix endianness annotation in tcp_v6_send_response Cc: Florent Fourcot Fixes: 1d13a96c74fc ("ipv6: tcp: fix flowlabel value in ACK messages send from TIME_WAIT") Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dcb94b88c09ce82a80e188d49bcffdc83ba215a6 Author: Hannes Frederic Sowa Date: Sat Jun 11 20:32:06 2016 +0200 ipv6: fix endianness error in icmpv6_err IPv6 ping socket error handler doesn't correctly convert the new 32 bit mtu to host endianness before using. Cc: Lorenzo Colitti Fixes: 6d0bfe22611602f ("net: ipv6: Add IPv6 support to the ping socket.") Signed-off-by: Hannes Frederic Sowa Acked-by: Lorenzo Colitti Signed-off-by: David S. Miller net/ipv6/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fdecf36fcefa9f48c2f2de21c8176f1a8ce2c960 Author: Clemens Gruber Date: Sat Jun 11 17:21:26 2016 +0200 phy: marvell: fix LED configuration via marvell,reg-init Configuring the PHY LED registers for the Marvell 88E1510 and others is not possible, because regardless of the values in marvell,reg-init, it is later overridden in m88e1121_config_aneg with a non-standard default. This patch moves that default configuration to .config_init to allow setting the LED configuration through marvell,reg-init in the device tree, which should override said default if it exists. Signed-off-by: Clemens Gruber Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller drivers/net/phy/marvell.c | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) commit 5bc28b93a36e3cb3acc2870fb75cb6ffb182fece Author: Rhyland Klein Date: Thu Jun 9 17:28:39 2016 -0400 power_supply: power_supply_read_temp only if use_cnt > 0 Change power_supply_read_temp() to use power_supply_get_property() so that it will check the use_cnt and ensure it is > 0. The use_cnt will be incremented at the end of __power_supply_register, so this will block to case where get_property can be called before the supply is fully registered. This fixes the issue show in the stack below: [ 1.452598] power_supply_read_temp+0x78/0x80 [ 1.458680] thermal_zone_get_temp+0x5c/0x11c [ 1.464765] thermal_zone_device_update+0x34/0xb4 [ 1.471195] thermal_zone_device_register+0x87c/0x8cc [ 1.477974] __power_supply_register+0x364/0x424 [ 1.484317] power_supply_register_no_ws+0x10/0x18 [ 1.490833] bq27xxx_battery_setup+0x10c/0x164 [ 1.497003] bq27xxx_battery_i2c_probe+0xd0/0x1b0 [ 1.503435] i2c_device_probe+0x174/0x240 [ 1.509172] driver_probe_device+0x1fc/0x29c [ 1.515167] __driver_attach+0xa4/0xa8 [ 1.520643] bus_for_each_dev+0x58/0x98 [ 1.526204] driver_attach+0x20/0x28 [ 1.531505] bus_add_driver+0x1c8/0x22c [ 1.537067] driver_register+0x68/0x108 [ 1.542630] i2c_register_driver+0x38/0x7c [ 1.548457] bq27xxx_battery_i2c_driver_init+0x18/0x20 [ 1.555321] do_one_initcall+0x38/0x12c [ 1.560886] kernel_init_freeable+0x148/0x1ec [ 1.566972] kernel_init+0x10/0xfc [ 1.572101] ret_from_fork+0x10/0x40 Also make the same change to ps_get_max_charge_cntl_limit() and ps_get_cur_chrage_cntl_limit() to be safe. Lastly, change the return value of power_supply_get_property() to -EAGAIN from -ENODEV if use_cnt <= 0. Fixes: 297d716f6260 ("power_supply: Change ownership from driver to core") Cc: stable@vger.kernel.org Signed-off-by: Rhyland Klein Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel drivers/power/power_supply_core.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit b914bb55f2abd66937c23fa0b89becaf9bcceb37 Author: Vinod Koul Date: Tue Jun 14 21:33:44 2016 +0530 ASoC: Intel: Skylake: Initialize module list for Broxton The module list was not initialized for Broxton DSP code, so initialize it. Signed-off-by: Vinod Koul Signed-off-by: Mark Brown sound/soc/intel/skylake/bxt-sst.c | 1 + 1 file changed, 1 insertion(+) commit eee930163c6a2507aa3b41edf8f7e3b7a2049769 Author: Geert Uytterhoeven Date: Fri Mar 25 11:47:11 2016 +0100 nfsd: Fix NFSD_MDS_PR_KEY on 32-bit by adding ULL postfix On 32-bit: fs/nfsd/blocklayout.c: In function ‘nfsd4_block_get_device_info_scsi’: fs/nfsd/blocklayout.c:337: warning: integer constant is too large for ‘long’ type fs/nfsd/blocklayout.c:344: warning: integer constant is too large for ‘long’ type fs/nfsd/blocklayout.c: In function ‘nfsd4_scsi_fence_client’: fs/nfsd/blocklayout.c:385: warning: integer constant is too large for ‘long’ type Add the missing "ULL" postfix to 64-bit constant NFSD_MDS_PR_KEY to fix this. Fixes: f99d4fbdae6765d0 ("nfsd: add SCSI layout support") Signed-off-by: Geert Uytterhoeven Reviewed-by: Christoph Hellwig Signed-off-by: J. Bruce Fields fs/nfsd/blocklayout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bba42c7877d3efce86ca331ad1a7e37046627c72 Merge: 182fd9e 280a3ef Author: Kalle Valo Date: Tue Jun 14 17:07:38 2016 +0300 Merge tag 'iwlwifi-for-kalle-2016-06-10' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * fix the scan timeout for long scans * fix an RCU splat caused when updating the TKIP key * fix a potential NULL-derefence introduced recently * fix a IGTK key bug that has existed since the MVM driver was introduced * fix some fw capabilities checks that got accidentally inverted commit bbb1681ee3653bdcfc6a4ba31902738118311fd4 Author: Mark Rutland Date: Mon Jun 13 17:57:02 2016 +0100 arm64: mm: mark fault_info table const Unlike the debug_fault_info table, we never intentionally alter the fault_info table at runtime, and all derived pointers are treated as const currently. Make the table const so that it can be placed in .rodata and protected from unintentional writes, as we do for the syscall tables. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Will Deacon Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c5cea06be060f38e5400d796e61cfc8c36e52924 Author: Mark Rutland Date: Mon Jun 13 11:15:14 2016 +0100 arm64: fix dump_instr when PAN and UAO are in use If the kernel is set to show unhandled signals, and a user task does not handle a SIGILL as a result of an instruction abort, we will attempt to log the offending instruction with dump_instr before killing the task. We use dump_instr to log the encoding of the offending userspace instruction. However, dump_instr is also used to dump instructions from kernel space, and internally always switches to KERNEL_DS before dumping the instruction with get_user. When both PAN and UAO are in use, reading a user instruction via get_user while in KERNEL_DS will result in a permission fault, which leads to an Oops. As we have regs corresponding to the context of the original instruction abort, we can inspect this and only flip to KERNEL_DS if the original abort was taken from the kernel, avoiding this issue. At the same time, remove the redundant (and incorrect) comments regarding the order dump_mem and dump_instr are called in. Cc: Catalin Marinas Cc: James Morse Cc: Robin Murphy Cc: #4.6+ Signed-off-by: Mark Rutland Reported-by: Vladimir Murzin Tested-by: Vladimir Murzin Fixes: 57f4959bad0a154a ("arm64: kernel: Add support for User Access Override") Signed-off-by: Will Deacon arch/arm64/kernel/traps.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit e024111f6946f45cf1559a8c6fd48d2d0f696d07 Author: Miaoqing Pan Date: Tue Jun 7 15:47:07 2016 +0300 ath9k: fix GPIO mask for AR9462 and AR9565 The incorrect GPIO mask cause kernel warning, when AR9462 access GPIO11. Also fix the mask for AR9565. WARNING: CPU: 1 PID: 199 at ../drivers/net/wireless/ath/ath9k/hw.c:2778 ath9k_hw_gpio_get+0x1a9/0x1b0 [ath9k_hw] CPU: 1 PID: 199 Comm: kworker/u16:9 Not tainted 4.7.0-rc1-next-20160530+ #5 Hardware name: Acer TravelMate P243/BA40_HC, BIOS V1.01 04/20/2012 Workqueue: events_power_efficient rfkill_poll 0000000000000000 ffff88002cf73d28 ffffffff813b8ddc 0000000000000000 0000000000000000 ffff88002cf73d68 ffffffff8107a331 00000ada00000086 ffff880148d9c018 000000000000000b ffff880147e68720 0000000000000200 Call Trace: [] dump_stack+0x63/0x87 [] __warn+0xd1/0xf0 [] warn_slowpath_null+0x1d/0x20 [] ath9k_hw_gpio_get+0x1a9/0x1b0 [ath9k_hw] [] ath9k_rfkill_poll_state+0x34/0x60 [ath9k] [] ieee80211_rfkill_poll+0x33/0x40 [mac80211] [] cfg80211_rfkill_poll+0x2a/0xc0 [cfg80211] [] rfkill_poll+0x24/0x50 [] process_one_work+0x153/0x3f0 [] worker_thread+0x12b/0x4b0 [] ? rescuer_thread+0x340/0x340 [] kthread+0xc9/0xe0 [] ret_from_fork+0x1f/0x40 [] ? kthread_park+0x60/0x60 Fixes: a01ab81b09c5 ("ath9k: define correct GPIO numbers and bits mask") Reported-by: Sudip Mukherjee Tested-by: Sudip Mukherjee Signed-off-by: Miaoqing Pan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath9k/reg.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e50525bef593c3dd0564df676c567d77f7c20322 Author: Rajkumar Manoharan Date: Thu Jun 9 11:33:55 2016 +0530 ath10k: fix deadlock while processing rx_in_ord_ind commit 5c86d97bcc1d ("ath10k: combine txrx and replenish task") introduced deadlock while processing rx in order indication message for qca6174 based devices. While merging replenish and txrx tasklets, replenish task should be called out of htt rx ring locking since it is also try to acquire the same lock. Unfortunately this issue is not exposed by other solutions (qca988x, qca99x0 & qca4019), as rx_in_ord_ind message is specific to qca6174 based devices. This patch fixes ============================================= [ INFO: possible recursive locking detected ] 4.7.0-rc2-wt-ath+ #1353 Tainted: G E --------------------------------------------- swapper/3/0 is trying to acquire lock: (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [] ath10k_htt_rx_msdu_buff_replenish+0x29/0x90 [ath10k_core] but task is already holding lock: (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [] ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core] other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&htt->rx_ring.lock)->rlock); lock(&(&htt->rx_ring.lock)->rlock); *** DEADLOCK *** May be due to missing lock nesting notation 1 lock held by swapper/3/0: #0: (&(&htt->rx_ring.lock)->rlock){+.-...}, at: [] ath10k_htt_txrx_compl_task+0x21b/0x250 [ath10k_core] Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=119151 Fixes: 5c86d97bcc1d ("ath10k: combine txrx and replenish task") Reported-by: Mike Lothian Signed-off-by: Rajkumar Manoharan Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/htt_rx.c | 1 - 1 file changed, 1 deletion(-) commit 57675cb976eff977aefb428e68e4e0236d48a9ff Author: Andrey Ryabinin Date: Thu Jun 9 15:20:05 2016 +0300 kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w Lengthy output of sysrq-w may take a lot of time on slow serial console. Currently we reset NMI-watchdog on the current CPU to avoid spurious lockup messages. Sometimes this doesn't work since softlockup watchdog might trigger on another CPU which is waiting for an IPI to proceed. We reset softlockup watchdogs on all CPUs, but we do this only after listing all tasks, and this may be too late on a busy system. So, reset watchdogs CPUs earlier, in for_each_process_thread() loop. Signed-off-by: Andrey Ryabinin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Link: http://lkml.kernel.org/r/1465474805-14641-1-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit eda8dca519269c92a0771668b3d5678792de7b78 Author: Josh Poimboeuf Date: Mon Jun 13 02:32:09 2016 -0500 sched/debug: Fix deadlock when enabling sched events I see a hang when enabling sched events: echo 1 > /sys/kernel/debug/tracing/events/sched/enable The printk buffer shows: BUG: spinlock recursion on CPU#1, swapper/1/0 lock: 0xffff88007d5d8c00, .magic: dead4ead, .owner: swapper/1/0, .owner_cpu: 1 CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.7.0-rc2+ #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014 ... Call Trace: [] dump_stack+0x85/0xc2 [] spin_dump+0x78/0xc0 [] do_raw_spin_lock+0x11a/0x150 [] _raw_spin_lock+0x61/0x80 [] ? try_to_wake_up+0x256/0x4e0 [] try_to_wake_up+0x256/0x4e0 [] ? _raw_spin_unlock_irqrestore+0x4a/0x80 [] wake_up_process+0x15/0x20 [] insert_work+0x84/0xc0 [] __queue_work+0x18f/0x660 [] queue_work_on+0x46/0x90 [] drm_fb_helper_dirty.isra.11+0xcb/0xe0 [drm_kms_helper] [] drm_fb_helper_sys_imageblit+0x30/0x40 [drm_kms_helper] [] soft_cursor+0x1ad/0x230 [] bit_cursor+0x649/0x680 [] ? update_attr.isra.2+0x90/0x90 [] fbcon_cursor+0x14a/0x1c0 [] hide_cursor+0x28/0x90 [] vt_console_print+0x3bf/0x3f0 [] call_console_drivers.constprop.24+0x183/0x200 [] console_unlock+0x3d4/0x610 [] vprintk_emit+0x3c5/0x610 [] vprintk_default+0x29/0x40 [] printk+0x57/0x73 [] enqueue_entity+0xc2e/0xc70 [] enqueue_task_fair+0x59/0xab0 [] ? kvm_sched_clock_read+0x9/0x20 [] ? sched_clock+0x9/0x10 [] activate_task+0x5c/0xa0 [] ttwu_do_activate+0x54/0xb0 [] sched_ttwu_pending+0x7a/0xb0 [] scheduler_ipi+0x61/0x170 [] smp_trace_reschedule_interrupt+0x4f/0x2a0 [] trace_reschedule_interrupt+0x96/0xa0 [] ? native_safe_halt+0x6/0x10 [] ? trace_hardirqs_on+0xd/0x10 [] default_idle+0x20/0x1a0 [] arch_cpu_idle+0xf/0x20 [] default_idle_call+0x2f/0x50 [] cpu_startup_entry+0x37e/0x450 [] start_secondary+0x160/0x1a0 Note the hang only occurs when echoing the above from a physical serial console, not from an ssh session. The bug is caused by a deadlock where the task is trying to grab the rq lock twice because printk()'s aren't safe in sched code. Signed-off-by: Josh Poimboeuf Cc: Linus Torvalds Cc: Matt Fleming Cc: Mel Gorman Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: cb2517653fcc ("sched/debug: Make schedstats a runtime tunable that is disabled by default") Link: http://lkml.kernel.org/r/20160613073209.gdvdybiruljbkn3p@treble Signed-off-by: Ingo Molnar kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8d950d2fb23b696d393020486ab6a350bcb2c582 Author: Jon Mason Date: Thu Jun 9 13:24:19 2016 -0400 MAINTAINERS: Update the Calgary IOMMU entry Update the contact info for Muli, clean-up my name, and update the mailing list to the IOMMU mailing list. Signed-off-by: Jon Mason Cc: Andrew Morton Cc: Bartlomiej Zolnierkiewicz Cc: Greg Kroah-Hartman Cc: Krzysztof Kozlowski Cc: Linus Torvalds Cc: Muli Ben-Yehuda Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1465493059-11840-2-git-send-email-jdmason@kudzu.us Signed-off-by: Ingo Molnar MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit dcfc47248d3f7d28df6f531e6426b933de94370d Author: Masami Hiramatsu Date: Sat Jun 11 23:06:53 2016 +0900 kprobes/x86: Clear TF bit in fault on single-stepping Fix kprobe_fault_handler() to clear the TF (trap flag) bit of the flags register in the case of a fault fixup on single-stepping. If we put a kprobe on the instruction which caused a page fault (e.g. actual mov instructions in copy_user_*), that fault happens on the single-stepping buffer. In this case, kprobes resets running instance so that the CPU can retry execution on the original ip address. However, current code forgets to reset the TF bit. Since this fault happens with TF bit set for enabling single-stepping, when it retries, it causes a debug exception and kprobes can not handle it because it already reset itself. On the most of x86-64 platform, it can be easily reproduced by using kprobe tracer. E.g. # cd /sys/kernel/debug/tracing # echo p copy_user_enhanced_fast_string+5 > kprobe_events # echo 1 > events/kprobes/enable And you'll see a kernel panic on do_debug(), since the debug trap is not handled by kprobes. To fix this problem, we just need to clear the TF bit when resetting running kprobe. Signed-off-by: Masami Hiramatsu Reviewed-by: Ananth N Mavinakayanahalli Acked-by: Steven Rostedt Cc: Alexander Shishkin Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Jiri Olsa Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Vince Weaver Cc: systemtap@sourceware.org Cc: stable@vger.kernel.org # All the way back to ancient kernels Link: http://lkml.kernel.org/r/20160611140648.25885.37482.stgit@devbox [ Updated the comments. ] Signed-off-by: Ingo Molnar arch/x86/kernel/kprobes/core.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 4b2312bd0592708c85ed94368c874819e7013309 Author: Harvey Hunt Date: Mon May 23 12:05:52 2016 +0100 irqchip/mips-gic: Fix IRQs in gic_dev_domain When allocating a new device IRQ, gic_dev_domain_alloc() correctly calls irq_domain_set_hwirq_and_chip(), but gic_irq_domain_alloc() does not. This means that gic_irq_domain believes all IRQs from the dev domain have an hwirq of 0 and creates incorrect mappings in the linear_revmap. As gic_irq_domain is a parent of the gic_dev_domain, this leads to an inability to boot on devices with a GIC. Excerpt of the error: [ 2.297649] irq 0: nobody cared (try booting with the "irqpoll" option) ... [ 2.436963] handlers: [ 2.439492] Disabling IRQ #0 Fix this by calling irq_domain_set_hwirq_and_chip() for both the dev and irq domain. Now that we are modifying the parent domain, be sure to clear it up in case of an allocation error. Fixes: c98c1822ee13 ("irqchip/mips-gic: Add device hierarchy domain") Fixes: 2af70a962070 ("irqchip/mips-gic: Add a IPI hierarchy domain") Signed-off-by: Harvey Hunt Tested-by: Govindraj Raja # On Pistachio SoC Reviewed-by: Matt Redfearn Cc: linux-mips@linux-mips.org Cc: Qais Yousef Cc: jason@lakedaemon.net Cc: marc.zyngier@arm.com Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1464001552-31174-1-git-send-email-harvey.hunt@imgtec.com Signed-off-by: Thomas Gleixner drivers/irqchip/irq-mips-gic.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 719bd6542044efd9b338a53dba1bef45f40ca169 Author: Michal Suchanek Date: Mon Jun 13 17:46:49 2016 +0000 spi: sunxi: fix transfer timeout The trasfer timeout is fixed at 1000 ms. Reading a 4Mbyte flash over 1MHz SPI bus takes way longer than that. Calculate the timeout from the actual time the transfer is supposed to take and multiply by 2 for good measure. Signed-off-by: Michal Suchanek Acked-by: Maxime Ripard Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-sun4i.c | 10 +++++++++- drivers/spi/spi-sun6i.c | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) commit 6d9fe44bd73d567d04d3a68a2d2fa521ab9532f2 Author: Michal Suchanek Date: Mon Jun 13 17:46:49 2016 +0000 spi: sun4i: fix FIFO limit When testing SPI without DMA I noticed that filling the FIFO on the spi controller causes timeout. Always leave room for one byte in the FIFO. Signed-off-by: Michal Suchanek Acked-by: Maxime Ripard Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-sun4i.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 0699fdb380a847dcd4b74bbca6078bdb20033366 Merge: c1b8bfb 6df82a7 Author: Paolo Bonzini Date: Tue Jun 14 11:00:16 2016 +0200 Merge branch 'kvm-mips-fixes' into HEAD Merge MIPS patches destined to both 4.7 and kvm/next, to avoid unnecessary conflicts. Signed-off-by: Paolo Bonzini commit 6df82a7b88dc9b0b519765562b005ef9196d812a Author: James Hogan Date: Thu Jun 9 10:50:46 2016 +0100 MIPS: KVM: Fix CACHE triggered exception emulation When emulating TLB miss / invalid exceptions during CACHE instruction emulation, be sure to set up the correct PC and host_cp0_badvaddr state for the kvm_mips_emlulate_tlb*_ld() function to pick up for guest EPC and BadVAddr. PC needs to be rewound otherwise the guest EPC will end up pointing at the next instruction after the faulting CACHE instruction. host_cp0_badvaddr must be set because guest CACHE instructions trap with a Coprocessor Unusable exception, which doesn't update the host BadVAddr as a TLB exception would. This doesn't tend to get hit when dynamic translation of emulated instructions is enabled, since only the first execution of each CACHE instruction actually goes through this code path, with subsequent executions hitting the SYNCI instruction that it gets replaced with. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Ralf Baechle Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Paolo Bonzini arch/mips/kvm/emulate.c | 3 +++ 1 file changed, 3 insertions(+) commit cc81e9486202345d6ca56495cf8b5f3d03fbc563 Author: James Hogan Date: Thu Jun 9 10:50:45 2016 +0100 MIPS: KVM: Don't unwind PC when emulating CACHE When a CACHE instruction is emulated by kvm_mips_emulate_cache(), the PC is first updated to point to the next instruction, and afterwards it falls through the "dont_update_pc" label, which rewinds the PC back to its original address. This works when dynamic translation of emulated instructions is enabled, since the CACHE instruction is replaced with a SYNCI which works without trapping, however when dynamic translation is disabled the guest hangs on CACHE instructions as they always trap and are never stepped over. Roughly swap the meanings of the "done" and "dont_update_pc" to match kvm_mips_emulate_CP0(), so that "done" will roll back the PC on failure, and "dont_update_pc" won't change PC at all (for the sake of exceptions that have already modified the PC). Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Ralf Baechle Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Paolo Bonzini arch/mips/kvm/emulate.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 7f5a1ddc792901249c2060e165bcb3ca779cde35 Author: James Hogan Date: Thu Jun 9 10:50:44 2016 +0100 MIPS: KVM: Include bit 31 in segment matches When faulting guest addresses are matched against guest segments with the KVM_GUEST_KSEGX() macro, change the mask to 0xe0000000 so as to include bit 31. This is mainly for safety's sake, as it prevents a rogue BadVAddr in the host kseg2/kseg3 segments (e.g. 0xC*******) after a TLB exception from matching the guest kseg0 segment (e.g. 0x4*******), triggering an internal KVM error instead of allowing the corresponding guest kseg0 page to be mapped into the host vmalloc space. Such a rogue BadVAddr was observed to happen with the host MIPS kernel running under QEMU with KVM built as a module, due to a not entirely transparent optimisation in the QEMU TLB handling. This has already been worked around properly in a previous commit. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Ralf Baechle Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Paolo Bonzini arch/mips/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 797179bc4fe06c89e47a9f36f886f68640b423f8 Author: James Hogan Date: Thu Jun 9 10:50:43 2016 +0100 MIPS: KVM: Fix modular KVM under QEMU Copy __kvm_mips_vcpu_run() into unmapped memory, so that we can never get a TLB refill exception in it when KVM is built as a module. This was observed to happen with the host MIPS kernel running under QEMU, due to a not entirely transparent optimisation in the QEMU TLB handling where TLB entries replaced with TLBWR are copied to a separate part of the TLB array. Code in those pages continue to be executable, but those mappings persist only until the next ASID switch, even if they are marked global. An ASID switch happens in __kvm_mips_vcpu_run() at exception level after switching to the guest exception base. Subsequent TLB mapped kernel instructions just prior to switching to the guest trigger a TLB refill exception, which enters the guest exception handlers without updating EPC. This appears as a guest triggered TLB refill on a host kernel mapped (host KSeg2) address, which is not handled correctly as user (guest) mode accesses to kernel (host) segments always generate address error exceptions. Signed-off-by: James Hogan Cc: Paolo Bonzini Cc: Radim Krčmář Cc: Ralf Baechle Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: # 3.10.x- Signed-off-by: Paolo Bonzini arch/mips/include/asm/kvm_host.h | 1 + arch/mips/kvm/interrupt.h | 1 + arch/mips/kvm/locore.S | 1 + arch/mips/kvm/mips.c | 11 ++++++++++- 4 files changed, 13 insertions(+), 1 deletion(-) commit b7fa30c9cc48c4f55663420472505d3b4f6e1705 Author: Peter Zijlstra Date: Thu Jun 9 15:07:50 2016 +0200 sched/fair: Fix post_init_entity_util_avg() serialization Chris Wilson reported a divide by 0 at: post_init_entity_util_avg(): > 725 if (cfs_rq->avg.util_avg != 0) { > 726 sa->util_avg = cfs_rq->avg.util_avg * se->load.weight; > -> 727 sa->util_avg /= (cfs_rq->avg.load_avg + 1); > 728 > 729 if (sa->util_avg > cap) > 730 sa->util_avg = cap; > 731 } else { Which given the lack of serialization, and the code generated from update_cfs_rq_load_avg() is entirely possible: if (atomic_long_read(&cfs_rq->removed_load_avg)) { s64 r = atomic_long_xchg(&cfs_rq->removed_load_avg, 0); sa->load_avg = max_t(long, sa->load_avg - r, 0); sa->load_sum = max_t(s64, sa->load_sum - r * LOAD_AVG_MAX, 0); removed_load = 1; } turns into: ffffffff81087064: 49 8b 85 98 00 00 00 mov 0x98(%r13),%rax ffffffff8108706b: 48 85 c0 test %rax,%rax ffffffff8108706e: 74 40 je ffffffff810870b0 ffffffff81087070: 4c 89 f8 mov %r15,%rax ffffffff81087073: 49 87 85 98 00 00 00 xchg %rax,0x98(%r13) ffffffff8108707a: 49 29 45 70 sub %rax,0x70(%r13) ffffffff8108707e: 4c 89 f9 mov %r15,%rcx ffffffff81087081: bb 01 00 00 00 mov $0x1,%ebx ffffffff81087086: 49 83 7d 70 00 cmpq $0x0,0x70(%r13) ffffffff8108708b: 49 0f 49 4d 70 cmovns 0x70(%r13),%rcx Which you'll note ends up with 'sa->load_avg - r' in memory at ffffffff8108707a. By calling post_init_entity_util_avg() under rq->lock we're sure to be fully serialized against PELT updates and cannot observe intermediate state like this. Reported-by: Chris Wilson Signed-off-by: Peter Zijlstra (Intel) Cc: Andrey Ryabinin Cc: Linus Torvalds Cc: Mike Galbraith Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Yuyang Du Cc: bsegall@google.com Cc: morten.rasmussen@arm.com Cc: pjt@google.com Cc: steve.muckle@linaro.org Fixes: 2b8c41daba32 ("sched/fair: Initiate a new task's util avg to a bounded value") Link: http://lkml.kernel.org/r/20160609130750.GQ30909@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar kernel/sched/core.c | 3 +-- kernel/sched/fair.c | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) commit cc51846ba81ca179a3be20f6313e3b72531888c1 Author: Boris Brezillon Date: Tue May 17 11:12:32 2016 +0200 pwm: atmel-hlcdc: Fix default PWM polarity The PWM device exposed by the HLCDC IP is configured with an inverted polarity by default. Registering the PWM chip with the normal polarity was not a problem before commit 42e8992c58d4 ("pwm: Add core infrastructure to allow atomic updates") because the ->set_polarity() hook was called no matter the current polarity state, but this is no longer the case. Signed-off-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/pwm-atmel-hlcdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61edc3f3b51d2d3948029197cfff6fef7d94e939 Author: Richard Weinberger Date: Mon Jun 13 00:49:04 2016 +0200 ubi: Don't bypass ->getattr() Directly accessing inode fields bypasses ->getattr() and can cause problems when the underlying filesystem does not have the default ->getattr() implementation. So instead of obtaining the backing inode via d_backing_inode() use vfs_getattr() and obtain what we need from the kstat struct. Cc: Al Viro Reported-by: Al Viro Signed-off-by: Richard Weinberger drivers/mtd/ubi/build.c | 16 ++++++++++------ drivers/mtd/ubi/kapi.c | 17 ++++++++++------- 2 files changed, 20 insertions(+), 13 deletions(-) commit 1a498ec45eeabcb246c3c3f5822ed9ac1b4f70d8 Author: Richard Weinberger Date: Mon Jun 13 00:49:03 2016 +0200 Revert "mtd: switch open_mtd_by_chdev() to use of vfs_stat()" This reverts commit 87f15d4add758fb7fc76655721af94be57a4c17d. vfs_stat() can only be used on user supplied buffers. Cc: Al Viro Signed-off-by: Richard Weinberger drivers/mtd/ubi/build.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit ad022c87187b50f50937bd9bcd1ef312442a89af Author: Richard Weinberger Date: Sun Jun 12 23:37:53 2016 +0200 Revert "mtd: switch ubi_open_volume_path() to vfs_stat()" This reverts commit 322ea0bbf3003df17b6253f76e572c37d79a6810. vfs_stat() can only be used on user supplied buffers. UBI's kapi.c is the API to the kernel and therefore vfs_stat() is inappropriate. This solves the problem that mounting any UBIFS will immediately fail with -EINVAL. Cc: Al Viro Signed-off-by: Richard Weinberger drivers/mtd/ubi/kapi.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit ea1d39a31d3b1b6060b6e83e5a29c069a124c68a Author: Oscar Date: Tue Jun 14 14:14:35 2016 +0800 usb: common: otg-fsm: add license to usb-otg-fsm Fix warning about tainted kernel because usb-otg-fsm has no license. WARNING: with this patch usb-otg-fsm module can be loaded but then the kernel will hang. Tested with a udoo quad board. Cc: #v4.1+ Signed-off-by: Oscar Signed-off-by: Peter Chen drivers/usb/common/usb-otg-fsm.c | 2 ++ 1 file changed, 2 insertions(+) commit db06d759d6cf903aeda8c107fd3abd366dd80200 Merge: 35398ee 6710e59 Author: Linus Torvalds Date: Mon Jun 13 19:54:46 2016 -1000 Merge branch 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu Pull percpu fixes from Tejun Heo: "While adding GFP_ATOMIC support to the percpu allocator, the synchronization for the fast-path which doesn't require external allocations was separated into pcpu_lock. Unfortunately, it incorrectly decoupled async paths and percpu chunks could get destroyed while still being operated on. This contains two patches to fix the bug" * 'for-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu: percpu: fix synchronization between synchronous map extension and chunk destruction percpu: fix synchronization between chunk->map_extend_work and chunk destruction commit 35398ee3f00a4363faa1bd0fe7bb6a90f8a6b7e4 Merge: 5edb564 0d2a8ef4 Author: Linus Torvalds Date: Mon Jun 13 19:52:31 2016 -1000 Merge tag 'regulator-fix-v4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "Some driver specific fixes for the regulator subsystem: - Some of the changes to the core that were merged in the last merge window exposed the fact that the qcom-smd driver hadn't implemented the voltage enumeration interfaces like it should. Since it's a simple driver specific fix to implement them do that. - Fix the ramp delay configuration for tps51632" * tag 'regulator-fix-v4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: qcom_smd: add list_voltage callback regulator: qcom_smd: add regulator ops for pm8941 lnldo regulator: qcom_smd: add list_voltage callback regulator: tps51632: Fix setting ramp delay commit 8550e2fa34f077c8a87cf1ba2453102bbbc9ade9 Author: Aneesh Kumar K.V Date: Wed Jun 8 19:55:55 2016 +0530 powerpc/mm/hash: Use the correct PPP mask when updating HPTE With commit e58e87adc8bf9 "powerpc/mm: Update _PAGE_KERNEL_RO" we now use all the three PPP bits. The top bit is now used to have a PPP value of 0b110 which will be mapped to kernel read only. When updating the hpte entry use right mask such that we update the 63rd bit (top 'P' bit) too. Prior to e58e87adc8bf we didn't support KERNEL_RO at all (it was == KERNEL_RW), so this isn't a regression as such. Fixes: e58e87adc8bf ("powerpc/mm: Update _PAGE_KERNEL_RO") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + arch/powerpc/mm/hash_native_64.c | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) commit 4d2ec8575357d4afc965564e2e910a72fe608d39 Author: Johannes Thumshirn Date: Tue May 10 12:39:45 2016 +0200 mcb: Acquire reference to carrier module in core Acquire a reference to the carrier's kernel module in bus code, so it can't be removed from the kernel while it still has a bus and thus possibly devices attached to it. Signed-off-by: Johannes Thumshirn Reported-by: Andreas Werner Tested-by: Andreas Werner Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-core.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 7bc364097a89a0a9a5e5e4989d6b3e6fb2027a9e Author: Johannes Thumshirn Date: Tue May 10 12:39:44 2016 +0200 mcb: Acquire reference to device in probe mcb_probe() does not aqcuire a reference to the probed device but drops one when removing the device. As it is actually using the device, it should grab a reference via get_device(). This could lead to a panic found with a rmmod/modprobe stress test Signed-off-by: Johannes Thumshirn Reported-by: Andreas Werner Tested-by: Andreas Werner Signed-off-by: Greg Kroah-Hartman drivers/mcb/mcb-core.c | 1 + 1 file changed, 1 insertion(+) commit 7c4021d403ca72ce52d39c17d8154974521a82be Author: Alex Deucher Date: Mon Jun 13 18:59:17 2016 -0400 Revert "drm/amdgpu: add pipeline sync while vmid switch in same ctx" This reverts commit 2ba272d7bde27e1db2cf1c6cee49b01b7ea08989. The issue fixed by this patch is specific to compute rings and the previous patch was enough. Additionally, this patch as been traced to strange behavior on some CZ systems so we might as well drop it. drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 ++------- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++--- 3 files changed, 6 insertions(+), 13 deletions(-) commit a0110642e6efc49cc214a67b9749a791b0ca045d Merge: b046302 a7d7865 Author: Olof Johansson Date: Mon Jun 13 15:53:29 2016 -0700 Merge tag 'samsung-fixes-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into fixes Fixes for Exynos-based Snow and Peach Pit boards for regressions introduced in 4.7-rc1 because OF graph logic expects specific names of child nodes. * tag 'samsung-fixes-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Fix port nodes names for Exynos5420 Peach Pit board ARM: dts: exynos: Fix port nodes names for Exynos5250 Snow board Signed-off-by: Olof Johansson commit b046302a1dbbc49102da50000a22f4c69b1d700e Author: Fabio Estevam Date: Mon Jun 6 10:51:40 2016 -0300 MAINTAINERS: Add myself as reviewer of ARM FSL/NXP I would like to help reviewing FSL/NXP ARM architecture patches. Signed-off-by: Fabio Estevam Acked-by: Shawn Guo Signed-off-by: Olof Johansson MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit ecb0693d3e26470a49fbeb1b1f7fe197bb234725 Merge: b223d62 c106c21 Author: Olof Johansson Date: Mon Jun 13 15:48:51 2016 -0700 Merge tag 'socfpga_fix_for_v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into fixes SoCFPGA fix for v4.7 - Add missing PHY phandle for SoCFPGA VINING board * tag 'socfpga_fix_for_v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux: ARM: dts: socfpga: Add missing PHY phandle Signed-off-by: Olof Johansson commit 8b18300c13a1e08e152f6b6a430faac84f986231 Author: Alex Deucher Date: Mon Jun 13 18:26:24 2016 -0400 drm/amdgpu/gfx7: fix broken condition check Wrong operator. Reported-by: David Binderman Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05082b8bbd1a0ffc74235449c4b8930a8c240f85 Author: Alex Deucher Date: Mon Jun 13 15:37:34 2016 -0400 drm/radeon: fix asic initialization for virtualized environments When executing in a PCI passthrough based virtuzliation environment, the hypervisor will usually attempt to send a PCIe bus reset signal to the ASIC when the VM reboots. In this scenario, the card is not correctly initialized, but we still consider it to be posted. Therefore, in a passthrough based environemnt we should always post the card to guarantee it is in a good state for driver initialization. Ported from amdgpu commit: amdgpu: fix asic initialization for virtualized environments Cc: Andres Rodriguez Cc: Alex Williamson Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org drivers/gpu/drm/radeon/radeon_device.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit 048765ad5af7c8939603b4c6cb96293ffa05e00d Author: Andres Rodriguez Date: Sat Jun 11 02:51:32 2016 -0400 amdgpu: fix asic initialization for virtualized environments (v2) When executing in a PCI passthrough based virtuzliation environemnt, the hypervisor will usually attempt to send a PCIe bus reset signal to the ASIC when the VM reboots. In this scenario, the card is not correctly initialized, but we still consider it to be posted. Therefore, in a passthrough based environemnt we should always post the card to guarantee it is in a good state for driver initialization. However, if we are operating in SR-IOV mode it is up to the GIM driver to manage the asic state, therefore we should not post the card (and shouldn't be able to do it either). v2: add missing semi-colon Reviewed-by: Christian König Signed-off-by: Andres Rodriguez Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 17 ++++++++++++++++- drivers/gpu/drm/amd/amdgpu/cik.c | 7 +++++++ drivers/gpu/drm/amd/amdgpu/vi.c | 15 +++++++++++++++ 4 files changed, 45 insertions(+), 1 deletion(-) commit 9ef8537e68941d858924a3eacee5a1945767cbab Author: Christian König Date: Mon Jun 13 16:09:53 2016 +0200 drm/radeon: don't use fractional dividers on RS[78]80 if SS is enabled Seems to cause problems for some older hardware. Kudos to Thom Kouwenhoven for working a lot with the PLLs and figuring this out. Reviewed-by: Alex Deucher Signed-off-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/atombios_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit ccaa2c12fba72f3e547d18e66820e2e6c5883113 Author: Jérôme Glisse Date: Tue Jun 7 17:43:04 2016 -0400 drm/radeon: do not hard reset GPU while freezing on r600/r700 family Seems r600/r700 does not like hard reset while freezing for hibernation (regression due to 274ad65c9d02bdcbee9bae045517864c3521d530 which itself is a fix for hibernation on some GPU families). Until i can debug further issue with r600, let just disable this for r600/r700 as they are very similar family and bug affecting one likely affect the other. Reviewed-by: Christian König Signed-off-by: Jérôme Glisse Signed-off-by: Alex Deucher drivers/gpu/drm/radeon/radeon_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d2a8ef4395e84aa9623ac1e282417c75a73490c Merge: 5edb564 3bfbb4d c714a58 Author: Mark Brown Date: Mon Jun 13 16:51:57 2016 +0100 Merge remote-tracking branches 'regulator/fix/qcom-smd' and 'regulator/fix/tps51632' into regulator-linus commit 19edeb30c55079c9bba4573d700bbcafed03303c Author: Charles Keepax Date: Mon Jun 13 13:35:16 2016 +0100 ASoC: wm5102: Correct supported channels on trace compressed DAI The audio trace firmware on wm5102 only supports 4 channels correct the DAI driver structure to reflect this. Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm5102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d72fea6214f3fee2355d8cb6c51348059d98768b Author: Ajit Pandey Date: Mon Jun 13 13:35:15 2016 +0100 ASoC: wm5110: Add missing route from OUT3R to SYSCLK Output 3 is stereo on wm5110 and all inputs/outputs should have a connection to SYSCLK. This patch adds the missing DAPM route. Signed-off-by: Ajit Pandey Signed-off-by: Charles Keepax Signed-off-by: Mark Brown sound/soc/codecs/wm5110.c | 1 + 1 file changed, 1 insertion(+) commit 1c343f7b0e177e8ca7f4d4a5dd1fa790f85abbcc Author: Christian Borntraeger Date: Mon Jun 13 13:14:56 2016 +0200 KVM: s390/mm: Fix CMMA reset during reboot commit 1e133ab296f ("s390/mm: split arch/s390/mm/pgtable.c") factored out the page table handling code from __gmap_zap and __s390_reset_cmma into ptep_zap_unused and added a simple flag that tells which one of the function (reset or not) is to be made. This also changed the behaviour, as it also zaps unused page table entries on reset. Turns out that this is wrong as s390_reset_cmma uses the page walker, which DOES NOT take the ptl lock. The most simple fix is to not do the zapping part on reset (which uses the walker) Signed-off-by: Christian Borntraeger Fixes: 1e133ab296f ("s390/mm: split arch/s390/mm/pgtable.c") Cc: stable@vger.kernel.org # 4.6+ Signed-off-by: Martin Schwidefsky arch/s390/mm/pgtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ae4ea9a2460c7fee2ae8feeb4dfe96f5f6c3e562 Author: Junichi Nomura Date: Fri Jun 10 04:31:52 2016 +0000 ipmi: Remove smi_msg from waiting_rcv_msgs list before handle_one_recv_msg() Commit 7ea0ed2b5be8 ("ipmi: Make the message handler easier to use for SMI interfaces") changed handle_new_recv_msgs() to call handle_one_recv_msg() for a smi_msg while the smi_msg is still connected to waiting_rcv_msgs list. That could lead to following list corruption problems: 1) low-level function treats smi_msg as not connected to list handle_one_recv_msg() could end up calling smi_send(), which assumes the msg is not connected to list. For example, the following sequence could corrupt list by doing list_add_tail() for the entry still connected to other list. handle_new_recv_msgs() msg = list_entry(waiting_rcv_msgs) handle_one_recv_msg(msg) handle_ipmb_get_msg_cmd(msg) smi_send(msg) spin_lock(xmit_msgs_lock) list_add_tail(msg) spin_unlock(xmit_msgs_lock) 2) race between multiple handle_new_recv_msgs() instances handle_new_recv_msgs() once releases waiting_rcv_msgs_lock before calling handle_one_recv_msg() then retakes the lock and list_del() it. If others call handle_new_recv_msgs() during the window shown below list_del() will be done twice for the same smi_msg. handle_new_recv_msgs() spin_lock(waiting_rcv_msgs_lock) msg = list_entry(waiting_rcv_msgs) spin_unlock(waiting_rcv_msgs_lock) | | handle_one_recv_msg(msg) | spin_lock(waiting_rcv_msgs_lock) list_del(msg) spin_unlock(waiting_rcv_msgs_lock) Fixes: 7ea0ed2b5be8 ("ipmi: Make the message handler easier to use for SMI interfaces") Signed-off-by: Jun'ichi Nomura [Added a comment to describe why this works.] Signed-off-by: Corey Minyard Cc: stable@vger.kernel.org # 3.19 Tested-by: Ye Feng drivers/char/ipmi/ipmi_msghandler.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 053ae6499a5634c0dc5fa18437e1af3d2f2ec98e Author: Axel Lin Date: Mon Jun 13 13:48:53 2016 +0800 gpio: 104-idi-48: Fix missing spin_lock_init for ack_lock Fixes: 9ae482104cb9 ("gpio: 104-idi-48: Clear pending interrupt once in IRQ handler") Signed-off-by: Axel Lin Acked-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-idi-48.c | 1 + 1 file changed, 1 insertion(+) commit c1b8bfb08f25d1cb9ef2bc93229107113a41ad8c Merge: af8c34c 9ec6de1 Author: Paolo Bonzini Date: Mon Jun 13 13:44:50 2016 +0200 Merge tag 'kvm-s390-master-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: fixup and missing stat 1. A fixup for a bug that was introduced in 4.7-rc1 if userspace uses the cpu model ioctls 2. Add the missing kvm stat for pei events commit 19ced623db2fe91604d69f7d86b03144c5107739 Author: Linus Walleij Date: Wed Jun 8 14:56:39 2016 +0200 crypto: ux500 - memmove the right size The hash buffer is really HASH_BLOCK_SIZE bytes, someone must have thought that memmove takes n*u32 words by mistake. Tests work as good/bad as before after this patch. Cc: Joakim Bech Cc: stable@vger.kernel.org Reported-by: David Binderman Signed-off-by: Linus Walleij Signed-off-by: Herbert Xu drivers/crypto/ux500/hash/hash_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 12d3f49e1ffbbf8cbbb60acae5a21103c5c841ac Author: Anton Blanchard Date: Fri Jun 10 16:47:03 2016 +1000 crypto: vmx - Increase priority of aes-cbc cipher All of the VMX AES ciphers (AES, AES-CBC and AES-CTR) are set at priority 1000. Unfortunately this means we never use AES-CBC and AES-CTR, because the base AES-CBC cipher that is implemented on top of AES inherits its priority. To fix this, AES-CBC and AES-CTR have to be a higher priority. Set them to 2000. Testing on a POWER8 with: cryptsetup benchmark --cipher aes --key-size 256 Shows decryption speed increase from 402.4 MB/s to 3069.2 MB/s, over 7x faster. Thanks to Mike Strosaker for helping me debug this issue. Fixes: 8c755ace357c ("crypto: vmx - Adding CBC routines for VMX module") Cc: stable@vger.kernel.org Signed-off-by: Anton Blanchard Signed-off-by: Herbert Xu drivers/crypto/vmx/aes_cbc.c | 2 +- drivers/crypto/vmx/aes_ctr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 975f57fdff1d0eb9816806cabd27162a8a1a4038 Author: Anton Blanchard Date: Fri Jun 10 16:47:02 2016 +1000 crypto: vmx - Fix ABI detection When calling ppc-xlate.pl, we pass it either linux-ppc64 or linux-ppc64le. The script however was expecting linux64le, a result of its OpenSSL origins. This means we aren't obeying the ppc64le ABIv2 rules. Fix this by checking for linux-ppc64le. Fixes: 5ca55738201c ("crypto: vmx - comply with ABIs that specify vrsave as reserved.") Cc: stable@vger.kernel.org Signed-off-by: Anton Blanchard Signed-off-by: Herbert Xu drivers/crypto/vmx/ppc-xlate.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9aeb26cfc2abc96be42b9df2d0f2dc5d805084ff Author: Jean-Philippe Brucker Date: Fri Jun 3 11:50:30 2016 +0100 iommu/arm-smmu: Wire up map_sg for arm-smmu-v3 The map_sg callback is missing from arm_smmu_ops, but is required by iommu.h. Similarly to most other IOMMU drivers, connect it to default_iommu_map_sg. Cc: Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon Signed-off-by: Joerg Roedel drivers/iommu/arm-smmu-v3.c | 1 + 1 file changed, 1 insertion(+) commit 3bfbb4d1a480cc17f6ccfce13b76eb6c0dbeaf8c Author: Srinivas Kandagatla Date: Thu Jun 2 11:23:15 2016 +0100 regulator: qcom_smd: add list_voltage callback This patch adds support to list_voltage callback, so that consumers like mmc core, can get information of supported voltage range. Without this patch there is no way for mmc core to know this voltage range. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown drivers/regulator/qcom_smd-regulator.c | 1 + 1 file changed, 1 insertion(+) commit 6b41d44862e8f3a4b95102c6ff6cad3fccc7994b Author: Nishanth Menon Date: Tue May 24 08:35:40 2016 -0500 ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_mem_ret As per the latest revision F of public TRM for DRA7/AM57xx SoCs SPRUHZ6F[1] (April 2016), with the exception of MPU power domain, all other power domains do not have memories capable of retention since they all operate in either "ON" or "OFF" mode. For these power states, the retention state for memories are basically ignored by PRCM and does not require to be programmed. [1] http://www.ti.com/lit/pdf/spruhz6 Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren arch/arm/mach-omap2/powerdomains7xx_data.c | 65 ------------------------------ 1 file changed, 65 deletions(-) commit 9ffb668f268c79f2f58b56bbd63208440b31260f Author: Nishanth Menon Date: Tue May 24 08:35:39 2016 -0500 ARM: OMAP: DRA7: powerdomain data: Remove unused pwrsts_logic_ret As per the latest revision F of public TRM for DRA7/AM57xx SoCs SPRUHZ6F[1] (April 2016), with the exception of MPU power domain (and CPUx sub power domains), all other power domains can either operate in "ON" mode OR in some cases, "OFF" mode. For these power states, the logic retention state is basically ignored by PRCM and does not require to be programmed. [1] http://www.ti.com/lit/pdf/spruhz6 Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren arch/arm/mach-omap2/powerdomains7xx_data.c | 7 ------- 1 file changed, 7 deletions(-) commit d16c0d722d09496a03222dc27ee3071b7b1051e5 Author: Nishanth Menon Date: Tue May 24 08:35:38 2016 -0500 ARM: OMAP: DRA7: powerdomain data: Set L3init and L4per to ON As per the latest revision F of public TRM for DRA7/AM57xx SoCs SPRUHZ6F[1] (April 2016), L4Per and L3init power domains now operate in always "ON" mode due to asymmetric aging limitations. Update the same [1] http://www.ti.com/lit/pdf/spruhz6 Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren arch/arm/mach-omap2/powerdomains7xx_data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d941ebe88a411aa281cc80477a93feb931a1b50b Author: Ivan Khoronzhuk Date: Sat Jun 11 01:11:54 2016 +0300 net: ethernet: ti: cpsw: use destroy ctlr to destroy channels There is no reason to destroy channels that are destroyed while cpdma_ctlr destroy. In this case no need to remember how much channels where created and destroy them by one, as cpdma_ctlr destroys all of them. Signed-off-by: Ivan Khoronzhuk Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 4 ---- 1 file changed, 4 deletions(-) commit cbdf451164785c9cf5acd5d2983c1e7c778df4c1 Author: Eric Dumazet Date: Sun Jun 12 16:21:47 2016 -0700 net_sched: prio: properly report out of memory errors At Qdisc creation or change time, prio_tune() creates missing pfifo qdiscs but does not return an error code if one qdisc could not be allocated. Leaving a qdisc in non operational state without telling user anything about this problem is not good. Also, testing if we replace something different than noop_qdisc a second time makes no sense so I removed useless code. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller net/sched/sch_prio.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) commit ea01a18494b3d7a91b2f1f2a6a5aaef4741bc294 Author: Al Viro Date: Sun Jun 12 11:24:46 2016 -0400 autofs races * make autofs4_expire_indirect() skip the dentries being in process of expiry * do *not* mess with list_move(); making sure that dentry with AUTOFS_INF_EXPIRING are not picked for expiry is enough. * do not remove NO_RCU when we set EXPIRING, don't bother with smp_mb() there. Clear it at the same time we clear EXPIRING. Makes a bunch of tests simpler. * rename NO_RCU to WANT_EXPIRE, which is what it really is. Signed-off-by: Al Viro fs/autofs4/autofs_i.h | 8 ++++++-- fs/autofs4/expire.c | 27 ++++++++------------------- fs/autofs4/root.c | 2 +- 3 files changed, 15 insertions(+), 22 deletions(-) commit 5edb56491d4812c42175980759da53388e5d86f5 Author: Linus Torvalds Date: Sun Jun 12 07:20:35 2016 -0700 Linux 4.7-rc3 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57120fac12321f636c83af447a081d680c0de2e2 Merge: 8714f8f 5a5e78c Author: Linus Torvalds Date: Sun Jun 12 06:30:39 2016 -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 an ordering issue in cpu cooling that cooling device is registered before it's ready (freq_table being populated). (Lukasz Luba) - fix a missing comment update (Caesar Wang) * 'for-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: add the note for set_trip_temp thermal: cpu_cooling: fix improper order during initialization commit 30402c8949934fbaca07d9c20074d0d7a5a8385f Merge: b581755 eb0a4a4 Author: Miklos Szeredi Date: Sun Jun 12 12:05:21 2016 +0200 Merge branch 'overlayfs-af_unix-fix' into overlayfs-linus commit 86ef7f9cbfd564377028098cf20cc1c3ec2c776d Author: David S. Miller Date: Sat Jun 11 20:40:24 2016 -0700 ipconfig: Protect ic_addrservaddr with IPCONFIG_DYNAMIC. >> net/ipv4/ipconfig.c:130:15: warning: 'ic_addrservaddr' defined but not used [-Wunused-variable] static __be32 ic_addrservaddr = NONE; /* IP Address of the IP addresses'server */ Reported-by: kbuild test robot Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 2 ++ 1 file changed, 2 insertions(+) commit 8714f8f5fe396ca513ccaaac2304497439c181fb Merge: 3a7c114 edb50a5 Author: Linus Torvalds Date: Sat Jun 11 18:42:59 2016 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block layer fixes from Jens Axboe: "A small collection of fixes for the current series. This contains: - Two fixes for xen-blkfront, from Bob Liu. - A bug fix for NVMe, releasing only the specific resources we requested. - Fix for a debugfs flags entry for nbd, from Josef. - Plug fix from Omar, fixing up a case of code being switched between two functions. - A missing bio_put() for the new discard callers of submit_bio_wait(), fixing a regression causing a leak of the bio. From Shaun. - Improve dirty limit calculation precision in the writeback code, fixing a case where setting a limit lower than 1% of memory would end up being zero. From Tejun" * 'for-linus' of git://git.kernel.dk/linux-block: NVMe: Only release requested regions xen-blkfront: fix resume issues after a migration xen-blkfront: don't call talk_to_blkback when already connected to blkback nbd: pass the nbd pointer for flags debugfs block: missing bio_put following submit_bio_wait blk-mq: really fix plug list flushing for nomerge queues writeback: use higher precision calculation in domain_dirty_limits() commit 3a7c114d358dbe1c5cba70e7d4c3cb39b3c8ecaa Merge: 45b00c9 b66b2a0 Author: Linus Torvalds Date: Sat Jun 11 18:03:39 2016 -0700 Merge tag 'gpio-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "A new bunch of GPIO fixes for v4.7. This time I am very grateful that Ricardo Ribalda Delgado went in and fixed my stupid refcounting mistakes in the removal path for GPIO chips. I had a feeling something was wrong here and so it was. It exploded on OMAP and it fixes their problem. Now it should be (more) solid. The rest i compilation, Kconfig and driver fixes. Some tagged for stable. Summary: - Fix a NULL pointer dereference when we are searching the GPIO device list but one of the devices have been removed (struct gpio_chip pointer is NULL). - Fix unaligned reference counters: we were ending on +3 after all said and done. It should be 0. Remove an extraneous get_device(), and call cdev_del() followed by device_del() in gpiochip_remove() instead and the count goes to zero and calls the release() function properly. - Fix a compile warning due to a missing #include in the OF/device tree portions. - Select ANON_INODES for GPIOLIB, we're using that for our character device. Some randconfig tests disclosed the problem. - Make sure the Zynq driver clock runs also without CONFIG_PM enabled - Fix an off-by-one error in the 104-DIO-48E driver - Fix warnings in bcm_kona_gpio_reset()" * tag 'gpio-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: bcm-kona: fix bcm_kona_gpio_reset() warnings gpio: select ANON_INODES gpio: include in gpiolib-of gpiolib: Fix unaligned used of reference counters gpiolib: Fix NULL pointer deference gpio: zynq: initialize clock even without CONFIG_PM gpio: 104-dio-48e: Fix control port offset computation off-by-one error commit 45b00c94be33db5d00595046663163ce55cbbfb9 Merge: 5d1f702 27ea13e Author: Linus Torvalds Date: Sat Jun 11 11:42:08 2016 -0700 Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "Two current fixes: - one affects Qemu CD ROM emulation, which stopped working after the updates in SCSI to require VPD pages from all conformant devices. Fix temporarily by blacklisting Qemu (we can relax later when they come into compliance). - The other is a fix to the optimal transfer size. We set up a minefield for ourselves by being confused about whether the limits are in bytes or sectors (SCSI optimal is in blocks and the queue parameter is in bytes). This tries to fix the problem (wrong setting for queue limits max_sectors) and make the problem more obvious by introducing a wrapper function" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: sd: Fix rw_max for devices that report an optimal xfer size scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist commit 5d1f7023fb2233d454ac3ac2fb7cc96fb94e9cac Merge: 90735c9 9f05e62 Author: Linus Torvalds Date: Sat Jun 11 11:24:54 2016 -0700 Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fixes from Wolfram Sang: - a bigger fix for i801 to finally be able to be loaded on some machines again - smaller driver fixes - documentation update because of a renamed file * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: mux: reg: Provide of_match_table i2c: mux: refer to i2c-mux.txt i2c: octeon: Avoid printk after too long SMBUS message i2c: octeon: Missing AAK flag in case of I2C_M_RECV_LEN i2c: i801: Allow ACPI SystemIO OpRegion to conflict with PCI BAR commit 90735c99edfa1968a3e8da26a0b471a59fbc0f57 Merge: f1c32afd 06dfeef Author: Linus Torvalds Date: Sat Jun 11 11:08:57 2016 -0700 Merge tag 'devicetree-fixes-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree fixes from Rob Herring: - fix unflatten_dt_nodes when dad parameter is set. - add vendor prefixes for TechNexion and UniWest - documentation fix for Marvell BT - OF IRQ kerneldoc fixes - restrict CMA alignment adjustments to non dma-coherent - a couple of warning fixes in reserved-memory code - DT maintainers updates * tag 'devicetree-fixes-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: drivers: of: add definition of early_init_dt_alloc_reserved_memory_arch drivers/of: Fix depth for sub-tree blob in unflatten_dt_nodes() drivers: of: Fix of_pci.h header guard dt-bindings: Add vendor prefix for TechNexion of: add vendor prefix for UniWest dt: bindings: fix documentation for MARVELL's bt-sd8xxx wireless device of: add missing const for of_parse_phandle_with_args() in !CONFIG_OF of: silence warnings due to max() usage drivers: of: of_reserved_mem: fixup the CMA alignment not to affect dma-coherent of: irq: fix of_irq_get[_byname]() kernel-doc MAINTAINERS: DeviceTree maintainer updates commit f1c32afdb83eb8fa1d130049f4bf8e14fdab7cc4 Merge: 3d0f0b6 f89dec7 Author: Linus Torvalds Date: Sat Jun 11 10:55:30 2016 -0700 Merge tag '20160610_uvc_compat_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/luto/linux Pull uvc compat XU ioctl fixes from Andy Lutomirski: "uvc's compat XU ioctls go through tons of potentially buggy indirection. The first patch removes the indirection. The second one cleans up the code. Compile-tested only. I have the hardware, but I have absolutely no idea what XU does, how to use it, what software to recompile as 32-bit, or what to test in that software" * tag '20160610_uvc_compat_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/luto/linux: uvc_v4l2: Simplify compat ioctl implementation uvc: Forward compat ioctls to their handlers directly commit f4070a19142d5ee06f0da0cef56a0e78995f172c Author: Luis de Bethencourt Date: Wed Jun 1 20:25:54 2016 +0100 staging: iio: ad5933: fix order of cycle conditions Correctly handle the settling time cycles value. The else branch is an impossible condition, > 1022 in the else branch of > 511. Flipping the order. Based on the Table 13 at the bottom of Page 25 of the Data Sheet: http://www.analog.com/media/en/technical-documentation/data-sheets/AD5933.pdf Signed-off-by: Luis de Bethencourt Reviewed-by: Lars-Peter Clausen Signed-off-by: Jonathan Cameron drivers/staging/iio/impedance-analyzer/ad5933.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7e982555d89cc84b1fa23b5d54c7ffd9f7753908 Author: Arnd Bergmann Date: Mon May 30 15:50:24 2016 +0200 staging: iio: fix ad7606_spi regression As pointed out by Geert Uytterhoeven, the patch was incorrect and breaks the driver, which was fortunately pointed out by this gcc warning: drivers/staging/iio/adc/ad7606_spi.c: In function ‘ad7606_spi_read_block’: drivers/staging/iio/adc/ad7606_spi.c:34: warning: ‘data’ is used uninitialized in this function The effect of the patch is that the data is copied into a random memory location (from the uninitialized pointer) instead of being byteswapped in place. This adds the initialization for the 'data' variable back to restore the original behavior. Cc: Ksenija Stanojevic Fixes: 87787e5ef727 ("Staging: iio: Fix sparse endian warning") Signed-off-by: Arnd Bergmann Acked-by: Geert Uytterhoeven Signed-off-by: Jonathan Cameron drivers/staging/iio/adc/ad7606_spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e85dbe4b461e59fa3cad6f6235cb47fa4c6a629 Author: Crestez Dan Leonard Date: Fri Jun 3 21:30:24 2016 +0300 iio: inv_mpu6050: Fix use-after-free in ACPI code In some cases this can result in incorrectly returning a negative value from asus_acpi_get_sensor_info and the AK8963 magnetometer failing to show up. Note cpm is an alias for buffer.pointer which isn't apparent in this patch on it's own. Cc: Srinivas Pandruvada Signed-off-by: Crestez Dan Leonard Acked-by: Daniel Baluta Signed-off-by: Jonathan Cameron drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 92ca8241533009e4e05a9f3999a75389678af094 Author: Manuel Lauss Date: Sat Jun 11 00:13:04 2016 +0200 net: au1000_eth: fix PHY detection Commit 7f854420fbfe9d49afe2ffb1df052cfe8e215541 ("phy: Add API for {un}registering an mdio device to a bus.") broke PHY detection on this driver with a copy-paste bug: The code is looking 32 times for a PHY at address 0. Fixes ethernet on AMD DB1100/DB1500/DB1550 boards which have their (autodetected) PHYs at address 31. Cc: Andrew Lunn Signed-off-by: Manuel Lauss Signed-off-by: David S. Miller drivers/net/ethernet/amd/au1000_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86c5fe4c932a8ef2d32f8b3d32cc9f0476fc54f3 Author: David S. Miller Date: Fri Jun 10 23:34:24 2016 -0700 Revert "net: au1000_eth: fix PHY detection" This reverts commit a2f27217e4e60e663b5b971b0ccb287a9548b04e. I applied the wrong version of this. Signed-off-by: David S. Miller drivers/net/ethernet/amd/au1000_eth.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit a2f27217e4e60e663b5b971b0ccb287a9548b04e Author: Manuel Lauss Date: Fri Jun 10 16:53:05 2016 +0200 net: au1000_eth: fix PHY detection Commit 7f854420fbfe9d49afe2ffb1df052cfe8e215541 ("phy: Add API for {un}registering an mdio device to a bus.") broke PHY detection on this driver with a copy-paste bug: The code is looking 32 times for a PHY at address 0. Fixes ethernet on AMD DB1100/DB1500/DB1550 boards which have their (autodetected) PHYs at address 31. Cc: Andrew Lunn Signed-off-by: Manuel Lauss Signed-off-by: David S. Miller drivers/net/ethernet/amd/au1000_eth.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit a4b42ab3205a28b24eb0d480935cf9fd1051a7f2 Merge: 0b392be 82c6544 Author: David S. Miller Date: Fri Jun 10 23:29:30 2016 -0700 Merge branch 'mediatek-fixes' John Crispin says: ==================== net: mediatek: various small fixes This series contains various small fixes that we stumbled across while doing thorough testing and code level reviewing of the driver. Changes in V2: * drop the DQL patch from the list until a better solution is found ==================== Signed-off-by: David S. Miller commit 82c6544dddc6c4bd940917af2f987dee6be0fc17 Author: John Crispin Date: Fri Jun 10 13:28:08 2016 +0200 net: mediatek: remove superfluous queue wake up call The code checks if the queue should be stopped because we are below the threshold of free descriptors only to check if it should be started again. If we do end up in a state where we are at the threshold limit, it makes more sense to just stop the queue and wait for the next IRQ to trigger the TX housekeeping again. There is no rush in enqueuing the next packet, it needs to wait for all the others in the queue to be dispatched first anyway. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit ad3cba989e8b1bbefe078eece29f0e8d8aaea1d6 Author: John Crispin Date: Fri Jun 10 13:28:07 2016 +0200 net: mediatek: only wake the queue if it is stopped The current code unconditionally wakes up the queue at the end of each tx_poll action. Change the code to only wake up the queues if any of them have actually been stopped before. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) commit 12c97c13ea7174db5b5dc4a1ef91d4e9245bb569 Author: John Crispin Date: Fri Jun 10 13:28:06 2016 +0200 net: mediatek: fix off by one in the TX ring allocation The TX ring setup has an off by one error causing it to not utilise all descriptors. This has the side effect that we need to reset the next pointer at runtime to make it work. Fix the off by one and remove the code fixing the ring at runtime. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit eaadf9fd3f6390f6ecbd0dfbd5997a0486fc9d5e Author: John Crispin Date: Fri Jun 10 13:28:05 2016 +0200 net: mediatek: increase watchdog_timeo During stress testing, after reducing the threshold value, we have seen TX timeouts that were caused by the watchdog_timeo value being too low. Increase the value to 5 * HZ which is a value commonly used by many other drivers. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 04698cccb1de54d5d97fda2e4a1c6ca365da0f70 Author: John Crispin Date: Fri Jun 10 13:28:04 2016 +0200 net: mediatek: fix threshold value The logic to calculate the threshold value for stopping the TX queue is bad. Currently it will always use 1/2 of the rings size, which is way too much. Set the threshold to MAX_SKB_FRAGS. This makes sure that the queue is stopped when there is not enough room to accept an additional segment.  Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 2ff0bb61646f286fa97db2904491974302a14f1f Author: John Crispin Date: Fri Jun 10 13:28:03 2016 +0200 net: mediatek: disable all interrupts during probe The current code only disables those IRQs that we will later use. To ensure that we have a predefined state, we really want to disable all IRQs. Change the code to disable all IRQs to achieve this. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6675086d04e7c0748cd5884f7c8611b5f0836250 Author: John Crispin Date: Fri Jun 10 13:28:02 2016 +0200 net: mediatek: add next data pointer coherency protection The QDMA engine can fail to update the register pointing to the next TX descriptor if this bit does not get set in the QDMA configuration register. Not setting this bit can result in invalid values inside the TX rings registers which will causes TX stalls. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 94321a9fc9f5b6c6e949cc7c69741538f556ab74 Author: John Crispin Date: Fri Jun 10 13:28:01 2016 +0200 net: mediatek: dropped rx packets are not being counted properly There are two places inside mtk_poll_rx where rx_dropped is not being incremented properly. Fix this by adding the missing code to increment the counter. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 ++ 1 file changed, 2 insertions(+) commit 2fae723cefb8bfe712371978288aa0a70b54802e Author: John Crispin Date: Fri Jun 10 13:28:00 2016 +0200 net: mediatek: invalid buffer lookup in mtk_tx_map() The lookup of the tx_buffer in the error path inside mtk_tx_map() uses the wrong descriptor pointer. This looks like a copy & paste error. Change the code to use the correct pointer. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 605e4fe476956c67ced8518247e6c9601a31b868 Author: John Crispin Date: Fri Jun 10 13:27:59 2016 +0200 net: mediatek: fix missing free of scratch memory Scratch memory gets allocated in mtk_init_fq_dma() but the corresponding code to free it is missing inside mtk_dma_free() causing a memory leak. With this patch applied, we can run ifconfig up/down several thousand times without any problems. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 18 +++++++++++++----- drivers/net/ethernet/mediatek/mtk_eth_soc.h | 2 ++ 2 files changed, 15 insertions(+), 5 deletions(-) commit 562c5a70400c75f50d99de631666ac7cc2f03958 Author: John Crispin Date: Fri Jun 10 13:27:58 2016 +0200 net: mediatek: add missing return code check The code fails to check if the scratch memory was properly allocated. Add this check and return with an error if the allocation failed. Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++ 1 file changed, 3 insertions(+) commit 0b392be9a86560dae3af2e7528f226ff465ab549 Author: Ben Dooks Date: Fri Jun 10 12:11:06 2016 +0100 net: ipconfig: avoid warning by making ic_addrservaddr static The symbol ic_addrservaddr is not static, but has no declaration to match so make it static to fix the following warning: net/ipv4/ipconfig.c:130:8: warning: symbol 'ic_addrservaddr' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: David S. Miller net/ipv4/ipconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c3ec5e5ce9cea1f369a5a8ad69d6471680796bc6 Author: Ben Dooks Date: Thu Jun 9 18:05:09 2016 +0100 net: diag: add missing declarations The functions inet_diag_msg_common_fill and inet_diag_msg_attrs_fill seem to have been missed from the include/linux/inet_diag.h header file. Add them to fix the following warnings: net/ipv4/inet_diag.c:69:6: warning: symbol 'inet_diag_msg_common_fill' was not declared. Should it be static? net/ipv4/inet_diag.c:108:5: warning: symbol 'inet_diag_msg_attrs_fill' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: David S. Miller include/linux/inet_diag.h | 6 ++++++ net/sctp/sctp_diag.c | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) commit e4600d56323ed119469fdcb21564f7544e1e6b3c Merge: 11c011a 31b2a32 Author: Greg Kroah-Hartman Date: Fri Jun 10 23:06:21 2016 -0700 Merge tag 'phy-for-4.7-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy into usb-linus Kishon writes: phy: for 4.7-rc *) Fix compiler warning in exynos-mipi-video *) Fix in ti-pipe3 PHY to program the DPLL even if it was already locked Signed-off-by: Kishon Vijay Abraham I commit 56fae404fb2c306db0a35dad0d16fa24c65678f3 Author: Ido Schimmel Date: Tue Jun 7 12:06:58 2016 +0300 bridge: Fix incorrect re-injection of STP packets Commit 8626c56c8279 ("bridge: fix potential use-after-free when hook returns QUEUE or STOLEN verdict") fixed incorrect usage of NF_HOOK's return value by consuming packets in okfn via br_pass_frame_up(). However, this function re-injects packets to the Rx path with skb->dev set to the bridge device, which breaks kernel's STP, as all STP packets appear to originate from the bridge device itself. Instead, if STP is enabled and bridge isn't a 802.1ad bridge, then learn packet's SMAC and inject it back to the Rx path for further processing by the packet handlers. The patch also makes netfilter's behavior consistent with regards to packets destined to the Bridge Group Address, as no hook registered at LOCAL_IN will ever be called, regardless if STP is enabled or not. Cc: Florian Westphal Cc: Shmulik Ladkani Cc: Toshiaki Makita Fixes: 8626c56c8279 ("bridge: fix potential use-after-free when hook returns QUEUE or STOLEN verdict") Signed-off-by: Jiri Pirko Signed-off-by: Ido Schimmel Signed-off-by: David S. Miller net/bridge/br_input.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit fc0f7e3317c5f406e6d5520209b4689a4ffecfdf Author: Manfred Schlaegl Date: Mon Jun 6 10:47:47 2016 +0200 net: phy: smsc: reintroduced unconditional soft reset We detected some problems using the smsc lan8720a in combination with i.MX28 and tracked this down to commit 21009686662f ("net: phy: smsc: move smsc_phy_config_init reset part in a soft_reset function") With 2100968666 the generic soft reset is replaced by a specific function which handles power down state correctly. But additionally the soft reset itself got conditional and is therefore also only performed if the phy is in power down state. This patch keeps the conditional wake up from power down, but re-introduces the unconditional soft reset using the generic soft reset function. It was tested on linux-4.1.25 and linux-4.7.0-rc2. Signed-off-by: Manfred Schlaegl Signed-off-by: David S. Miller drivers/net/phy/smsc.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 69f1804a9ab602701217a8c23d371f8f36f8b57a Author: Alexander Usyskin Date: Mon May 9 00:07:46 2016 -0400 mei: don't use wake_up_interruptible for wr_ctrl wr_ctrl waiters are none interruptible, so should be waken up with call to wake_up and not to wake_up_interruptible. This fixes commit: 7ff4bdd ("mei: fix waiting for wr_ctrl for corner cases.") Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman drivers/misc/mei/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 27bf60db2485c09eba3b473ce5ffbaa4bba0c24e Merge: 7ff6977 0fbbbf8 Author: Dave Airlie Date: Sat Jun 11 09:34:20 2016 +1000 Merge tag 'drm-amdkfd-fixes-2016-06-03' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes * tag 'drm-amdkfd-fixes-2016-06-03' of git://people.freedesktop.org/~gabbayo/linux: drm/amdkfd: print once about mem_banks truncation drm/amdkfd: destroy dbgmgr in notifier release drm/amdkfd: unbind only existing processes commit f89dec72e98b34b3be66bb1ef1be62974c0f8483 Author: Andy Lutomirski Date: Wed May 11 17:41:27 2016 -0700 uvc_v4l2: Simplify compat ioctl implementation The uvc compat ioctl implementation seems to have copied user data for no good reason. Remove a bunch of copies. Signed-off-by: Andy Lutomirski drivers/media/usb/uvc/uvc_v4l2.c | 58 ++-------------------------------------- 1 file changed, 2 insertions(+), 56 deletions(-) commit a44323e2a8f342848bb77e8e04fcd85fcb91b3b4 Author: Andy Lutomirski Date: Tue May 24 15:13:02 2016 -0700 uvc: Forward compat ioctls to their handlers directly The current code goes through a lot of indirection just to call a known handler. Simplify it: just call the handlers directly. Cc: stable@vger.kernel.org Signed-off-by: Andy Lutomirski drivers/media/usb/uvc/uvc_v4l2.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) commit 3d0f0b6a5520878305589411b8d434fe088e4f21 Merge: ccf55f7 719da39 Author: Linus Torvalds Date: Fri Jun 10 14:13:27 2016 -0700 Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "Has some fixes and some new self tests for btrfs. The self tests are usually disabled in the .config file (unless you're doing btrfs dev work), and this bunch is meant to find problems with the 64K page size patches. Jeff has a patch to help people see if they are using the hardware assist crc32c module, which really helps us nail down problems when people ask why crcs are using so much CPU. Otherwise, it's small fixes" * 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: self-tests: Fix extent buffer bitmap test fail on BE system Btrfs: self-tests: Fix test_bitmaps fail on 64k sectorsize Btrfs: self-tests: Use macros instead of constants and add missing newline Btrfs: self-tests: Support testing all possible sectorsizes and nodesizes Btrfs: self-tests: Execute page straddling test only when nodesize < PAGE_SIZE btrfs: advertise which crc32c implementation is being used at module load Btrfs: add validadtion checks for chunk loading Btrfs: add more validation checks for superblock Btrfs: clear uptodate flags of pages in sys_array eb Btrfs: self-tests: Support non-4k page size Btrfs: Fix integer overflow when calculating bytes_per_bitmap Btrfs: test_check_exists: Fix infinite loop when searching for free space entries Btrfs: end transaction if we abort when creating uuid root btrfs: Use __u64 in exported linux/btrfs.h. commit ccf55f73a607dba0cec470e677e3fad754304220 Merge: c8f17d6 8017ea3 Author: Linus Torvalds Date: Fri Jun 10 12:23:49 2016 -0700 Merge tag 'powerpc-4.7-3Michael Ellerman:' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from - ptrace: Fix out of bounds array access warning from Khem Raj - pseries: Fix PCI config address for DDW from Gavin Shan - pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET since POWER8NVL was added from Michael Ellerman - of: fix autoloading due to broken modalias with no 'compatible' from Wolfram Sang - radix: Fix always false comparison against MMU_NO_CONTEXT from Aneesh Kumar K.V - hash: Compute the segment size correctly for ISA 3.0 from Aneesh Kumar K.V - nohash: Fix build break with 64K pages from Michael Ellerman * tag 'powerpc-4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/nohash: Fix build break with 64K pages powerpc/mm/hash: Compute the segment size correctly for ISA 3.0 powerpc/mm/radix: Fix always false comparison against MMU_NO_CONTEXT of: fix autoloading due to broken modalias with no 'compatible' powerpc/pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET since POWER8NVL was added powerpc/pseries: Fix PCI config address for DDW powerpc/ptrace: Fix out of bounds array access warning commit c8f17d60645cc38cbe5f6e2b2f93370483b28895 Merge: f5364c1 38bab98 Author: Linus Torvalds Date: Fri Jun 10 12:18:34 2016 -0700 Merge tag 'hwmon-for-linus-v4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - fix regression in fam15h_power driver - minor variable type fix in lm90 driver - document compatible statement for ina2xx driver * tag 'hwmon-for-linus-v4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (lm90) use proper type for update_interval hwmon: (ina2xx) Document compatible for INA231 hwmon: (fam15h_power) Disable preemption when reading registers commit f5364c150aa645b3d7daa21b5c0b9feaa1c9cd6d Merge: 33fc259 29d6455 Author: Linus Torvalds Date: Fri Jun 10 12:10:02 2016 -0700 Merge branch 'stacking-fixes' (vfs stacking fixes from Jann) Merge filesystem stacking fixes from Jann Horn. * emailed patches from Jann Horn : sched: panic on corrupted stack end ecryptfs: forbid opening files without mmap handler proc: prevent stacking filesystems on top commit 29d6455178a09e1dc340380c582b13356227e8df Author: Jann Horn Date: Wed Jun 1 11:55:07 2016 +0200 sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, caused by the overwritten CPU index in the thread_info). Just panic directly. Signed-off-by: Jann Horn Signed-off-by: Linus Torvalds kernel/sched/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2f36db71009304b3f0b95afacd8eba1f9f046b87 Author: Jann Horn Date: Wed Jun 1 11:55:06 2016 +0200 ecryptfs: forbid opening files without mmap handler This prevents users from triggering a stack overflow through a recursive invocation of pagefault handling that involves mapping procfs files into virtual memory. Signed-off-by: Jann Horn Acked-by: Tyler Hicks Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds fs/ecryptfs/kthread.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit e54ad7f1ee263ffa5a2de9c609d58dfa27b21cd9 Author: Jann Horn Date: Wed Jun 1 11:55:05 2016 +0200 proc: prevent stacking filesystems on top This prevents stacking filesystems (ecryptfs and overlayfs) from using procfs as lower filesystem. There is too much magic going on inside procfs, and there is no good reason to stack stuff on top of procfs. (For example, procfs does access checks in VFS open handlers, and ecryptfs by design calls open handlers from a kernel thread that doesn't drop privileges or so.) Signed-off-by: Jann Horn Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds fs/proc/root.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 33fc259a2053f89d6ea0f07f534079b58899d128 Merge: 75d089d 0106d45 Author: Linus Torvalds Date: Fri Jun 10 11:57:17 2016 -0700 Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 fix from Will Deacon: "A fix for an issue that Alex saw whilst swapping with hardware access/dirty bit support enabled in the kernel: Fix a failure to fault in old pages on a write when CONFIG_ARM64_HW_AFDBM is enabled" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: mm: always take dirty state from new pte in ptep_set_access_flags commit 75d089d12a66a8662d888ff60a9eaea230fed53e Merge: 60e3830 9d98bce Author: Linus Torvalds Date: Fri Jun 10 11:36:04 2016 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes from all around the map, plus a commit that introduces a new header of Intel model name symbols (unused) that will make the next merge window easier" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/ioapic: Fix incorrect pointers in ioapic_setup_resources() x86/entry/traps: Don't force in_interrupt() to return true in IST handlers x86/cpu/AMD: Extend X86_FEATURE_TOPOEXT workaround to newer models x86/cpu/intel: Introduce macros for Intel family numbers x86, build: copy ldlinux.c32 to image.iso x86/msr: Use the proper trace point conditional for writes commit 60e383037ba192d86fc0110b5b5a9a2013d83b13 Merge: 7fcbc23 4698f88 Author: Linus Torvalds Date: Fri Jun 10 11:24:39 2016 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Two scheduler debugging fixes" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/debug: Fix 'schedstats=enable' cmdline option sched/debug: Fix /proc/sched_debug regression commit 7fcbc230c6f0ee96d397e30d061ef4995879b835 Merge: 02b07bd 62a92c8 Author: Linus Torvalds Date: Fri Jun 10 11:15:41 2016 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf fixes from Ingo Molnar: "A handful of tooling fixes, two PMU driver fixes and a cleanup of redundant code that addresses a security analyzer false positive" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Remove a redundant check perf/x86/intel/uncore: Remove SBOX support for Broadwell server perf ctf: Convert invalid chars in a string before set value perf record: Fix crash when kptr is restricted perf symbols: Check kptr_restrict for root perf/x86/intel/rapl: Fix pmus free during cleanup commit 02b07bde619e179bf7ac0e073d28e2e038dfab77 Merge: 606c17f 077fa7a Author: Linus Torvalds Date: Fri Jun 10 10:53:46 2016 -0700 Merge branch 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking fixes from Ingo Molnar: "Misc fixes: - a file-based futex fix - one more spin_unlock_wait() fix - a ww-mutex deadlock detection improvement/fix - and a raw_read_seqcount_latch() barrier fix" * 'locking-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: futex: Calculate the futex key based on a tail page for file-based futexes locking/qspinlock: Fix spin_unlock_wait() some more locking/ww_mutex: Report recursive ww_mutex locking early locking/seqcount: Re-fix raw_read_seqcount_latch() commit 606c17f4e9b788ed9ce9d7849619498cc67b9072 Merge: 94fcad6 c753439 Author: Linus Torvalds Date: Fri Jun 10 10:47:22 2016 -0700 Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI fixes from Ingo Molnar: "Two fixes: a regression/crash fix, and a message output fix" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: efi/arm: Fix the format of EFI debug messages efi: Fix for_each_efi_memory_desc_in_map() for empty memmaps commit 94fcad6932e5eec50b3e5d82c5ce53bca11a2fa2 Merge: 698ea54 0b0d81e Author: Linus Torvalds Date: Fri Jun 10 10:37:01 2016 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool fix from Ingo Molnar: "Addresses a false positive warning in the GPU/DRM code" [ Technically it's not a "false positive", but it's the virtual GPU interface that needs the frame pointer for its own internal purposes ] * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool, drm/vmwgfx: Fix "duplicate frame pointer save" warning commit ba65dc5ef16f82fba77869cecf7a7d515f61446b Author: Al Viro Date: Fri Jun 10 11:32:47 2016 -0400 much milder d_walk() race d_walk() relies upon the tree not getting rearranged under it without rename_lock being touched. And we do grab rename_lock around the places that change the tree topology. Unfortunately, branch reordering is just as bad from d_walk() POV and we have two places that do it without touching rename_lock - one in handling of cursors (for ramfs-style directories) and another in autofs. autofs one is a separate story; this commit deals with the cursors. * mark cursor dentries explicitly at allocation time * make __dentry_kill() leave ->d_child.next pointing to the next non-cursor sibling, making sure that it won't be moved around unnoticed before the parent is relocked on ascend-to-parent path in d_walk(). * make d_walk() skip cursors explicitly; strictly speaking it's not necessary (all callbacks we pass to d_walk() are no-ops on cursors), but it makes analysis easier. Signed-off-by: Al Viro fs/dcache.c | 58 ++++++++++++++++++++++++++++++++++++++++++++------ fs/internal.h | 1 + fs/libfs.c | 4 +--- include/linux/dcache.h | 1 + 4 files changed, 55 insertions(+), 9 deletions(-) commit 698ea54dde6768d4a96080d0fb796cb3a4eadaf8 Merge: 729d378 5021953 Author: Linus Torvalds Date: Fri Jun 10 08:32:24 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) nfnetlink timestamp taken from wrong skb, fix from Florian Westphal. 2) Revert some msleep conversions in rtlwifi as these spots are in atomic context, from Larry Finger. 3) Validate that NFTA_SET_TABLE attribute is actually specified when we call nf_tables_getset(). From Phil Turnbull. 4) Don't do mdio_reset in stmmac driver with spinlock held as that can sleep, from Vincent Palatin. 5) sk_filter() does things other than run a BPF filter, so we should not elide it's call just because sk->sk_filter is NULL. Fix from Eric Dumazet. 6) Fix missing backlog updates in several packet schedulers, from Cong Wang. 7) bnx2x driver should allow VLAN add/remove while the interface is down, from Michal Schmidt. 8) Several RDS/TCP race fixes from Sowmini Varadhan. 9) fq_codel scheduler doesn't return correct queue length in dumps, from Eric Dumazet. 10) Fix TCP stats for tail loss probe and early retransmit in ipv6, from Yuchung Cheng. 11) Properly initialize udp_tunnel_socket_cfg in l2tp_tunnel_create(), from Guillaume Nault. 12) qfq scheduler leaks SKBs if a kzalloc fails, fix from Florian Westphal. 13) sock_fprog passed into PACKET_FANOUT_DATA needs compat handling, from Willem de Bruijn. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (85 commits) vmxnet3: segCnt can be 1 for LRO packets packet: compat support for sock_fprog stmmac: fix parameter to dwmac4_set_umac_addr() net/mlx5e: Fix blue flame quota logic net/mlx5e: Use ndo_stop explicitly at shutdown flow net/mlx5: E-Switch, always set mc_promisc for allmulti vports net/mlx5: E-Switch, Modify node guid on vf set MAC net/mlx5: E-Switch, Fix vport enable flow net/mlx5: E-Switch, Use the correct error check on returned pointers net/mlx5: E-Switch, Use the correct free() function net/mlx5: Fix E-Switch flow steering capabilities check net/mlx5: Fix flow steering NIC capabilities check net/mlx5: Fix root flow table update net/mlx5: Fix MLX5_CMD_OP_MAX to be defined correctly net/mlx5: Fix masking of reserved bits in XRCD number net/mlx5: Fix the size of modify QP mailbox mlxsw: spectrum: Don't sleep during ndo_get_phys_port_name() mlxsw: spectrum: Make split flow match firmware requirements wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel cfg80211: remove get/set antenna and tx power warnings ... commit 729d378479ddb7aeafe762f59a5fc1eb79c61d7a Merge: 00da900 35639a0e Author: Linus Torvalds Date: Fri Jun 10 08:27:30 2016 -0700 Merge tag 'sound-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound fixes from Takashi Iwai: "We have only few, mainly HD-audio device-specific fixes. Realtek codec driver got a slightly more LOC, but they are all for the new codec chip, and won't affect others at all" * tag 'sound-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: ALSA: hda - Add PCI ID for Kabylake ALSA: hda/realtek: Add T560 docking unit fixup ALSA: hda - Fix headset mic detection problem for Dell machine ALSA: uapi: Add three missing header files to Kbuild file ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703 ALSA: hda/realtek - ALC256 speaker noise issue commit 00da90085e84f4cee316c196041d76ce5fba677f Merge: f758bbd 7ff6977 Author: Linus Torvalds Date: Fri Jun 10 08:21:06 2016 -0700 Merge tag 'drm-fixes-for-v4.7-rc3' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "This weeks instalment of fixes: amdgpu: Lots of memory leak and firmware leak fixes nouveau: Collection of display fixes, KASAN fixes vc4: vblank/pageflipping fixes fsl-dcu: Regmap cache fix omap: Unused variable warning fix. Nothing too surprising so far" * tag 'drm-fixes-for-v4.7-rc3' of git://people.freedesktop.org/~airlied/linux: (46 commits) drm/amdgpu: fix warning with powerplay disabled. drm/amd/powerplay: delete useless code as pptable changed in vbios. drm/amd/powerplay: fix bug visit array out of bounds drm/amdgpu: fix smu ucode memleak (v2) drm/amdgpu: add release firmware for cgs drm/amdgpu: fix tonga smu_fini mem leak drm/amdgpu: fix fiji smu fini mem leak drm/amdgpu: fix cik sdma ucode memleak drm/amdgpu: fix sdma24 ucode mem leak drm/amdgpu: fix sdma3 ucode mem leak drm/amdgpu: fix uvd fini mem leak drm/amdgpu: fix gfx 7 ucode mem leak drm/amdgpu: fix gfx8 ucode mem leak drm/amdgpu: fix missing free wb for cond_exec drm/amdgpu: fix memleak in pptable_init drm/amdgpu: fix mem leak in atombios drm/amdgpu: fix mem leak in pplib/hwmgr drm/amdgpu: fix mem leak in smumgr drm/amdgpu: add pipeline sync while vmid switch in same ctx drm/amdgpu: vBIOS post only call when mem_size zero ... commit f758bbd470723b306a01bc3655ef77f888aa3c99 Merge: 524a3f2 bd6ac2a Author: Linus Torvalds Date: Fri Jun 10 08:15:37 2016 -0700 Merge tag 'acpi-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "A recently introduced boot regression related to the ACPI EC initialization is addressed by restoring the previous behavior (Lv Zheng)" * tag 'acpi-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / EC: Fix a boot EC regresion by restoring boot EC support for the DSDT EC commit 524a3f2ca284831262fcf5e4ca145ef32f4b282d Merge: 9557c3c 3681196 Author: Linus Torvalds Date: Fri Jun 10 08:09:12 2016 -0700 Merge tag 'pm-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Stable-candidate fixes for the intel_pstate driver and the cpuidle core. Specifics: - Fix two intel_pstate initialization issues, one of which was introduced during the 4.4 cycle (Srinivas Pandruvada) - Fix kernel build with CONFIG_UBSAN set and CONFIG_CPU_IDLE unset (Catalin Marinas)" * tag 'pm-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: intel_pstate: Fix ->set_policy() interface for no_turbo cpufreq: intel_pstate: Fix code ordering in intel_pstate_set_policy() cpuidle: Do not access cpuidle_devices when !CONFIG_CPU_IDLE commit 9557c3cfdaa792c7db04b86f47b5dd1e6dc5ec4f Merge: 147d9e7 18aba41 Author: Linus Torvalds Date: Fri Jun 10 08:00:47 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc fixes from Andrew Morton: "7 fixes" * emailed patches from Andrew Morton : mm/fadvise.c: do not discard partial pages with POSIX_FADV_DONTNEED mm: introduce dedicated WQ_MEM_RECLAIM workqueue to do lru_add_drain_all kernel/relay.c: fix potential memory leak mm: thp: broken page count after commit aa88b68c3b1d revert "mm: memcontrol: fix possible css ref leak on oom" kasan: change memory hot-add error messages to info messages mm/hugetlb: fix huge page reserve accounting for private mappings commit 9d98bcec731756b8688b59ec998707924d716d7b Author: Rui Wang Date: Wed Jun 8 14:59:52 2016 +0800 x86/ioapic: Fix incorrect pointers in ioapic_setup_resources() On a 4-socket Brickland system, hot-removing one ioapic is fine. Hot-removing the 2nd one causes panic in mp_unregister_ioapic() while calling release_resource(). It is because the iomem_res pointer has already been released when removing the first ioapic. To explain the use of &res[num] here: res is assigned to ioapic_resources, and later in ioapic_insert_resources() we do: struct resource *r = ioapic_resources; for_each_ioapic(i) { insert_resource(&iomem_resource, r); r++; } Here 'r' is treated as an arry of 'struct resource', and the r++ ensures that each element of the array is inserted separately. Thus we should call release_resouce() on each element at &res[num]. Fix it by assigning the correct pointers to ioapics[i].iomem_res in ioapic_setup_resources(). Signed-off-by: Rui Wang Signed-off-by: Thomas Gleixner Cc: tony.luck@intel.com Cc: linux-pci@vger.kernel.org Cc: rjw@rjwysocki.net Cc: linux-acpi@vger.kernel.org Cc: bhelgaas@google.com Link: http://lkml.kernel.org/r/1465369193-4816-3-git-send-email-rui.y.wang@intel.com Signed-off-by: Ingo Molnar arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe5aa34d6eb9c4d34071845f70f3714b41c8a77d Author: Ryo Kodama Date: Wed Jun 8 10:58:23 2016 +0900 pwm: sysfs: Get return value from pwm_apply_state() This patch adds to check the return value from pwm_apply_state() used in enable_store(). The error of enable_store() doesn't work if the return value doesn't received. Signed-off-by: Ryo Kodama Signed-off-by: Yoshihiro Shimoda Fixes: 39100ceea79f ("pwm: Switch to the atomic API") Signed-off-by: Thierry Reding drivers/pwm/sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef2bf4997f7da6efa8540d9cf726c44bf2b863af Author: Brian Norris Date: Fri May 27 09:45:49 2016 -0700 pwm: Improve args checking in pwm_apply_state() It seems like in the process of refactoring pwm_config() to utilize the newly-introduced pwm_apply_state() API, some args/bounds checking was dropped. In particular, I noted that we are now allowing invalid period selections, e.g.: # echo 1 > /sys/class/pwm/pwmchip0/export # cat /sys/class/pwm/pwmchip0/pwm1/period 100 # echo 101 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle [... driver may or may not reject the value, or trigger some logic bug ...] It's better to see: # echo 1 > /sys/class/pwm/pwmchip0/export # cat /sys/class/pwm/pwmchip0/pwm1/period 100 # echo 101 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle -bash: echo: write error: Invalid argument This patch reintroduces some bounds checks in both pwm_config() (for its signed parameters; we don't want to convert negative values into large unsigned values) and in pwm_apply_state() (which fix the above described behavior, as well as other potential API misuses). Fixes: 5ec803edcb70 ("pwm: Add core infrastructure to allow atomic updates") Signed-off-by: Brian Norris Acked-by: Boris Brezillon Signed-off-by: Thierry Reding drivers/pwm/core.c | 3 ++- include/linux/pwm.h | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) commit aaee8c3c5cce2d9107310dd9f3026b4f901d441c Author: Andy Lutomirski Date: Tue May 24 15:54:04 2016 -0700 x86/entry/traps: Don't force in_interrupt() to return true in IST handlers Forcing in_interrupt() to return true if we're not in a bona fide interrupt confuses the softirq code. This fixes warnings like: NOHZ: local_softirq_pending 282 ... which can happen when running things like selftests/x86. This will change perf's static percpu buffer usage in IST context. I think this is okay, and it's changing the behavior to match historical (pre-4.0) behavior. Signed-off-by: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: stable@vger.kernel.org Fixes: 959274753857 ("x86, traps: Track entry into and exit from IST context") Link: http://lkml.kernel.org/r/cdc215f94d118d691d73df35275022331156fb45.1464130360.git.luto@kernel.org Signed-off-by: Ingo Molnar arch/x86/kernel/traps.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 280a3efa82fccc9532c968a77e5162cb9f0af497 Author: Johannes Berg Date: Tue Jun 7 14:46:37 2016 +0200 iwlwifi: mvm: fix a few firmware capability checks My cleanup in "iwlwifi: prepare for higher API/CAPA bits" accidentally inverted a few tests - fix them. Fixes: 859d914c8f5c ("iwlwifi: prepare for higher API/CAPA bits") Reported-by: Sara Sharon Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit aa950524d501afa28869b7f56e539fd9e744dd9f Author: Ayala Beker Date: Wed Jun 1 00:28:09 2016 +0300 iwlwifi: mvm: set the encryption type of an IGTK key The FW expect the driver to set the encryption algorithm type when installing the IGTK key in the HW. Currently when installing CMAC IGTK key we don't set the algorithm type and as a result the FW fails to calculate the MIC of multicast management frames. Fix it. Signed-off-by: Ayala Beker Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 1f9788f335d7c3145bcb59bd570c5b9ef7203ef4 Author: Luca Coelho Date: Mon May 16 14:34:20 2016 +0300 iwlwifi: mvm: fix potential NULL-dereference in iwl_mvm_reorder() We try to access sta before we check for IS_ERR_OR_NULL(), so we may end up accessing a NULL pointer. To prevent that, move the conversion from sta to mvm_sta below the check. Fixes: b915c10174fb ("iwlwifi: mvm: add reorder buffer per queue") Reported-by: Dan Carpenter Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 7d6a1ab6a2db180122dee8db6c201f2dcf677813 Author: Emmanuel Grumbach Date: Sun May 15 10:20:29 2016 +0300 iwlwifi: mvm: fix RCU splat in TKIP's update_key The commit below mistakenly changed an rcu_dereference_check to a rcu_dereference_protected which introduced the following RCU warning: [ INFO: suspicious RCU usage. ] 4.6.0-rc7-next-20160513-dbg-00004-g8de8b92-dirty #655 Not tainted ------------------------------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h:1069 suspicious rcu_dereference_protected() usage! Call Trace: [] lockdep_rcu_suspicious+0xf7/0x100 [] iwl_mvm_get_key_sta.part.0+0x5d/0x80 [iwlmvm] [] iwl_mvm_update_tkip_key+0xd3/0x162 [iwlmvm] [] iwl_mvm_mac_update_tkip_key+0x17/0x19 [iwlmvm] [] ieee80211_tkip_decrypt_data+0x22c/0x24b [mac80211] [] ieee80211_crypto_tkip_decrypt+0xc5/0x110 [mac80211] [] ieee80211_rx_handlers+0x9bb/0x1fe1 [mac80211] Fixes: 13303c0fb148 ("iwlwifi: mvm: use helpers to get iwl_mvm_sta") Reported-by: Sergey Senozhatsky Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 06a84db74c3572cde79eb1b04f301399eafb8226 Author: Luca Coelho Date: Mon May 2 15:27:34 2016 +0300 iwlwifi: mvm: increase scan timeout to 20 seconds The 16 seconds timeout we were using turned out to be too short. Recalculations by system show that the total time in both bands should be < 18.5 seconds, even in the slowest cases (e.g. DCM P2P with DTIM=2). Rounding it up to 20 seconds for a bit more safety. Fixes: 728e825f81b1 ("iwlwifi: mvm: add a scan timeout for regular scans") Signed-off-by: Luca Coelho drivers/net/wireless/intel/iwlwifi/mvm/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 07ea0b4d9a0abde8d252738079a8a811c5132a94 Author: Maxime Ripard Date: Sat Apr 2 12:28:31 2016 +0200 clk: sunxi: display: Add per-clock flags The TCON channel 0 clock that is the parent clock of our pixel clock is expected to change its rate depending on the resolution we want to output in our display engine. However, since it's only a mux, the only way it can do that is by changing its parents rate. Allow to give flags in our display clocks description, and add the CLK_SET_RATE_PARENT flag for the TCON channel 0 flag. Fixes: a3b4956ee6d9 ("clk: sunxi: display: Add per-clock flags") Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi/clk-sun4i-display.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 4de2d58bc973caa8988b44ddd11787e57051c843 Author: Maxime Ripard Date: Wed May 11 20:57:44 2016 +0200 clk: sunxi: tcon-ch1: Do not return a negative error in get_parent get_parent is supposed to return an unsigned 8 bit integer, so returning -EINVAL is a bad idea. Remove it. Reported-by: Dan Carpenter Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard drivers/clk/sunxi/clk-sun4i-tcon-ch1.c | 3 --- 1 file changed, 3 deletions(-) commit 9ec6de19235889ab0118e970ee732cb33c9efc06 Author: Alexander Yarygin Date: Fri May 6 16:33:06 2016 +0300 KVM: s390: Add stats for PEI events Add partial execution intercepted events in kvm_stats_debugfs. Signed-off-by: Alexander Yarygin Acked-by: Cornelia Huck Reviewed-by: David Hildenbrand Signed-off-by: Christian Borntraeger arch/s390/include/asm/kvm_host.h | 1 + arch/s390/kvm/intercept.c | 2 ++ arch/s390/kvm/kvm-s390.c | 1 + 3 files changed, 4 insertions(+) commit 0487c44d1e1070b636ba3f3a12494ec456c2d005 Author: David Hildenbrand Date: Fri Jun 10 09:22:31 2016 +0200 KVM: s390: ignore IBC if zero Looks like we forgot about the special IBC value of 0 meaning "no IBC". Let's fix that, otherwise it gets rounded up and suddenly an IBC is active with the lowest possible machine. Signed-off-by: David Hildenbrand Reviewed-by: Cornelia Huck Fixes: commit 053dd2308d81 ("KVM: s390: force ibc into valid range") Signed-off-by: Christian Borntraeger arch/s390/kvm/kvm-s390.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 356d27bbfe332de0f2f78e55636e581960c9774e Author: Ville Syrjälä Date: Tue May 31 12:08:34 2016 +0300 drm/i915: Extract physical display dimensions from VBT The VBT has these mysterious H/V image sizes as part of the display timings. Looking at some dumps those appear to be the physical dimensions in mm. Which makes sense since the timing descriptor matches the format used by EDID detailed timing descriptor, which defines these as "H/V Addressable Video Image Size in mm". So let's use that information from the panel fixed mode to get the physical dimensions for LVDS/eDP/DSI displays. And with that we can fill out the display_info so that userspace can get at it via GetConnector. v2: Use (hi<<8)|lo instead of broken (hi<<4)+lo Handle LVDS and eDP too Cc: Stephen Just Tested-by: Stephen Just Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96255 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1464685714-30507-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Mika Kahola (cherry picked from commit df457245b5b7515cf97763ebd8975229e34d4cf3) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_bios.c | 5 +++++ drivers/gpu/drm/i915/intel_dp.c | 5 ++++- drivers/gpu/drm/i915/intel_dsi.c | 3 +++ drivers/gpu/drm/i915/intel_lvds.c | 2 ++ drivers/gpu/drm/i915/intel_vbt_defs.h | 7 ++++--- 5 files changed, 18 insertions(+), 4 deletions(-) commit a5aac5ab876ad95b7f5e8d862afb07248ee9cae2 Author: Ville Syrjälä Date: Fri Jun 3 12:17:43 2016 +0300 drm/i915: Check VBT for port presence in addition to the strap on VLV/CHV Apparently some CHV boards failed to hook up the port presence straps for HDMI ports as well (earlier we assumed this problem only affected eDP ports). So let's check the VBT in addition to the strap, and if either one claims that the port is present go ahead and register the relevant connector. While at it, change port D to register DP before HDMI as we do for ports B and C since commit 457c52d87e5d ("drm/i915: Only ignore eDP ports that are connected") Also print a debug message when we register a HDMI connector to aid in diagnosing missing/incorrect ports. We already had such a print for DP/eDP. v2: Improve the comment in the code a bit, note the port D change in the commit message Cc: Radoslav Duda Tested-by: Radoslav Duda Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96321 Signed-off-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1464945463-14364-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson (cherry picked from commit 22f35042593c2b369861f0b9740efb8065a42db0) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_bios.c | 39 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_display.c | 30 ++++++++++++++++++--------- drivers/gpu/drm/i915/intel_hdmi.c | 3 +++ 4 files changed, 64 insertions(+), 9 deletions(-) commit fff7660d1e4f47dc6372ce2bd31a7b8cba0da340 Author: Chris Wilson Date: Wed Jun 1 08:27:50 2016 +0100 drm/i915: Only ignore eDP ports that are connected If the VBT says that a certain port should be eDP (and hence fused off from HDMI), but in reality it isn't, we need to try and acquire the HDMI connection instead. So only trust the VBT edp setting if we can connect to an eDP device on that port. Fixes: d2182a6608 (drm/i915: Don't register HDMI connectors for eDP ports on VLV/CHV) References: https://bugs.freedesktop.org/show_bug.cgi?id=96288 Signed-off-by: Chris Wilson Tested-by: Phidias Chiang Cc: Ville Syrjälä Cc: Jani Nikula Cc: Daniel Vetter Reviewed-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1464766070-31623-1-git-send-email-chris@chris-wilson.co.uk (cherry picked from commit 457c52d87e5dac9a4cf1a6a287e60ea7645067d4) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_display.c | 20 ++++++++++---------- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++------- drivers/gpu/drm/i915/intel_drv.h | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-) commit 36a5fc5c439c7a95cb9b64414fad4067da6ae3ce Author: Chris Wilson Date: Wed Jun 1 18:08:43 2016 +0100 drm/i915: Silence "unexpected child device config size" for VBT on 845g My old 845g complains that the child_device_size inside its VBT, version 110, is incorrect. Let's fiddle with the version matching such that it works with this VBT (i.e. treat BIOS v110 as having the same size as v108). Fixes [drm:intel_bios_init] *ERROR* Unexpected child device config size 27 (expected 33 for VBT version 110) Whether this is correct, no one knows - but it works for this particular machine. Signed-off-by: Chris Wilson Acked-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1464800923-6054-1-git-send-email-chris@chris-wilson.co.uk (cherry picked from commit fa05178c5dc3d1a3ad370f101cad01cf9dd3bbf9) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_bios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50219538ffc0493a2b451a3aa0191138ef8bfe9d Author: Shrikrishna Khare Date: Wed Jun 8 07:40:53 2016 -0700 vmxnet3: segCnt can be 1 for LRO packets The device emulation may send segCnt of 1 for LRO packets. Signed-off-by: Shrikrishna Khare Signed-off-by: Jin Heo Signed-off-by: David S. Miller drivers/net/vmxnet3/vmxnet3_drv.c | 2 +- drivers/net/vmxnet3/vmxnet3_int.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 719c44d340beeecd22cbda91b00ef55585b3c1a0 Author: Willem de Bruijn Date: Tue Jun 7 12:06:34 2016 -0400 packet: compat support for sock_fprog Socket option PACKET_FANOUT_DATA takes a struct sock_fprog as argument if PACKET_FANOUT has mode PACKET_FANOUT_CBPF. This structure contains a pointer into user memory. If userland is 32-bit and kernel is 64-bit the two disagree about the layout of struct sock_fprog. Add compat setsockopt support to convert a 32-bit compat_sock_fprog to a 64-bit sock_fprog. This is analogous to compat_sock_fprog support for SO_REUSEPORT added in commit 1957598840f4 ("soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF"). Reported-by: Daniel Borkmann Signed-off-by: Willem de Bruijn Acked-by: Daniel Borkmann Signed-off-by: David S. Miller include/net/compat.h | 1 + net/compat.c | 17 +++++++++++++++-- net/packet/af_packet.c | 25 +++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) commit ca8bdaf13abbdcbb12ff12164aa2d5b522ec524d Author: Ben Dooks Date: Wed Jun 8 19:21:17 2016 +0100 stmmac: fix parameter to dwmac4_set_umac_addr() The dwmac4_set_umac_addr() takes a struct mac_device_info as the first parameter, but is being passed a ioaddr instead from dwmac4_set_filter(). Fix the warning/bug by changing the first parameter. drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46: warning: incorrect type in argument 1 (different address spaces) drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46: expected struct mac_device_info *hw drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:159:46: got void [noderef] *ioaddr Note, only compile tested this as do not have any hardware with it in. Signed-off-by: Ben Dooks Acked-by: Giuseppe Cavallaro Signed-off-by: David S. Miller drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 143aaef8aae2b53a5ab2d0e9d48c4ff368e82b16 Author: Ander Conselvan de Oliveira Date: Fri May 20 15:47:06 2016 +0300 drm/i915: Fix NULL pointer deference when out of PLLs in IVB In commit f9476a6c6d0c ("drm/i915: Refactor platform specifics out of intel_get_shared_dpll()"), the ibx_get_dpll() function lacked an error check, that can lead to a NULL pointer dereference when trying to enable three pipes. BUG: unable to handle kernel NULL pointer dereference at 0000000000000068 IP: [] intel_reference_shared_dpll+0x15/0x100 [i915] PGD cec87067 PUD d30ce067 PMD 0 Oops: 0000 [#1] PREEMPT SMP Modules linked in: snd_hda_intel i915 drm_kms_helper drm intel_gtt sch_fq_codel cfg80211 binfmt_misc i2c_algo_bit cfbfillrect syscopyarea cfbimgblt sysfillrect sysimgblt fb_sys_fops cfbcopyarea intel_rapl iosf_mbi x86_pkg_temp_thermal coretemp agpgart kvm_intel snd_hda_codec_hdmi kvm iTCO_wdt snd_hda_codec_realtek snd_hda_codec_generic irqbypass aesni_intel aes_x86_64 glue_helper lrw gf128mul ablk_helper cryptd psmouse pcspkr snd_hda_codec i2c_i801 snd_hwdep snd_hda_core snd_pcm snd_timer lpc_ich mfd_core snd soundcore wmi evdev tpm_tis tpm [last unloaded: drm] CPU: 3 PID: 5810 Comm: kms_flip Tainted: G U W 4.6.0-test+ #3 Hardware name: /DZ77BH-55K, BIOS BHZ7710H.86A.0100.2013.0517.0942 05/17/2013 task: ffff8800d3908040 ti: ffff8801166c8000 task.ti: ffff8801166c8000 RIP: 0010:[] [] intel_reference_shared_dpll+0x15/0x100 [i915] RSP: 0018:ffff8801166cba60 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000002 RDX: 0000000000000001 RSI: ffff8800d07f1bf8 RDI: 0000000000000000 RBP: ffff8801166cba88 R08: 0000000000000002 R09: ffff8800d32e5698 R10: 0000000000000001 R11: ffff8800cc89ac88 R12: ffff8800d07f1bf8 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 FS: 00007f4c3fc8d8c0(0000) GS:ffff88011bcc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000068 CR3: 00000000d3b4c000 CR4: 00000000001406e0 Stack: 0000000000000000 ffff8800d07f1bf8 0000000000000000 ffff8800d04c0000 0000000000000000 ffff8801166cbaa8 ffffffffa04823a7 ffff8800d07f1bf8 ffff8800d32e5698 ffff8801166cbab8 ffffffffa04840cf ffff8801166cbaf0 Call Trace: [] ibx_get_dpll+0x47/0xa0 [i915] [] intel_get_shared_dpll+0x1f/0x50 [i915] [] ironlake_crtc_compute_clock+0x280/0x430 [i915] [] intel_crtc_atomic_check+0x240/0x320 [i915] [] drm_atomic_helper_check_planes+0x14e/0x1d0 [drm_kms_helper] [] intel_atomic_check+0x5dc/0x1110 [i915] [] drm_atomic_check_only+0x14a/0x660 [drm] [] ? drm_atomic_set_crtc_for_connector+0x96/0x100 [drm] [] drm_atomic_commit+0x17/0x60 [drm] [] restore_fbdev_mode+0x237/0x260 [drm_kms_helper] [] ? drm_modeset_lock_all_ctx+0x9a/0xb0 [drm] [] drm_fb_helper_restore_fbdev_mode_unlocked+0x33/0x80 [drm_kms_helper] [] drm_fb_helper_set_par+0x2d/0x50 [drm_kms_helper] [] drm_fb_helper_hotplug_event+0xaa/0xf0 [drm_kms_helper] [] drm_fb_helper_restore_fbdev_mode_unlocked+0x56/0x80 [drm_kms_helper] [] intel_fbdev_restore_mode+0x22/0x80 [i915] [] i915_driver_lastclose+0xe/0x20 [i915] [] drm_lastclose+0x2e/0x130 [drm] [] drm_release+0x2ac/0x4b0 [drm] [] __fput+0xed/0x1f0 [] ____fput+0xe/0x10 [] task_work_run+0x76/0xb0 [] do_exit+0x3ab/0xc60 [] ? trace_hardirqs_on_caller+0x12f/0x1c0 [] do_group_exit+0x4e/0xc0 [] SyS_exit_group+0x14/0x20 [] entry_SYSCALL_64_fastpath+0x18/0xa8 Code: 14 80 48 8d 34 90 b8 01 00 00 00 d3 e0 09 04 b3 5b 41 5c 5d c3 90 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 49 89 fe 41 55 41 54 53 <44> 8b 67 68 48 89 f3 48 8b be 08 02 00 00 4c 8b 2e e8 15 9d fd RIP [] intel_reference_shared_dpll+0x15/0x100 [i915] RSP CR2: 0000000000000068 Cc: Ville Syrjälä Cc: drm-intel-fixes@lists.freedesktop.org Reported-by: Ville Syrjälä Fixes: f9476a6c6d0c ("drm/i915: Refactor platform specifics out of intel_get_shared_dpll()") Signed-off-by: Ander Conselvan de Oliveira Reviewed-by: Ville Syrjälä Tested-by: Ville Syrjälä Link: http://patchwork.freedesktop.org/patch/msgid/1463748426-5956-1-git-send-email-ander.conselvan.de.oliveira@intel.com (cherry picked from commit bb143165510661feda06fd99298b8b3a94af3046) Signed-off-by: Jani Nikula drivers/gpu/drm/i915/intel_dpll_mgr.c | 3 +++ 1 file changed, 3 insertions(+) commit a145abf12c9f7d30d8c330c9d8a97428cbf0589b Author: Aneesh Kumar K.V Date: Wed Jun 8 19:55:51 2016 +0530 powerpc/mm/radix: Flush page walk cache when freeing page table Even though a tlb_flush() does a flush with invalidate all cache, we can end up doing an RCU page table free before calling tlb_flush(). That means we can have page walk cache entries even after we free the page table pages. This can result in us doing wrong page table walk. Avoid this by doing pwc flush on every page table free. We can't batch the pwc flush, because the rcu call back function where we free the page table pages doesn't have information of the mmu gather. Thus we have to do a pwc on every page table page freed. Note: I also removed the dummy tlb_flush_pgtable call functions for hash 32. Fixes: 1a472c9dba6b ("powerpc/mm/radix: Add tlbflush routines") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/include/asm/book3s/32/pgalloc.h | 1 - arch/powerpc/include/asm/book3s/64/pgalloc.h | 16 ++++++++- .../powerpc/include/asm/book3s/64/tlbflush-radix.h | 3 ++ arch/powerpc/include/asm/book3s/64/tlbflush.h | 14 ++++++++ arch/powerpc/include/asm/book3s/pgalloc.h | 5 --- arch/powerpc/mm/tlb-radix.c | 41 ++++++++++++++++++++++ 6 files changed, 73 insertions(+), 7 deletions(-) commit 36194812a4063dd2a72070aec3ee7890d135a587 Author: Aneesh Kumar K.V Date: Wed Jun 8 19:55:50 2016 +0530 powerpc/mm/radix: Update to tlb functions ric argument Radix invalidate control (RIC) is used to control which cache to flush using tlb instructions. When doing a PID flush, we currently flush everything including page walk cache. For address range flush, we flush only the TLB. In the next patch, we add support for flushing only the page walk cache. Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) commit 8618e6e79d10863a643101a5d1008d1536ce14b7 Merge: e71ba91 0ca00fc Author: David S. Miller Date: Thu Jun 9 22:06:27 2016 -0700 Merge branch 'mlx5-fixes' Saeed Mahameed says: ==================== Mellanox 100G mlx5 fixes for 4.7-rc The following series provides some small fixes for mlx5 driver. Two small fixes for the mlx5e netdev, the 1st is for the blue flame quota accounting and the 2nd is a small refactoring in shutdown flow. Five trivial fixes for mlx5 E-Switch. - Allmulti mc_promisc flag was not set in a specific flow. - Modify VF node guid when admin mac is changed. - Race in vport enable flow. - Misc code fixes (kvfree when needed and error pointers checking). Three in mlx5 steering area. Correct capabilities checking and root flow table update. Three misc fixes in mlx5 commands enum and layouts. ==================== Signed-off-by: David S. Miller commit 0ca00fc1f808602137dc6d51f17747b3bb0fc34d Author: Eli Cohen Date: Fri Jun 10 00:07:40 2016 +0300 net/mlx5e: Fix blue flame quota logic Blue flame is a latency enhancement feature that allows the driver to write the packet data directly to the NIC's registers thus making the read of the packet data from host memory redundant. We maintain a quota for the blue flame which is reloaded whenever we identify that the hardware is processing send requests and processes them fast enough so by the time we post the next send request it was able to process all the pending ones. This indicates that the hardware is capable of processing more blue flame requests efficiently. The blue flame quota is decremented whenever we send using blue flame. The current code erroneously clears the budget if we did not use blue flame for the current post send operation and we fix it here. Fixes: 88a85f99e51f ('net/mlx5e: TX latency optimization to save DMA reads') Signed-off-by: Eli Cohen Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 811afeaa3797bdf4eabed286100811b33005c9e0 Author: Eran Ben Elisha Date: Fri Jun 10 00:07:39 2016 +0300 net/mlx5e: Use ndo_stop explicitly at shutdown flow The current implementation copies the flow of ndo_stop instead of calling it explicitly, Fixed it. Fixes: 5fc7197d3a25 ("net/mlx5: Add pci shutdown callback") Signed-off-by: Eran Ben Elisha Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 62e3c24ac4f0ee307c41a3652636f88a3f8d165c Author: Mohamad Haj Yahia Date: Fri Jun 10 00:07:38 2016 +0300 net/mlx5: E-Switch, always set mc_promisc for allmulti vports Set the mc_promisc flag also in the case of adding new mc address to existing allmulti vport. Fixes: a35f71f27a61 ('net/mlx5: E-Switch, Implement promiscuous rx modes vf request handling') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 1 + 1 file changed, 1 insertion(+) commit 23898c763f4af6f5c80b0230b1ea788a0ce3cf73 Author: Noa Osherovich Date: Fri Jun 10 00:07:37 2016 +0300 net/mlx5: E-Switch, Modify node guid on vf set MAC In RoCE, the RDMA-CM needs the node guid to establish connection between nodes. Today, the node guid exposed to mlx5 Ethernet VFs is zero, therefore RDMA-CM on the VF is broken. Whenever the administrator sets a MAC for a VF, derive the node guid from it and set it as well in the following way: MAC: e4:1d:2d:b3:f4:01 -> node_guid: e4:1d:2d:ff:fe:b3:f4:01 Fixes: 77256579c6b43 ('net/mlx5: E-Switch, Introduce Vport...') Signed-off-by: Noa Osherovich Signed-off-by: Majd Dibbiny Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 23 ++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/vport.c | 38 +++++++++++++++++++++++ include/linux/mlx5/mlx5_ifc.h | 9 ++++-- include/linux/mlx5/vport.h | 2 ++ 4 files changed, 68 insertions(+), 4 deletions(-) commit 25fff58cb24c8880090d8b8ef7746001a135e876 Author: Mohamad Haj Yahia Date: Fri Jun 10 00:07:36 2016 +0300 net/mlx5: E-Switch, Fix vport enable flow Reorder vport enable flow to mark the vport as enabled before calling the vport change handler which was modified to handle the case for when vport is not enabled. This fixes the case for when the PF netdev is open before sriov is enabled, once sriov is enabled at esw_enable_vport, esw_vport_change_handle_locked didn't read the PF context since it thought the PF vport was not enabled. When we enable the vport, arming for events is not required anymore, since it's done on the vport change handle Fixes: 586cfa7f1d58 ('net/mlx5: E-Switch, Use vport event handler for vport cleanup') Signed-off-by: Mohamad Haj Yahia Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 3f42ac6648723e906c1c10edc0c523aff29963cc Author: Or Gerlitz Date: Fri Jun 10 00:07:35 2016 +0300 net/mlx5: E-Switch, Use the correct error check on returned pointers The mlx5 flow-steering API (mlx5_create_flow_table/group/rule) never returns null pointer on error. Even if it was doing that, checking for IS_ERR_OR_NULL(p) and then returning PTR_ERR(p) would have cause bugs, since PTR_ERR(NULL) --> success, crash. To make things more robust and protect against related future bugs, convert all IS_ERR_OR_NULL checks on returned values to IS_ERR. Fixes: 5742df0f7dbe ('net/mlx5: E-Switch, Introduce VST vport ingress/egress ACLs') Fixes: 86d722ad2c3b ('net/mlx5: Use flow steering infrastructure for mlx5_en') Signed-off-by: Or Gerlitz Reported-by: Ilya Lesokhin Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 34 +++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) commit 3fe3d819d5015d56d0d7289ae16db5e612640c5b Author: Or Gerlitz Date: Fri Jun 10 00:07:34 2016 +0300 net/mlx5: E-Switch, Use the correct free() function We must use kvfree() for something that could have been allocated with vzalloc(), do that. Fixes: 5742df0f7dbe ('net/mlx5: E-Switch, Introduce VST vport ingress/egress ACLs') Fixes: 86d722ad2c3b ('net/mlx5: Use flow steering infrastructure for mlx5_en') Signed-off-by: Or Gerlitz Reported-by: Ilya Lesokhin Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/eswitch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bd02ef8eec0b98abe6d5efe280c87903b2eb9874 Author: Maor Gottlieb Date: Fri Jun 10 00:07:33 2016 +0300 net/mlx5: Fix E-Switch flow steering capabilities check Add missing capabilities check for E-Switch FDB and ACLs flow tables before creating their namespace in flow steering. Fixes: efdc810ba39d ('net/mlx5: Flow steering, Add vport ACL support') Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 28 ++++++++++++----------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 876d634d19e41603aab91455f2c52a78a28372d5 Author: Maor Gottlieb Date: Fri Jun 10 00:07:32 2016 +0300 net/mlx5: Fix flow steering NIC capabilities check Flow steering infrastructure is currently used only on link layer ethernet, therefore the driver should initialize the flow steering when the device link layer is ethernet. In addition, add missing capability check before initializing the namespace of NIC RX flow tables. Fixes: 2530236303d9 ('net/mlx5_core: Flow steering tree initialization') Signed-off-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 10 +++++++++- include/linux/mlx5/device.h | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) commit 2fee37a47cebc26d58eec5dafc8ba787a6ee5350 Author: Maor Gottlieb Date: Fri Jun 10 00:07:31 2016 +0300 net/mlx5: Fix root flow table update When we destroy the last flow table we need to update the root_ft to NULL. It fixes an issue for when the last flow table is destroyed and recreated again, root_ft pointer will not be updated, as a result traffic will be dropped. Fixes: 2cc43b494a6c ('net/mlx5_core: Managing root flow table') Signed-off-by: Maor Gottlieb 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 86d56a1a6b7352542661d8a9463758c7f285fce3 Author: Shahar Klein Date: Fri Jun 10 00:07:30 2016 +0300 net/mlx5: Fix MLX5_CMD_OP_MAX to be defined correctly Having MLX5_CMD_OP_MAX on another file causes us to repeatedly miss accounting new commands added to the driver and hence there're no entries for them in debugfs. To solve that, we integrate it into the commands enum as the last entry. Fixes: 34a40e689393 ('net/mlx5_core: Introduce modify flow table command') Signed-off-by: Shahar Klein Signed-off-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller include/linux/mlx5/device.h | 2 -- include/linux/mlx5/mlx5_ifc.h | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) commit 9cd3411c42c5d5ba55d6e745edfe7df53c1ffa41 Author: Majd Dibbiny Date: Fri Jun 10 00:07:29 2016 +0300 net/mlx5: Fix masking of reserved bits in XRCD number Mask the reserved bits when reading the number of newly created XRCD. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Majd Dibbiny Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlx5/core/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 418f8399a8bedf376ec13eb01088f04a76ebdd6f Author: Majd Dibbiny Date: Fri Jun 10 00:07:28 2016 +0300 net/mlx5: Fix the size of modify QP mailbox Add 16 reserved bytes at the end of mlx5_modify_qp_mbox_in to match the hardware spec definition. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters') Signed-off-by: Majd Dibbiny Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller include/linux/mlx5/qp.h | 1 + 1 file changed, 1 insertion(+) commit 8017ea35d33f9e0950d369773ab48bcb1efb9ba0 Author: Michael Ellerman Date: Wed Jun 8 21:50:50 2016 +1000 powerpc/nohash: Fix build break with 64K pages Commit 74701d5947a6 "powerpc/mm: Rename function to indicate we are allocating fragments" renamed page_table_free() to pte_fragment_free(). One occurrence was mistyped as pte_fragment_fre(). This only breaks the nohash 64K page build, which is not the default or enabled in any defconfig. Fixes: 74701d5947a6 ("powerpc/mm: Rename function to indicate we are allocating fragments") Signed-off-by: Michael Ellerman arch/powerpc/include/asm/nohash/64/pgalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ff6977be8e3c7e6f5ae1ee56bc1535c5ca653b1 Merge: 29ccf75 ce492b3 Author: Dave Airlie Date: Fri Jun 10 12:17:46 2016 +1000 Merge branch 'fixes-for-v4.7-rc3' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-fixes * 'fixes-for-v4.7-rc3' of http://git.agner.ch/git/linux-drm-fsl-dcu: drm/fsl-dcu: use flat regmap cache commit 29ccf7590ec49647b3442b6b2c64c4406a931c80 Author: Dave Airlie Date: Fri Jun 10 11:40:49 2016 +1000 drm/amdgpu: fix warning with powerplay disabled. This just fixes a warning when you disable powerplay. Signed-off-by: Dave Airlie drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9cc4006155a68dd0940728f4f222dd035180904 Author: Doug Oucharek Date: Thu Jun 9 18:45:45 2016 -0400 staging: lustre: lnet: Don't access NULL NI on failure path In kiblnd_passive_connect(), if we are failing the connection attempt because we cannot find a valid NI (we have a NULL NI), we were coring after the "goto fail" because the failure path was assuming non-NULL NI. This patch ensures we don't dereference a NULL NI on that failure path. Signed-off-by: Doug Oucharek Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8022 Reviewed-on: http://review.whamcloud.com/19614 Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Matt Ezell Reviewed-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit fa6bcad781c165b8f3ec70f481dac48f1267da71 Merge: 166108a 5f96ddb Author: Dave Airlie Date: Fri Jun 10 09:46:59 2016 +1000 Merge branch 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-fixes Mostly memory leak and firmware leak fixes for amdgpu. A bit bigger than usual since this is several weeks worth of fixes. * 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux: (28 commits) drm/amd/powerplay: delete useless code as pptable changed in vbios. drm/amd/powerplay: fix bug visit array out of bounds drm/amdgpu: fix smu ucode memleak (v2) drm/amdgpu: add release firmware for cgs drm/amdgpu: fix tonga smu_fini mem leak drm/amdgpu: fix fiji smu fini mem leak drm/amdgpu: fix cik sdma ucode memleak drm/amdgpu: fix sdma24 ucode mem leak drm/amdgpu: fix sdma3 ucode mem leak drm/amdgpu: fix uvd fini mem leak drm/amdgpu: fix gfx 7 ucode mem leak drm/amdgpu: fix gfx8 ucode mem leak drm/amdgpu: fix missing free wb for cond_exec drm/amdgpu: fix memleak in pptable_init drm/amdgpu: fix mem leak in atombios drm/amdgpu: fix mem leak in pplib/hwmgr drm/amdgpu: fix mem leak in smumgr drm/amdgpu: add pipeline sync while vmid switch in same ctx drm/amdgpu: vBIOS post only call when mem_size zero drm/amdgpu: modify sdma start sequence ... commit 166108aa263013d3b9965793dcdc97f374ed73ac Merge: 170fba3 a9e26ca Author: Dave Airlie Date: Fri Jun 10 09:45:42 2016 +1000 Merge branch 'msm-fixes-4.7-rc3' of git://people.freedesktop.org/~robclark/linux into drm-fixes * 'msm-fixes-4.7-rc3' of git://people.freedesktop.org/~robclark/linux: drm/msm: fix potential submit error path issue drm/msm: fix some crashes in submit fail path drm/msm: deal with exhausted vmap space better commit 3681196ae568f97d534537c1c1102f4707ca11f9 Merge: af8c34c 983e600 9bd616e Author: Rafael J. Wysocki Date: Thu Jun 9 23:49:16 2016 +0200 Merge branches 'pm-cpufreq-fixes' and 'pm-cpuidle' * pm-cpufreq-fixes: cpufreq: intel_pstate: Fix ->set_policy() interface for no_turbo cpufreq: intel_pstate: Fix code ordering in intel_pstate_set_policy() * pm-cpuidle: cpuidle: Do not access cpuidle_devices when !CONFIG_CPU_IDLE commit bd6ac2abc9937eb7613aa194195fd98fe9312b38 Merge: af8c34c dcf15cb Author: Rafael J. Wysocki Date: Thu Jun 9 23:48:54 2016 +0200 Merge branch 'acpi-ec' * acpi-ec: ACPI / EC: Fix a boot EC regresion by restoring boot EC support for the DSDT EC commit 147d9e7bcad3b8d5465f6eea6292731e7f35dee8 Merge: 52e7d46 61c78eea Author: Linus Torvalds Date: Thu Jun 9 14:36:12 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma fixes from Doug Ledford: "This is the first -rc pull for the RDMA subsystem. The patch count is high, but they are all smallish patches fixing simple things for the most part, and the overall line count of changes here is smaller than the patch count would lead a person to believe. Code is up and running in my labs, including direct testing of cxgb4, mlx4, mlx5, ocrdma, and qib. Summary: - Multiple minor fixes to the rdma core - Multiple minor fixes to hfi1 - Multiple minor fixes to mlx5 - A very few other minor fixes (SRP, IPoIB, usNIC, mlx4)" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (35 commits) IB/IPoIB: Don't update neigh validity for unresolved entries IB/mlx5: Fix alternate path code IB/mlx5: Fix pkey_index length in the QP path record IB/mlx5: Fix entries check in mlx5_ib_resize_cq IB/mlx5: Fix entries checks in mlx5_ib_create_cq IB/mlx5: Check BlueFlame HCA support IB/mlx5: Fix returned values of query QP IB/mlx5: Limit query HCA clock IB/mlx5: Fix FW version diaplay in sysfs IB/mlx5: Return PORT_ERR in Active to Initializing tranisition IB/mlx5: Set flow steering capability bit IB/core: Make all casts in ib_device_cap_flags enum consistent IB/core: Fix bit curruption in ib_device_cap_flags structure IB/core: Initialize sysfs attributes before sysfs create group IB/IPoIB: Disable bottom half when dealing with device address IB/core: Fix removal of default GID cache entry IB/IPoIB: Fix race between ipoib_remove_one to sysfs functions IB/core: Fix query port failure in RoCE IB/core: fix error unwind in sysfs hw counters code IB/core: Fix array length allocation ... commit 52e7d46c642ae7762b44cc3203a816ebaa4b6b8b Merge: c8ae067 ed6aefe Author: Linus Torvalds Date: Thu Jun 9 14:28:39 2016 -0700 Merge tag 'arc-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC fixes from Vineet Gupta: - Revert of ll-sc backoff retry workaround in atomics/spinlocks as hardware is now proven to work just fine - Typo fixes (Thanks Andrea Gelmini) - Removal of obsolete DT property (Alexey) - Other minor fixes * tag 'arc-4.7-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: Revert "ARCv2: spinlock/rwlock/atomics: Delayed retry of failed SCOND with exponential backoff" Revert "ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle" Revert "ARCv2: spinlock/rwlock/atomics: reduce 1 instruction in exponential backoff" ARC: don't enable DISCONTIGMEM unconditionally ARC: [intc-compact] simplify code for 2 priority levels arc: Get rid of root core-frequency property Fix typos commit 18aba41cbfbcd138e9f6d8d446427d8b7691c194 Author: Oleg Drokin Date: Wed Jun 8 15:33:59 2016 -0700 mm/fadvise.c: do not discard partial pages with POSIX_FADV_DONTNEED I noticed that the logic in the fadvise64_64 syscall is incorrect for partial pages. While first page of the region is correctly skipped if it is partial, the last page of the region is mistakenly discarded. This leads to problems for applications that read data in non-page-aligned chunks discarding already processed data between the reads. A somewhat misguided application that does something like write(XX bytes (non-page-alligned)); drop the data it just wrote; repeat gets a significant penalty in performance as a result. Link: http://lkml.kernel.org/r/1464917140-1506698-1-git-send-email-green@linuxhacker.ru Signed-off-by: Oleg Drokin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/fadvise.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit f3a932baa7f65072434f1c04c02c8a4d2746fcfc Author: Wang Sheng-Hui Date: Wed Jun 8 15:33:56 2016 -0700 mm: introduce dedicated WQ_MEM_RECLAIM workqueue to do lru_add_drain_all This patch is based on https://patchwork.ozlabs.org/patch/574623/. Tejun submitted commit 23d11a58a9a6 ("workqueue: skip flush dependency checks for legacy workqueues") for the legacy create*_workqueue() interface. But some workq created by alloc_workqueue still reports warning on memory reclaim, e.g nvme_workq with flag WQ_MEM_RECLAIM set: workqueue: WQ_MEM_RECLAIM nvme:nvme_reset_work is flushing !WQ_MEM_RECLAIM events:lru_add_drain_per_cpu ------------[ cut here ]------------ WARNING: CPU: 0 PID: 6 at SoC/linux/kernel/workqueue.c:2448 check_flush_dependency+0xb4/0x10c ... check_flush_dependency+0xb4/0x10c flush_work+0x54/0x140 lru_add_drain_all+0x138/0x188 migrate_prep+0xc/0x18 alloc_contig_range+0xf4/0x350 cma_alloc+0xec/0x1e4 dma_alloc_from_contiguous+0x38/0x40 __dma_alloc+0x74/0x25c nvme_alloc_queue+0xcc/0x36c nvme_reset_work+0x5c4/0xda8 process_one_work+0x128/0x2ec worker_thread+0x58/0x434 kthread+0xd4/0xe8 ret_from_fork+0x10/0x50 That's because lru_add_drain_all() will schedule the drain work on system_wq, whose flag is set to 0, !WQ_MEM_RECLAIM. Introduce a dedicated WQ_MEM_RECLAIM workqueue to do lru_add_drain_all(), aiding in getting memory freed. Link: http://lkml.kernel.org/r/1464917521-9775-1-git-send-email-shhuiw@foxmail.com Signed-off-by: Wang Sheng-Hui Acked-by: Tejun Heo Cc: Keith Busch Cc: Peter Zijlstra Cc: Thierry Reding Cc: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit ba62bafe942b159a6109cbec780d36496e06b6c5 Author: Zhouyi Zhou Date: Wed Jun 8 15:33:53 2016 -0700 kernel/relay.c: fix potential memory leak When relay_open_buf() fails in relay_open(), code will goto free_bufs, but chan is nowhere freed. Link: http://lkml.kernel.org/r/1464777927-19675-1-git-send-email-yizhouzhou@ict.ac.cn Signed-off-by: Zhouyi Zhou Cc: Jens Axboe Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds kernel/relay.c | 1 + 1 file changed, 1 insertion(+) commit 770a5370226cb207461bbad902543381c1fad521 Author: Gerald Schaefer Date: Wed Jun 8 15:33:50 2016 -0700 mm: thp: broken page count after commit aa88b68c3b1d Christian Borntraeger reported a kernel panic after corrupt page counts, and it turned out to be a regression introduced with commit aa88b68c3b1d ("thp: keep huge zero page pinned until tlb flush"), at least on s390. put_huge_zero_page() was moved over from zap_huge_pmd() to release_pages(), and it was replaced by tlb_remove_page(). However, release_pages() might not always be triggered by (the arch-specific) tlb_remove_page(). On s390 we call free_page_and_swap_cache() from tlb_remove_page(), and not tlb_flush_mmu() -> free_pages_and_swap_cache() like the generic version, because we don't use the MMU-gather logic. Although both functions have very similar names, they are doing very unsimilar things, in particular free_page_xxx is just doing a put_page(), while free_pages_xxx calls release_pages(). This of course results in very harmful put_page()s on the huge zero page, on architectures where tlb_remove_page() is implemented in this way. It seems to affect only s390 and sh, but sh doesn't have THP support, so the problem (currently) probably only exists on s390. The following quick hack fixed the issue: Link: http://lkml.kernel.org/r/20160602172141.75c006a9@thinkpad Signed-off-by: Gerald Schaefer Reported-by: Christian Borntraeger Tested-by: Christian Borntraeger Cc: "Kirill A. Shutemov" Cc: Andrea Arcangeli Cc: "Aneesh Kumar K.V" Cc: Mel Gorman Cc: Hugh Dickins Cc: Johannes Weiner Cc: Dave Hansen Cc: Vlastimil Babka Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: [4.6.x] Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/swap_state.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit d0db7afa1b767d95e3e14632718da5a9794129bc Author: Andrew Morton Date: Wed Jun 8 15:33:47 2016 -0700 revert "mm: memcontrol: fix possible css ref leak on oom" Revert commit 1383399d7be0 ("mm: memcontrol: fix possible css ref leak on oom"). Johannes points out "There is a task_in_memcg_oom() check before calling mem_cgroup_oom()". Acked-by: Michal Hocko Cc: Johannes Weiner Cc: Vladimir Davydov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 91a4c272145652d798035c17e1c02c91001d3f51 Author: Shuah Khan Date: Wed Jun 8 15:33:45 2016 -0700 kasan: change memory hot-add error messages to info messages Change the following memory hot-add error messages to info messages. There is no need for these to be errors. kasan: WARNING: KASAN doesn't support memory hot-add kasan: Memory hot-add will be disabled Link: http://lkml.kernel.org/r/1464794430-5486-1-git-send-email-shuahkh@osg.samsung.com Signed-off-by: Shuah Khan Acked-by: Andrey Ryabinin Cc: Alexander Potapenko Cc: Dmitry Vyukov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/kasan/kasan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 67961f9db8c477026ea20ce05761bde6f8bf85b0 Author: Mike Kravetz Date: Wed Jun 8 15:33:42 2016 -0700 mm/hugetlb: fix huge page reserve accounting for private mappings When creating a private mapping of a hugetlbfs file, it is possible to unmap pages via ftruncate or fallocate hole punch. If subsequent faults repopulate these mappings, the reserve counts will go negative. This is because the code currently assumes all faults to private mappings will consume reserves. The problem can be recreated as follows: - mmap(MAP_PRIVATE) a file in hugetlbfs filesystem - write fault in pages in the mapping - fallocate(FALLOC_FL_PUNCH_HOLE) some pages in the mapping - write fault in pages in the hole This will result in negative huge page reserve counts and negative subpool usage counts for the hugetlbfs. Note that this can also be recreated with ftruncate, but fallocate is more straight forward. This patch modifies the routines vma_needs_reserves and vma_has_reserves to examine the reserve map associated with private mappings similar to that for shared mappings. However, the reserve map semantics for private and shared mappings are very different. This results in subtly different code that is explained in the comments. Link: http://lkml.kernel.org/r/1464720957-15698-1-git-send-email-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Hillf Danton Cc: Dave Hansen Cc: Kirill Shutemov Cc: Michal Hocko Cc: Naoya Horiguchi Cc: Aneesh Kumar Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/hugetlb.c | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) commit 9f05e6219023116b59f6495e8c4d4ba352dd5fea Author: Lukasz Gemborowski Date: Mon Jun 6 15:51:50 2016 +0200 i2c: mux: reg: Provide of_match_table of_match_table was not filled which prevents device to be instantiated from device tree node. Signed-off-by: Lukasz Gemborowski Reviewed-by: Alexander Sverdlin Signed-off-by: Wolfram Sang drivers/i2c/muxes/i2c-mux-reg.c | 1 + 1 file changed, 1 insertion(+) commit 2e9328493f89a5a06ea0ecb0b7763d61930a682a Author: Simon Horman Date: Wed Jun 8 15:21:39 2016 +0900 i2c: mux: refer to i2c-mux.txt Correct references to i2c-mux.txt which was previously mux.txt. Also correct the spelling of relevant. Signed-off-by: Simon Horman Acked-by: Peter Rosin Signed-off-by: Wolfram Sang Documentation/devicetree/bindings/i2c/i2c-arb-gpio-challenge.txt | 4 ++-- Documentation/devicetree/bindings/i2c/i2c-demux-pinctrl.txt | 3 ++- Documentation/devicetree/bindings/i2c/i2c-mux-gpio.txt | 6 +++--- Documentation/devicetree/bindings/i2c/i2c-mux-pinctrl.txt | 4 ++-- Documentation/devicetree/bindings/i2c/i2c-mux-reg.txt | 6 +++--- 5 files changed, 12 insertions(+), 11 deletions(-) commit edb50a5403d2e2d2b2b63a8365c4378c9c300ed6 Author: Johannes Thumshirn Date: Tue May 10 15:14:28 2016 +0200 NVMe: Only release requested regions The NVMe driver only requests the PCIe device's memory regions but releases all possible regions (including eventual I/O regions). This leads to a stale warning entry in dmesg about freeing non existent resources. Signed-off-by: Johannes Thumshirn Signed-off-by: Jens Axboe drivers/nvme/host/pci.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 8913f8d2930368f30998e60851259606eeed2c49 Author: Jan Glauber Date: Wed Jun 8 08:51:19 2016 +0200 i2c: octeon: Avoid printk after too long SMBUS message Remove the warning about a too long SMBUS message because the ipmi_ssif driver triggers this warning too frequently so it spams the message log. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 908cf12bbca0f18a23085a5a35301509e034f0a9 Author: Jan Glauber Date: Wed Jun 8 08:51:17 2016 +0200 i2c: octeon: Missing AAK flag in case of I2C_M_RECV_LEN During receive the controller requires the AAK flag for all bytes but the final one. This was wrong in case of I2C_M_RECV_LEN, where the decision if the final byte is to be transmitted happened before adding the additional received length byte. Set the AAK flag if additional bytes are to be received. Signed-off-by: Jan Glauber Signed-off-by: Wolfram Sang drivers/i2c/busses/i2c-octeon.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit a7ae81952cdab56a1277bd2f9ed7284c0f575120 Author: Mika Westerberg Date: Thu Jun 9 16:56:28 2016 +0300 i2c: i801: Allow ACPI SystemIO OpRegion to conflict with PCI BAR Many Intel systems the BIOS declares a SystemIO OpRegion below the SMBus PCI device as can be seen in ACPI DSDT table from Lenovo Yoga 900: Device (SBUS) { OperationRegion (SMBI, SystemIO, (SBAR << 0x05), 0x10) Field (SMBI, ByteAcc, NoLock, Preserve) { HSTS, 8, Offset (0x02), HCON, 8, HCOM, 8, TXSA, 8, DAT0, 8, DAT1, 8, HBDR, 8, PECR, 8, RXSA, 8, SDAT, 16 } There are also bunch of AML methods that that the BIOS can use to access these fields. Most of the systems in question AML methods accessing the SMBI OpRegion are never used. Now, because of this SMBI OpRegion many systems fail to load the SMBus driver with an error looking like one below: ACPI Warning: SystemIO range 0x0000000000003040-0x000000000000305F conflicts with OpRegion 0x0000000000003040-0x000000000000304F (\_SB.PCI0.SBUS.SMBI) (20160108/utaddress-255) ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver The reason is that this SMBI OpRegion conflicts with the PCI BAR used by the SMBus driver. It turns out that we can install a custom SystemIO address space handler for the SMBus device to intercept all accesses through that OpRegion. This allows us to share the PCI BAR with the AML code if it for some reason is using it. We do not expect that this OpRegion handler will ever be called but if it is we print a warning and prevent all access from the SMBus driver itself. Link: https://bugzilla.kernel.org/show_bug.cgi?id=110041 Reported-by: Andy Lutomirski Reported-by: Pali Rohár Suggested-by: Rafael J. Wysocki Signed-off-by: Mika Westerberg Acked-by: Rafael J. Wysocki Reviewed-by: Jean Delvare Reviewed-by: Benjamin Tissoires Tested-by: Pali Rohár Tested-by: Jean Delvare Signed-off-by: Wolfram Sang Cc: stable@vger.kernel.org drivers/i2c/busses/i2c-i801.c | 99 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 96 insertions(+), 3 deletions(-) commit 06dfeef88573cf032e5c27e37f80ff5237b3318a Author: Ben Dooks Date: Thu Jun 9 11:38:34 2016 +0100 drivers: of: add definition of early_init_dt_alloc_reserved_memory_arch The function early_init_dt_alloc_reserved_memory_arch is defined in drivers/of/of_reserved_mem.c but is not declared in any of the header files. Add the declaration of this to avoid the warning: drivers/of/of_reserved_mem.c:31:19: warning: symbol 'early_init_dt_alloc_reserved_memory_arch' was not declared. Should it be static? Signed-off-by: Ben Dooks [robh: drop extern from declaration] Signed-off-by: Rob Herring include/linux/of_reserved_mem.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 8c237cd0ccb570d13158758af02e11359a4a5b1c Author: Gavin Shan Date: Thu Jun 9 15:50:49 2016 +1000 drivers/of: Fix depth for sub-tree blob in unflatten_dt_nodes() The function is unflattening device sub-tree blob if @dad passed to the function is valid. Currently, this functionality is used by PPC PowerNV PCI hotplug driver only. There are possibly multiple nodes in the first level of depth, fdt_next_node() bails immediately when @depth becomes negative before the second device node can be probed successfully. It leads to the device nodes except the first one won't be unflattened successfully. This fixes the issue by setting the initial depth (@inital_depth) to 1 when this function is called to unflatten device sub-tree blob. No logic changes when this function is used to unflatten non-sub-tree blob. Cc: Rhyland Klein Fixes: 78c44d910 ("drivers/of: Fix depth when unflattening devicetree") Signed-off-by: Gavin Shan Tested-by: Rhyland Klein Tested-by: Andrew Donnellan Signed-off-by: Rob Herring drivers/of/fdt.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit e71ba91e4839976ea0ada12f2d30c12d41825939 Merge: 60d6f36 3d5fdff Author: David S. Miller Date: Thu Jun 9 11:52:47 2016 -0700 Merge tag 'mac80211-for-davem-2016-06-09' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Two more fixes for now: * a fix for a long-standing iwpriv 32/64 compat issue * two fairly recently introduced (4.6) warning asking for symmetric operations are erroneous and I remove them ==================== Signed-off-by: David S. Miller commit 60d6f36f5c9768f16b45dac7ecb483cce3e250a4 Merge: 9b15350 d664b41 Author: David S. Miller Date: Thu Jun 9 11:20:05 2016 -0700 Merge branch 'mlxsw-fixes' Jiri Pirko says: ==================== mlxsw: couple of fixes Couple of fixes from Ido. ==================== Signed-off-by: David S. Miller commit d664b41e2adf5851e4d0d39f450b2f3f808b65d6 Author: Ido Schimmel Date: Thu Jun 9 09:51:40 2016 +0200 mlxsw: spectrum: Don't sleep during ndo_get_phys_port_name() When rtnl_fill_ifinfo() is called for a certain netdevice it queries its various parameters such as switch id and physical port name. The function might get called in an atomic context, which means the underlying driver must not sleep during the query operation. Don't query the device and sleep during ndo_get_phys_port_name(), but instead store the needed parameters in port creation time. Fixes: 2bf9a58675c5 ("mlxsw: spectrum: Add support for physical port names") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 64 +++++++++----------------- drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 5 ++ 2 files changed, 26 insertions(+), 43 deletions(-) commit be94535f95313a013b844b563ef15ddd8fb43da8 Author: Ido Schimmel Date: Thu Jun 9 09:51:39 2016 +0200 mlxsw: spectrum: Make split flow match firmware requirements When a port is created following a split / unsplit we need to map it to the correct module and lane, enable it and then continue to initialize its various parameters such as MTU and VLAN filters. Under certain conditions, such as trying to split ports at the bottom row of the front panel by four, we get firmware errors. After evaluating this with the firmware team it was decided to alter the split / unsplit flow, so that first all the affected ports are mapped, then enabled and finally each is initialized separately. Fix the split / unsplit flow by first mapping and enabling all the affected ports. Newer firmware versions will support both flows. Fixes: 18f1e70c4137 ("mlxsw: spectrum: Introduce port splitting") Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 147 ++++++++++++++++--------- 1 file changed, 95 insertions(+), 52 deletions(-) commit 56530f5d2ddc9b9fade7ef8db9cb886e9dc689b5 Author: Steve Capper Date: Tue Jun 7 17:58:06 2016 +0100 ARM: 8579/1: mm: Fix definition of pmd_mknotpresent Currently pmd_mknotpresent will use a zero entry to respresent an invalidated pmd. Unfortunately this definition clashes with pmd_none, thus it is possible for a race condition to occur if zap_pmd_range sees pmd_none whilst __split_huge_pmd_locked is running too with pmdp_invalidate just called. This patch fixes the race condition by modifying pmd_mknotpresent to create non-zero faulting entries (as is done in other architectures), removing the ambiguity with pmd_none. [catalin.marinas@arm.com: using L_PMD_SECT_VALID instead of PMD_TYPE_SECT] Fixes: 8d9625070073 ("ARM: mm: Transparent huge page support for LPAE systems.") Cc: # 3.11+ Reported-by: Kirill A. Shutemov Acked-by: Will Deacon Cc: Russell King Signed-off-by: Steve Capper Signed-off-by: Catalin Marinas Signed-off-by: Russell King arch/arm/include/asm/pgtable-3level.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 624531886987f0f1b5d01fb598034d039198e090 Author: Will Deacon Date: Tue Jun 7 17:57:54 2016 +0100 ARM: 8578/1: mm: ensure pmd_present only checks the valid bit In a subsequent patch, pmd_mknotpresent will clear the valid bit of the pmd entry, resulting in a not-present entry from the hardware's perspective. Unfortunately, pmd_present simply checks for a non-zero pmd value and will therefore continue to return true even after a pmd_mknotpresent operation. Since pmd_mknotpresent is only used for managing huge entries, this is only an issue for the 3-level case. This patch fixes the 3-level pmd_present implementation to take into account the valid bit. For bisectability, the change is made before the fix to pmd_mknotpresent. [catalin.marinas@arm.com: comment update regarding pmd_mknotpresent patch] Fixes: 8d9625070073 ("ARM: mm: Transparent huge page support for LPAE systems.") Cc: # 3.11+ Cc: Russell King Cc: Steve Capper Signed-off-by: Will Deacon Signed-off-by: Catalin Marinas Signed-off-by: Russell King arch/arm/include/asm/pgtable-2level.h | 1 + arch/arm/include/asm/pgtable-3level.h | 1 + arch/arm/include/asm/pgtable.h | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) commit 1decabc1a70b97ef7412224df3dcb59d1227e3af Merge: d366a0f 2a6f71a Author: Jens Axboe Date: Thu Jun 9 09:49:55 2016 -0600 Merge branch 'stable/for-jens-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus Konrad writes: Thishas two fixes for a guest migrating from host that has multi-queue to one without it (and vice-versa). commit 5f96ddb4607382528ef2eb23b49ce1856fdb316d Author: Rex Zhu Date: Fri Jun 3 19:12:42 2016 +0800 drm/amd/powerplay: delete useless code as pptable changed in vbios. The vbios table changed so this code is useless now. Signed-off-by: Rex Zhu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 21 --------------------- 1 file changed, 21 deletions(-) commit d2e312183b62cde0c44af35664f3b104b247dd9c Author: Rex Zhu Date: Thu Jun 2 19:11:01 2016 +0800 drm/amd/powerplay: fix bug visit array out of bounds Signed-off-by: Rex Zhu Acked-by: Christian König Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5bbc16cc7be89dbe6dd824570456c3340b6d2ef7 Author: Monk Liu Date: Tue May 31 13:44:48 2016 +0800 drm/amdgpu: fix smu ucode memleak (v2) Properly release the smu ucode in powerplay. v2: agd: add polaris as well Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 2 ++ drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 + drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 2 ++ 3 files changed, 5 insertions(+) commit a392746a8c38de494a1a2d00c5cfd34a05449e35 Author: Monk Liu Date: Tue May 31 13:44:30 2016 +0800 drm/amdgpu: add release firmware for cgs Powerplay uses cgs to load the firmware so add a function to release it as well to avoid leaking it on driver unload. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 12 ++++++++++++ drivers/gpu/drm/amd/include/cgs_common.h | 6 ++++++ 2 files changed, 18 insertions(+) commit 86e4cdd675f489e0b3deaa3d6b75cddadd16e71c Author: Monk Liu Date: Mon May 30 15:16:26 2016 +0800 drm/amdgpu: fix tonga smu_fini mem leak Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 5 +++++ 1 file changed, 5 insertions(+) commit e6232effab9091472689b1c5604a7e59d320a8e0 Author: Monk Liu Date: Mon May 30 15:16:04 2016 +0800 drm/amdgpu: fix fiji smu fini mem leak Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 4 ++++ 1 file changed, 4 insertions(+) commit d1ff53b7c2aa6e8c9dbd37ea7d858eeaba1ecb4a Author: Monk Liu Date: Mon May 30 16:07:40 2016 +0800 drm/amdgpu: fix cik sdma ucode memleak Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 9c55c5204445689c1d6b7b60e89de7f8fcf8a77f Author: Monk Liu Date: Mon May 30 16:05:58 2016 +0800 drm/amdgpu: fix sdma24 ucode mem leak Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 14d83e78c578a6c45163fb399ee760fe0d314bad Author: Monk Liu Date: Mon May 30 15:15:32 2016 +0800 drm/amdgpu: fix sdma3 ucode mem leak Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 05f19eb5bd1d46aeeeb86a2a8538f35d7d55eb34 Author: Monk Liu Date: Mon May 30 15:13:59 2016 +0800 drm/amdgpu: fix uvd fini mem leak Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit e517cd77ee76a26f3542d51a1b4f4d7c452f85cf Author: Monk Liu Date: Mon May 30 16:01:48 2016 +0800 drm/amdgpu: fix gfx 7 ucode mem leak Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 13331ac384e8211a0bf3158a895ac8b22005a622 Author: Monk Liu Date: Mon May 30 14:18:57 2016 +0800 drm/amdgpu: fix gfx8 ucode mem leak Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) commit 67a6a504af90e58c478b2e7fa6c0af8ed64c995b Author: Monk Liu Date: Mon May 30 14:17:42 2016 +0800 drm/amdgpu: fix missing free wb for cond_exec Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 1 + 1 file changed, 1 insertion(+) commit 9d8f086cd05954e03f10db1a9a52a240d086dc8c Author: Monk Liu Date: Mon May 30 13:43:45 2016 +0800 drm/amdgpu: fix memleak in pptable_init Signed-off-by: Monk Liu Acked-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 +++- .../amd/powerplay/hwmgr/tonga_processpptables.c | 54 ++++++++++------------ 2 files changed, 32 insertions(+), 30 deletions(-) commit 89e0ec9f5e27a8c5b5954290bef703dc6aac44f3 Author: Monk Liu Date: Fri May 27 19:34:11 2016 +0800 drm/amdgpu: fix mem leak in atombios Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 61da601b95cd5565d047e42e73f984f5bdfbba70 Author: Monk Liu Date: Fri May 27 19:09:06 2016 +0800 drm/amdgpu: fix mem leak in pplib/hwmgr Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3a3e88804d44e41ef2182d2a6577a6803fdd9ee0 Author: Monk Liu Date: Fri May 27 17:52:58 2016 +0800 drm/amdgpu: fix mem leak in smumgr Signed-off-by: Monk Liu Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/smumgr/smumgr.c | 1 + 1 file changed, 1 insertion(+) commit 2ba272d7bde27e1db2cf1c6cee49b01b7ea08989 Author: Chunming Zhou Date: Wed Apr 27 18:07:41 2016 +0800 drm/amdgpu: add pipeline sync while vmid switch in same ctx Since vmid-mgr supports vmid sharing in one vm, the same ctx could get different vmids for two emits without vm flush, vm_flush could be done in another ring. Signed-off-by: Chunming Zhou Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 +++++++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) commit fdff8cfa72b3e42d4d0c70684fa18b1dfee46d97 Author: Monk Liu Date: Tue May 24 13:23:46 2016 +0800 drm/amdgpu: vBIOS post only call when mem_size zero 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 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 505dfe76cd3203bb2dcf13d862f46b7f0e95869a Author: Monk Liu Date: Wed May 25 16:57:14 2016 +0800 drm/amdgpu: modify sdma start sequence should fist halt engine, and then doing the register programing, and later unhalt engine, and finally run ring_test. this help fix reloading driver hang issue of SDMA ring original sequence is wrong for it programing engine after unhalt, which will lead to fault behavior when doing driver reloading after unloaded. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 9 +++++++-- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 8 ++++++-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 15 +++++++++++---- 3 files changed, 24 insertions(+), 8 deletions(-) commit d72f7c0685870aa7efda0a06f8ca160a94905031 Author: Monk Liu Date: Wed May 25 16:55:50 2016 +0800 drm/amdgpu: init more register for sdma This help fix reloading driver hang issue of SDMA ring Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 ++ drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 2 ++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 ++ 3 files changed, 6 insertions(+) commit 9a005bef5b5b5ceb78ff1138e6d6baf4bbeb8061 Author: Monk Liu Date: Wed May 25 16:55:07 2016 +0800 drm/amdgpu: clear SA bo when created This help fix reloading driver hang issue of SDMA ring 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_sa.c | 1 + 1 file changed, 1 insertion(+) commit 768c95e70c4bd33b3da32a15dd33486246f4ca79 Author: Alex Deucher Date: Wed Jun 1 11:09:01 2016 -0400 drm/amdgpu: fix fw leak in non-powerplay dpm code We need to release the firmware on driver tear down. Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 3 +++ drivers/gpu/drm/amd/amdgpu/fiji_dpm.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/iceland_dpm.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/tonga_dpm.c | 5 +++++ 4 files changed, 18 insertions(+) commit a6dcfd9cc55432e4dcbe058d6ae9f07fb3452992 Author: Monk Liu Date: Thu May 19 14:36:34 2016 +0800 drm/amdgpu: fix pplib finish bug 1,should use late_fini to kfree all resource otherwise the released pointer maybe accessed in IRQ ip fini routine. 2,hwmgr should not be kfree by pem_fini which is invoked by hw fini path. 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 | 5 +++++ drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 7 ------- drivers/gpu/drm/amd/powerplay/eventmgr/eventmgr.c | 3 --- 3 files changed, 5 insertions(+), 10 deletions(-) commit 482587e3145ef4100b52946660ae52b457d09194 Author: Monk Liu Date: Thu May 19 14:36:01 2016 +0800 drm/amdgpu: impl late_fini for amdgpu_pp_ip This implements late_init support for powerplay. 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_powerplay.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit 212cb3b6d79bb9f525da5593133d93b107184b27 Author: Monk Liu Date: Thu May 19 14:35:17 2016 +0800 drm/amdgpu: add late_fini for ip_funcs This give IP modules an optional late cleanup function. This is needed to handle tricky inter-module dependencies during tear down. Signed-off-by: Monk Liu Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher drivers/gpu/drm/amd/include/amd_shared.h | 1 + 1 file changed, 1 insertion(+) commit 8b4af8a8e3e6ad82e0d32d1665d9a755c05c4c12 Author: Rex Zhu Date: Mon May 23 18:24:41 2016 +0800 drm/admgpu/powerplay/polaris: fix powertune table upload Exclude AVFS related fields when update powertune table to hw. The driver shouldn't set them directly. Signed-off-by: Rex Zhu Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_powertune.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d1a7f7aadc866eff61c422da0ecbe1f8e383e0f5 Author: Ken Wang Date: Tue May 24 09:26:27 2016 +0800 drm/amdgpu/iceland: Set SC_PA_RASTER_CONFIG according to different RB enabled fix the raster config setting for different iceland configs. Signed-off-by: Ken Wang Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 20c15226d1c73150c4d9107301cac5dda0b7f995 Author: Fabio Estevam Date: Wed May 11 16:39:30 2016 -0300 ARM: imx6ul: Fix Micrel PHY mask The value used for Micrel PHY mask is not correct. Use the MICREL_PHY_ID_MASK definition instead. Thanks to Jiri Luznicky for proposing the fix at https://community.freescale.com/thread/387739 Cc: Fixes: 709bc0657fe6f9f55 ("ARM: imx6ul: add fec MAC refrence clock and phy fixup init") Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Signed-off-by: Shawn Guo arch/arm/mach-imx/mach-imx6ul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3d5fdff46c4b2b9534fa2f9fc78e90a48e0ff724 Author: Prasun Maiti Date: Mon Jun 6 20:04:19 2016 +0530 wext: Fix 32 bit iwpriv compatibility issue with 64 bit Kernel iwpriv app uses iw_point structure to send data to Kernel. The iw_point structure holds a pointer. For compatibility Kernel converts the pointer as required for WEXT IOCTLs (SIOCIWFIRST to SIOCIWLAST). Some drivers may use iw_handler_def.private_args to populate iwpriv commands instead of iw_handler_def.private. For those case, the IOCTLs from SIOCIWFIRSTPRIV to SIOCIWLASTPRIV will follow the path ndo_do_ioctl(). Accordingly when the filled up iw_point structure comes from 32 bit iwpriv to 64 bit Kernel, Kernel will not convert the pointer and sends it to driver. So, the driver may get the invalid data. The pointer conversion for the IOCTLs (SIOCIWFIRSTPRIV to SIOCIWLASTPRIV), which follow the path ndo_do_ioctl(), is mandatory. This patch adds pointer conversion from 32 bit to 64 bit and vice versa, if the ioctl comes from 32 bit iwpriv to 64 bit Kernel. Cc: stable@vger.kernel.org Signed-off-by: Prasun Maiti Signed-off-by: Ujjal Roy Tested-by: Dibyajyoti Ghosh Signed-off-by: Johannes Berg net/wireless/wext-core.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 6cbf6236d54c24b9a29e6892549c25b6902b44ce Author: Johannes Berg Date: Thu Jun 9 09:40:55 2016 +0200 cfg80211: remove get/set antenna and tx power warnings Since set_tx_power and set_antenna are frequently implemented without the matching get_tx_power/get_antenna, we shouldn't have added warnings for those. Remove them. The remaining ones are correct and need to be implemented symmetrically for correct operation. Cc: stable@vger.kernel.org Fixes: de3bb771f471 ("cfg80211: add more warnings for inconsistent ops") Signed-off-by: Johannes Berg net/wireless/core.c | 2 -- 1 file changed, 2 deletions(-) commit 8d29bdba7291f9f939bc17ac088ab650d106d451 Author: Dave Gerlach Date: Tue May 24 11:12:29 2016 -0500 ARM: OMAP2+: Select OMAP_INTERCONNECT for SOC_AM43XX AM43XX SoCs make use of the omap_l3_noc driver so explicitly select OMAP_INTERCONNECT in the Kconfig for SOC_AM43XX to ensure it always gets enabled for AM43XX only builds. Signed-off-by: Dave Gerlach Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 4c88c1c72f86dab63d8219c0aa9e9a398f2efaa9 Author: Tomi Valkeinen Date: Fri May 20 13:13:33 2016 +0300 ARM: dts: DRA74x: fix DSS PLL2 addresses DSS's 'pll2_clkctrl' and 'pll2' have wrong addresses in the dra74x.dtsi file. Video PLL2 has not been used so wrong addresses went unnoticed. Signed-off-by: Tomi Valkeinen Signed-off-by: Tony Lindgren arch/arm/boot/dts/dra74x.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2e4094bdaa3ef295abbebb31b978e3344ee64257 Author: Nishanth Menon Date: Thu May 19 18:20:17 2016 -0500 ARM: OMAP2: Enable Errata 430973 for OMAP3 Enable Erratum 430973 similar to commit 5c86c5339c56 ("ARM: omap2plus_defconfig: Enable ARM erratum 430973 for omap3") - Since multiple defconfigs can exist from various points of view (multi_v7, omap2plus etc.. it is always better to enable the erratum from the Kconfig selection point of view so that downstream kernels dont have to rediscover this all over again. Reported-by: Grygorii Strashko Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren arch/arm/mach-omap2/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 35639a0e98391036a4c7f23253c321d6621a8897 Author: Vinod Koul Date: Thu Jun 9 11:32:14 2016 +0530 ALSA: hda - Add PCI ID for Kabylake Kabylake shows up as PCI ID 0xa171. And Kabylake-LP as 0x9d71. Since these are similar to Skylake add these to SKL_PLUS macro Signed-off-by: Vinod Koul Cc: Signed-off-by: Takashi Iwai sound/pci/hda/hda_intel.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 9b15350f0d5c401c02eca15c4e6ca0603cff1a41 Author: Florian Westphal Date: Wed Jun 8 23:23:01 2016 +0200 qfq: don't leak skb if kzalloc fails When we need to create a new aggregate to enqueue the skb we call kzalloc. If that fails we returned ENOBUFS without freeing the skb. Spotted during code review. Signed-off-by: Florian Westphal Signed-off-by: David S. Miller net/sched/sch_qfq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0a46baaf634663d28038fc137239b71bf5385e5a Author: Shweta Choudaha Date: Wed Jun 8 20:15:43 2016 +0100 ip6gre: Allow live link address change The ip6 GRE tap device should not be forced to down state to change the mac address and should allow live address change for tap device similar to ipv4 gre. Signed-off-by: Shweta Choudaha Signed-off-by: David S. Miller net/ipv6/ip6_gre.c | 3 +++ 1 file changed, 3 insertions(+) commit a436d20df948f62a79ee0547d223936e5b2b9d54 Merge: 3497ed8 201c44b Author: David S. Miller Date: Wed Jun 8 21:43:15 2016 -0700 Merge branch 'cls_u32-hwoffload-fixes' Jakub Kicinski says: ==================== incremental cls_u32 hardware offload fixes These are incremental changes from v1 of cls_u32 fixes. First patch is reposted in its entirety, patch 2 is an incremental change from patch 2 of the original series. ==================== Signed-off-by: David S. Miller commit 201c44bd8ffa899f07b7b322a73e19baf0ada1e5 Author: Jakub Kicinski Date: Wed Jun 8 20:11:04 2016 +0100 net: cls_u32: be more strict about skip-sw flag for knodes Return an error if user requested skip-sw and the underlaying hardware cannot handle tc offloads (or offloads are disabled). This patch fixes the knode handling. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/sched/cls_u32.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit 6eef3801e719e4ea9c15c01b1d77706f47331166 Author: Jakub Kicinski Date: Wed Jun 8 20:11:03 2016 +0100 net: cls_u32: catch all hardware offload errors Errors reported by u32_replace_hw_hnode() were not propagated. Signed-off-by: Jakub Kicinski Acked-by: Sridhar Samudrala Signed-off-by: David S. Miller net/sched/cls_u32.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 72d8c36ec364c82bf1bf0c64dfa1041cfaf139f7 Author: Wei Fang Date: Tue Jun 7 14:53:56 2016 +0800 scsi: fix race between simultaneous decrements of ->host_failed sas_ata_strategy_handler() adds the works of the ata error handler to system_unbound_wq. This workqueue asynchronously runs work items, so the ata error handler will be performed concurrently on different CPUs. In this case, ->host_failed will be decreased simultaneously in scsi_eh_finish_cmd() on different CPUs, and become abnormal. It will lead to permanently inequality between ->host_failed and ->host_busy, and scsi error handler thread won't start running. IO errors after that won't be handled. Since all scmds must have been handled in the strategy handler, just remove the decrement in scsi_eh_finish_cmd() and zero ->host_busy after the strategy handler to fix this race. Fixes: 50824d6c5657 ("[SCSI] libsas: async ata-eh") Cc: stable@vger.kernel.org Signed-off-by: Wei Fang Reviewed-by: James Bottomley Signed-off-by: Martin K. Petersen Documentation/scsi/scsi_eh.txt | 8 ++++++-- drivers/ata/libata-eh.c | 2 +- drivers/scsi/scsi_error.c | 4 +++- 3 files changed, 10 insertions(+), 4 deletions(-) commit 170fba306af798bc1249b6ba925cf9031f3b3806 Merge: 8533273 56d1fe0 Author: Dave Airlie Date: Thu Jun 9 12:32:09 2016 +1000 Merge tag 'drm-vc4-fixes-2016-06-06' of github.com:anholt/linux into drm-fixes This pull request brings in vblank/pageflip fixes I had hoped to see merged before 4.7rc1, plus two new fixes that have come in since then. * tag 'drm-vc4-fixes-2016-06-06' of github.com:anholt/linux: drm/vc4: Make pageflip completion handling more robust. drm/vc4: Fix ioctl permissions for render nodes. drm/vc4: Return -EBUSY if there's already a pending flip event. drm/vc4: Fix drm_vblank_put/get imbalance in page flip path. drm/vc4: Fix get_vblank_counter with proper no-op for Linux 4.4+ commit 85332739628fe4beafecdb713438c7cb1454c2f5 Author: Tomi Valkeinen Date: Fri Jun 3 14:27:03 2016 +0300 drm/omap: fix unused variable warning in dsi & hdmi Signed-off-by: Tomi Valkeinen Signed-off-by: Dave Airlie drivers/gpu/drm/omapdrm/dss/dsi.c | 1 - drivers/gpu/drm/omapdrm/dss/hdmi5.c | 1 - 2 files changed, 2 deletions(-) commit 9920779c9054ee442f38e7e9c8d606c77d11b8d8 Merge: af8c34c 4691409 Author: Dave Airlie Date: Thu Jun 9 12:30:29 2016 +1000 Merge branch 'linux-4.7' of git://github.com/skeggsb/linux into drm-fixes Fixes for two issues reported by KASAN, a display engine hang due to incorrect BIOS table parsing, and incorrect LTC interrupt handling on Maxwell which could lead to a never-ending interrupt storm. * 'linux-4.7' of git://github.com/skeggsb/linux: drm/nouveau/disp/sor/gm107: training pattern registers are like gm200 drm/nouveau/disp/sor/gf119: both links use the same training register drm/nouveau/core: swap the order of imem/fb drm/nouveau/fbcon: fix out-of-bounds memory accesses drm/nouveau/gr/gf100-: update sm error decoding from gk20a nvgpu headers drm/nouveau/ltc/gm107-: fix typo in the address of NV_PLTCG_LTC0_LTS0_INTR drm/nouveau/bios/disp: fix handling of "match any protocol" entries commit ce492b3b8f99cf9d2f807ec22d8805c996a09503 Author: Stefan Agner Date: Fri Jun 3 14:21:34 2016 -0700 drm/fsl-dcu: use flat regmap cache Using flat regmap cache instead of RB-tree to avoid the following lockdep warning on driver load: WARNING: CPU: 0 PID: 1 at kernel/locking/lockdep.c:2755 lockdep_trace_alloc+0x15c/0x160() DEBUG_LOCKS_WARN_ON(irqs_disabled_flags(flags)) The RB-tree regmap cache needs to allocate new space on first writes. However, allocations in an atomic context (e.g. when a spinlock is held) are not allowed. The function regmap_write calls map->lock, which acquires a spinlock in the fast_io case. Since the FSL DCU driver uses MMIO, the regmap bus of type regmap_mmio is being used which has fast_io set to true. Use flat regmap cache and specify max register to be large enouth to cover all registers available in LS1021a and Vybrids register space. Signed-off-by: Stefan Agner Cc: Mark Brown Cc: stable@vger.kernel.org drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 719da39a61173c849f70656ed1a302e4b6deaa5b Merge: 4c52990 5f9e105 Author: Chris Mason Date: Wed Jun 8 14:36:12 2016 -0700 Merge branch 'misc-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.7 commit 4c52990080e37925039a4d546937e9df2a8da944 Merge: 8dff9c8 34b3e6c Author: Chris Mason Date: Wed Jun 8 14:35:11 2016 -0700 Merge branch 'for-chris' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.7 commit 25789f95a8834d154e5c1f0c9df9a7faedeae98e Author: Jean Delvare Date: Thu May 26 11:43:23 2016 +0200 platform/x86: Drop duplicate dependencies on X86 The whole menu depends on X86 so there is no point in repeating this dependency on individual driver entries. Signed-off-by: Jean Delvare Signed-off-by: Darren Hart drivers/platform/x86/Kconfig | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 0118c2d3eac0545d4095877e5a015b5dc763b3c2 Author: Dennis Wassenberg Date: Wed Jun 8 10:54:25 2016 -0400 thinkpad_acpi: Add support for HKEY version 0x200 Lenovo Thinkpad devices T460, T460s, T460p, T560, X260 use HKEY version 0x200 without adaptive keyboard. HKEY version 0x200 has method MHKA with one parameter value. Passing parameter value 1 will get hotkey_all_mask (the same like HKEY version 0x100 without parameter). Passing parameter value 2 to MHKA method will retrieve hotkey_all_adaptive_mask. If 0 is returned in that case there is no adaptive keyboard available. Signed-off-by: Dennis Wassenberg Signed-off-by: Lyude Tested-by: Lyude Tested-by: Marco Trevisan Acked-by: Henrique de Moraes Holschuh [dvhart: Keep MHKA error string on one line in new and existing pr_err calls] Signed-off-by: Darren Hart drivers/platform/x86/thinkpad_acpi.c | 87 ++++++++++++++++++++++++++---------- 1 file changed, 63 insertions(+), 24 deletions(-) commit 48f67d62194952617dcade08194abc7f5cb3f50c Author: Alex Hung Date: Mon Jun 6 09:46:11 2016 +0800 ideapad_laptop: Add an event for mic mute hotkey Newer ideapads support a new mic hotkey implemented via an ACPI interface. This patch converts the mic mute event to a keycode KEY_MICMUTE. Signed-off-by: Alex Hung Acked-by: Ike Panhc Signed-off-by: Darren Hart drivers/platform/x86/ideapad-laptop.c | 2 ++ 1 file changed, 2 insertions(+) commit c106c21ce02e366f3dc887bff7c48f3f140c45c9 Author: Marek Vasut Date: Wed May 25 22:40:42 2016 +0000 ARM: dts: socfpga: Add missing PHY phandle Add missing PHY phandle into the DT, otherwise the stmmac code won't detect the PHY correctly anymore. Signed-off-by: Marek Vasut Cc: Dinh Nguyen Signed-off-by: Dinh Nguyen arch/arm/boot/dts/socfpga_cyclone5_vining_fpga.dts | 1 + 1 file changed, 1 insertion(+) commit 3497ed8c852a5a3d48957ca91baaa443d9bfcd4d Author: Bert Kenward Date: Mon Jun 6 17:29:30 2016 +0100 sfc: report supported link speeds on SFP connections 7000-series SFC NICs connected with an SFP+ module currently fail to report any supported link speeds. Reported-by: Jarod Wilson Signed-off-by: Bert Kenward Reviewed-by: Jarod Wilson Tested-by: Jarod Wilson Signed-off-by: David S. Miller drivers/net/ethernet/sfc/mcdi_port.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e0d194adfa9f5f473068cc546bee60fb84ab77ba Author: Eric Dumazet Date: Wed Jun 8 06:19:45 2016 -0700 net_sched: add missing paddattr description "make htmldocs" complains otherwise: .//net/core/gen_stats.c:65: warning: No description found for parameter 'padattr' .//net/core/gen_stats.c:101: warning: No description found for parameter 'padattr' Fixes: 9854518ea04d ("sched: align nlattr properly when needed") Signed-off-by: Eric Dumazet Reported-by: kbuild test robot Acked-by: Nicolas Dichtel Signed-off-by: David S. Miller net/core/gen_stats.c | 2 ++ 1 file changed, 2 insertions(+) commit 00bc0ef5880dc7b82f9c320dead4afaad48e47be Author: Jakub Sitnicki Date: Wed Jun 8 15:13:34 2016 +0200 ipv6: Skip XFRM lookup if dst_entry in socket cache is valid At present we perform an xfrm_lookup() for each UDPv6 message we send. The lookup involves querying the flow cache (flow_cache_lookup) and, in case of a cache miss, creating an XFRM bundle. If we miss the flow cache, we can end up creating a new bundle and deriving the path MTU (xfrm_init_pmtu) from on an already transformed dst_entry, which we pass from the socket cache (sk->sk_dst_cache) down to xfrm_lookup(). This can happen only if we're caching the dst_entry in the socket, that is when we're using a connected UDP socket. To put it another way, the path MTU shrinks each time we miss the flow cache, which later on leads to incorrectly fragmented payload. It can be observed with ESPv6 in transport mode: 1) Set up a transformation and lower the MTU to trigger fragmentation # ip xfrm policy add dir out src ::1 dst ::1 \ tmpl src ::1 dst ::1 proto esp spi 1 # ip xfrm state add src ::1 dst ::1 \ proto esp spi 1 enc 'aes' 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b # ip link set dev lo mtu 1500 2) Monitor the packet flow and set up an UDP sink # tcpdump -ni lo -ttt & # socat udp6-listen:12345,fork /dev/null & 3) Send a datagram that needs fragmentation with a connected socket # perl -e 'print "@" x 1470 | socat - udp6:[::1]:12345 2016/06/07 18:52:52 socat[724] E read(3, 0x555bb3d5ba00, 8192): Protocol error 00:00:00.000000 IP6 ::1 > ::1: frag (0|1448) ESP(spi=0x00000001,seq=0x2), length 1448 00:00:00.000014 IP6 ::1 > ::1: frag (1448|32) 00:00:00.000050 IP6 ::1 > ::1: ESP(spi=0x00000001,seq=0x3), length 1272 (^ ICMPv6 Parameter Problem) 00:00:00.000022 IP6 ::1 > ::1: ESP(spi=0x00000001,seq=0x5), length 136 4) Compare it to a non-connected socket # perl -e 'print "@" x 1500' | socat - udp6-sendto:[::1]:12345 00:00:40.535488 IP6 ::1 > ::1: frag (0|1448) ESP(spi=0x00000001,seq=0x6), length 1448 00:00:00.000010 IP6 ::1 > ::1: frag (1448|64) What happens in step (3) is: 1) when connecting the socket in __ip6_datagram_connect(), we perform an XFRM lookup, miss the flow cache, create an XFRM bundle, and cache the destination, 2) afterwards, when sending the datagram, we perform an XFRM lookup, again, miss the flow cache (due to mismatch of flowi6_iif and flowi6_oif, which is an issue of its own), and recreate an XFRM bundle based on the cached (and already transformed) destination. To prevent the recreation of an XFRM bundle, avoid an XFRM lookup altogether whenever we already have a destination entry cached in the socket. This prevents the path MTU shrinkage and brings us on par with UDPv4. The fix also benefits connected PINGv6 sockets, another user of ip6_sk_dst_lookup_flow(), who also suffer messages being transformed twice. Joint work with Hannes Frederic Sowa. Reported-by: Jan Tluka Signed-off-by: Jakub Sitnicki Acked-by: Hannes Frederic Sowa Signed-off-by: David S. Miller net/ipv6/ip6_output.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit a5c5e2da8551eb69e5d5d09d51d526140b5db9fb Author: Guillaume Nault Date: Wed Jun 8 12:59:17 2016 +0200 l2tp: fix configuration passed to setup_udp_tunnel_sock() Unused fields of udp_cfg must be all zeros. Otherwise setup_udp_tunnel_sock() fills ->gro_receive and ->gro_complete callbacks with garbage, eventually resulting in panic when used by udp_gro_receive(). [ 72.694123] BUG: unable to handle kernel paging request at ffff880033f87d78 [ 72.695518] IP: [] 0xffff880033f87d78 [ 72.696530] PGD 26e2067 PUD 26e3067 PMD 342ed063 PTE 8000000033f87163 [ 72.696530] Oops: 0011 [#1] SMP KASAN [ 72.696530] Modules linked in: l2tp_ppp l2tp_netlink l2tp_core ip6_udp_tunnel udp_tunnel pptp gre pppox ppp_generic slhc crc32c_intel ghash_clmulni_intel jitterentropy_rng sha256_generic hmac drbg ansi_cprng aesni_intel evdev aes_x86_64 ablk_helper cryptd lrw gf128mul glue_helper serio_raw acpi_cpufreq button proc\ essor ext4 crc16 jbd2 mbcache virtio_blk virtio_net virtio_pci virtio_ring virtio [ 72.696530] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.7.0-rc1 #1 [ 72.696530] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Debian-1.8.2-1 04/01/2014 [ 72.696530] task: ffff880035b59700 ti: ffff880035b70000 task.ti: ffff880035b70000 [ 72.696530] RIP: 0010:[] [] 0xffff880033f87d78 [ 72.696530] RSP: 0018:ffff880035f87bc0 EFLAGS: 00010246 [ 72.696530] RAX: ffffed000698f996 RBX: ffff88003326b840 RCX: ffffffff814cc823 [ 72.696530] RDX: ffff88003326b840 RSI: ffff880033e48038 RDI: ffff880034c7c780 [ 72.696530] RBP: ffff880035f87c18 R08: 000000000000a506 R09: 0000000000000000 [ 72.696530] R10: ffff880035f87b38 R11: ffff880034b9344d R12: 00000000ebfea715 [ 72.696530] R13: 0000000000000000 R14: ffff880034c7c780 R15: 0000000000000000 [ 72.696530] FS: 0000000000000000(0000) GS:ffff880035f80000(0000) knlGS:0000000000000000 [ 72.696530] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 72.696530] CR2: ffff880033f87d78 CR3: 0000000033c98000 CR4: 00000000000406a0 [ 72.696530] Stack: [ 72.696530] ffffffff814cc834 ffff880034b93468 0000001481416818 ffff88003326b874 [ 72.696530] ffff880034c7ccb0 ffff880033e48038 ffff88003326b840 ffff880034b93462 [ 72.696530] ffff88003326b88a ffff88003326b88c ffff880034b93468 ffff880035f87c70 [ 72.696530] Call Trace: [ 72.696530] [ 72.696530] [] ? udp_gro_receive+0x1c6/0x1f9 [ 72.696530] [] udp4_gro_receive+0x2b5/0x310 [ 72.696530] [] inet_gro_receive+0x4a3/0x4cd [ 72.696530] [] dev_gro_receive+0x584/0x7a3 [ 72.696530] [] ? __lock_is_held+0x29/0x64 [ 72.696530] [] napi_gro_receive+0x124/0x21d [ 72.696530] [] virtnet_receive+0x8df/0x8f6 [virtio_net] [ 72.696530] [] virtnet_poll+0x1d/0x8d [virtio_net] [ 72.696530] [] net_rx_action+0x15b/0x3b9 [ 72.696530] [] __do_softirq+0x216/0x546 [ 72.696530] [] irq_exit+0x49/0xb6 [ 72.696530] [] do_IRQ+0xe2/0xfa [ 72.696530] [] common_interrupt+0x89/0x89 [ 72.696530] [ 72.696530] [] ? trace_hardirqs_on_caller+0x229/0x270 [ 72.696530] [] ? default_idle+0x1c/0x2d [ 72.696530] [] ? default_idle+0x1a/0x2d [ 72.696530] [] arch_cpu_idle+0xa/0xc [ 72.696530] [] default_idle_call+0x1a/0x1c [ 72.696530] [] cpu_startup_entry+0x15b/0x20f [ 72.696530] [] start_secondary+0x12c/0x133 [ 72.696530] Code: ff ff ff ff ff ff ff ff ff ff 7f ff ff ff ff ff ff ff 7f 00 7e f8 33 00 88 ff ff 6d 61 58 81 ff ff ff ff 5e de 0a 81 ff ff ff ff <00> 5c e2 34 00 88 ff ff 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 72.696530] RIP [] 0xffff880033f87d78 [ 72.696530] RSP [ 72.696530] CR2: ffff880033f87d78 [ 72.696530] ---[ end trace ad7758b9a1dccf99 ]--- [ 72.696530] Kernel panic - not syncing: Fatal exception in interrupt [ 72.696530] Kernel Offset: disabled [ 72.696530] ---[ end Kernel panic - not syncing: Fatal exception in interrupt v2: use empty initialiser instead of "{ NULL }" to avoid relying on first field's type. Fixes: 38fd2af24fcf ("udp: Add socket based GRO and config") Signed-off-by: Guillaume Nault Signed-off-by: David S. Miller net/l2tp/l2tp_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a6f71ad99cabe436e70c3f5fcf58072cb3bc07f Author: Bob Liu Date: Tue May 31 16:59:17 2016 +0800 xen-blkfront: fix resume issues after a migration After a migrate to another host (which may not have multiqueue support), the number of rings (block hardware queues) may be changed and the ring info structure will also be reallocated. This patch fixes two related bugs: * call blk_mq_update_nr_hw_queues() to make blk-core know the number of hardware queues have been changed. * Don't store rinfo pointer to hctx->driver_data, because rinfo may be reallocated so use hctx->queue_num to get the rinfo structure instead. Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) commit efd1535270c1deb0487527bf0c3c827301a69c93 Author: Bob Liu Date: Tue Jun 7 10:43:15 2016 -0400 xen-blkfront: don't call talk_to_blkback when already connected to blkback Sometimes blkfront may twice receive blkback_changed() notification (XenbusStateConnected) after migration, which will cause talk_to_blkback() to be called twice too and confuse xen-blkback. The flow is as follow: blkfront blkback blkfront_resume() > talk_to_blkback() > Set blkfront to XenbusStateInitialised front changed() > Connect() > Set blkback to XenbusStateConnected blkback_changed() > Skip talk_to_blkback() because frontstate == XenbusStateInitialised > blkfront_connect() > Set blkfront to XenbusStateConnected ----- And here we get another XenbusStateConnected notification leading to: ----- blkback_changed() > because now frontstate != XenbusStateInitialised talk_to_blkback() is also called again > blkfront state changed from XenbusStateConnected to XenbusStateInitialised (Which is not correct!) front_changed(): > Do nothing because blkback already in XenbusStateConnected Now blkback is in XenbusStateConnected but blkfront is still in XenbusStateInitialised - leading to no disks. Poking of the XenbusStateConnected state is allowed (to deal with block disk change) and has to be dealt with. The most likely cause of this bug are custom udev scripts hooking up the disks and then validating the size. Signed-off-by: Bob Liu Signed-off-by: Konrad Rzeszutek Wilk drivers/block/xen-blkfront.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 077fa7aed17de5022e44bf07dbaf732078b7b5b2 Author: Mel Gorman Date: Wed Jun 8 14:25:22 2016 +0100 futex: Calculate the futex key based on a tail page for file-based futexes Mike Galbraith reported that the LTP test case futex_wake04 was broken by commit 65d8fc777f6d ("futex: Remove requirement for lock_page() in get_futex_key()"). This test case uses futexes backed by hugetlbfs pages and so there is an associated inode with a futex stored on such pages. The problem is that the key is being calculated based on the head page index of the hugetlbfs page and not the tail page. Prior to the optimisation, the page lock was used to stabilise mappings and pin the inode is file-backed which is overkill. If the page was a compound page, the head page was automatically looked up as part of the page lock operation but the tail page index was used to calculate the futex key. After the optimisation, the compound head is looked up early and the page lock is only relied upon to identify truncated pages, special pages or a shmem page moving to swapcache. The head page is looked up because without the page lock, special care has to be taken to pin the inode correctly. However, the tail page is still required to calculate the futex key so this patch records the tail page. On vanilla 4.6, the output of the test case is; futex_wake04 0 TINFO : Hugepagesize 2097152 futex_wake04 1 TFAIL : futex_wake04.c:126: Bug: wait_thread2 did not wake after 30 secs. With the patch applied futex_wake04 0 TINFO : Hugepagesize 2097152 futex_wake04 1 TPASS : Hi hydra, thread2 awake! Fixes: 65d8fc777f6d "futex: Remove requirement for lock_page() in get_futex_key()" Reported-and-tested-by: Mike Galbraith Signed-off-by: Mel Gorman Acked-by: Peter Zijlstra (Intel) Reviewed-by: Davidlohr Bueso Cc: Sebastian Andrzej Siewior Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/20160608132522.GM2469@suse.de Signed-off-by: Thomas Gleixner kernel/futex.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit c0530dd3ef1d3997d885e1345e34a284db2b9cfa Author: Hariprasad Shenai Date: Wed Jun 8 14:57:28 2016 +0530 cxgb4: Add device id of T540-BT adapter Signed-off-by: Hariprasad Shenai Signed-off-by: David S. Miller drivers/net/ethernet/chelsio/cxgb4/t4_pci_id_tbl.h | 1 + 1 file changed, 1 insertion(+) commit d366a0ff1cf73f93796f2377e7b0361a94c41c35 Author: Josef Bacik Date: Wed Jun 8 10:32:10 2016 -0400 nbd: pass the nbd pointer for flags debugfs We were passing in &nbd for the private data in debugfs_create_file() for the flags entry. We expect it to just be nbd, fix this so we get proper output from this debugfs entry. Signed-off-by: Josef Bacik Signed-off-by: Jens Axboe drivers/block/nbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b0d81e3b7334897da9b2e3ffee860c2046f7bc0 Author: Josh Poimboeuf Date: Thu May 26 13:43:43 2016 -0500 objtool, drm/vmwgfx: Fix "duplicate frame pointer save" warning objtool reports the following warnings: drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: warning: objtool: vmw_send_msg()+0x107: duplicate frame pointer save drivers/gpu/drm/vmwgfx/vmwgfx_msg.o: warning: objtool: vmw_host_get_guestinfo()+0x252: duplicate frame pointer save To quote Linus: "The reason is that VMW_PORT_HB_OUT() uses a magic instruction sequence (a "rep outsb") to communicate with the hypervisor (it's a virtual GPU driver for vmware), and %rbp is part of the communication. So the inline asm does a save-and-restore of the frame pointer around the instruction sequence. I actually find the objtool warning to be quite reasonable, so it's not exactly a false positive, since in this case it actually does point out that the frame pointer won't be reliable over that instruction sequence. But in this particular case it just ends up being the wrong thing - the code is what it is, and %rbp just can't have the frame information due to annoying magic calling conventions." Silence the warnings by telling objtool to ignore the two functions which use the VMW_PORT_HB_{IN,OUT} macros. Reported-by: Linus Torvalds Signed-off-by: Josh Poimboeuf Acked-by: Linus Torvalds Cc: DRI Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/20160526184343.fdtjjjg67smmeekt@treble Signed-off-by: Ingo Molnar drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 5c1d3310d84309330264e2a06e5000eb289a44ad Author: Robin Murphy Date: Tue Jun 7 18:44:48 2016 +0100 drivers: of: Fix of_pci.h header guard The compilation of of_pci.c is governed by CONFIG_OF_PCI, but the corresponding declarations in of_pci.h are inconsistently guarded by CONFIG_OF, with the result that if CONFIG_PCI is disabled for an OF platform, the dangling external declarations are still active and the inline stub definitions not. So far this has managed to go unnoticed since it happens that the only references to these functions are from code which itself depends on CONFIG_PCI or CONFIG_OF_PCI. Fix this with the appropriate config guard so that any new callers outside PCI-specific code don't start unexpectedly breaking under certain configs. Signed-off-by: Robin Murphy Signed-off-by: Rob Herring include/linux/of_pci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3eefa7e8cc8516d737a6a961914e20501eb2a952 Author: Fabio Estevam Date: Thu Jun 2 21:30:48 2016 -0300 dt-bindings: Add vendor prefix for TechNexion TechNexion designs and manufactures embedded computing systems: http://www.technexion.com/ Signed-off-by: Fabio Estevam Signed-off-by: Rob Herring Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 4698f88c06b893f2acc0b443004a53bf490fde7c Author: Josh Poimboeuf Date: Tue Jun 7 14:43:16 2016 -0500 sched/debug: Fix 'schedstats=enable' cmdline option The 'schedstats=enable' option doesn't work, and also produces the following warning during boot: WARNING: CPU: 0 PID: 0 at /home/jpoimboe/git/linux/kernel/jump_label.c:61 static_key_slow_inc+0x8c/0xa0 static_key_slow_inc used before call to jump_label_init Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 4.7.0-rc1+ #25 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014 0000000000000086 3ae3475a4bea95d4 ffffffff81e03da8 ffffffff8143fc83 ffffffff81e03df8 0000000000000000 ffffffff81e03de8 ffffffff810b1ffb 0000003d00000096 ffffffff823514d0 ffff88007ff197c8 0000000000000000 Call Trace: [] dump_stack+0x85/0xc2 [] __warn+0xcb/0xf0 [] warn_slowpath_fmt+0x5f/0x80 [] static_key_slow_inc+0x8c/0xa0 [] static_key_enable+0x16/0x40 [] setup_schedstats+0x29/0x94 [] unknown_bootoption+0x89/0x191 [] parse_args+0x297/0x4b0 [] start_kernel+0x1d8/0x4a9 [] ? set_init_arg+0x55/0x55 [] ? early_idt_handler_array+0x120/0x120 [] x86_64_start_reservations+0x2f/0x31 [] x86_64_start_kernel+0x14a/0x16d The problem is that it tries to update the 'sched_schedstats' static key before jump labels have been initialized. Changing jump_label_init() to be called earlier before parse_early_param() wouldn't fix it: it would still fail trying to poke_text() because mm isn't yet initialized. Instead, just create a temporary '__sched_schedstats' variable which can be copied to the static key later during sched_init() after jump labels have been initialized. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Cc: Linus Torvalds Cc: Matt Fleming Cc: Mel Gorman Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Thomas Gleixner Fixes: cb2517653fcc ("sched/debug: Make schedstats a runtime tunable that is disabled by default") Link: http://lkml.kernel.org/r/453775fe3433bed65731a583e228ccea806d18cd.1465322027.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar kernel/sched/core.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) commit 9c57259117b9c25472a3fa6d5a14d6bb3b647e87 Author: Josh Poimboeuf Date: Fri Jun 3 17:58:40 2016 -0500 sched/debug: Fix /proc/sched_debug regression Commit: cb2517653fcc ("sched/debug: Make schedstats a runtime tunable that is disabled by default") ... introduced a bug when CONFIG_SCHEDSTATS is enabled and the runtime tunable is disabled (which is the default). The wait-time, sum-exec, and sum-sleep fields are missing from the /proc/sched_debug file in the runnable_tasks section. Fix it with a new schedstat_val() macro which returns the field value when schedstats is enabled and zero otherwise. The macro works with both SCHEDSTATS and !SCHEDSTATS. I put the macro in stats.h since it might end up being useful in other places. Signed-off-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Acked-by: Mel Gorman Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Srikar Dronamraju Cc: Thomas Gleixner Fixes: cb2517653fcc ("sched/debug: Make schedstats a runtime tunable that is disabled by default") Link: http://lkml.kernel.org/r/bcda7c2790cf2ccbe586a28c02dd7b6fe7749a2b.1464994423.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar kernel/sched/debug.c | 15 ++++----------- kernel/sched/stats.h | 3 +++ 2 files changed, 7 insertions(+), 11 deletions(-) commit 62a92c8f553e49270a0ee391b8733da71ab0aebc Author: Alexander Shishkin Date: Tue Jun 7 15:44:15 2016 +0300 perf/core: Remove a redundant check There is no way to end up in _free_event() with event::pmu being NULL. The latter is initialized in event allocation path and remains set forever. In case of allocation failure, the error path doesn't use _free_event(). Having the check, however, suggests that it is possible to have a event::pmu==NULL situation in _free_event() and confuses the robots. This patch gets rid of the check. Reported-by: Dan Carpenter Signed-off-by: Alexander Shishkin Signed-off-by: Peter Zijlstra (Intel) Cc: Arnaldo Carvalho de Melo Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: eranian@google.com Cc: vince@deater.net Link: http://lkml.kernel.org/r/1465303455-26032-1-git-send-email-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar kernel/events/core.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 2c610022711675ee908b903d242f0b90e1db661f Author: Peter Zijlstra Date: Wed Jun 8 10:19:51 2016 +0200 locking/qspinlock: Fix spin_unlock_wait() some more While this prior commit: 54cf809b9512 ("locking,qspinlock: Fix spin_is_locked() and spin_unlock_wait()") ... fixes spin_is_locked() and spin_unlock_wait() for the usage in ipc/sem and netfilter, it does not in fact work right for the usage in task_work and futex. So while the 2 locks crossed problem: spin_lock(A) spin_lock(B) if (!spin_is_locked(B)) spin_unlock_wait(A) foo() foo(); ... works with the smp_mb() injected by both spin_is_locked() and spin_unlock_wait(), this is not sufficient for: flag = 1; smp_mb(); spin_lock() spin_unlock_wait() if (!flag) // add to lockless list // iterate lockless list ... because in this scenario, the store from spin_lock() can be delayed past the load of flag, uncrossing the variables and loosing the guarantee. This patch reworks spin_is_locked() and spin_unlock_wait() to work in both cases by exploiting the observation that while the lock byte store can be delayed, the contender must have registered itself visibly in other state contained in the word. It also allows for architectures to override both functions, as PPC and ARM64 have an additional issue for which we currently have no generic solution. Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Boqun Feng Cc: Davidlohr Bueso Cc: Giovanni Gherdovich Cc: Linus Torvalds Cc: Pan Xinhui Cc: Paul E. McKenney Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Waiman Long Cc: Will Deacon Cc: stable@vger.kernel.org # v4.2 and later Fixes: 54cf809b9512 ("locking,qspinlock: Fix spin_is_locked() and spin_unlock_wait()") Signed-off-by: Ingo Molnar include/asm-generic/qspinlock.h | 53 ++++++++++++------------------------ kernel/locking/qspinlock.c | 60 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 36 deletions(-) commit b66b2a0adf0e48973b582e055758b9907a7eee7c Author: Ben Dooks Date: Tue Jun 7 17:22:17 2016 +0100 gpio: bcm-kona: fix bcm_kona_gpio_reset() warnings The bcm_kona_gpio_reset() calls bcm_kona_gpio_write_lock_regs() with what looks like the wrong parameter. The write_lock_regs function takes a pointer to the registers, not the bcm_kona_gpio structure. Fix the warning, and probably bug by changing the function to pass reg_base instead of kona_gpio, fixing the following warning: drivers/gpio/gpio-bcm-kona.c:550:47: warning: incorrect type in argument 1 (different address spaces) expected void [noderef] *reg_base got struct bcm_kona_gpio *kona_gpio warning: incorrect type in argument 1 (different address spaces) expected void [noderef] *reg_base got struct bcm_kona_gpio *kona_gpio Cc: stable@vger.kernel.org Signed-off-by: Ben Dooks Acked-by: Ray Jui Reviewed-by: Markus Mayer Signed-off-by: Linus Walleij drivers/gpio/gpio-bcm-kona.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 96685a55a82c383cbba7ef1d4a636acf708cf17f Author: Borislav Petkov Date: Wed Jun 1 12:04:28 2016 +0200 x86/cpu/AMD: Extend X86_FEATURE_TOPOEXT workaround to newer models We need to reenable the topology extensions CPUID leafs on newer models too, if BIOS has disabled them, as we rely on them to get proper compute unit topology. Make the printk a once thing, while at it. Signed-off-by: Borislav Petkov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Rui Huang Cc: Sherry Hurwitz Cc: Thomas Gleixner Cc: linux-hwmon@vger.kernel.org Link: http://lkml.kernel.org/r/1464775468-23355-1-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar arch/x86/kernel/cpu/amd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 60a5eaba46919f3a4c63a0c93bb7015ad5e56a82 Author: Linus Walleij Date: Wed Jun 8 13:45:08 2016 +0200 gpio: select ANON_INODES The build servers found that gpiolib is using ANON_INODES but has forgotten to select it. Fix this. Reported-by: kbuild test robot Fixes: 521a2ad6f862 ("gpio: add userspace ABI for GPIO line information") Signed-off-by: Linus Walleij drivers/gpio/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d1e44b6b2823f1751ffe7e7589f545f05cfe2095 Author: Srinivas Kandagatla Date: Fri Jun 3 12:23:09 2016 +0100 regulator: qcom_smd: add regulator ops for pm8941 lnldo After "regulator: qcom_smd: add list_voltage callback" patch adding pm8941 lnldo regulators would bug on list_voltages as it is a fixed regulator without any linear range. This patch fixes that issue by adding dedicated ops for pm8941 lnldo without list_voltages callback. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown Cc: stable@vger.kernel.org # v4.6 drivers/regulator/qcom_smd-regulator.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit a8a47540ebe32f1733eebc3e5699af580ceaa3f5 Author: Srinivas Kandagatla Date: Thu Jun 2 11:23:15 2016 +0100 regulator: qcom_smd: add list_voltage callback This patch adds support to list_voltage callback, so that consumers like mmc core, can get information of supported voltage range. Without this patch there is no way for mmc core to know this voltage range. Signed-off-by: Srinivas Kandagatla Signed-off-by: Mark Brown Cc: stable@vger.kernel.org # v4.6 drivers/regulator/qcom_smd-regulator.c | 1 + 1 file changed, 1 insertion(+) commit 4dc0dd83603f05dc3ae152af33ecb15104c313f3 Author: Tomeu Vizoso Date: Wed Jun 8 09:32:51 2016 +0200 spi: rockchip: Signal unfinished DMA transfers When using DMA, the transfer_one callback should return 1 because the transfer hasn't finished yet. A previous commit changed the function to return 0 when the DMA channels were correctly prepared. This manifested in Veyron boards with this message: [ 1.983605] cros-ec-spi spi0.0: EC failed to respond in time Fixes: ea9849113343 ("spi: rockchip: check return value of dmaengine_prep_slave_sg") Signed-off-by: Tomeu Vizoso Signed-off-by: Mark Brown Cc: stable@vger.kernel.org drivers/spi/spi-rockchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 970442c599b22ccd644ebfe94d1d303bf6f87c05 Author: Dave Hansen Date: Thu Jun 2 17:19:27 2016 -0700 x86/cpu/intel: Introduce macros for Intel family numbers Problem: We have a boatload of open-coded family-6 model numbers. Half of them have these model numbers in hex and the other half in decimal. This makes grepping for them tons of fun, if you were to try. Solution: Consolidate all the magic numbers. Put all the definitions in one header. The names here are closely derived from the comments describing the models from arch/x86/events/intel/core.c. We could easily make them shorter by doing things like s/SANDYBRIDGE/SNB/, but they seemed fine even with the longer versions to me. Do not take any of these names too literally, like "DESKTOP" or "MOBILE". These are all colloquial names and not precise descriptions of everywhere a given model will show up. Signed-off-by: Dave Hansen Cc: Adrian Hunter Cc: Andy Lutomirski Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Darren Hart Cc: Dave Hansen Cc: Denys Vlasenko Cc: Doug Thompson Cc: Eduardo Valentin Cc: H. Peter Anvin Cc: Jacob Pan Cc: Kan Liang Cc: Len Brown Cc: Linus Torvalds Cc: Mauro Carvalho Chehab Cc: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Rajneesh Bhardwaj Cc: Souvik Kumar Chakravarty Cc: Srinivas Pandruvada Cc: Stephane Eranian Cc: Thomas Gleixner Cc: Tony Luck Cc: Ulf Hansson Cc: Viresh Kumar Cc: Vishwanath Somayaji Cc: Zhang Rui Cc: jacob.jun.pan@intel.com Cc: linux-acpi@vger.kernel.org Cc: linux-edac@vger.kernel.org Cc: linux-mmc@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: platform-driver-x86@vger.kernel.org Link: http://lkml.kernel.org/r/20160603001927.F2A7D828@viggo.jf.intel.com Signed-off-by: Ingo Molnar arch/x86/include/asm/intel-family.h | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 5ab92a7cb82c66bf30685583a38a18538e3807db Author: Linus Walleij Date: Wed Jun 8 10:29:48 2016 +0200 leds: handle suspend/resume in heartbeat trigger The following phenomena was observed: when suspending the system, sometimes the heartbeat LED was left on, glowing and wasting power while the rest of the system is asleep, also disturbing power dissapation measures on the odd suspend cycle when it's left on. Clearly this is not how we want the heartbeat trigger to work: it should turn off and leave the LED off during system suspend. This removes the heartbeat trigger when preparing suspend and restores it during resume. The trigger code will make sure all LEDs are left in OFF state after removing the trigger, and will re-enable the trigger on all LEDs after resuming. Cc: linux-pm@vger.kernel.org Signed-off-by: Linus Walleij Reviewed-by: Ulf Hansson Signed-off-by: Jacek Anaszewski drivers/leds/trigger/ledtrig-heartbeat.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) commit 7cfe749fad5158247282f2fee30773fd454029ab Author: Tony Makkiel Date: Wed May 18 17:22:45 2016 +0100 leds: core: Fix brightness setting upon hardware blinking enabled Commit 76931edd54f8 ("leds: fix brightness changing when software blinking is active") changed the semantics of led_set_brightness() which according to the documentation should disable blinking upon any brightness setting. Moreover it made it different for soft blink case, where it was possible to change blink brightness, and for hardware blink case, where setting any brightness greater than 0 was ignored. While the change itself is against the documentation claims, it was driven also by the fact that timer trigger remained active after turning blinking off. Fixing that would have required major refactoring in the led-core, led-class, and led-triggers because of cyclic dependencies. Finally, it has been decided that allowing for brightness change during blinking is beneficial as it can be accomplished without disturbing blink rhythm. The change in brightness setting semantics will not affect existing LED class drivers that implement blink_set op thanks to the LED_BLINK_SW flag introduced by this patch. The flag state will be from now on checked in led_set_brightness() which will allow to distinguish between software and hardware blink mode. In the latter case the control will be passed directly to the drivers which apply their semantics on brightness set, which is disable the blinking in case of most such drivers. New drivers will apply new semantics and just change the brightness while hardware blinking is on, if possible. The issue was smuggled by subsequent LED core improvements, which modified the code that originally introduced the problem. Fixes: f1e80c07416a ("leds: core: Add two new LED_BLINK_ flags") Signed-off-by: Tony Makkiel Signed-off-by: Jacek Anaszewski Documentation/leds/leds-class.txt | 4 ++-- drivers/leds/led-core.c | 9 ++++++--- include/linux/leds.h | 23 ++++++++++++----------- 3 files changed, 20 insertions(+), 16 deletions(-) commit 0106d456c4cb1770253fefc0ab23c9ca760b43f7 Author: Will Deacon Date: Tue Jun 7 17:55:15 2016 +0100 arm64: mm: always take dirty state from new pte in ptep_set_access_flags Commit 66dbd6e61a52 ("arm64: Implement ptep_set_access_flags() for hardware AF/DBM") ensured that pte flags are updated atomically in the face of potential concurrent, hardware-assisted updates. However, Alex reports that: | This patch breaks swapping for me. | In the broken case, you'll see either systemd cpu time spike (because | it's stuck in a page fault loop) or the system hang (because the | application owning the screen is stuck in a page fault loop). It turns out that this is because the 'dirty' argument to ptep_set_access_flags is always 0 for read faults, and so we can't use it to set PTE_RDONLY. The failing sequence is: 1. We put down a PTE_WRITE | PTE_DIRTY | PTE_AF pte 2. Memory pressure -> pte_mkold(pte) -> clear PTE_AF 3. A read faults due to the missing access flag 4. ptep_set_access_flags is called with dirty = 0, due to the read fault 5. pte is then made PTE_WRITE | PTE_DIRTY | PTE_AF | PTE_RDONLY (!) 6. A write faults, but pte_write is true so we get stuck The solution is to check the new page table entry (as would be done by the generic, non-atomic definition of ptep_set_access_flags that just calls set_pte_at) to establish the dirty state. Cc: # 4.3+ Fixes: 66dbd6e61a52 ("arm64: Implement ptep_set_access_flags() for hardware AF/DBM") Reviewed-by: Catalin Marinas Reported-by: Alexander Graf Tested-by: Alexander Graf Signed-off-by: Will Deacon arch/arm64/mm/fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d4defe21c682c934a19fce1ba8b54b7bde61b08 Author: Linus Walleij Date: Wed Jun 8 10:58:20 2016 +0200 gpio: include in gpiolib-of When enabling the gpiolib for all archs a build robot came up with this: All errors (new ones prefixed by >>): drivers/gpio/gpiolib-of.c: In function 'of_mm_gpiochip_add_data': >> drivers/gpio/gpiolib-of.c:317:2: error: implicit declaration of function 'iounmap' [-Werror=implicit-function-declaration] iounmap(mm_gc->regs); ^~~~~~~ cc1: some warnings being treated as errors Fix this by including explicitly. Fixes: 296ad4acb8ef ("gpio: remove deps on ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB") Reported-by: kbuild test robot Signed-off-by: Linus Walleij drivers/gpio/gpiolib-of.c | 1 + 1 file changed, 1 insertion(+) commit f4833b8cc7edab57d3f3033e549111a546c2e02b Author: Ricardo Ribalda Delgado Date: Fri Jun 3 19:10:02 2016 +0200 gpiolib: Fix unaligned used of reference counters gpiolib relies on the reference counters to clean up the gpio_device structure. Although the number of get/put is properly aligned on gpiolib.c itself, it does not take into consideration how the referece counters are affected by other external functions such as cdev_add and device_add. Because of this, after the last call to put_device, the reference counter has a value of +3, therefore never calling gpiodevice_release. Due to the fact that some of the device has already been cleaned on gpiochip_remove, the library will end up OOPsing the kernel (e.g. a call to of_gpiochip_find_and_xlate). Cc: stable@vger.kernel.org Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11f33a6d15bfa397867ac0d7f3481b6dd683286f Author: Ricardo Ribalda Delgado Date: Fri Jun 3 19:10:01 2016 +0200 gpiolib: Fix NULL pointer deference Under some circumstances, a gpiochip might be half cleaned from the gpio_device list. This patch makes sure that the chip pointer is still valid, before calling the match function. [ 104.088296] BUG: unable to handle kernel NULL pointer dereference at 0000000000000090 [ 104.089772] IP: [] of_gpiochip_find_and_xlate+0x15/0x80 [ 104.128273] Call Trace: [ 104.129802] [] ? of_parse_own_gpio+0x1f0/0x1f0 [ 104.131353] [] gpiochip_find+0x60/0x90 [ 104.132868] [] of_get_named_gpiod_flags+0x9a/0x120 ... [ 104.141586] [] gpio_led_probe+0x11b/0x360 Cc: stable@vger.kernel.org Signed-off-by: Ricardo Ribalda Delgado Signed-off-by: Linus Walleij drivers/gpio/gpiolib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f84f29ff30bdb1bca23017b118b4ea3999cac32 Author: Helmut Grohne Date: Fri Jun 3 14:15:32 2016 +0200 gpio: zynq: initialize clock even without CONFIG_PM When the PM initialization was moved in the commit referenced below, the code enabling the clock was removed from the probe function. On CONFIG_PM=y kernels, this is not a problem as the pm resume hook enables the clock, but when power management is disabled, all those pm_* functions are noops and the clock is never enabled resulting in a dysfunctional gpio controller. Put the clock initialization back to support CONFIG_PM=n. Cc: stable@vger.kernel.org Signed-off-by: Helmut Grohne Fixes: 3773c195d387 ("gpio: zynq: Do PM initialization earlier to support gpio hogs") Signed-off-by: Linus Walleij drivers/gpio/gpio-zynq.c | 7 +++++++ 1 file changed, 7 insertions(+) commit d15d6cf91695674fbabac3b1d2c8a269d9bab5c6 Author: William Breathitt Gray Date: Thu Jun 2 16:00:09 2016 -0400 gpio: 104-dio-48e: Fix control port offset computation off-by-one error There are only two control ports, each controlling three distinct I/O ports. To compute the control port address offset for a respective I/O port, the I/O port address offset should be divided by 3; dividing by 2 may result in not only the wrong address offset but possibly also an out-of-bounds array memory access for a non-existent third control port. Fixes: 1b06d64f7374 ("gpio: Add GPIO support for the ACCES 104-DIO-48E") Signed-off-by: William Breathitt Gray Signed-off-by: Linus Walleij drivers/gpio/gpio-104-dio-48e.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 88832a22d6bb50e3b5f9d5ecc6cf26707c35f322 Author: Ben Dooks Date: Tue Jun 7 19:27:51 2016 +0100 net-sysfs: fix missing The of_find_net_device_by_node() function is defined in but not included in the .c file that implements it. Fix the following warning by including the header: net/core/net-sysfs.c:1494:19: warning: symbol 'of_find_net_device_by_node' was not declared. Should it be static? Signed-off-by: Ben Dooks Signed-off-by: David S. Miller net/core/net-sysfs.c | 1 + 1 file changed, 1 insertion(+) commit 0b148def403153a4d1565f1640356cb78ce5109f Author: Toshiaki Makita Date: Tue Jun 7 19:14:17 2016 +0900 bridge: Don't insert unnecessary local fdb entry on changing mac address The missing br_vlan_should_use() test caused creation of an unneeded local fdb entry on changing mac address of a bridge device when there is a vlan which is configured on a bridge port but not on the bridge device. Fixes: 2594e9064a57 ("bridge: vlan: add per-vlan struct and move to rhashtables") Signed-off-by: Toshiaki Makita Acked-by: Nikolay Aleksandrov Signed-off-by: David S. Miller net/bridge/br_fdb.c | 2 ++ 1 file changed, 2 insertions(+) commit 03cce00b4b0d70885c7a63ef17713b8cc2b1c8bd Merge: af8c34c 94bef00 Author: Greg Kroah-Hartman Date: Tue Jun 7 22:26:20 2016 -0700 Merge tag 'iio-fixes-for-4.7a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-linus Jonathan writes: First round of iio fixes for the 4.7 cycle. A slightly bumper set due to travel delaying the pull request and a fair few issues with the recent merge window patches. Patches all over the place. The st-sensors one is probably the most involved, but definitly solves the issues seen. Note there are some other issues around that handler (and the fact that a lot of boards tie a level interrupt chip to an edge interrupt only irq chip). These are not regressions however, so will turn up the slow route. * core - iio_trigger_attach_pollfunc had some really badly wrong error handling. Another nasty triggered whilst chasing down issues with the st sensors rework below. * ad5592r - fix an off by one error when allocating channels. * am2315 - a stray mutex unlock before we ever take the lock. * apds9960 - missing a parent in the driver model (which should be the i2c device). Result is it doesn't turn up under /sys/bus/i2c/devices which some userspace code uses for repeatable device identification. * as3935 - ABI usage bug which meant a processed value was reported as raw. Now reporting scale as well to ensure userspace has the info it needs. - Don't return processed value via the buffer - it doesn't conform to the ABI and will overflow in some cases. - Fix a wrongly sized buffer which would overflow trashing part of the stack. Also move it onto the heap as part of the fix. * bh1780 - a missing return after write in debugfs lead to an incorrect read and a null pointer dereference. - dereferencing the wrong pointer in suspend and resume leading to unpredictable results. - assign a static name to avoid accidentally ending up with no name if loaded via device tree. * bmi160 - output data rate for the accelerometer was incorrectly reported. Fix it. - writing the output data rate was also wrong due to reverse parameters. * bmp280 - error message for wrong chip ID gave the wrong expected value. * hdc100x - mask for writing the integration time was wrong allowin g us to get 'stuck' in a particular value with no way back. - temperature reported in celsius rather than millicelsius as per the ABI. - Get rid of some incorrect data shifting which lead to readings being rather incorrect. * max44000 - drop scale attribute for proximity as it is an unscaled value (depends on what is in range rather than anything knowable at the detector). * st-pressure - ABI compliance fixes - units were wrong. * st-sensors - We introduced some nasty issues with the recent switch over to a a somewhat threaded handler in that we broke using a software trigger with these devices. Now do it properly. It's a larger patch than ideal for a fix, but the logic is straight forward. - Make sure the trigger is initialized before requesting the interrupt. This matters now the interrupt can be shared. Before it was ugly and wrong but short of flakey hardware could not be triggered. - Hammer down the dataready pin at boot - otherwise with really unlucky timing things could get interestingly wedged requiring a hard power down of the chip. commit 11c011a5e777c83819078a18672543f04482b3ec Author: Srinivas Kandagatla Date: Thu May 19 11:12:56 2016 +0100 usb: echi-hcd: Add ehci_setup check before echi_shutdown This patch protects system from crashing at shutdown in cases where usb host is not added yet from OTG controller driver. As ehci_setup() not done yet, so stop accessing registers or variables initialized as part of ehci_setup(). The use case is simple, for boards like DB410c where the usb host or device functionality is decided based on the micro-usb cable presence. If the board boots up with micro-usb connected, the OTG driver like echi-msm would not add the usb host by default. However a system shutdown would go and access registers and uninitialized variables, resulting in below crash. Unable to handle kernel NULL pointer dereference at virtual address 00000008 pgd = ffffffc034581000 [00000008] *pgd=0000000000000000, *pud=0000000000000000 CPU: 2 PID: 1957 Comm: reboot Not tainted 4.6.0+ #99 task: ffffffc034bc0000 ti: ffffffc0345cc000 task.ti: ffffffc0345cc000 PC is at ehci_halt+0x54/0x108 LR is at ehci_halt+0x38/0x108 pc : [] lr : [] pstate: a00001c5 sp : ffffffc0345cfc60 x29: ffffffc0345cfc60 x28: ffffffc0345cc000 x27: ffffff8008a4d000 x26: 000000000000008e x25: ffffff8008d86cb0 x24: ffffff800908b040 x23: ffffffc036068870 x22: ffffff8009d0a000 x21: ffffffc03512a410 x20: ffffffc03512a410 x19: ffffffc03512a338 x18: 00000000000065ba x17: ffffff8009b16b80 x16: 0000000000000003 x15: 00000000000065b9 x14: 00000000000065b6 x13: 0000000000000000 x12: 0000000000000000 x11: 000000000000003d x10: ffffffc0345cf9e0 x9 : 0000000000000001 x8 : ffffffc0345cc000 x7 : ffffff8008698360 x6 : 0000000000000000 x5 : 0000000000000080 x4 : 0000000000000001 x3 : 0000000000000000 x2 : 0000000000000000 x1 : 0000000000000008 x0 : ffffffc034bc0000 Process reboot (pid: 1957, stack limit = 0xffffffc0345cc020) Stack: (0xffffffc0345cfc60 to 0xffffffc0345d0000) fc60: ffffffc0345cfc90 ffffff8008698448 ffffffc03512a338 ffffffc03512a338 fc80: ffffffc03512a410 ffffff8008a3bbfc ffffffc0345cfcc0 ffffff8008698548 fca0: ffffffc03512a338 ffffffc03512a000 ffffffc03512a410 ffffff8009d0a000 fcc0: ffffffc0345cfcf0 ffffff800865d2bc ffffffc036068828 ffffffc036068810 fce0: ffffffc036003810 ffffff800853f43c ffffffc0345cfd00 ffffff800854338c fd00: ffffffc0345cfd10 ffffff800853f45c ffffffc0345cfd60 ffffff80080e0f48 fd20: 0000000000000000 0000000001234567 ffffff8008f8c000 ffffff8008f8c060 fd40: 0000000000000000 0000000000000015 0000000000000120 ffffff80080e0f30 fd60: ffffffc0345cfd70 ffffff80080e1020 ffffffc0345cfd90 ffffff80080e12fc fd80: 0000000000000000 0000000001234567 0000000000000000 ffffff8008085e70 fda0: 0000000000000000 0000005592905000 ffffffffffffffff 0000007f79daf1cc fdc0: 0000000000000000 0000000000000000 0000007ffcbb1198 000000000000000a fde0: 00000055928d3f58 0000000000000001 ffffffc034900000 00000000fffffffe fe00: ffffffc034900000 0000007f79da902c ffffffc0345cfe40 ffffff800820af38 fe20: 0000000000000000 0000007ffcbb1078 ffffffffffffffff ffffff80081e9b38 fe40: ffffffc0345cfe60 ffffff80081eb410 ffffffc0345cfe60 ffffff80081eb444 fe60: ffffffc0345cfec0 ffffff80081ec4f4 0000000000000000 0000007ffcbb1078 fe80: ffffffffffffffff 0000000000000015 ffffffc0345cfec0 0000007ffcbb1078 fea0: 0000000000000002 000000000000000a ffffffffffffffff 0000000000000000 fec0: 0000000000000000 ffffff8008085e70 fffffffffee1dead 0000000028121969 fee0: 0000000001234567 0000000000000000 ffffffffffffffff 8080800000800000 ff00: 0000800000808080 0000007ffcbb10f0 000000000000008e fefeff54918cb8c7 ff20: 7f7f7f7fffffffff 0101010101010101 0000000000000010 0000000000000000 ff40: 0000000000000000 0000007f79e33588 0000005592905eb8 0000007f79daf1b0 ff60: 0000007ffcbb1340 0000005592906000 0000005592905000 0000005592906000 ff80: 0000005592907000 0000000000000002 0000007ffcbb1d98 0000005592906000 ffa0: 00000055928d2000 0000000000000000 0000000000000000 0000007ffcbb1aa0 ffc0: 00000055928b819c 0000007ffcbb1aa0 0000007f79daf1cc 0000000000000000 ffe0: fffffffffee1dead 000000000000008e 05ef555057155555 d555544d55d775d3 Call trace: Exception stack(0xffffffc0345cfaa0 to 0xffffffc0345cfbc0) Set corner to 6 faa0: ffffffc03512a338 ffffffc03512a410 ffffffc0345cfc60 ffffff800869837c fac0: ffffff8008114210 0000000100000001 ffffff8009ce1b20 ffffff8009ce5f20 fae0: ffffffc0345cfb80 ffffff80081145a8 ffffffc0345cfc10 ffffff800810b924 fb00: ffffffc0345cc000 00000000000001c0 ffffffc03512a410 ffffff8009d0a000 fb20: ffffffc036068870 ffffff800908b040 ffffff8008d86cb0 000000000000008e fb40: ffffffc034bc0000 0000000000000008 0000000000000000 0000000000000000 fb60: 0000000000000001 0000000000000080 0000000000000000 ffffff8008698360 fb80: ffffffc0345cc000 0000000000000001 ffffffc0345cf9e0 000000000000003d fba0: 0000000000000000 0000000000000000 00000000000065b6 00000000000065b9 [] ehci_halt+0x54/0x108 [] ehci_silence_controller+0x18/0xcc [] ehci_shutdown+0x4c/0x64 [] usb_hcd_platform_shutdown+0x1c/0x24 [] platform_drv_shutdown+0x20/0x28 [] device_shutdown+0xf4/0x1b0 [] kernel_restart_prepare+0x34/0x3c [] kernel_restart+0x14/0x74 [] SyS_reboot+0x110/0x21c [] el0_svc_naked+0x24/0x28 Code: 53001c42 350000a2 d5033e9f 91002021 (b9000022) Fixes 4bb3cad7125b ("usb: host: ehci-msm: Register usb shutdown function") Signed-off-by: Srinivas Kandagatla Tested-by: Pramod Gurav Tested-by: Andy Gross Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-hcd.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 815c9d6a3caeb803ae36d09788c8969b85ce7e4c Author: Andy Gross Date: Fri May 20 16:35:07 2016 -0500 usb: host: ehci-msm: Conditionally call ehci suspend/resume This patch fixes a suspend/resume issue where the driver is blindly calling ehci_suspend/resume functions when the ehci hasn't been setup. This results in a crash during suspend/resume operations. Signed-off-by: Andy Gross Tested-by: Pramod Gurav Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-msm.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 1700bd9872dcd06a284c38c1ce33bba0f239dbd3 Author: Geert Uytterhoeven Date: Sun May 22 11:06:26 2016 +0200 MAINTAINERS: Add file patterns for usb device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Greg Kroah-Hartman MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 7cc9ca5a994c90fa771135e50b7a9cb99a65aa1d Author: Thierry Reding Date: Thu May 26 17:23:30 2016 +0200 usb: host: ehci-tegra: Avoid getting the same reset twice Starting with commit 0b52297f2288 ("reset: Add support for shared reset controls") there is a reference count for reset control assertions. The goal is to allow resets to be shared by multiple devices and an assert will take effect only when all instances have asserted the reset. In order to preserve backwards-compatibility, all reset controls become exclusive by default. This is to ensure that reset_control_assert() can immediately assert in hardware. However, this new behaviour triggers the following warning in the EHCI driver for Tegra: [ 3.365019] ------------[ cut here ]------------ [ 3.369639] WARNING: CPU: 0 PID: 1 at drivers/reset/core.c:187 __of_reset_control_get+0x16c/0x23c [ 3.382151] Modules linked in: [ 3.385214] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc6-next-20160503 #140 [ 3.392769] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree) [ 3.399046] [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [ 3.406787] [] (show_stack) from [] (dump_stack+0x90/0xa4) [ 3.414007] [] (dump_stack) from [] (__warn+0xe8/0x100) [ 3.420964] [] (__warn) from [] (warn_slowpath_null+0x20/0x28) [ 3.428525] [] (warn_slowpath_null) from [] (__of_reset_control_get+0x16c/0x23c) [ 3.437648] [] (__of_reset_control_get) from [] (tegra_ehci_probe+0x394/0x518) [ 3.446600] [] (tegra_ehci_probe) from [] (platform_drv_probe+0x4c/0xb0) [ 3.455029] [] (platform_drv_probe) from [] (driver_probe_device+0x1ec/0x330) [ 3.463892] [] (driver_probe_device) from [] (__driver_attach+0xb8/0xbc) [ 3.472320] [] (__driver_attach) from [] (bus_for_each_dev+0x68/0x9c) [ 3.480489] [] (bus_for_each_dev) from [] (bus_add_driver+0x1a0/0x218) [ 3.488743] [] (bus_add_driver) from [] (driver_register+0x78/0xf8) [ 3.496738] [] (driver_register) from [] (do_one_initcall+0x40/0x170) [ 3.504909] [] (do_one_initcall) from [] (kernel_init_freeable+0x158/0x1f8) [ 3.513600] [] (kernel_init_freeable) from [] (kernel_init+0x8/0x114) [ 3.521770] [] (kernel_init) from [] (ret_from_fork+0x14/0x3c) [ 3.529361] ---[ end trace 4bda87dbe4ecef8a ]--- The reason is that Tegra SoCs have three EHCI controllers, each with a separate reset line. However the first controller contains UTMI pads configuration registers that are shared with its siblings and that are reset as part of the first controller's reset. There is special code in the driver to assert and deassert this shared reset at probe time, and it does so irrespective of which controller is probed first to ensure that these shared registers are reset before any of the controllers are initialized. Unfortunately this means that if the first controller gets probed first, it will request its own reset line and will subsequently request the same reset line again (temporarily) to perform the reset. This used to work fine before the above-mentioned commit, but now triggers the new WARN. Work around this by making sure we reuse the controller's reset if the controller happens to be the first controller. Cc: Philipp Zabel Cc: Hans de Goede Reviewed-by: Philipp Zabel Signed-off-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-tegra.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) commit f8a15a9650694feaa0dabf197b0c94d37cd3fb42 Author: Thierry Reding Date: Thu May 26 17:23:29 2016 +0200 usb: host: ehci-tegra: Grab the correct UTMI pads reset There are three EHCI controllers on Tegra SoCs, each with its own reset line. However, the first controller contains a set of UTMI configuration registers that are shared with its siblings. These registers will only be reset as part of the first controller's reset. For proper operation it must be ensured that the UTMI configuration registers are reset before any of the EHCI controllers are enabled, irrespective of the probe order. Commit a47cc24cd1e5 ("USB: EHCI: tegra: Fix probe order issue leading to broken USB") introduced code that ensures the first controller is always reset before setting up any of the controllers, and is never again reset afterwards. This code, however, grabs the wrong reset. Each EHCI controller has two reset controls attached: 1) the USB controller reset and 2) the UTMI pads reset (really the first controller's reset). In order to reset the UTMI pads registers the code must grab the second reset, but instead it grabbing the first. Fixes: a47cc24cd1e5 ("USB: EHCI: tegra: Fix probe order issue leading to broken USB") Acked-by: Jon Hunter Cc: stable@vger.kernel.org Signed-off-by: Thierry Reding Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ehci-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dcb21ad4385731b7fc3ef39d255685f2f63c8c5d Author: Sudip Mukherjee Date: Mon May 30 19:16:33 2016 +0530 USB: mos7720: delete parport parport subsystem has introduced parport_del_port() to delete a port when it is going away. Without parport_del_port() the registered port will not be unregistered. To reproduce and verify the error: Command to be used is : ls /sys/bus/parport/devices 1) without the device attached there is no output as there is no registered parport. 2) Attach the device, and the command will show "parport0". 3) Remove the device and the command still shows "parport0". 4) Attach the device again and we get "parport1". With the patch applied: 1) without the device attached there is no output as there is no registered parport. 2) Attach the device, and the command will show "parport0". 3) Remove the device and there is no output as "parport0" is now removed. 4) Attach device again to get "parport0" again. Cc: # 4.2+ Signed-off-by: Sudip Mukherjee Signed-off-by: Greg Kroah-Hartman drivers/usb/serial/mos7720.c | 1 + 1 file changed, 1 insertion(+) commit c66f59ee5050447b3da92d36f5385a847990a894 Author: Michał Pecio Date: Tue Jun 7 12:34:45 2016 +0200 USB: OHCI: Don't mark EDs as ED_OPER if scheduling fails Since ed_schedule begins with marking the ED as "operational", the ED may be left in such state even if scheduling actually fails. This allows future submission attempts to smuggle this ED to the hardware behind the scheduler's back and without linking it to the ohci->eds_in_use list. The former causes bandwidth saturation and data loss on isoc endpoints, the latter crashes the kernel when attempt is made to unlink such ED from this list. Fix ed_schedule to update ED state only on successful return. Signed-off-by: Michal Pecio Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman drivers/usb/host/ohci-q.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3b6d1eb7ea65f4aa64115cf9ba02c190e5c9f6de Author: Aneesh Kumar K.V Date: Thu May 19 13:24:30 2016 +0530 powerpc/mm/hash: Compute the segment size correctly for ISA 3.0 PowerISA 3.0 encodes the segment size in the second half of hash page table entry. Update hpte_decode() accordingly. Fixes: 50de596de8be ("powerpc/mm/hash: Add support for Power9 Hash") Signed-off-by: Aneesh Kumar K.V Signed-off-by: Michael Ellerman arch/powerpc/mm/hash_native_64.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 9690c15742688e9cb5ee4aa0b08e458551ceea13 Author: Aneesh Kumar K.V Date: Thu Jun 2 15:14:48 2016 +0530 powerpc/mm/radix: Fix always false comparison against MMU_NO_CONTEXT In some of the radix TLB flush routines, we use a local to store the mm->context.id, AKA the PID. Currently we use an int, but the PID is unsigned long, so large values of PID will be truncated. In particular MMU_NO_CONTEXT is -1, which means all our comparisons against that value can never be true. This means we'll issue TLB flushes when we shouldn't on radix enabled machines. Fix it by using an unsigned long for the local. Discovered by Coverity. Fixes: 1a472c9dba6b ("powerpc/mm/radix: Add tlbflush routines") Signed-off-by: Aneesh Kumar K.V Reviewed-by: Balbir Singh [mpe: Write change log] Signed-off-by: Michael Ellerman arch/powerpc/mm/tlb-radix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c8ae067f2635be0f8c7e5db1bb74b757d623e05b Merge: 2051877 1607f09 Author: Linus Torvalds Date: Tue Jun 7 20:41:36 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Fixes for crap of assorted ages: EOPENSTALE one is 4.2+, autofs one is 4.6, d_walk - 3.2+. The atomic_open() and coredump ones are regressions from this window" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: coredump: fix dumping through pipes fix a regression in atomic_open() fix d_walk()/non-delayed __d_free() race autofs braino fix for do_last() fix EOPENSTALE bug in do_last() commit 38bab98a8da4a2ff5c3f55b045b0c8bf6901362f Author: Wolfram Sang Date: Sun Jun 5 09:35:43 2016 +0200 hwmon: (lm90) use proper type for update_interval The code handles this variable always as unsigned, so adapt the type. Signed-off-by: Wolfram Sang Signed-off-by: Guenter Roeck drivers/hwmon/lm90.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1069ad8f65a474bb30a487a001511b25f3575f5e Author: Krzysztof Kozlowski Date: Wed Jun 1 11:43:12 2016 +0200 hwmon: (ina2xx) Document compatible for INA231 Document the compatible for INA231 sensor. Signed-off-by: Krzysztof Kozlowski Acked-by: Rob Herring Signed-off-by: Guenter Roeck Documentation/devicetree/bindings/hwmon/ina2xx.txt | 1 + 1 file changed, 1 insertion(+) commit 7be4881846cfa67f968eaf5b7b50d9623a652afb Author: Borislav Petkov Date: Wed Jun 1 11:36:13 2016 +0200 hwmon: (fam15h_power) Disable preemption when reading registers We need to read a bunch of registers on each compute unit and possibly on the current CPU too. Disable preemption around it. Otherwise, you get: BUG: using smp_processor_id() in preemptible [00000000] code: systemd-udevd/327 caller is read_registers+0x6a/0x110 [fam15h_power] CPU: 3 PID: 327 Comm: systemd-udevd Not tainted 4.7.0-rc1+ #4 Hardware name: HP HP EliteBook 745 G3/807E, BIOS N73 Ver. 01.08 01/28/2016 ... Suggested-by: Thomas Gleixner Signed-off-by: Borislav Petkov Cc: Rui Huang Cc: Sherry Hurwitz Cc: Guenter Roeck Acked-by: Huang Rui Tested-by: Huang Rui Fixes: fa7943449943 ("hwmon: (fam15h_power) Add compute unit accumulated power") Signed-off-by: Guenter Roeck drivers/hwmon/fam15h_power.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 1607f09c226d1378439c411baaaa020042750338 Author: Mateusz Guzik Date: Sun Jun 5 23:14:14 2016 +0200 coredump: fix dumping through pipes The offset in the core file used to be tracked with ->written field of the coredump_params structure. The field was retired in favour of file->f_pos. However, ->f_pos is not maintained for pipes which leads to breakage. Restore explicit tracking of the offset in coredump_params. Introduce ->pos field for this purpose since ->written was already reused. Fixes: a00839395103 ("get rid of coredump_params->written"). Reported-by: Zbigniew Jędrzejewski-Szmek Signed-off-by: Mateusz Guzik Reviewed-by: Omar Sandoval Signed-off-by: Al Viro arch/powerpc/platforms/cell/spufs/coredump.c | 2 +- fs/binfmt_elf.c | 2 +- fs/binfmt_elf_fdpic.c | 2 +- fs/coredump.c | 4 +++- include/linux/binfmts.h | 1 + 5 files changed, 7 insertions(+), 4 deletions(-) commit a01e718f7241c53f564402f7acff373eed5bd166 Author: Al Viro Date: Tue Jun 7 21:53:51 2016 -0400 fix a regression in atomic_open() open("/foo/no_such_file", O_RDONLY | O_CREAT) on should fail with EACCES when /foo is not writable; failing with ENOENT is obviously wrong. That got broken by a braino introduced when moving the creat_error logics from atomic_open() to lookup_open(). Easy to fix, fortunately. Spotted-by: "Yan, Zheng" Tested-by: "Yan, Zheng" Signed-off-by: Al Viro fs/namei.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 3d56c25e3bb0726a5c5e16fc2d9e38f8ed763085 Author: Al Viro Date: Tue Jun 7 21:26:55 2016 -0400 fix d_walk()/non-delayed __d_free() race Ascend-to-parent logics in d_walk() depends on all encountered child dentries not getting freed without an RCU delay. Unfortunately, in quite a few cases it is not true, with hard-to-hit oopsable race as the result. Fortunately, the fix is simiple; right now the rule is "if it ever been hashed, freeing must be delayed" and changing it to "if it ever had a parent, freeing must be delayed" closes that hole and covers all cases the old rule used to cover. Moreover, pipes and sockets remain _not_ covered, so we do not introduce RCU delay in the cases which are the reason for having that delay conditional in the first place. Cc: stable@vger.kernel.org # v3.2+ (and watch out for __d_materialise_dentry()) Signed-off-by: Al Viro fs/dcache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 983e600e88835f0321d1a0ea06f52d48b7b5a544 Author: Srinivas Pandruvada Date: Tue Jun 7 17:38:53 2016 -0700 cpufreq: intel_pstate: Fix ->set_policy() interface for no_turbo When turbo is disabled, the ->set_policy() interface is broken. For example, when turbo is disabled and cpuinfo.max = 2900000 (full max turbo frequency), setting the limits results in frequency less than the requested one: Set 1000000 KHz results in 0700000 KHz Set 1500000 KHz results in 1100000 KHz Set 2000000 KHz results in 1500000 KHz This is because the limits->max_perf fraction is calculated using the max turbo frequency as the reference, but when the max P-State is capped in intel_pstate_get_min_max(), the reference is not the max turbo P-State. This results in reducing max P-State. One option is to always use max turbo as reference for calculating limits. But this will not be correct. By definition the intel_pstate sysfs limits, shows percentage of available performance. So when BIOS has disabled turbo, the available performance is max non turbo. So the max_perf_pct should still show 100%. Signed-off-by: Srinivas Pandruvada [ rjw : Subject & changelog, rewrite in fewer lines of code ] Cc: All applicable Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 2c2c1af4497514da1be2b571066859701dd79231 Author: Srinivas Pandruvada Date: Tue Jun 7 17:38:52 2016 -0700 cpufreq: intel_pstate: Fix code ordering in intel_pstate_set_policy() The limits->max_perf is rounded_up but immediately overwritten by another assignment to limits->max_perf. Move that operation to the correct location. While here also added a pr_debug() call in ->set_policy to aid in debugging. Fixes: 785ee2788141 (cpufreq: intel_pstate: Fix limits->max_perf rounding error) Signed-off-by: Srinivas Pandruvada [ rjw : Subject & changelog ] Cc: 4.4+ # 4.4+ Signed-off-by: Rafael J. Wysocki drivers/cpufreq/intel_pstate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit b3c0a4dab7e35a9b6d69c0415641d2280fdefb2b Author: Wolfram Sang Date: Mon Jun 6 18:48:38 2016 +0200 of: fix autoloading due to broken modalias with no 'compatible' Because of an improper dereference, a stray 'C' character was output to the modalias when no 'compatible' was specified. This is the case for some old PowerMac drivers which only set the 'name' property. Fix it to let them match again. Reported-by: Mathieu Malaterre Signed-off-by: Wolfram Sang Tested-by: Mathieu Malaterre Cc: Philipp Zabel Cc: Andreas Schwab Fixes: 6543becf26fff6 ("mod/file2alias: make modalias generation safe for cross compiling") Cc: stable@vger.kernel.org # v3.9+ Signed-off-by: Michael Ellerman scripts/mod/file2alias.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c2a63e301fd19ccae673e79de59b30a232ff7f9 Author: Michael Ellerman Date: Wed Jun 8 10:01:23 2016 +1000 powerpc/pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET since POWER8NVL was added The recent commit 7cc851039d64 ("powerpc/pseries: Add POWER8NVL support to ibm,client-architecture-support call") added a new PVR mask & value to the start of the ibm_architecture_vec[] array. However it missed the fact that further down in the array, we hard code the offset of one of the fields, and then at boot use that value to patch the value in the array. This means every update to the array must also update the #define, ugh. This means that on pseries machines we will misreport to firmware the number of cores we support, by a factor of threads_per_core. Fix it for now by updating the #define. Fixes: 7cc851039d64 ("powerpc/pseries: Add POWER8NVL support to ibm,client-architecture-support call") Cc: stable@vger.kernel.org # v4.0+ Signed-off-by: Michael Ellerman arch/powerpc/kernel/prom_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32565644580de57e67b700f7ddbf658e0fc43a35 Merge: ce3cf4e 3ec10d3 Author: David S. Miller Date: Tue Jun 7 17:14:10 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes for net The following patchset contains two Netfilter/IPVS fixes for your net tree, they are: 1) Fix missing alignment in next offset calculation for standard targets, introduced in the previous merge window, patch from Florian Westphal. 2) Fix to correct the handling of outgoing connections which use the SIP-pe such that the binding of a real-server is updated when needed. This was an omission from changes introduced by Marco Angaroni in the previous merge window too, to allow handling of outgoing connections by the SIP-pe. Patch and report came via Simon Horman. ==================== Signed-off-by: David S. Miller commit ce3cf4ec0305919fc69a972f6c2b2efd35d36abc Author: Yuchung Cheng Date: Mon Jun 6 15:07:18 2016 -0700 tcp: record TLP and ER timer stats in v6 stats The v6 tcp stats scan do not provide TLP and ER timer information correctly like the v4 version . This patch fixes that. Fixes: 6ba8a3b19e76 ("tcp: Tail loss probe (TLP)") Fixes: eed530b6c676 ("tcp: early retransmit") Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller net/ipv6/tcp_ipv6.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 92c075dbdeed02bdf293cb0f513bad70aa714b8d Author: Daniel Borkmann Date: Mon Jun 6 22:50:39 2016 +0200 net: sched: fix tc_should_offload for specific clsact classes When offloading classifiers such as u32 or flower to hardware, and the qdisc is clsact (TC_H_CLSACT), then we need to differentiate its classes, since not all of them handle ingress, therefore we must leave those in software path. Add a .tcf_cl_offload() callback, so we can generically handle them, tested on ixgbe. Fixes: 10cbc6843446 ("net/sched: cls_flower: Hardware offloaded filters statistics support") Fixes: 5b33f48842fa ("net/flower: Introduce hardware offload support") Fixes: a1b7c5fd7fe9 ("net: sched: add cls_u32 offload hooks for netdevs") Signed-off-by: Daniel Borkmann Acked-by: John Fastabend Signed-off-by: David S. Miller include/net/pkt_cls.h | 10 +++++++--- include/net/sch_generic.h | 1 + net/sched/cls_flower.c | 6 +++--- net/sched/cls_u32.c | 8 ++++---- net/sched/sch_ingress.c | 12 ++++++++++++ 5 files changed, 27 insertions(+), 10 deletions(-) commit a03e6fe569713fb3ff0714f8fd7c8785c0ca9e22 Author: WANG Cong Date: Mon Jun 6 09:54:30 2016 -0700 act_police: fix a crash during removal The police action is using its own code to initialize tcf hash info, which makes us to forgot to initialize a->hinfo correctly. Fix this by calling the helper function tcf_hash_create() directly. This patch fixed the following crash: BUG: unable to handle kernel NULL pointer dereference at 0000000000000028 IP: [] __lock_acquire+0xd3/0xf91 PGD d3c34067 PUD d3e18067 PMD 0 Oops: 0000 [#1] SMP CPU: 2 PID: 853 Comm: tc Not tainted 4.6.0+ #87 Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011 task: ffff8800d3e28040 ti: ffff8800d3f6c000 task.ti: ffff8800d3f6c000 RIP: 0010:[] [] __lock_acquire+0xd3/0xf91 RSP: 0000:ffff88011b203c80 EFLAGS: 00010002 RAX: 0000000000000046 RBX: 0000000000000000 RCX: 0000000000000000 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000028 RBP: ffff88011b203d40 R08: 0000000000000001 R09: 0000000000000000 R10: ffff88011b203d58 R11: ffff88011b208000 R12: 0000000000000001 R13: ffff8800d3e28040 R14: 0000000000000028 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88011b200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000028 CR3: 00000000d4be1000 CR4: 00000000000006e0 Stack: ffff8800d3e289c0 0000000000000046 000000001b203d60 ffffffff00000000 0000000000000000 ffff880000000000 0000000000000000 ffffffff00000000 ffffffff8187142c ffff88011b203ce8 ffff88011b203ce8 ffffffff8101dbfc Call Trace: [] ? __tcf_hash_release+0x77/0xd1 [] ? native_sched_clock+0x1a/0x35 [] ? native_sched_clock+0x1a/0x35 [] ? sched_clock_local+0x11/0x78 [] ? mark_lock+0x24/0x201 [] lock_acquire+0x120/0x1b4 [] ? lock_acquire+0x120/0x1b4 [] ? __tcf_hash_release+0x77/0xd1 [] _raw_spin_lock_bh+0x3c/0x72 [] ? __tcf_hash_release+0x77/0xd1 [] __tcf_hash_release+0x77/0xd1 [] tcf_action_destroy+0x49/0x7c [] tcf_exts_destroy+0x20/0x2d [] u32_destroy_key+0x1b/0x4d [] u32_delete_key_freepf_rcu+0x1b/0x1d [] rcu_process_callbacks+0x610/0x82e [] ? u32_destroy_key+0x4d/0x4d [] __do_softirq+0x191/0x3f4 Fixes: ddf97ccdd7cb ("net_sched: add network namespace support for tc actions") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/act_police.c | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) commit aafddbf0cffeb790f919436285328c762279b5d4 Author: Eric Dumazet Date: Mon Jun 6 09:12:39 2016 -0700 fq_codel: return non zero qlen in class dumps We properly scan the flow list to count number of packets, but John passed 0 to gnet_stats_copy_queue() so we report a zero value to user space instead of the result. Fixes: 640158536632 ("net: sched: restrict use of qstats qlen") Signed-off-by: Eric Dumazet Cc: John Fastabend Acked-by: John Fastabend Signed-off-by: David S. Miller net/sched/sch_fq_codel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 064d5e6f8eedb071b81b72186f986fa390f7b164 Merge: 7b01b8e d47a0f3 Author: David S. Miller Date: Tue Jun 7 16:27:15 2016 -0700 Merge branch 'u32-hwoffload-fixes' Jakub Kicinski says: ==================== cls_u32 hardware offload fixes This set fixes two small issues with error codes I noticed in cls_u32. Second patch could be viewed as user space API change but that portion of API is not part of any release, yet. Compile tested only. ==================== Signed-off-by: David S. Miller commit d47a0f387fe907bdb0430a398850c1cb80eb7def Author: Jakub Kicinski Date: Mon Jun 6 16:16:48 2016 +0100 net: cls_u32: be more strict about skip-sw flag Return an error if user requested skip-sw and the underlaying hardware cannot handle tc offloads (or offloads are disabled). Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller net/sched/cls_u32.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 1a0f7d2984f3864e64a43714b4a0999b5a27cff5 Author: Jakub Kicinski Date: Mon Jun 6 16:16:47 2016 +0100 net: cls_u32: fix error code for invalid flags 'err' variable is not set in this test, we would return whatever previous test set 'err' to. Signed-off-by: Jakub Kicinski Acked-by: Sridhar Samudrala Acked-by: John Fastabend Signed-off-by: David S. Miller net/sched/cls_u32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b01b8e847d00cf9cf0c2c3aa8fdfc4126dca024 Author: Colin Ian King Date: Mon Jun 6 16:08:41 2016 +0100 gtp: #define _UAPI_LINUX_GTP_H_ and not _UAPI_LINUX_GTP_H__ Fix clang build warning: ./include/uapi/linux/gtp.h:1:9: warning: '_UAPI_LINUX_GTP_H_' is used as a header guard here, followed by #define of a different macro [-Wheader-guard] fix by defining _UAPI_LINUX_GTP_H_ and not _UAPI_LINUX_GTP_H__ Signed-off-by: Colin Ian King Acked-by: Pablo Neira Ayuso Signed-off-by: David S. Miller include/uapi/linux/gtp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2051877c4c8526abc0a1d514e76f95610b4ab8f3 Merge: 43c082e 72ad679 Author: Linus Torvalds Date: Tue Jun 7 16:24:44 2016 -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: "This finally removes the CLK_IS_ROOT flag by picking up the last few stragglers that didn't get merged by anyone this time around. Better to do it now than wait for another one to pop up. There's also a minor maintainers update and a Kconfig fix" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: nxp: Select MFD_SYSCON for creg driver MAINTAINERS: Add file patterns for clock device tree bindings clk: Remove CLK_IS_ROOT flag clk: microchip: Remove CLK_IS_ROOT powerpc/512x: clk: Remove CLK_IS_ROOT vexpress/spc: Remove CLK_IS_ROOT commit 9f647a6de9926f4844feb8c5e21c78d4e61c55ab Author: Colin Ian King Date: Mon Jun 6 09:21:44 2016 +0100 net: fec: fix spelling mistakes and add missing newline trivial fix to spelling mistakes and add missing newline in pr_err messages Signed-off-by: Colin Ian King Acked-by: Fugang Duan Signed-off-by: David S. Miller drivers/net/ethernet/freescale/fec_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 71743ffa15b1822d10dc6320fbc2272a086a99c2 Merge: fa54cc7 8852ddb Author: David S. Miller Date: Tue Jun 7 16:02:04 2016 -0700 Merge branch 'bnxt_en-fixes' Michael Chan says: ==================== bnxt_en: Bug fixes. Fix a race condition and VLAN rx acceleration logic. ==================== Signed-off-by: David S. Miller commit 8852ddb4dcdfe6f877a02f79bf2bca9ae63c039a Author: Michael Chan Date: Mon Jun 6 02:37:16 2016 -0400 bnxt_en: Simplify VLAN receive logic. Since both CTAG and STAG rx acceleration must be enabled together, we only need to check one feature flag (NETIF_F_HW_VLAN_CTAG_RX) before calling __vlan_hwaccel_put_tag(). Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) commit 5a9f6b238e59bc05afb4cdeaf3672990bf2a5309 Author: Michael Chan Date: Mon Jun 6 02:37:15 2016 -0400 bnxt_en: Enable and disable RX CTAG and RX STAG VLAN acceleration together. The hardware can only be set to strip or not strip both the VLAN CTAG and STAG. It cannot strip one and not strip the other. Add logic to bnxt_fix_features() to toggle both feature flags when the user is toggling one of them. Signed-off-by: Michael Chan Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnxt/bnxt.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b9a8460a08a1e0150073cda3e7a0dd23cb888052 Author: Michael Chan Date: Mon Jun 6 02:37:14 2016 -0400 bnxt_en: Fix tx push race condition. Set the is_push flag in the software BD before the tx data is pushed to the chip. It is possible to get the tx interrupt as soon as the tx data is pushed. The tx handler will not handle the event properly if the is_push flag is not set and it will crash. 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 9c77679cadb118c0aa99e6f88533d91765a131ba Author: H. Peter Anvin Date: Tue Apr 5 17:01:33 2016 -0700 x86, build: copy ldlinux.c32 to image.iso For newer versions of Syslinux, we need ldlinux.c32 in addition to isolinux.bin to reside on the boot disk, so if the latter is found, copy it, too, to the isoimage tree. Signed-off-by: H. Peter Anvin Cc: Linux Stable Tree arch/x86/boot/Makefile | 3 +++ 1 file changed, 3 insertions(+) commit fa54cc70ed2eddd96773ffdf4d96d23ea7483e56 Author: Wu Fengguang Date: Sun Jun 5 07:17:19 2016 +0800 rxrpc: fix ptr_ret.cocci warnings net/rxrpc/rxkad.c:1165: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: David Howells Signed-off-by: Fengguang Wu Signed-off-by: David S. Miller net/rxrpc/rxkad.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 29a36611e9f10f629b4d7920418fcb8f5e50ae75 Merge: 80e509d 9c79440 Author: David S. Miller Date: Tue Jun 7 15:10:16 2016 -0700 Merge branch 'rds-packet-assembly-fixes' Sowmini Varadhan says: ==================== RDS: TCP: socket locking RDS packet assembly fixes This three part patchset fixes bugs in synchronization between rds_tcp_accept_one() and the rds-tcp send/recv path. Patch 1 ensures that the lock_sock() is taken appropriately and the RDS datagram reassembly state is reset to synchronize with the receive path. Patch 2 ensures that partially sent RDS datagrams will get retransmitted after rds_tcp_accept_one() switches sockets. Patch 3 fixes a race window which would prematurely re-enable rds_send_xmit() before the rds_tcp_connection setup has been completed in rds_tcp_accept_one(). ==================== Signed-off-by: David S. Miller commit 9c79440e2c5e2518879f1599270f64c3ddda3baf Author: Sowmini Varadhan Date: Sat Jun 4 14:00:00 2016 -0700 RDS: TCP: fix race windows in send-path quiescence by rds_tcp_accept_one() The send path needs to be quiesced before resetting callbacks from rds_tcp_accept_one(), and commit eb192840266f ("RDS:TCP: Synchronize rds_tcp_accept_one with rds_send_xmit when resetting t_sock") achieves this using the c_state and RDS_IN_XMIT bit following the pattern used by rds_conn_shutdown(). However this leaves the possibility of a race window as shown in the sequence below take t_conn_lock in rds_tcp_conn_connect send outgoing syn to peer drop t_conn_lock in rds_tcp_conn_connect incoming from peer triggers rds_tcp_accept_one, conn is marked CONNECTING wait for RDS_IN_XMIT to quiesce any rds_send_xmit threads call rds_tcp_reset_callbacks [.. race-window where incoming syn-ack can cause the conn to be marked UP from rds_tcp_state_change ..] lock_sock called from rds_tcp_reset_callbacks, and we set t_sock to null As soon as the conn is marked UP in the race-window above, rds_send_xmit() threads will proceed to rds_tcp_xmit and may encounter a null-pointer deref on the t_sock. Given that rds_tcp_state_change() is invoked in softirq context, whereas rds_tcp_reset_callbacks() is in workq context, and testing for RDS_IN_XMIT after lock_sock could result in a deadlock with tcp_sendmsg, this commit fixes the race by using a new c_state, RDS_TCP_RESETTING, which will prevent a transition to RDS_CONN_UP from rds_tcp_state_change(). Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/rds.h | 2 ++ net/rds/tcp.c | 14 +++++++++++++- net/rds/tcp_connect.c | 2 +- net/rds/tcp_listen.c | 7 +++---- net/rds/threads.c | 10 ++++++++-- 5 files changed, 27 insertions(+), 8 deletions(-) commit 0b6f760cff04a7cdfafc3ec6915e91fed0533d8d Author: Sowmini Varadhan Date: Sat Jun 4 13:59:59 2016 -0700 RDS: TCP: Retransmit half-sent datagrams when switching sockets in rds_tcp_reset_callbacks When we switch a connection's sockets in rds_tcp_rest_callbacks, any partially sent datagram must be retransmitted on the new socket so that the receiver can correctly reassmble the RDS datagram. Use rds_send_reset() which is designed for this purpose. Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/send.c | 1 + net/rds/tcp.c | 1 + 2 files changed, 2 insertions(+) commit 335b48d980f631fbc5b233cbb3625ac0c86d67cb Author: Sowmini Varadhan Date: Sat Jun 4 13:59:58 2016 -0700 RDS: TCP: Add/use rds_tcp_reset_callbacks to reset tcp socket safely When rds_tcp_accept_one() has to replace the existing tcp socket with a newer tcp socket (duelling-syn resolution), it must lock_sock() to suppress the rds_tcp_data_recv() path while callbacks are being changed. Also, existing RDS datagram reassembly state must be reset, so that the next datagram on the new socket does not have corrupted state. Similarly when resetting the newly accepted socket, appropriate locks and synchronization is needed. This commit ensures correct synchronization by invoking kernel_sock_shutdown to reset a newly accepted sock, and by taking appropriate lock_sock()s (for old and new sockets) when resetting existing callbacks. Signed-off-by: Sowmini Varadhan Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller net/rds/tcp.c | 65 +++++++++++++++++++++++++++++++++++++++++++++++++--- net/rds/tcp.h | 1 + net/rds/tcp_listen.c | 13 ++++------- 3 files changed, 67 insertions(+), 12 deletions(-) commit 80e509db54c81247b32fcb75bb1730fc789b893d Author: Eric Dumazet Date: Sat Jun 4 12:55:13 2016 -0700 fq_codel: fix NET_XMIT_CN behavior My prior attempt to fix the backlogs of parents failed. If we return NET_XMIT_CN, our parents wont increase their backlog, so our qdisc_tree_reduce_backlog() should take this into account. v2: Florian Westphal pointed out that we could drop the packet, so we need to save qdisc_pkt_len(skb) in a temp variable before calling fq_codel_drop() Fixes: 9d18562a2278 ("fq_codel: add batch ability to fq_codel_drop()") Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Reported-by: Stas Nichiporovich Signed-off-by: Eric Dumazet Cc: WANG Cong Cc: Jamal Hadi Salim Acked-by: Jamal Hadi Salim Acked-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_fq_codel.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) commit 5b6c1b4d46b0dae4edea636a776d09f2064f4cd7 Author: Daniel Borkmann Date: Sat Jun 4 20:50:59 2016 +0200 bpf, trace: use READ_ONCE for retrieving file ptr In bpf_perf_event_read() and bpf_perf_event_output(), we must use READ_ONCE() for fetching the struct file pointer, which could get updated concurrently, so we must prevent the compiler from potential refetching. We already do this with tail calls for fetching the related bpf_prog, but not so on stored perf events. Semantics for both are the same with regards to updates. Fixes: a43eec304259 ("bpf: introduce bpf_perf_event_output() helper") Fixes: 35578d798400 ("bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU conuter") Signed-off-by: Daniel Borkmann Acked-by: Alexei Starovoitov Signed-off-by: David S. Miller kernel/trace/bpf_trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b36fad65d61fffe4b662d4bfb1ed673c455a36a2 Author: Michal Marek Date: Tue Jun 7 11:57:02 2016 +0200 kbuild: Initialize exported variables The NOSTDINC_FLAGS variable is exported, so it needs to be cleared to avoid duplicating its content when running make from within make (e.g. in the packaging targets). This became an issue after commit 9c8fa9bc08f6 ("kbuild: fix if_change and friends to consider argument order"), which no longer ignores the duplicate options. As Paulo Zanoni points out, the LDFLAGS_vmlinux variable has the same problem. Reported-by: "Zanoni, Paulo R" Fixes: 9c8fa9bc08f6 ("kbuild: fix if_change and friends to consider argument order") Signed-off-by: Michal Marek Makefile | 2 ++ 1 file changed, 2 insertions(+) commit 6519c3d7b8621c9f4333c98ed4b703029b51ba79 Author: Laurent Pinchart Date: Tue May 24 09:09:33 2016 -0300 [media] adv7604: Don't ignore pad number in subdev DV timings pad operations The dv_timings_cap() and enum_dv_timings() pad operations take a pad number as an input argument and return the DV timings capabilities and list of supported DV timings for that pad. Commit bd3e275f3ec0 ("[media] media: i2c: adv7604: Use v4l2-dv-timings helpers") broke this as it started ignoring the pad number, always returning the information associated with the currently selected input. Fix it. Fixes: bd3e275f3ec0 ("[media] media: i2c: adv7604: Use v4l2-dv-timings helpers") Signed-off-by: Laurent Pinchart Signed-off-by: Hans Verkuil Cc: # for v4.6 Signed-off-by: Mauro Carvalho Chehab drivers/media/i2c/adv7604.c | 46 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) commit 1ca830b110cd9d067327571f1136fdbf1ef2b4d3 Author: Hans Verkuil Date: Mon May 23 08:45:44 2016 -0300 [media] v4l2-ioctl: fix stupid mistake in cropcap condition Fix duplicate tests in condition. The second test for vidioc_cropcap should have tested for vidioc_g_selection instead. Signed-off-by: Hans Verkuil Reported-by: David Binderman Acked-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 43c082e72745555952126848a40db3a06fc8a7a9 Merge: 3613a62 d71ed6c Author: Linus Torvalds Date: Tue Jun 7 10:04:35 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace Pull userns fixes from Eric Biederman: "This contains two small but significant fixes to fs/namespace.c. The first adds a filesystem refcount drop on error. The second corrects a test in fs_fully_visible which could be abused to allow mounting of proc or sysfs, when that should not be allowed. To keep myself honest I have tested to ensure the incorrect test in fs_fully_visible actually allows improper mounting of proc before the fix and that when fixed the improper mounting is not allowed" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: mnt: fs_fully_visible test the proper mount for MNT_LOCKED mnt: If fs_fully_visible fails call put_filesystem. commit 05bd92dddc595d74ea645e793c1f3bd4b1fc251a Author: Shaun Tancheff Date: Tue Jun 7 11:32:13 2016 -0500 block: missing bio_put following submit_bio_wait submit_bio_wait() gives the caller an opportunity to examine struct bio and so expects the caller to issue the put_bio() This fixes a memory leak reported by a few people in 4.7-rc2 kmemleak report after 9082e87bfbf8 ("block: remove struct bio_batch") Signed-off-by: Shaun Tancheff Tested-by: Catalin Marinas Tested-by: Larry Finger@lwfinger.net Tested-by: David Drysdale Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe block/blk-lib.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit c853f18b640f3e58ba14ffb25e551be8af218209 Merge: aff093d af8c34c Author: Mauro Carvalho Chehab Date: Tue Jun 7 13:04:56 2016 -0300 Merge tag 'v4.7-rc2' into v4l_for_linus Linux 4.7-rc2 * tag 'v4.7-rc2': (10914 commits) Linux 4.7-rc2 devpts: Make each mount of devpts an independent filesystem. parisc: Move die_if_kernel() prototype into traps.h header parisc: Fix pagefault crash in unaligned __get_user() call parisc: Fix printk time during boot parisc: Fix backtrace on PA-RISC mm, page_alloc: recalculate the preferred zoneref if the context can ignore memory policies mm, page_alloc: reset zonelist iterator after resetting fair zone allocation policy mm, oom_reaper: do not use siglock in try_oom_reaper() mm, page_alloc: prevent infinite loop in buffered_rmqueue() checkpatch: reduce git commit description style false positives mm/z3fold.c: avoid modifying HEADLESS page and minor cleanup memcg: add RCU locking around css_for_each_descendant_pre() in memcg_offline_kmem() mm: check the return value of lookup_page_ext for all call sites kdump: fix dmesg gdbmacro to work with record based printk mm: fix overflow in vm_map_ram() Btrfs: deal with duplciates during extent_map insertion in btrfs_get_extent arm64: fix alignment when RANDOMIZE_TEXT_OFFSET is enabled arm64: move {PAGE,CONT}_SHIFT into Kconfig arm64: mm: dump: log span level ... commit 61c78eea9516a921799c17b4c20558e2aa780fd3 Author: Erez Shitrit Date: Sat Jun 4 15:15:19 2016 +0300 IB/IPoIB: Don't update neigh validity for unresolved entries ipoib_neigh_get unconditionally updates the "alive" variable member on any packet send. This prevents the neighbor garbage collection from cleaning out a dead neighbor entry if we are still queueing packets for it. If the queue for this neighbor is full, then don't update the alive timestamp. That way the neighbor can time out even if packets are still being queued as long as none of them are being sent. Fixes: b63b70d87741 ("IPoIB: Use a private hash table for path lookup in xmit path") Signed-off-by: Erez Shitrit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit f879ee8d900fc78b5bc5d840edd9ecb57d02ab7e Author: Achiad Shochat Date: Sat Jun 4 15:15:37 2016 +0300 IB/mlx5: Fix alternate path code Userspace flag IBV_QP_ALT_PATH is supposed to set the alternate path including fields alt_pkey_index and alt_timeout. Added IB_QP_PKEY_INDEX and IB_QP_TIMEOUT to the attribute mask when calling mlx5_set_path for the alternate path to force setting the alt_pkey_index and alt_timeout values. Fixes: bf24481a3a7c4 ('IB/mlx5: Consider alternate path in pkey ...') Signed-off-by: Achiad Shochat Signed-off-by: Noa Osherovich Reviewed-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit d3ae2bdeba9bad8cb95301451aeaf03ce31e82f0 Author: Noa Osherovich Date: Sat Jun 4 15:15:36 2016 +0300 IB/mlx5: Fix pkey_index length in the QP path record Pkey index fields in the QP context path record are extended to 16 bits, as required by IB spec (version 1.3). This change affects all QP commands which include path records. To enable this change, moved the free adaptive routing flag bit (free_ar) to the most significant byte of the QP path record. Fixes: e126ba97dba9e ('mlx5: Add driver for Mellanox Connect-IB ...') Signed-off-by: Noa Osherovich Reviewed-by: Jack Morgenstein Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 15 ++++++++------- include/linux/mlx5/qp.h | 5 ++--- 2 files changed, 10 insertions(+), 10 deletions(-) commit 3c4c37746c919c983e439ac6a7328cd2d48c10ed Author: Noa Osherovich Date: Sat Jun 4 15:15:35 2016 +0300 IB/mlx5: Fix entries check in mlx5_ib_resize_cq Verify that number of entries is less than device capability. Add an appropriate warning message for error flow. Fixes: bde51583f49b ('IB/mlx5: Add support for resize CQ') Signed-off-by: Majd Dibbiny Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 9ea578528656e191c1097798a771ff08bab6f323 Author: Noa Osherovich Date: Sat Jun 4 15:15:34 2016 +0300 IB/mlx5: Fix entries checks in mlx5_ib_create_cq Number of entries shouldn't be greater than the device's max capability. This should be checked before rounding the entries number to power of two. Fixes: 51ee86a4af639 ('IB/mlx5: Fix check of number of entries...') Signed-off-by: Majd Dibbiny Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/cq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 2cc6ad5f2130733e561f97dba7a2052f8ea024aa Author: Noa Osherovich Date: Sat Jun 4 15:15:33 2016 +0300 IB/mlx5: Check BlueFlame HCA support BlueFlame support is reported only for PFs when the HCA capability is on. Fixes: 938fe83c8dcbb ('net/mlx5_core: New device capabilities...') Signed-off-by: Majd Dibbiny Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0540d8148d419bf769e5aa99c77027febd8922f0 Author: Noa Osherovich Date: Sat Jun 4 15:15:32 2016 +0300 IB/mlx5: Fix returned values of query QP Some variables were not initialized properly: max_recv_wr, max_recv_sge, max_send_wr, qp_context and max_inline_data. Fixes: e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB...') Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/qp.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit bc5c6eed0510f19b033ce7a7d3976e695e96785b Author: Noa Osherovich Date: Sat Jun 4 15:15:31 2016 +0300 IB/mlx5: Limit query HCA clock When PAGE_SIZE is larger than 4K, the user shouldn't be able to query the HCA core clock. This counter is within 4KB boundary and the user-space shall not read information that's after this boundary. Fixes: b368d7cb8ceb7 ('IB/mlx5: Add hca_core_clock_offset to...') Signed-off-by: Majd Dibbiny Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit c0fcebf55289c48148992eee002a7caf853a5358 Author: Eran Ben Elisha Date: Sat Jun 4 15:15:30 2016 +0300 IB/mlx5: Fix FW version diaplay in sysfs Add a 4-digit padding to show FW version in proper format. Fixes: 9603b61de1eee ('mlx5: Move pci device handling from...') Signed-off-by: Eran Ben Elisha Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2788cf3bd90af3791c3195c52391bcf34fa67b40 Author: Noa Osherovich Date: Sat Jun 4 15:15:29 2016 +0300 IB/mlx5: Return PORT_ERR in Active to Initializing tranisition FW port-change events are fired on Active <-> non Active port state transitions only. When the port state changes from Active to Initializing (Active -> Down -> Initializing), a single event is fired. The HCA transitions from Down to Initializing unless prevented from doing so, hence the driver should also propagate events when the port state is Initializing to consumers so they'll be aware that the port is no longer Active and act accordingly. Fixes: e126ba97dba9e ('mlx5: Add driver for Mellanox Connect-IB...') Signed-off-by: Noa Osherovich Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit da6d6ba3c6f085abf82723612efd746a97f8e414 Author: Maor Gottlieb Date: Sat Jun 4 15:15:28 2016 +0300 IB/mlx5: Set flow steering capability bit Flow steering is supported by mlx5 device when the following features are supported by firmware: 1. NIC RX flow table. 2. Device has enough flow steering levels. 3. Atomic modification of flow table entry. 4. Flow tables chaining. To check if flow steering is supported it's enough to check if the driver opened the mlx5 bypass namespace. Signed-off-by: Maor Gottlieb Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx5/main.c | 3 +++ 1 file changed, 3 insertions(+) commit c7e162a417488f3c79eb09f3c4f1d36f1e042463 Author: Max Gurtovoy Date: Mon Jun 6 19:34:40 2016 +0300 IB/core: Make all casts in ib_device_cap_flags enum consistent Replace the few u64 casts with ULL to match the rest of the casts. Signed-off-by: Max Gurtovoy Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 47355b3cd7d3c9c5226bff7c449b9d269fb17fa6 Author: Max Gurtovoy Date: Mon Jun 6 19:34:39 2016 +0300 IB/core: Fix bit curruption in ib_device_cap_flags structure ib_device_cap_flags 64-bit expansion caused caps overlapping and made consumers read wrong device capabilities. For example IB_DEVICE_SG_GAPS_REG was falsely read by the iser driver causing it to use a non-existing capability. This happened because signed int becomes sign extended when converted it to u64. Fix this by casting IB_DEVICE_ON_DEMAND_PAGING enumeration to ULL. Fixes: f5aa9159a418 ('IB/core: Add arbitrary sg_list support') Reported-by: Robert LeBlanc Cc: Stable #[v4.6+] Acked-by: Sagi Grimberg Signed-off-by: Max Gurtovoy Signed-off-by: Matan Barak Reviewed-by: Christoph Hellwig Signed-off-by: Doug Ledford include/rdma/ib_verbs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8aec013afe6d9665eb478396026ebd4384dbe934 Author: Mark Bloch Date: Sat Jun 4 15:15:24 2016 +0300 IB/core: Initialize sysfs attributes before sysfs create group For dynamically allocated sysfs attributes there is a need to call sysfs_attr_init in order to comply with lockdep, not calling it will result in error complaining key is not in .data section. Fixes: b40f4757daa1 ("IB/core: Make device counter infrastructure dynamic") Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 3 +++ 1 file changed, 3 insertions(+) commit 9b29953bf8ca23944c5e00dcc15ad7bd9fecdd4e Author: Mark Bloch Date: Sat Jun 4 15:15:22 2016 +0300 IB/IPoIB: Disable bottom half when dealing with device address Align locking usage when touching device address with rest of the kernel. Lock the bottom half when doing so using netif_addr_lock_bh. This also solves the following case as reported by lockdep: CPU0 CPU1 ---- ---- lock(_xmit_INFINIBAND); local_irq_disable(); lock(&(&mc->mca_lock)->rlock); lock(_xmit_INFINIBAND); lock(&(&mc->mca_lock)->rlock); *** DEADLOCK *** Fixes: 492a7e67ff83 ("IB/IPoIB: Allow setting the device address") Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib_ib.c | 8 ++++---- drivers/infiniband/ulp/ipoib/ipoib_main.c | 8 ++++---- drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) commit 8e787646fbce895c20c4433973e90af90e1c6a28 Author: Aviv Heller Date: Sat Jun 4 15:15:21 2016 +0300 IB/core: Fix removal of default GID cache entry When deleting a default GID from the cache, its gid_type field is set to 0. This could set the gid_type to RoCE v1 for a RoCE v2 default GID, essentially making it inaccessible to future modifications, since it is no longer found by find_gid(). This fix preserves the gid_type value for default gids during cache operations. Fixes: b39ffa1df505 ('IB/core: Add gid_type to gid attribute') Signed-off-by: Aviv Heller Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/core/cache.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 198b12f77084244d310888dd5d643083cb5c2aa1 Author: Erez Shitrit Date: Sat Jun 4 15:15:20 2016 +0300 IB/IPoIB: Fix race between ipoib_remove_one to sysfs functions In ipoib_remove_one the driver holds the rtnl_lock and tries to do some operation like dev_change_flags or unregister_netdev, while sysfs callback like ipoib_vlan_delete holds sysfs mutex and tries to hold the rtnl_lock via rtnl_trylock() and restart_syscall() if the lock is not free, meanwhile ipoib_remove_one tries to get the sysfs lock in order to free its sysfs directory, and we will get a->b, b->a deadlock. Trace like the following: schedule+0x37/0x80 schedule_preempt_disabled+0xe/0x10 __mutex_lock_slowpath+0xb5/0x120 mutex_lock+0x23/0x40 rtnl_lock+0x15/0x20 netdev_run_todo+0x17c/0x320 rtnl_unlock+0xe/0x10 ipoib_vlan_delete+0x11b/0x1b0 [ib_ipoib] delete_child+0x54/0x80 [ib_ipoib] dev_attr_store+0x18/0x30 sysfs_kf_write+0x37/0x40 mutex_lock+0x16/0x40 SyS_write+0x55/0xc0 entry_SYSCALL_64_fastpath+0x16/0x75 And schedule+0x37/0x80 __kernfs_remove+0x1a8/0x260 ? wake_atomic_t_function+0x60/0x60 kernfs_remove+0x25/0x40 sysfs_remove_dir+0x50/0x80 kobject_del+0x18/0x50 device_del+0x19f/0x260 netdev_unregister_kobject+0x6a/0x80 rollback_registered_many+0x1fd/0x340 rollback_registered+0x3c/0x70 unregister_netdevice_queue+0x55/0xc0 unregister_netdev+0x20/0x30 ipoib_remove_one+0x114/0x1b0 [ib_ipoib] ib_unregister_client+0x4a/0x170 [ib_core] ? find_module_all+0x71/0xa0 ipoib_cleanup_module+0x10/0x94 [ib_ipoib] SyS_delete_module+0x1b5/0x210 entry_SYSCALL_64_fastpath+0x16/0x75 The fix is by checking the flag IPOIB_FLAG_INTF_ON_DESTROY in order to get out from the sysfs function. Fixes: 862096a8bbf8 ("IB/ipoib: Add more rtnl_link_ops callbacks") Fixes: 9baa0b036410 ("IB/ipoib: Add rtnl_link_ops support") Signed-off-by: Erez Shitrit Signed-off-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/ulp/ipoib/ipoib.h | 1 + drivers/infiniband/ulp/ipoib/ipoib_cm.c | 4 ++++ drivers/infiniband/ulp/ipoib/ipoib_main.c | 3 +++ drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 6 ++++++ 4 files changed, 14 insertions(+) commit d7012467a95b767b4d3beb2e027aa24a83f12f0f Author: Eli Cohen Date: Sat Jun 4 15:15:18 2016 +0300 IB/core: Fix query port failure in RoCE Currently ib_query_port always attempts to to read the subnet prefix by calling ib_query_gid(). For RoCE/iWARP there is no subnet manager and no subnet prefix. Fix this by querying GID[0] only for IB networks. Fixes: fad61ad4e755 ('IB/core: Add subnet prefix to port info') Signed-off-by: Eli Cohen Signed-off-by: Leon Romanovsky Reviewed-by: Steve Wise Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 3 +++ 1 file changed, 3 insertions(+) commit 495fbae6e2c115099921ba33b1e1bea1190b5280 Author: Doug Ledford Date: Tue Jun 7 07:43:46 2016 -0400 IB/core: fix error unwind in sysfs hw counters code Between the initial and final versions of the function setup_hw_stats, the order of variable initialization was changed. However, the unwind flow on error did not properly keep up with the flow changes. Make the unwind flow match a proper unwind of the allocation flow, then remove no longer needed variable initializations. Fixes: b40f4757daa1 (IB/core: Make device counter infrastructure dynamic) Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 41aaa99fab6ceaa4b533c2b6ad4913987ddb3ddc Author: Doug Ledford Date: Mon Jun 6 19:52:55 2016 -0400 IB/core: Fix array length allocation The new sysfs hw_counters code had an off by one in its array allocation length. Fix that and the comment along with it. Reported-by: Mark Bloch Fixes: b40f4757daa1 (IB/core: Make device counter infrastructure dynamic) Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit dab38e43b298501a4e8807b56117c029e2e98383 Author: Torsten Hilbrich Date: Tue Jun 7 13:14:21 2016 +0200 ALSA: hda/realtek: Add T560 docking unit fixup Tested with Lenovo Ultradock. Fixes the non-working headphone jack on the docking unit. Signed-off-by: Torsten Hilbrich Tested-by: Torsten Hilbrich Cc: Signed-off-by: Takashi Iwai sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+) commit 8d0a0710ea0d22881fdb40eb79d346a98cc64ae6 Author: Ben Greear Date: Thu Jun 2 17:59:54 2016 +0300 ath10k: fix crash related to printing features This looks like a regression from commit c4cdf753ed42 ("ath10k: move fw_features to struct ath10k_fw_file"), we were printing the features from a wrong struct. Fixes: c4cdf753ed42 ("ath10k: move fw_features to struct ath10k_fw_file") Signed-off-by: Ben Greear [kvalo@qca.qualcomm.com: improve commit log] Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 572f1f613a109e03b52e72b62df2d2c0e595d3bd Author: Bard Liao Date: Tue Jun 7 11:03:08 2016 +0800 ASoC: rt5670: fix HP Playback Volume control The register setting for HP Playback Volume is inverted. So, set the invert flag in SOC_DOUBLE_TLV. Signed-off-by: Bard Liao Signed-off-by: Mark Brown sound/soc/codecs/rt5670.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a7d7865fecd83adb98b20eca5eddef7efc94831d Author: Javier Martinez Canillas Date: Mon Jun 6 16:24:44 2016 -0400 ARM: dts: exynos: Fix port nodes names for Exynos5420 Peach Pit board Commit bea7eef6949c ("ARM: dts: exynos: Fix DTC unit name warnings in Peach Pit") fixed the DTC warnings about mismatches between unit names and reg properties in the Exynos5420 Peach Pit DTS. But unfortunately it also added a regression on the Peach Pit when changing the port node names since the OF graph logic expects the port nodes to be always named 'port'. The Documentation/devicetree/bindings/graph.txt binding document says that when there is more than one port, '#address-cells', '#size-cells' and 'reg' properties should be used to number the port nodes. Fixes: bea7eef6949c ("ARM: dts: exynos: Fix DTC unit name warnings in Peach Pit") Reported-by: Marc Zyngier Signed-off-by: Javier Martinez Canillas Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5420-peach-pit.dts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 2969c03763b40e946b46aee57ef083527711c69f Author: Javier Martinez Canillas Date: Mon Jun 6 16:24:43 2016 -0400 ARM: dts: exynos: Fix port nodes names for Exynos5250 Snow board Commit 5c9cbade0629 ("ARM: dts: exynos: Fix DTC unit name warnings in Exynos5250") fixed all the DTC warnings about mismatchs between unit names and reg properties in Exynos5250 boards DTS. But unfortunately it also added a regression on the Exynos5250 Snow Chromebook when changing the port node names since the OF graph logic expects the port nodes to be always named 'port'. The Documentation/devicetree/bindings/graph.txt binding document says that when there is more than one port, '#address-cells', '#size-cells' and 'reg' properties should be used to number the port nodes. Fixes: 5c9cbade0629 ("ARM: dts: exynos: Fix DTC unit name warnings in Exynos5250") Reported-by: Marc Zyngier Signed-off-by: Javier Martinez Canillas Tested-by: Marc Zyngier Signed-off-by: Krzysztof Kozlowski arch/arm/boot/dts/exynos5250-snow-common.dtsi | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5156463588c3999b630d9ffc6061a54962f3c2d9 Author: Stefan Roese Date: Wed Jun 1 12:43:32 2016 +0200 dmaengine: mv_xor: Fix incorrect offset in dma_map_page() Upon booting, I occasionally spotted some BUGs triggered by the internal DMA test routine executed upon driver probing. This was detected by SLUB_DEBUG ("Freechain corrupt" or "Redzone overwritten"). Tracking this down located a problem in passing 0 as offset in dma_map_page(). As kmalloc, especially when used with SLUB_DEBUG, may return a non page aligned address. This patch fixes this issue by passing the correct offset in dma_map_page(). Tested on a custom Armada XP board. Signed-off-by: Stefan Roese Cc: Thomas Petazzoni Cc: Gregory CLEMENT Cc: Marcin Wojtas Signed-off-by: Vinod Koul drivers/dma/mv_xor.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d71ed6c930ac7d8f88f3cef6624a7e826392d61f Author: Eric W. Biederman Date: Fri May 27 14:50:05 2016 -0500 mnt: fs_fully_visible test the proper mount for MNT_LOCKED MNT_LOCKED implies on a child mount implies the child is locked to the parent. So while looping through the children the children should be tested (not their parent). Typically an unshare of a mount namespace locks all mounts together making both the parent and the slave as locked but there are a few corner cases where other things work. Cc: stable@vger.kernel.org Fixes: ceeb0e5d39fc ("vfs: Ignore unlocked mounts in fs_fully_visible") Reported-by: Seth Forshee Signed-off-by: "Eric W. Biederman" fs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97c1df3e54e811aed484a036a798b4b25d002ecf Author: Eric W. Biederman Date: Mon Jun 6 15:36:07 2016 -0500 mnt: If fs_fully_visible fails call put_filesystem. Add this trivial missing error handling. Cc: stable@vger.kernel.org Fixes: 1b852bceb0d1 ("mnt: Refactor the logic for mounting sysfs and proc in a user namespace") Signed-off-by: "Eric W. Biederman" fs/namespace.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a27758ffaf96f89002129eedb2cc172d254099f8 Author: WANG Cong Date: Fri Jun 3 15:05:57 2016 -0700 net_sched: keep backlog updated with qlen For gso_skb we only update qlen, backlog should be updated too. Note, it is correct to just update these stats at one layer, because the gso_skb is cached there. Reported-by: Stas Nichiporovich Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller include/net/sch_generic.h | 5 ++++- net/sched/sch_generic.c | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) commit dcf15cbded656a12335bc4151f3f75f10080a375 Author: Lv Zheng Date: Fri Jun 3 10:26:12 2016 +0800 ACPI / EC: Fix a boot EC regresion by restoring boot EC support for the DSDT EC According to the Windows probing result, during the table loading, the EC device described in the ECDT should be used. And the ECDT EC is also effective during the period the namespace objects are initialized (we can see a separate process executing _STA/_INI on Windows before executing other device specific control methods, for example, EC._REG). During the device enumration, the EC device described in the DSDT should be used. But there are differences between Linux and Windows around the device probing order. Thus in Linux, we should enable the DSDT EC as early as possible before enumerating devices in order not to trigger issues related to the device enumeration order differences. This patch thus converts acpi_boot_ec_enable() into acpi_ec_dsdt_probe() to fix the gap. This also fixes a user reported regression triggered after we switched the "table loading"/"ECDT support" to be ACPI spec 2.0 compliant. Fixes: 59f0aa9480cf (ACPI 2.0 / ECDT: Remove early namespace reference from EC) Link: https://bugzilla.kernel.org/show_bug.cgi?id=119261 Reported-and-tested-by: Gabriele Mazzotta Signed-off-by: Lv Zheng Signed-off-by: Rafael J. Wysocki drivers/acpi/bus.c | 2 +- drivers/acpi/ec.c | 29 ++++++++++++++++++++++------- drivers/acpi/internal.h | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) commit 55c40648d31d0d97608f266955b8afae74e2b686 Author: Bart Van Assche Date: Fri Jun 3 12:11:16 2016 -0700 IB/hfi1: Suppress sparse warnings Avoid that sparse reports the following warnings for the hfi1 driver: trace.c:217:13: warning: no previous prototype for ‘print_u64_array’ [-Wmissing-prototypes] user_sdma.c:1361:17: warning: dubious: !x & y Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/trace.c | 13 ------------- drivers/infiniband/hw/hfi1/user_sdma.c | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) commit d55215c50e4eaa4b906a42ef45884d8fcbadc777 Author: Bart Van Assche Date: Fri Jun 3 12:10:37 2016 -0700 IB/hfi1: Use bit 0 instead of bit 1 The first argument of test_bit() and clear_bit() is a bit number and not a bitmask. Hence change that first argument from (1 << 0) into 0. This patch avoids that smatch reports the following warnings: user_sdma.c:1059: sdma_cache_evict() warn: test_bit() takes a bit number user_sdma.c:1590: sdma_rb_remove() warn: test_bit() takes a bit number Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/user_sdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 48a0cc139fb89590fd66eea11b626b9b9f6b8e9d Author: Bart Van Assche Date: Fri Jun 3 12:09:56 2016 -0700 IB/hfi1: Fix indentation Make the indentation of the source code consistent. Detected by smatch. Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/chip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c0a67f6ba356521a8266694ffffa4998264d0cb0 Author: Bart Van Assche Date: Fri Jun 3 12:09:16 2016 -0700 IB/rdmavt: Annotate rvt_reset_qp() This patch avoids that sparse reports the following warning: rdmavt/qp.c:507:17: warning: context imbalance in 'rvt_reset_qp' - unexpected unlock Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/sw/rdmavt/qp.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2190d10de58101448b0ac360facc0d5166e3d30d Author: Bart Van Assche Date: Fri Jun 3 12:08:44 2016 -0700 IB/mad: Fix indentation Make indentation consistent. Detected by smatch. Signed-off-by: Bart Van Assche Cc: Hal Rosenstock Cc: Ira Weiny Reviewed-By: Ira Weiny Reviewed-by: Hal Rosenstock Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/core/mad.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 0270be78da8d27cc5588d2472694aa7ad2c680b3 Author: Bart Van Assche Date: Fri Jun 3 12:08:00 2016 -0700 RDMA/core: Fix indentation Make indentation consistent. Detected by smatch. Signed-off-by: Bart Van Assche Cc: Tatyana Nikolova Cc: Steve Wise Reviewed-by: Steve Wise Reviewed-by: Sagi Grimberg Signed-off-by: Doug Ledford drivers/infiniband/core/iwpm_msg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9edba790fc52322051fd7b6589421021f0726483 Author: Bart Van Assche Date: Fri Jun 3 11:40:24 2016 -0700 IB/srp: Fix srp_map_sg_dma() Because patch "IB/srp: Move common code into the caller" was applied partially srp_map_sg_dma() doesn't work properly. Fix this by applying the remainder of that patch. See also http://thread.gmane.org/gmane.linux.drivers.rdma/35803/focus=35811. Fixes: 3849e44d1c4b ("IB/srp: Move common code into the caller") Signed-off-by: Bart Van Assche Cc: Mike Marciniszyn Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Laurence Oberman Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 249f06561fc333581e48e6d388a56e3d100d23b6 Author: Bart Van Assche Date: Fri Jun 3 11:39:35 2016 -0700 IB/srp: Always initialize use_fast_reg and use_fmr Avoid that mapping fails due to use_fast_reg != 0 or use_fmr != 0 if both member variables should be zero (if never_register == 1 or if neither FMR nor FR is supported). Remove an initialization that became superfluous due to changing a kmalloc() into a kzalloc() call. Fixes: 509c5f33f4f6 ("IB/srp: Prevent mapping failures") Cc: Sagi Grimberg Cc: Christoph Hellwig Cc: Laurence Oberman Signed-off-by: Bart Van Assche Reviewed-by: Leon Romanovsky Reviewed-by: Sagi Grimberg Reviewed-by: Christoph Hellwig Signed-off-by: Doug Ledford drivers/infiniband/ulp/srp/ib_srp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ca920f5b67f1b798a1f86c675ea441b295bf8464 Author: Bart Van Assche Date: Fri Jun 3 07:58:32 2016 -0700 IB/mlx4: Fix device managed flow steering support test Perform the test for device managed flow steering support even if memory windows are not supported. I noticed this because smatch reported inconsistent indentation for the device managed flow steering support test. Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Cc: Yishai Hadas Reviewed-by: Leon Romanovsky Signed-off-by: Doug Ledford drivers/infiniband/hw/mlx4/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ce67fef68de552b14ae417511a323013b478f78e Author: Krzysztof Kozlowski Date: Thu Jun 2 11:45:01 2016 +0200 IB/usnic: Remove unused DMA attributes The DMA attributes are set but never used. Signed-off-by: Krzysztof Kozlowski Signed-off-by: Doug Ledford drivers/infiniband/hw/usnic/usnic_uiom.c | 5 ----- 1 file changed, 5 deletions(-) commit 0147ebcf8927f09e1923114092f6b14c1de75a95 Author: Colin Ian King Date: Wed Jun 1 19:06:36 2016 +0100 IB/core: fix null pointer deref and mem leak in error handling The current error handling in setup_hw_stats has a couple of issues. It is possible to generate a null pointer deference on the kfree of hsag->attrs[i] because two of the early error exit paths jump to the kfree when hsags NULL and not allocated. Fix this by moving the kfree on stats and jumping to that, avoiding the hsag freeing. Secondly, there is a memory leak of stats if the hsag allocation fails; instead of returning, jump to the kfree on stats. Signed-off-by: Colin Ian King Signed-off-by: Doug Ledford drivers/infiniband/core/sysfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit da1f857be62ca0472024da37eab068b3b8ce0a15 Author: Dan Carpenter Date: Tue May 31 19:05:56 2016 +0300 IB/core: fix an error code in ib_core_init() We should return the error code if ib_add_ibnl_clients() fails. The current code returns success. Fixes: 735c631ae99d ('IB/core: Register SA ibnl client during ib_core initialization') Signed-off-by: Dan Carpenter Reviewed-by: Mark Bloch Signed-off-by: Doug Ledford drivers/infiniband/core/device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f242d93ae92032f78840471e5c2bfc2d04ae324c Author: Leon Romanovsky Date: Tue May 31 10:54:36 2016 +0300 IB/hfi1: Avoid large frame size warning When CONFIG_FRAME_WARN is set to 1024 bytes, which is useful to find stack consumers, we get a warning in hfi1 driver. drivers/infiniband/hw/hfi1/affinity.c: In function ‘hfi1_get_proc_affinity’: drivers/infiniband/hw/hfi1/affinity.c:415:1: warning: the frame size of 1056 bytes is larger than 1024 bytes [-Wframe-larger-than=] This change removes unneeded buf[1024] declaration and usage. Fixes: f48ad614c100 ("IB/hfi1: Move driver out of staging") Signed-off-by: Leon Romanovsky Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/affinity.c | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) commit a8b7da58ec81e74a3a6982e2dba24f899b56c915 Author: Dan Carpenter Date: Sat May 28 08:01:20 2016 +0300 IB/hfi1: fix some indenting That extra tabs are misleading. Signed-off-by: Dan Carpenter Reviewed-by: Bart Van Assche Acked-by: Dennis Dalessandro Signed-off-by: Doug Ledford drivers/infiniband/hw/hfi1/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 943f44d94aa26bfdcaafc40d3701e24eeb58edce Author: Bart Van Assche Date: Fri Mar 25 08:33:16 2016 -0700 IB/cm: Fix a recently introduced locking bug ib_cm_notify() can be called from interrupt context. Hence do not reenable interrupts unconditionally in cm_establish(). This patch avoids that lockdep reports the following warning: WARNING: CPU: 0 PID: 23317 at kernel/locking/lockdep.c:2624 trace _hardirqs_on_caller+0x112/0x1b0 DEBUG_LOCKS_WARN_ON(current->hardirq_context) Call Trace: [] dump_stack+0x67/0x92 [] __warn+0xc1/0xe0 [] warn_slowpath_fmt+0x4a/0x50 [] trace_hardirqs_on_caller+0x112/0x1b0 [] trace_hardirqs_on+0xd/0x10 [] _raw_spin_unlock_irq+0x27/0x40 [] ib_cm_notify+0x25c/0x290 [ib_cm] [] srpt_qp_event+0xa1/0xf0 [ib_srpt] [] mlx4_ib_qp_event+0x67/0xd0 [mlx4_ib] [] mlx4_qp_event+0x5a/0xc0 [mlx4_core] [] mlx4_eq_int+0x3d8/0xcf0 [mlx4_core] [] mlx4_msi_x_interrupt+0xc/0x20 [mlx4_core] [] handle_irq_event_percpu+0x64/0x100 [] handle_irq_event+0x34/0x60 [] handle_edge_irq+0x6a/0x150 [] handle_irq+0x15/0x20 [] do_IRQ+0x5c/0x110 [] common_interrupt+0x89/0x89 [] blk_run_queue_async+0x37/0x40 [] rq_completed+0x43/0x70 [dm_mod] [] dm_softirq_done+0x176/0x280 [dm_mod] [] blk_done_softirq+0x52/0x90 [] __do_softirq+0x10f/0x230 [] irq_exit+0xa8/0xb0 [] smp_trace_call_function_single_interrupt+0x2e/0x30 [] smp_call_function_single_interrupt+0x9/0x10 [] call_function_single_interrupt+0x89/0x90 Fixes: commit be4b499323bf (IB/cm: Do not queue work to a device that's going away) Signed-off-by: Bart Van Assche Cc: Erez Shitrit Cc: Sean Hefty Cc: Nikolay Borisov Cc: stable # v4.2+ Acked-by: Erez Shitrit Signed-off-by: Doug Ledford drivers/infiniband/core/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1957598840f47d42bb0b7f8a871717a780708686 Author: Helge Deller Date: Fri Jun 3 23:49:17 2016 +0200 soreuseport: add compat case for setsockopt SO_ATTACH_REUSEPORT_CBPF Commit 538950a1b752 ("soreuseport: setsockopt SO_ATTACH_REUSEPORT_[CE]BPF") missed to add the compat case for the SO_ATTACH_REUSEPORT_CBPF option. Signed-off-by: Helge Deller Acked-by: Daniel Borkmann Signed-off-by: David S. Miller net/compat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fc100a7f89da85da8edd9c2e6f6e8b2490d74ae1 Author: Helge Deller Date: Fri Jun 3 19:19:20 2016 +0200 soreuseport: Fix reuseport_bpf testcase on 32bit architectures This fixes the following compiler warnings when compiling the reuseport_bpf testcase on a 32 bit platform: reuseport_bpf.c: In function ‘attach_ebpf’: reuseport_bpf.c:114:15: warning: cast from pointer to integer of ifferent size [-Wpointer-to-int-cast] Signed-off-by: Helge Deller Signed-off-by: David S. Miller tools/testing/selftests/net/reuseport_bpf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4691409b3e2250ed66aa8dcefa23fe765daf7add Author: Ben Skeggs Date: Fri Jun 3 15:05:52 2016 +1000 drm/nouveau/disp/sor/gm107: training pattern registers are like gm200 Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/engine/disp/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/engine/disp/gm107.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/disp/outpdp.h | 9 +++- .../gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 2 +- .../gpu/drm/nouveau/nvkm/engine/disp/sorgm107.c | 53 ++++++++++++++++++++++ .../gpu/drm/nouveau/nvkm/engine/disp/sorgm200.c | 15 +----- 6 files changed, 64 insertions(+), 18 deletions(-) commit a8953c52b95167b5d21a66f0859751570271d834 Author: Ben Skeggs Date: Fri Jun 3 14:37:40 2016 +1000 drm/nouveau/disp/sor/gf119: both links use the same training register It appears that, for whatever reason, both link A and B use the same register to control the training pattern. It's a little odd, as the GPUs before this (Tesla/Fermi1) have per-link registers, as do newer GPUs (Maxwell). Fixes the third DP output on NVS 510 (GK107). Signed-off-by: Ben Skeggs Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/engine/disp/sorgf119.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 56d1fe0979dc9b73c1c12ee07722ac380d42a0c4 Author: Mario Kleiner Date: Wed May 18 14:02:46 2016 +0200 drm/vc4: Make pageflip completion handling more robust. Protect both the setup of the pageflip event and the latching of the new requested displaylist head pointer by the event lock, so we can't get into a situation where vc4_atomic_flush latches the new display list via HVS_WRITE, then immediately gets preempted before queueing the pageflip event, then the page-flip completes in hw and the vc4_crtc_handle_page_flip() runs and no-ops due to lack of a pending pageflip event, then vc4_atomic_flush continues and only then queues the pageflip event - after the page flip handling already no-oped. This would cause flip completion handling only at the next vblank - one frame too late. In vc4_crtc_handle_page_flip() check the actual DL head pointer in SCALER_DISPLACTX against the requested pointer for page flip to make sure that the flip actually really completed in the current vblank and doesn't get deferred to the next one because the DL head pointer was written a bit too late into SCALER_DISPLISTX, after start of vblank, and missed the boat. This avoids handling a pageflip completion too early - one frame too early. According to Eric, DL head pointer updates which were written into the HVS DISPLISTX reg get committed to hardware at the last pixel of active scanout. Our vblank interrupt handler, as triggered by PV_INT_VFP_START irq, gets to run earliest at the first pixel of HBLANK at the end of the last scanline of active scanout, ie. vblank irq handling runs at least 1 pixel duration after a potential pageflip completion happened in hardware. This ordering of events in the hardware, together with the lock protection and SCALER_DISPLACTX sampling of this patch, guarantees that pageflip completion handling only runs at exactly the vblank irq of actual pageflip completion in all cases. Background info from Eric about the relative timing of HVS, PV's and trigger points for interrupts, DL updates: https://lists.freedesktop.org/archives/dri-devel/2016-May/107510.html Tested on RPi 2B with hardware timing measurement equipment and shown to no longer complete flips too early or too late. Signed-off-by: Mario Kleiner Reviewed-by: Eric Anholt drivers/gpu/drm/vc4/vc4_crtc.c | 28 ++++++++++++++++++---------- drivers/gpu/drm/vc4/vc4_regs.h | 4 ++++ 2 files changed, 22 insertions(+), 10 deletions(-) commit b10c22e5f9902a329450c2027e9291b71e9f1602 Author: Herve Jourdain Date: Wed Jun 1 02:24:46 2016 +0800 drm/vc4: Fix ioctl permissions for render nodes. Contrary to other flags to DRM_IOCTL_DEF_DRV(), which restrict usage, the flag for render node is an enabler (the IOCTL can't be used from render node if it's not present). So DRM_RENDER_ALLOW needs to be added to all the flags that were previously 0. Signed-off-by: Herve Jourdain Reviewed-by: Eric Anholt Fixes: 0cd3e2747662 ("drm/vc4: Add missing render node support") drivers/gpu/drm/vc4/vc4_drv.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit fee48cf8374569a3888fd8c8536283e6067f0cfb Author: Ben Greear Date: Fri Apr 1 14:12:12 2016 -0700 ath10k: fix deadlock when peer cannot be created We must not attempt to send WMI packets while holding the data-lock, as it may deadlock: BUG: sleeping function called from invalid context at drivers/net/wireless/ath/ath10k/wmi.c:1824 in_atomic(): 1, irqs_disabled(): 0, pid: 2878, name: wpa_supplicant ============================================= [ INFO: possible recursive locking detected ] 4.4.6+ #21 Tainted: G W O --------------------------------------------- wpa_supplicant/2878 is trying to acquire lock: (&(&ar->data_lock)->rlock){+.-...}, at: [] ath10k_wmi_tx_beacons_iter+0x26/0x11a [ath10k_core] but task is already holding lock: (&(&ar->data_lock)->rlock){+.-...}, at: [] ath10k_peer_create+0x122/0x1ae [ath10k_core] other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&ar->data_lock)->rlock); lock(&(&ar->data_lock)->rlock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by wpa_supplicant/2878: #0: (rtnl_mutex){+.+.+.}, at: [] rtnl_lock+0x12/0x14 #1: (&ar->conf_mutex){+.+.+.}, at: [] ath10k_add_interface+0x3b/0xbda [ath10k_core] #2: (&(&ar->data_lock)->rlock){+.-...}, at: [] ath10k_peer_create+0x122/0x1ae [ath10k_core] #3: (rcu_read_lock){......}, at: [] rcu_read_lock+0x0/0x66 [mac80211] stack backtrace: CPU: 3 PID: 2878 Comm: wpa_supplicant Tainted: G W O 4.4.6+ #21 Hardware name: To be filled by O.E.M. To be filled by O.E.M./ChiefRiver, BIOS 4.6.5 06/07/2013 0000000000000000 ffff8801fcadf8f0 ffffffff8137086d ffffffff82681720 ffffffff82681720 ffff8801fcadf9b0 ffffffff8112e3be ffff8801fcadf920 0000000100000000 ffffffff82681720 ffffffffa0721500 ffff8801fcb8d348 Call Trace: [] dump_stack+0x81/0xb6 [] __lock_acquire+0xc5b/0xde7 [] ? ath10k_wmi_tx_beacons_iter+0x15/0x11a [ath10k_core] [] ? mark_lock+0x24/0x201 [] lock_acquire+0x132/0x1cb [] ? lock_acquire+0x132/0x1cb [] ? ath10k_wmi_tx_beacons_iter+0x26/0x11a [ath10k_core] [] ? ath10k_wmi_cmd_send_nowait+0x1ce/0x1ce [ath10k_core] [] _raw_spin_lock_bh+0x31/0x40 [] ? ath10k_wmi_tx_beacons_iter+0x26/0x11a [ath10k_core] [] ath10k_wmi_tx_beacons_iter+0x26/0x11a [ath10k_core] [] ? ath10k_wmi_cmd_send_nowait+0x1ce/0x1ce [ath10k_core] [] __iterate_interfaces+0x9d/0x13d [mac80211] [] ieee80211_iterate_active_interfaces_atomic+0x32/0x3e [mac80211] [] ? ath10k_wmi_cmd_send_nowait+0x1ce/0x1ce [ath10k_core] [] ath10k_wmi_tx_beacons_nowait.isra.13+0x14/0x16 [ath10k_core] [] ath10k_wmi_cmd_send+0x71/0x242 [ath10k_core] [] ath10k_wmi_peer_delete+0x3f/0x42 [ath10k_core] [] ath10k_peer_create+0x15e/0x1ae [ath10k_core] [] ath10k_add_interface+0x70d/0xbda [ath10k_core] [] drv_add_interface+0x123/0x1a5 [mac80211] [] ieee80211_do_open+0x351/0x667 [mac80211] [] ieee80211_open+0x49/0x4c [mac80211] [] __dev_open+0x88/0xde [] __dev_change_flags+0xa4/0x13a [] dev_change_flags+0x1f/0x54 [] devinet_ioctl+0x2b9/0x5c9 [] ? copy_to_user+0x32/0x38 [] inet_ioctl+0x81/0x9d [] ? inet_ioctl+0x81/0x9d [] sock_do_ioctl+0x20/0x3d [] sock_ioctl+0x222/0x22e [] do_vfs_ioctl+0x453/0x4d7 [] ? __sys_recvmsg+0x4c/0x5b [] ? __fget_light+0x48/0x6c [] SyS_ioctl+0x52/0x74 [] entry_SYSCALL_64_fastpath+0x16/0x7a Signed-off-by: Ben Greear Signed-off-by: Kalle Valo drivers/net/wireless/ath/ath10k/mac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3613a6245b9fb5091724961e502fd1228de40f32 Merge: af8c34c 665f05e0 Author: Linus Torvalds Date: Mon Jun 6 09:55:31 2016 -0700 Merge tag 'edac_fixes_for_4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC fixes from Borislav Petkov: "EDAC fixes to recent fallout from workqueue cleanup and Broadwell enablement: - sb_edac fallout fixes from recent Broadwell enablement (Tony Luck) - EDAC workqueue poll period resetting fix (Nicholas Krause)" * tag 'edac_fixes_for_4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: EDAC, sb_edac: Readd accidentally dropped Broadwell-D support EDAC: Fix workqueues poll period resetting EDAC, sb_edac: Fix rank lookup on Broadwell commit 34b3e6c92af1fa3f7067e4fa05ffa9d8bd41c96c Author: Feifei Xu Date: Wed Jun 1 19:18:30 2016 +0800 Btrfs: self-tests: Fix extent buffer bitmap test fail on BE system In __test_eb_bitmaps(), we write random data to a bitmap. Then copy the bitmap to another bitmap that resides inside an extent buffer. Later we verify the values of corresponding bits in the bitmap and the bitmap inside the extent buffer. However, extent_buffer_test_bit() reads in byte granularity while test_bit() reads in unsigned long granularity. Hence we end up comparing wrong bits on big-endian systems such as ppc64. This commit fixes the issue by reading the bitmap in byte granularity. Reviewed-by: Josef Bacik Reviewed-by: Chandan Rajendra Signed-off-by: Feifei Xu Signed-off-by: David Sterba fs/btrfs/tests/extent-io-tests.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 36b3dc05b4650e81eca7d60d548a92b014595eb1 Author: Feifei Xu Date: Wed Jun 1 19:18:29 2016 +0800 Btrfs: self-tests: Fix test_bitmaps fail on 64k sectorsize With 64K sectorsize, 1G sized block group cannot span across bitmaps. To execute test_bitmaps() function, this commit allocates "BITS_PER_BITMAP * sectorsize + PAGE_SIZE" sized block group. Reviewed-by: Josef Bacik Reviewed-by: Chandan Rajendra Signed-off-by: Feifei Xu Signed-off-by: David Sterba fs/btrfs/tests/free-space-tests.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit ef9f2db365c31433e52b0c5863793273bb632666 Author: Feifei Xu Date: Wed Jun 1 19:18:28 2016 +0800 Btrfs: self-tests: Use macros instead of constants and add missing newline This commit replaces numerical constants with appropriate preprocessor macros. Reviewed-by: Josef Bacik Signed-off-by: Chandan Rajendra Signed-off-by: Feifei Xu Signed-off-by: David Sterba fs/btrfs/disk-io.c | 3 ++- fs/btrfs/tests/extent-buffer-tests.c | 2 +- fs/btrfs/tests/qgroup-tests.c | 44 +++++++++++++++++++++++------------- 3 files changed, 31 insertions(+), 18 deletions(-) commit d94f43b4c6b88b9393422868d8dfde14c5923858 Author: Feifei Xu Date: Wed Jun 1 19:18:27 2016 +0800 Btrfs: self-tests: Support testing all possible sectorsizes and nodesizes To test all possible sectorsizes, this commit adds a sectorsize array. This commit executes the tests for all possible sectorsizes and nodesizes. Reviewed-by: Josef Bacik Signed-off-by: Chandan Rajendra Signed-off-by: Feifei Xu Signed-off-by: David Sterba fs/btrfs/super.c | 54 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 22 deletions(-) commit ed9e4afdb0551e3ef4ee8433fe664433a20ef73a Author: Feifei Xu Date: Wed Jun 1 19:18:26 2016 +0800 Btrfs: self-tests: Execute page straddling test only when nodesize < PAGE_SIZE On ppc64, PAGE_SIZE is 64k which is same as BTRFS_MAX_METADATA_BLOCKSIZE. In such a scenario, we will never be able to have an extent buffer containing more than one page. Hence in such cases this commit does not execute the page straddling tests. Reviewed-by: Josef Bacik Signed-off-by: Feifei Xu Signed-off-by: Chandan Rajendra Signed-off-by: David Sterba fs/btrfs/tests/extent-io-tests.c | 49 ++++++++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 19 deletions(-) commit b581755b1c565391c72d03b157ba2dd0b18e9d15 Author: Miklos Szeredi Date: Mon Jun 6 16:21:37 2016 +0200 ovl: xattr filter fix a) ovl_need_xattr_filter() is wrong, we can have multiple lower layers overlaid, all of which (except the lowest one) honouring the "trusted.overlay.opaque" xattr. So need to filter everything except the bottom and the pure-upper layer. b) we no longer can assume that inode is attached to dentry in get/setxattr. This patch unconditionally filters private xattrs to fix both of the above. Performance impact for get/removexattrs is likely in the noise. For listxattrs it might be measurable in pathological cases, but I very much hope nobody cares. If they do, we'll fix it then. Reported-by: Vivek Goyal Signed-off-by: Miklos Szeredi Fixes: b96809173e94 ("security_d_instantiate(): move to the point prior to attaching dentry to inode") fs/overlayfs/inode.c | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) commit 08dd8cd06ed95625b9e2fac43c78fcb45b7eaf94 Author: Dr. David Alan Gilbert Date: Fri Jun 3 19:00:59 2016 +0100 x86/msr: Use the proper trace point conditional for writes The msr tracing for writes is incorrectly conditional on the read trace. Fixes: 7f47d8cc039f "x86, tracing, perf: Add trace point for MSR accesses" Signed-off-by: Dr. David Alan Gilbert Cc: stable@vger.kernel.org Cc: ak@linux.intel.com Link: http://lkml.kernel.org/r/1464976859-21850-1-git-send-email-dgilbert@redhat.com Signed-off-by: Thomas Gleixner arch/x86/include/asm/msr.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 5f9e1059d9347191b271bf7d13bd83db57594d2a Author: Jeff Mahoney Date: Wed Sep 16 15:34:53 2015 +0200 btrfs: advertise which crc32c implementation is being used at module load Since several architectures support hardware-accelerated crc32c calculation, it would be nice to confirm that btrfs is actually using it. We can see an elevated use count for the module, but it doesn't actually show who the users are. This patch simply prints the name of the driver after successfully initializing the shash. Signed-off-by: Jeff Mahoney [ added a helper and used in module load-time message ] Signed-off-by: David Sterba fs/btrfs/hash.c | 5 +++++ fs/btrfs/hash.h | 1 + fs/btrfs/super.c | 5 +++-- 3 files changed, 9 insertions(+), 2 deletions(-) commit 139ab4d4e68b8cf2a611b06c006a2195dc6bedf1 Author: Michael S. Tsirkin Date: Tue May 24 15:21:05 2016 +0300 tools/virtio: add noring tool Useful to measure testing framework overhead. Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/Makefile | 4 ++- tools/virtio/ringtest/noring.c | 69 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) commit ef1b144d23dbd745fd655b7d0a70212fcc8d0121 Author: Mike Rapoport Date: Wed May 4 13:15:50 2016 +0300 tools/virtio/ringtest: fix run-on-all.sh to work without /dev/cpu /dev/cpu is only available on x86 with certain modules (e.g. msr) enabled. Using lscpu to get processors count is more portable. Signed-off-by: Mike Rapoport Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/run-on-all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3b220cf867ce6881c7f671b27564c4cc13d8c4b8 Author: Mike Rapoport Date: Wed May 4 09:12:55 2016 +0300 tools/virtio/ringtest: add usage example to README Having typical usage example in the README file is more convinient than in the git history... Signed-off-by: Mike Rapoport Signed-off-by: Michael S. Tsirkin tools/virtio/ringtest/README | 4 ++++ 1 file changed, 4 insertions(+) commit 0e4191fe6f2f1a6ac360bcca0066c536f1ff9a6e Author: Geert Uytterhoeven Date: Sun May 22 11:06:27 2016 +0200 MAINTAINERS: Add file patterns for virtio device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Cc: Michael S. Tsirkin Cc: virtualization@lists.linux-foundation.org Signed-off-by: Michael S. Tsirkin MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit e06cd3dd7cea50e87663a88acdfdb7ac1c53a5ca Author: Liu Bo Date: Fri Jun 3 12:05:15 2016 -0700 Btrfs: add validadtion checks for chunk loading To prevent fuzzed filesystem images from panic the whole system, we need various validation checks to refuse to mount such an image if btrfs finds any invalid value during loading chunks, including both sys_array and regular chunks. Note that these checks may not be sufficient to cover all corner cases, feel free to add more checks. Reported-by: Vegard Nossum Reported-by: Quentin Casasnovas Reviewed-by: David Sterba Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 82 ++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 15 deletions(-) commit 99e3ecfcb9f4ca35192d20a5bea158b81f600062 Author: Liu Bo Date: Fri Jun 3 12:05:14 2016 -0700 Btrfs: add more validation checks for superblock This adds validation checks for super_total_bytes, super_bytes_used and super_stripesize, super_num_devices. Reported-by: Vegard Nossum Reported-by: Quentin Casasnovas Reviewed-by: David Sterba Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/disk-io.c | 11 +++++++++++ fs/btrfs/volumes.c | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) commit d865177a5e749827f248f6363f5100d3a2f66b0f Author: Liu Bo Date: Fri Jun 3 17:41:42 2016 -0700 Btrfs: clear uptodate flags of pages in sys_array eb We set uptodate flag to pages in the temporary sys_array eb, but do not clear the flag after free eb. As the special btree inode may still hold a reference on those pages, the uptodate flag can remain alive in them. If btrfs_super_chunk_root has been intentionally changed to the offset of this sys_array eb, reading chunk_root will read content of sys_array and it will skip our beautiful checks in btree_readpage_end_io_hook() because of "pages of eb are uptodate => eb is uptodate" This adds the 'clear uptodate' part to force it to read from disk. Reviewed-by: Josef Bacik Signed-off-by: Liu Bo Signed-off-by: David Sterba fs/btrfs/volumes.c | 2 ++ 1 file changed, 2 insertions(+) commit a02cc9d3cc9f98905df214d4a57e5918473260ea Author: Michal Schmidt Date: Fri Jun 3 15:32:18 2016 +0200 bnx2x: allow adding VLANs while interface is down Since implementing VLAN filtering in commit 05cc5a39ddb74 ("bnx2x: add vlan filtering offload") bnx2x refuses to add a VLAN while the interface is down: # ip link add link enp3s0f0 enp3s0f0_10 type vlan id 10 RTNETLINK answers: Bad address and in dmesg (with bnx2x.debug=0x20): bnx2x: [bnx2x_vlan_rx_add_vid:12941(enp3s0f0)]Ignoring VLAN configuration the interface is down Other drivers have no problem with this. Fix this peculiar behavior in the following way: - Accept requests to add/kill VID regardless of the device state. Maintain the requested list of VIDs in the bp->vlan_reg list. - If the device is up, try to configure the VID list into the hardware. If we run out of VLAN credits or encounter a failure configuring an entry, fall back to accepting all VLANs. If we successfully configure all entries from the list, turn the fallback off. - Use the same code for reconfiguring VLANs during NIC load. Signed-off-by: Michal Schmidt Acked-by: Yuval Mintz Signed-off-by: David S. Miller drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 151 ++++++++++------------- 1 file changed, 62 insertions(+), 89 deletions(-) commit 8a934efe94347eee843aeea65bdec8077a79e259 Author: Gavin Shan Date: Thu May 26 09:56:07 2016 +1000 powerpc/pseries: Fix PCI config address for DDW In commit 8445a87f7092 "powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism", the PE address was replaced with the PCI config address in order to remove dependency on EEH. According to PAPR spec, firmware (pHyp or QEMU) should accept "xxBBSSxx" format PCI config address, not "xxxxBBSS" provided by the patch. Note that "BB" is PCI bus number and "SS" is the combination of slot and function number. This fixes the PCI address passed to DDW RTAS calls. Fixes: 8445a87f7092 ("powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism") Cc: stable@vger.kernel.org # v3.4+ Reported-by: Guilherme G. Piccoli Signed-off-by: Gavin Shan Tested-by: Guilherme G. Piccoli Signed-off-by: Michael Ellerman arch/powerpc/platforms/pseries/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1e407ee3b21f981140491d5b8a36422979ca246f Author: Khem Raj Date: Mon Apr 25 09:19:17 2016 -0700 powerpc/ptrace: Fix out of bounds array access warning gcc-6 correctly warns about a out of bounds access arch/powerpc/kernel/ptrace.c:407:24: warning: index 32 denotes an offset greater than size of 'u64[32][1] {aka long long unsigned int[32][1]}' [-Warray-bounds] offsetof(struct thread_fp_state, fpr[32][0])); ^ check the end of array instead of beginning of next element to fix this Signed-off-by: Khem Raj Cc: Kees Cook Cc: Michael Ellerman Cc: Segher Boessenkool Tested-by: Aaro Koskinen Acked-by: Olof Johansson Signed-off-by: Michael Ellerman arch/powerpc/kernel/ptrace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ec10d3a2ba591c87da94219c1e46b02ae97757a Author: Marco Angaroni Date: Mon May 16 19:18:09 2016 +0200 ipvs: update real-server binding of outgoing connections in SIP-pe Previous patch that introduced handling of outgoing packets in SIP persistent-engine did not call ip_vs_check_template() in case packet was matching a connection template. Assumption was that real-server was healthy, since it was sending a packet just in that moment. There are however real-server fault conditions requiring that association between call-id and real-server (represented by connection template) gets updated. Here is an example of the sequence of events: 1) RS1 is a back2back user agent that handled call-id1 and call-id2 2) RS1 is down and was marked as unavailable 3) new message from outside comes to IPVS with call-id1 4) IPVS reschedules the message to RS2, which becomes new call handler 5) RS2 forwards the message outside, translating call-id1 to call-id2 6) inside pe->conn_out() IPVS matches call-id2 with existing template 7) IPVS does not change association call-id2 <-> RS1 8) new message comes from client with call-id2 9) IPVS reschedules the message to a real-server potentially different from RS2, which is now the correct destination This patch introduces ip_vs_check_template() call in the handling of outgoing packets for SIP-pe. And also introduces a second optional argument for ip_vs_check_template() that allows to check if dest associated to a connection template is the same dest that was identified as the source of the packet. This is to change the real-server bound to a particular call-id independently from its availability status: the idea is that it's more reliable, for in->out direction (where internal network can be considered trusted), to always associate a call-id with the last real-server that used it in one of its messages. Think about above sequence of events where, just after step 5, RS1 returns instead to be available. Comparison of dests is done by simply comparing pointers to struct ip_vs_dest; there should be no cases where struct ip_vs_dest keeps its memory address, but represent a different real-server in terms of ip-address / port. Fixes: 39b972231536 ("ipvs: handle connections started by real-servers") Signed-off-by: Marco Angaroni Acked-by: Julian Anastasov Signed-off-by: Simon Horman include/net/ip_vs.h | 2 +- net/netfilter/ipvs/ip_vs_conn.c | 5 +++-- net/netfilter/ipvs/ip_vs_core.c | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) commit af8c34ce6ae32addda3788d54a7e340cad22516b Author: Linus Torvalds Date: Sun Jun 5 14:31:26 2016 -0700 Linux 4.7-rc2 Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5975b2c0c10adbc7894a54ab7b30db4fbcdd8c41 Merge: d834502 58f1c65 Author: Linus Torvalds Date: Sun Jun 5 11:15:33 2016 -0700 Merge branch 'parisc-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc fixes from Helge Deller: - Fix printk time stamps on SMP systems which got wrong due to a patch which was added during the merge window - Fix two bugs in the stack backtrace code: Races in module unloading and possible invalid accesses to memory due to wrong instruction decoding (Mikulas Patocka) - Fix userspace crash when syscalls access invalid unaligned userspace addresses. Those syscalls will now return EFAULT as expected. (tagged for stable kernel series) * 'parisc-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Move die_if_kernel() prototype into traps.h header parisc: Fix pagefault crash in unaligned __get_user() call parisc: Fix printk time during boot parisc: Fix backtrace on PA-RISC commit d834502e2fca9380a1579fecd134ef94c063b662 Merge: eedf265 4693fc7 Author: Linus Torvalds Date: Sun Jun 5 11:02:00 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull key handling update from James Morris: "This alters a new keyctl function added in the current merge window to allow for a future extension planned for the next merge window" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: KEYS: Add placeholder for KDF usage with DH commit eedf265aa003b4781de24cfed40a655a664457e6 Author: Eric W. Biederman Date: Thu Jun 2 10:29:47 2016 -0500 devpts: Make each mount of devpts an independent filesystem. The /dev/ptmx device node is changed to lookup the directory entry "pts" in the same directory as the /dev/ptmx device node was opened in. If there is a "pts" entry and that entry is a devpts filesystem /dev/ptmx uses that filesystem. Otherwise the open of /dev/ptmx fails. The DEVPTS_MULTIPLE_INSTANCES configuration option is removed, so that userspace can now safely depend on each mount of devpts creating a new instance of the filesystem. Each mount of devpts is now a separate and equal filesystem. Reserved ttys are now available to all instances of devpts where the mounter is in the initial mount namespace. A new vfs helper path_pts is introduced that finds a directory entry named "pts" in the directory of the passed in path, and changes the passed in path to point to it. The helper path_pts uses a function path_parent_directory that was factored out of follow_dotdot. In the implementation of devpts: - devpts_mnt is killed as it is no longer meaningful if all mounts of devpts are equal. - pts_sb_from_inode is replaced by just inode->i_sb as all cached inodes in the tty layer are now from the devpts filesystem. - devpts_add_ref is rolled into the new function devpts_ptmx. And the unnecessary inode hold is removed. - devpts_del_ref is renamed devpts_release and reduced to just a deacrivate_super. - The newinstance mount option continues to be accepted but is now ignored. In devpts_fs.h definitions for when !CONFIG_UNIX98_PTYS are removed as they are never used. Documentation/filesystems/devices.txt is updated to describe the current situation. This has been verified to work properly on openwrt-15.05, centos5, centos6, centos7, debian-6.0.2, debian-7.9, debian-8.2, ubuntu-14.04.3, ubuntu-15.10, fedora23, magia-5, mint-17.3, opensuse-42.1, slackware-14.1, gentoo-20151225 (13.0?), archlinux-2015-12-01. With the caveat that on centos6 and on slackware-14.1 that there wind up being two instances of the devpts filesystem mounted on /dev/pts, the lower copy does not end up getting used. Signed-off-by: "Eric W. Biederman" Cc: Greg KH Cc: Peter Hurley Cc: Peter Anvin Cc: Andy Lutomirski Cc: Al Viro Cc: Serge Hallyn Cc: Willy Tarreau Cc: Aurelien Jarno Cc: One Thousand Gnomes Cc: Jann Horn Cc: Jiri Slaby Cc: Florian Weimer Cc: Konstantin Khlebnikov Signed-off-by: Linus Torvalds Documentation/filesystems/devpts.txt | 145 +++----------------------- drivers/tty/Kconfig | 11 -- drivers/tty/pty.c | 15 +-- fs/devpts/inode.c | 191 ++++++++++------------------------- fs/namei.c | 49 +++++++-- include/linux/devpts_fs.h | 9 +- include/linux/namei.h | 2 + 7 files changed, 126 insertions(+), 296 deletions(-) commit 58f1c654d13a42575d507ea61f6de0332a761e75 Author: Helge Deller Date: Sat Jun 4 17:38:09 2016 +0200 parisc: Move die_if_kernel() prototype into traps.h header Signed-off-by: Helge Deller arch/parisc/include/asm/traps.h | 2 ++ arch/parisc/kernel/unaligned.c | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 8b78f260887df532da529f225c49195d18fef36b Author: Helge Deller Date: Sat Jun 4 17:21:33 2016 +0200 parisc: Fix pagefault crash in unaligned __get_user() call One of the debian buildd servers had this crash in the syslog without any other information: Unaligned handler failed, ret = -2 clock_adjtime (pid 22578): Unaligned data reference (code 28) CPU: 1 PID: 22578 Comm: clock_adjtime Tainted: G E 4.5.0-2-parisc64-smp #1 Debian 4.5.4-1 task: 000000007d9960f8 ti: 00000001bde7c000 task.ti: 00000001bde7c000 YZrvWESTHLNXBCVMcbcbcbcbOGFRQPDI PSW: 00001000000001001111100000001111 Tainted: G E r00-03 000000ff0804f80f 00000001bde7c2b0 00000000402d2be8 00000001bde7c2b0 r04-07 00000000409e1fd0 00000000fa6f7fff 00000001bde7c148 00000000fa6f7fff r08-11 0000000000000000 00000000ffffffff 00000000fac9bb7b 000000000002b4d4 r12-15 000000000015241c 000000000015242c 000000000000002d 00000000fac9bb7b r16-19 0000000000028800 0000000000000001 0000000000000070 00000001bde7c218 r20-23 0000000000000000 00000001bde7c210 0000000000000002 0000000000000000 r24-27 0000000000000000 0000000000000000 00000001bde7c148 00000000409e1fd0 r28-31 0000000000000001 00000001bde7c320 00000001bde7c350 00000001bde7c218 sr00-03 0000000001200000 0000000001200000 0000000000000000 0000000001200000 sr04-07 0000000000000000 0000000000000000 0000000000000000 0000000000000000 IASQ: 0000000000000000 0000000000000000 IAOQ: 00000000402d2e84 00000000402d2e88 IIR: 0ca0d089 ISR: 0000000001200000 IOR: 00000000fa6f7fff CPU: 1 CR30: 00000001bde7c000 CR31: ffffffffffffffff ORIG_R28: 00000002369fe628 IAOQ[0]: compat_get_timex+0x2dc/0x3c0 IAOQ[1]: compat_get_timex+0x2e0/0x3c0 RP(r2): compat_get_timex+0x40/0x3c0 Backtrace: [<00000000402d4608>] compat_SyS_clock_adjtime+0x40/0xc0 [<0000000040205024>] syscall_exit+0x0/0x14 This means the userspace program clock_adjtime called the clock_adjtime() syscall and then crashed inside the compat_get_timex() function. Syscalls should never crash programs, but instead return EFAULT. The IIR register contains the executed instruction, which disassebles into "ldw 0(sr3,r5),r9". This load-word instruction is part of __get_user() which tried to read the word at %r5/IOR (0xfa6f7fff). This means the unaligned handler jumped in. The unaligned handler is able to emulate all ldw instructions, but it fails if it fails to read the source e.g. because of page fault. The following program reproduces the problem: #define _GNU_SOURCE #include #include #include int main(void) { /* allocate 8k */ char *ptr = mmap(NULL, 2*4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); /* free second half (upper 4k) and make it invalid. */ munmap(ptr+4096, 4096); /* syscall where first int is unaligned and clobbers into invalid memory region */ /* syscall should return EFAULT */ return syscall(__NR_clock_adjtime, 0, ptr+4095); } To fix this issue we simply need to check if the faulting instruction address is in the exception fixup table when the unaligned handler failed. If it is, call the fixup routine instead of crashing. While looking at the unaligned handler I found another issue as well: The target register should not be modified if the handler was unsuccessful. Signed-off-by: Helge Deller Cc: stable@vger.kernel.org arch/parisc/kernel/unaligned.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 0032c08833ab7c7861d12eb35da26dce85f3e229 Author: Helge Deller Date: Fri Jun 3 19:22:31 2016 +0200 parisc: Fix printk time during boot Avoid showing invalid printk time stamps during boot. Signed-off-by: Helge Deller Reviewed-by: Aaro Koskinen arch/parisc/kernel/processor.c | 5 +++-- arch/parisc/kernel/time.c | 5 ----- 2 files changed, 3 insertions(+), 7 deletions(-) commit e6ec03a25f12b312b7e0c037fe4a6471c4ee5665 Author: Al Viro Date: Sun Jun 5 00:23:09 2016 -0400 autofs braino fix for do_last() It's an analogue of commit 7500c38a (fix the braino in "namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()"). The same problem (->lookup()-returned unhashed negative dentry just might be an autofs one with ->d_manage() that would wait until the daemon makes it positive) applies in do_last() - we need to do follow_managed() first. Fortunately, remaining callers of follow_managed() are OK - only autofs has that weirdness (negative dentry that does not mean an instant -ENOENT)) and autofs never has its negative dentries hashed, so we can't pick one from a dcache lookup. ->d_manage() is a bloody mess ;-/ Cc: stable@vger.kernel.org # v4.6 Spotted-by: Ian Kent Signed-off-by: Al Viro fs/namei.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4ef36e156670c2d835ccb4000a561ece4e598fd9 Merge: e7eacc9 182fd9e Author: David S. Miller Date: Sat Jun 4 22:14:53 2016 -0400 Merge tag 'wireless-drivers-for-davem-2016-06-04' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers Kalle Valo says: ==================== wireless-drivers fixes for 4.7 brcmfmac * add fallback RSSI report for devices that do not report per-chain values * fix a null pointer derefence regression on PCIe full dongle devices rtlwifi * fix scheduling while atomic regression from commit 49f86ec21c01 MAINTAINERS * add file patterns for wireless device tree bindings ==================== Signed-off-by: David S. Miller commit be24a89700eef61bedaba40f3b05ef07f5806e38 Author: Mikulas Patocka Date: Wed Jun 29 00:48:19 2011 +0200 parisc: Fix backtrace on PA-RISC This patch fixes backtrace on PA-RISC There were several problems: 1) The code that decodes instructions handles instructions that subtract from the stack pointer incorrectly. If the instruction subtracts the number X from the stack pointer the code increases the frame size by (0x100000000-X). This results in invalid accesses to memory and recursive page faults. 2) Because gcc reorders blocks, handling instructions that subtract from the frame pointer is incorrect. For example, this function int f(int a) { if (__builtin_expect(a, 1)) return a; g(); return a; } is compiled in such a way, that the code that decreases the stack pointer for the first "return a" is placed before the code for "g" call. If we recognize this decrement, we mistakenly believe that the frame size for the "g" call is zero. To fix problems 1) and 2), the patch doesn't recognize instructions that decrease the stack pointer at all. To further safeguard the unwind code against nonsense values, we don't allow frame size larger than Total_frame_size. 3) The backtrace is not locked. If stack dump races with module unload, invalid table can be accessed. This patch adds a spinlock when processing module tables. Note, that for correct backtrace, you need recent binutils. Binutils 2.18 from Debian 5 produce garbage unwind tables. Binutils 2.21 work better (it sometimes forgets function frames, but at least it doesn't generate garbage). Signed-off-by: Mikulas Patocka Signed-off-by: Helge Deller arch/parisc/kernel/unwind.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 049ec1b5a76d34a6980cccdb7c0baeb4eed7a993 Merge: f2c6b9e ab3ab68 Author: Linus Torvalds Date: Sat Jun 4 12:30:36 2016 -0700 Merge tag 'drm-fixes-for-v4.7-rc2' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: "A bunch of ARM drivers got into the fixes vibe this time around, so this contains a bunch of fixes for imx, atmel hlcdc, arm hdlcd (only so many combos of hlcd), mediatek and omap drm. Other than that there is one mgag200 fix and a few core drm regression fixes" * tag 'drm-fixes-for-v4.7-rc2' of git://people.freedesktop.org/~airlied/linux: (34 commits) drm/omap: fix unused variable warning. drm: hdlcd: Add information about the underlying framebuffers in debugfs drm: hdlcd: Cleanup the atomic plane operations drm/hdlcd: Fix up crtc_state->event handling drm: hdlcd: Revamp runtime power management drm/mediatek: mtk_dsi: Remove spurious drm_connector_unregister drm/mediatek: mtk_dpi: remove invalid error message drm: atmel-hlcdc: fix a NULL check drm: atmel-hlcdc: fix atmel_hlcdc_crtc_reset() implementation drm/mgag200: Black screen fix for G200e rev 4 drm: Wrap direct calls to driver->gem_free_object from CMA drm: fix fb refcount issue with atomic modesetting drm: make drm_atomic_set_mode_prop_for_crtc() more reliable drm/sti: remove extra mode fixup drm: add missing drm_mode_set_crtcinfo call drm/omap: include gpio/consumer.h where needed drm/omap: include linux/seq_file.h where needed Revert "drm/omap: no need to select OMAP2_DSS" drm/omap: Remove regulator API abuse OMAPDSS: HDMI5: Change DDC timings ... commit f2c6b9e4b2708ae50e3ab8c91dcad1564974f2a4 Merge: 95b46ae ce7585f Author: Linus Torvalds Date: Sat Jun 4 12:25:36 2016 -0700 Merge tag 'vfio-v4.7-rc2' of git://github.com/awilliam/linux-vfio Pull VFIO fixes from Alex Williamson: "Fix irqfd shutdown ordering, build warning, and VPD short read" * tag 'vfio-v4.7-rc2' of git://github.com/awilliam/linux-vfio: vfio/pci: Allow VPD short read vfio/type1: Fix build warning vfio/pci: Fix ordering of eventfd vs virqfd shutdown commit 95b46aeb05c53726236a2a468ad16119afd42b2c Merge: b2d5ad8 afefc10 Author: Linus Torvalds Date: Sat Jun 4 12:20:26 2016 -0700 Merge tag 'mmc-v4.7-rc1-2' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fixes from Ulf Hansson: "MMC core: - Fix/restore behaviour when selecting bus width for (e)MMC MMC host: - sunxi: Fix eMMC HS-DDR modes on Allwinner A80" * tag 'mmc-v4.7-rc1-2' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: sunxi: Re-enable eMMC HS-DDR modes on Allwinner A80 mmc: sunxi: Fix DDR MMC timings for A80 mmc: fix mmc mode selection for HS-DDR and higher commit b2d5ad822322cfb5dd33e90484ed7df4ee6e68ee Merge: a3021a5 8dff9c8 Author: Linus Torvalds Date: Sat Jun 4 11:56:28 2016 -0700 Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs fixes from Chris Mason: "The important part of this pull is Filipe's set of fixes for btrfs device replacement. Filipe fixed a few issues seen on the list and a number he found on his own" * 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: deal with duplciates during extent_map insertion in btrfs_get_extent Btrfs: fix race between device replace and read repair Btrfs: fix race between device replace and discard Btrfs: fix race between device replace and chunk allocation Btrfs: fix race setting block group back to RW mode during device replace Btrfs: fix unprotected assignment of the left cursor for device replace Btrfs: fix race setting block group readonly during device replace Btrfs: fix race between device replace and block group removal Btrfs: fix race between readahead and device replace/removal commit a9e26cab40ecfd4a0d718f22fa30db4dd1edbf60 Author: Rob Clark Date: Wed Jun 1 14:02:51 2016 -0400 drm/msm: fix potential submit error path issue Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 5 +++++ 1 file changed, 5 insertions(+) commit ba344afd667a6f1c6bf7c53e08fc16bd84fa4df7 Author: Rob Clark Date: Tue May 24 18:43:26 2016 -0400 drm/msm: fix some crashes in submit fail path If submit fails, before fence is created or before submit is added to submit-list, then unitialized fields cause problems in the clean-up path. Signed-off-by: Rob Clark drivers/gpu/drm/msm/msm_gem_submit.c | 2 ++ 1 file changed, 2 insertions(+) commit 69a834c28fb514403eb91a4f0120da214a52e056 Author: Rob Clark Date: Tue May 24 18:29:38 2016 -0400 drm/msm: deal with exhausted vmap space better Some, but not all, callers of obj->vmap() would check if return IS_ERR(). So let's actually return an error if vmap() fails. And fixup the call-sites that were not handling this properly. Signed-off-by: Rob Clark drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 +- drivers/gpu/drm/msm/msm_fbdev.c | 4 ++++ drivers/gpu/drm/msm/msm_gem.c | 2 ++ drivers/gpu/drm/msm/msm_rd.c | 3 +++ drivers/gpu/drm/msm/msm_ringbuffer.c | 4 ++++ 5 files changed, 14 insertions(+), 1 deletion(-) commit a3021a59cac40681b2c131c84cdd4b471793d524 Merge: eb10a7b f6973c0 Author: Linus Torvalds Date: Sat Jun 4 11:37:53 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull Ceph fixes from Sage Weil: "We have a few follow-up fixes for the libceph refactor from Ilya, and then some cephfs + fscache fixes from Zheng. The first two FS-Cache patches are acked by David Howells and deemed trivial enough to go through our tree. The rest fix some issues with the ceph fscache handling (disable cache for inodes opened for write, and simplify the revalidation logic accordingly, dropping the now-unnecessary work queue)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: ceph: use i_version to check validity of fscache ceph: improve fscache revalidation ceph: disable fscache when inode is opened for write ceph: avoid unnecessary fscache invalidation/revlidation ceph: call __fscache_uncache_page() if readpages fails FS-Cache: make check_consistency callback return int FS-Cache: wake write waiter after invalidating writes libceph: use %s instead of %pE in dout()s libceph: put request only if it's done in handle_reply() libceph: change ceph_osdmap_flag() to take osdc commit eb10a7b7befd07d4c28903029b238dc66f5dd570 Merge: 5016320 60c07f8 Author: Linus Torvalds Date: Sat Jun 4 11:26:49 2016 -0700 Merge tag 'acpi-4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fixes from Rafael Wysocki: "Two fixes for problems introduced recently (ACPICA and the ACPI backlight driver) and one fix for an older issue that prevents at least one system from booting. Specifics: - Fix an incorrect check introduced by recent ACPICA changes which causes problems with booting KVM guests to happen, among other things (Lv Zheng). - Fix a backlight issue introduced by recent changes to the ACPI video driver (Aaron Lu). - Fix the ACPI processor initialization which attempts to register an IO region without checking if that really is necessary and sometimes prevents drivers loaded subsequently from registering their resources which leads to boot issues (Rafael Wysocki)" * tag 'acpi-4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / processor: Avoid reserving IO regions too early ACPICA / Hardware: Fix old register check in acpi_hw_get_access_bit_width() ACPI / Thermal / video: fix max_level incorrect value commit 50163203e31c292a8ab00bce077077f996c74276 Merge: d46d025 8cd8cbd Author: Linus Torvalds Date: Sat Jun 4 11:07:57 2016 -0700 Merge tag 'pm-4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "Two fixes for problems introduced recently in the cpufreq core and the intel_pstate driver. Specifics: - Fix a silly mistake related to the clamp_val() usage in a function added by a recent commit (Rafael Wysocki). - Reduce the log level of an annoying message added to intel_pstate during the recent merge window (Srinivas Pandruvada)" * tag 'pm-4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: cpufreq: Fix clamp_val() usage in cpufreq_driver_fast_switch() cpufreq: intel_pstate: Downgrade print level for _PPC commit d46d0256cd030f196185078a4a8863563425b624 Merge: 8c52b6d e46e7b7 Author: Linus Torvalds Date: Sat Jun 4 10:51:29 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge various fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton : mm, page_alloc: recalculate the preferred zoneref if the context can ignore memory policies mm, page_alloc: reset zonelist iterator after resetting fair zone allocation policy mm, oom_reaper: do not use siglock in try_oom_reaper() mm, page_alloc: prevent infinite loop in buffered_rmqueue() checkpatch: reduce git commit description style false positives mm/z3fold.c: avoid modifying HEADLESS page and minor cleanup memcg: add RCU locking around css_for_each_descendant_pre() in memcg_offline_kmem() mm: check the return value of lookup_page_ext for all call sites kdump: fix dmesg gdbmacro to work with record based printk mm: fix overflow in vm_map_ram() commit fac7d1917dfddfa53e98524f0abfbe60252740fe Author: Al Viro Date: Sat Jun 4 11:41:49 2016 -0400 fix EOPENSTALE bug in do_last() EOPENSTALE occuring at the last component of a trailing symlink ends up with do_last() retrying its lookup. After the symlink body has been discarded. The thing is, all this retry_lookup logics in there is not needed at all - the upper layers will do the right thing if we simply return that -EOPENSTALE as we would with any other error. Trying to microoptimize in do_last() is a lot of headache for no good reason. Cc: stable@vger.kernel.org # v4.2+ Tested-by: Oleg Drokin Reviewed-and-Tested-by: Jeff Layton Signed-off-by: Al Viro fs/namei.c | 43 ++++--------------------------------------- 1 file changed, 4 insertions(+), 39 deletions(-) commit 182fd9eecb287e696c82b30d06c6150d80a49c5b Author: Geert Uytterhoeven Date: Sun May 22 11:06:10 2016 +0200 MAINTAINERS: Add file patterns for wireless device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven Cc: Kalle Valo Cc: linux-wireless@vger.kernel.org Signed-off-by: Kalle Valo MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 27ea13e6186c1a5bd0fa2b0d6f854d60ca4ca4c9 Merge: b02b1fb 6b7e9cd Author: James Bottomley Date: Sat Jun 4 09:53:29 2016 -0400 Merge remote-tracking branch 'mkp-scsi/4.7/scsi-fixes' into fixes commit e7eacc9e0bc5338e5b347750c305d99f93279404 Merge: 8478b6c 37920fc Author: David S. Miller Date: Fri Jun 3 19:54:23 2016 -0400 Merge branch 'mediatek-fixes' John Crispin says: ==================== net-next: mediatek: improve phy support The current driver did not handle the RGMII delay modes and asymmetric flow control properly. The mii_bus is not freed properly. Also add support for fixed-phy allowing the driver to work on SoCs that have an internal gigabit switch. ==================== Signed-off-by: David S. Miller commit 37920fce0fc10264410eb880d411968b7934b61d Author: John Crispin Date: Fri Jun 3 10:17:09 2016 +0200 net-next: mediatek: properly handle RGMII modes If an external Gigabit PHY is connected to either of the MACs we need to be able to tell the PHY to use a delay. Not doing so will result in heavy packet loss and/or data corruption when using PHYs such as the IC+ IP1001. We tell the PHY which MII delay mode to use via the devictree. The ethernet driver needs to be adapted to handle all 3 rgmii-*id modes in the same way as normal rgmii when setting up the MAC. Reviewed-by: Andrew Lunn Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++ 1 file changed, 3 insertions(+) commit 0c72c50f6f93b0c3daa9ea35d89ab3a933c7b5a0 Author: John Crispin Date: Fri Jun 3 10:17:08 2016 +0200 net-next: mediatek: add fixed-phy support The MT7623 SoC has a builtin gigabit switch. If we want to use it, GMAC1 needs to be configured using a fixed link speed and flow control settings. The easiest way to do this is to used the fixed-phy driver, allowing us to reuse the existing mdio polling code to setup the MAC. Reviewed-by: Andrew Lunn Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 3 +++ 1 file changed, 3 insertions(+) commit 08ef55c6f257acf3bdc6940813f80e8f0f5d90ec Author: John Crispin Date: Fri Jun 3 10:17:07 2016 +0200 net-next: mediatek: fix gigabit and flow control advertisement The current code will not setup the PHYs advertisement features correctly. Fix this and properly advertise Gigabit features and properly handle asymmetric pause frames. Signed-off-by: Sean Wang Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 30 +++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) commit 207bdf1844286d2ba94523d30528f82aaf33d52b Author: John Crispin Date: Fri Jun 3 10:17:06 2016 +0200 net-next: mediatek: use mdiobus_free() in favour of kfree() The driver currently uses kfree() to clear the mii_bus. This is not the correct way to clear the memory and mdiobus_free() should be used instead. This patch fixes the two instances where this happens in the driver. Reviewed-by: Andrew Lunn Signed-off-by: John Crispin Signed-off-by: David S. Miller drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8478b6cdc10e8a7735deeb9d9e46ad5b157c84d0 Author: Ivan Khoronzhuk Date: Thu Jun 2 16:14:52 2016 +0300 net: ethernet: ti: cpsw: fix rx-usecs interrupt pacing consistency The rx-usecs shouldn't be changed while interface down/up. Currently, for instance, if it's set to 100us, after interface down/up it's 500us. It's a hidden bug that can lead to lavish interrupt pacing time increasing while "down/up" up to max value. Steps to reproduce: - set rx-usecs to be 100us - down/up interface - read new unexpected rx-usecs Signed-off-by: Ivan Khoronzhuk Reviewed-by: Grygorii Strashko Signed-off-by: David S. Miller drivers/net/ethernet/ti/cpsw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c8b0778e48e4bbdb77121c6c1b7dd48e5182e67 Author: Yangbo Lu Date: Thu Jun 2 17:36:28 2016 +0800 gianfar: fix the last transmit buffer descriptor When the transmit hardware timestamping is enabled, an additional TxBD would be added and would be set as the last TxBD with TXBD_LAST and TXBD_INTERRUPT. However this has been broken by a patch recently. This made the software couldn't get transmit hardware timestamps and resulted in call trace. So, this patch is to fix this issue. Fixes: 48963b4492e9 ("gianfar: Remove redundant ops for do_tstamp from xmit()") Signed-off-by: Yangbo Lu Reviewed-by: Claudiu Manoil Signed-off-by: David S. Miller drivers/net/ethernet/freescale/gianfar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8d5958f424b62060a8696b12c17dad198d5d386f Author: WANG Cong Date: Wed Jun 1 16:15:19 2016 -0700 sch_tbf: update backlog as well Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_tbf.c | 4 ++++ 1 file changed, 4 insertions(+) commit d7f4f332f082c4d4ba53582f902ed6b44fd6f45e Author: WANG Cong Date: Wed Jun 1 16:15:18 2016 -0700 sch_red: update backlog as well Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_red.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6a73b571b63075ef408c83f07c2565b5652f93cc Author: WANG Cong Date: Wed Jun 1 16:15:17 2016 -0700 sch_drr: update backlog as well Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_drr.c | 4 ++++ 1 file changed, 4 insertions(+) commit 6529d75ad9228f4d8a8f6c5c5244ceb945ac9bc2 Author: WANG Cong Date: Wed Jun 1 16:15:16 2016 -0700 sch_prio: update backlog as well We need to update backlog too when we update qlen. Joint work with Stas. Reported-by: Stas Nichiporovich Tested-by: Stas Nichiporovich Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_prio.c | 4 ++++ 1 file changed, 4 insertions(+) commit 357cc9b4a8a7a0cd0e662537b76e6fa4670b6798 Author: WANG Cong Date: Wed Jun 1 16:15:15 2016 -0700 sch_hfsc: always keep backlog updated hfsc updates backlog lazily, that is only when we dump the stats. This is problematic after we begin to update backlog in qdisc_tree_reduce_backlog(). Reported-by: Stas Nichiporovich Tested-by: Stas Nichiporovich Fixes: 2ccccf5fb43f ("net_sched: update hierarchical backlog too") Cc: Jamal Hadi Salim Signed-off-by: Cong Wang Signed-off-by: David S. Miller net/sched/sch_hfsc.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 8c52b6dcdd1994ad0d2672e43c8d975d5c8195c3 Merge: 2c22132 2eec370 Author: Linus Torvalds Date: Fri Jun 3 16:12:35 2016 -0700 Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq fixes from Thomas Gleixner: - a few simple fixes for fallout from the recent gic-v3 changes - a workaround for a Cavium thunderX erratum - a bugfix for the pic32 irqchip to make external interrupts work proper - a missing return value in the generic IPI management code * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/irq-pic32-evic: Fix bug with external interrupts. irqchip/gicv3-its: numa: Enable workaround for Cavium thunderx erratum 23144 irqchip/gic-v3: Fix quiescence check in gic_enable_redist irqchip/gic-v3: Fix copy+paste mistakes in defines irqchip/gic-v3: Fix ICC_SGI1R_EL1.INTID decoding mask genirq: Fix missing return value in irq_destroy_ipi() commit e46e7b77c9096eb2f4d6bcb9ca0b64c9338465ee Author: Mel Gorman Date: Fri Jun 3 14:56:01 2016 -0700 mm, page_alloc: recalculate the preferred zoneref if the context can ignore memory policies The optimistic fast path may use cpuset_current_mems_allowed instead of of a NULL nodemask supplied by the caller for cpuset allocations. The preferred zone is calculated on this basis for statistic purposes and as a starting point in the zonelist iterator. However, if the context can ignore memory policies due to being atomic or being able to ignore watermarks then the starting point in the zonelist iterator is no longer correct. This patch resets the zonelist iterator in the allocator slowpath if the context can ignore memory policies. This will alter the zone used for statistics but only after it is known that it makes sense for that context. Resetting it before entering the slowpath would potentially allow an ALLOC_CPUSET allocation to be accounted for against the wrong zone. Note that while nodemask is not explicitly set to the original nodemask, it would only have been overwritten if cpuset_enabled() and it was reset before the slowpath was entered. Link: http://lkml.kernel.org/r/20160602103936.GU2527@techsingularity.net Fixes: c33d6c06f60f710 ("mm, page_alloc: avoid looking up the first zone in a zonelist twice") Signed-off-by: Mel Gorman Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Acked-by: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit 0d0bd89435d19faa3f2fd73f7ee11c64ac9304f4 Author: Mel Gorman Date: Fri Jun 3 14:55:58 2016 -0700 mm, page_alloc: reset zonelist iterator after resetting fair zone allocation policy Geert Uytterhoeven reported the following problem that bisected to commit c33d6c06f60f ("mm, page_alloc: avoid looking up the first zone in a zonelist twice") on m68k/ARAnyM BUG: scheduling while atomic: cron/668/0x10c9a0c0 Modules linked in: CPU: 0 PID: 668 Comm: cron Not tainted 4.6.0-atari-05133-gc33d6c06f60f710f #364 Call Trace: [<0003d7d0>] __schedule_bug+0x40/0x54 __schedule+0x312/0x388 __schedule+0x0/0x388 prepare_to_wait+0x0/0x52 schedule+0x64/0x82 schedule_timeout+0xda/0x104 set_next_entity+0x18/0x40 pick_next_task_fair+0x78/0xda io_schedule_timeout+0x36/0x4a bit_wait_io+0x0/0x40 bit_wait_io+0x12/0x40 __wait_on_bit+0x46/0x76 wait_on_page_bit_killable+0x64/0x6c bit_wait_io+0x0/0x40 wake_bit_function+0x0/0x4e __lock_page_or_retry+0xde/0x124 do_scan_async+0x114/0x17c lookup_swap_cache+0x24/0x4e handle_mm_fault+0x626/0x7de find_vma+0x0/0x66 down_read+0x0/0xe wait_on_page_bit_killable_timeout+0x77/0x7c find_vma+0x16/0x66 do_page_fault+0xe6/0x23a res_func+0xa3c/0x141a buserr_c+0x190/0x6d4 res_func+0xa3c/0x141a buserr+0x20/0x28 res_func+0xa3c/0x141a buserr+0x20/0x28 The relationship is not obvious but it's due to a failure to rescan the full zonelist after the fair zone allocation policy exhausts the batch count. While this is a functional problem, it's also a performance issue. A page allocator microbenchmark showed the following 4.7.0-rc1 4.7.0-rc1 vanilla reset-v1r2 Min alloc-odr0-1 327.00 ( 0.00%) 326.00 ( 0.31%) Min alloc-odr0-2 235.00 ( 0.00%) 235.00 ( 0.00%) Min alloc-odr0-4 198.00 ( 0.00%) 198.00 ( 0.00%) Min alloc-odr0-8 170.00 ( 0.00%) 170.00 ( 0.00%) Min alloc-odr0-16 156.00 ( 0.00%) 156.00 ( 0.00%) Min alloc-odr0-32 150.00 ( 0.00%) 150.00 ( 0.00%) Min alloc-odr0-64 146.00 ( 0.00%) 146.00 ( 0.00%) Min alloc-odr0-128 145.00 ( 0.00%) 145.00 ( 0.00%) Min alloc-odr0-256 155.00 ( 0.00%) 155.00 ( 0.00%) Min alloc-odr0-512 168.00 ( 0.00%) 165.00 ( 1.79%) Min alloc-odr0-1024 175.00 ( 0.00%) 174.00 ( 0.57%) Min alloc-odr0-2048 180.00 ( 0.00%) 180.00 ( 0.00%) Min alloc-odr0-4096 187.00 ( 0.00%) 186.00 ( 0.53%) Min alloc-odr0-8192 190.00 ( 0.00%) 190.00 ( 0.00%) Min alloc-odr0-16384 191.00 ( 0.00%) 191.00 ( 0.00%) Min alloc-odr1-1 736.00 ( 0.00%) 445.00 ( 39.54%) Min alloc-odr1-2 343.00 ( 0.00%) 335.00 ( 2.33%) Min alloc-odr1-4 277.00 ( 0.00%) 270.00 ( 2.53%) Min alloc-odr1-8 238.00 ( 0.00%) 233.00 ( 2.10%) Min alloc-odr1-16 224.00 ( 0.00%) 218.00 ( 2.68%) Min alloc-odr1-32 210.00 ( 0.00%) 208.00 ( 0.95%) Min alloc-odr1-64 207.00 ( 0.00%) 203.00 ( 1.93%) Min alloc-odr1-128 276.00 ( 0.00%) 202.00 ( 26.81%) Min alloc-odr1-256 206.00 ( 0.00%) 202.00 ( 1.94%) Min alloc-odr1-512 207.00 ( 0.00%) 202.00 ( 2.42%) Min alloc-odr1-1024 208.00 ( 0.00%) 205.00 ( 1.44%) Min alloc-odr1-2048 213.00 ( 0.00%) 212.00 ( 0.47%) Min alloc-odr1-4096 218.00 ( 0.00%) 216.00 ( 0.92%) Min alloc-odr1-8192 341.00 ( 0.00%) 219.00 ( 35.78%) Note that order-0 allocations are unaffected but higher orders get a small boost from this patch and a large reduction in system CPU usage overall as can be seen here: 4.7.0-rc1 4.7.0-rc1 vanilla reset-v1r2 User 85.32 86.31 System 2221.39 2053.36 Elapsed 2368.89 2202.47 Fixes: c33d6c06f60f ("mm, page_alloc: avoid looking up the first zone in a zonelist twice") Link: http://lkml.kernel.org/r/20160531100848.GR2527@techsingularity.net Signed-off-by: Mel Gorman Reported-by: Geert Uytterhoeven Tested-by: Geert Uytterhoeven Tested-by: Mikulas Patocka Cc: Vlastimil Babka Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 1 + 1 file changed, 1 insertion(+) commit cbdcf7f78900625de35173961b9b95cde22bce45 Author: Michal Hocko Date: Fri Jun 3 14:55:55 2016 -0700 mm, oom_reaper: do not use siglock in try_oom_reaper() Oleg has noted that siglock usage in try_oom_reaper is both pointless and dangerous. signal_group_exit can be checked lockless. The problem is that sighand becomes NULL in __exit_signal so we can crash. Fixes: 3ef22dfff239 ("oom, oom_reaper: try to reap tasks which skip regular OOM killer path") Link: http://lkml.kernel.org/r/1464679423-30218-1-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko Suggested-by: Oleg Nesterov Cc: Tetsuo Handa Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/oom_kill.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit 83b9355bf6f449c7d1231206c300ea89d3313a9d Author: Vlastimil Babka Date: Fri Jun 3 14:55:52 2016 -0700 mm, page_alloc: prevent infinite loop in buffered_rmqueue() In DEBUG_VM kernel, we can hit infinite loop for order == 0 in buffered_rmqueue() when check_new_pcp() returns 1, because the bad page is never removed from the pcp list. Fix this by removing the page before retrying. Also we don't need to check if page is non-NULL, because we simply grab it from the list which was just tested for being non-empty. Fixes: 479f854a207c ("mm, page_alloc: defer debugging checks of pages allocated from the PCP") Link: http://lkml.kernel.org/r/20160530090154.GM2527@techsingularity.net Signed-off-by: Vlastimil Babka Signed-off-by: Mel Gorman Reported-by: Naoya Horiguchi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds mm/page_alloc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 879be4f378cb412af3a3fe107d35835c99099add Author: Joe Perches Date: Fri Jun 3 14:55:49 2016 -0700 checkpatch: reduce git commit description style false positives Some lines in a commit log appear to be commit SHA1 ids like: ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit 0123456789ab ("commit description")' Link: http://lkml.kernel.org/r/40e03fd7aaf1f55c75d787128d6d17c5a71226c2.1464358556.git.vdavydov@virtuozzo.com Reduce the false positives. Link: http://lkml.kernel.org/r/eda977eaa8328fef42bb3c87935d97e10ea8ff67.1464384023.git.joe@perches.com Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 1 + 1 file changed, 1 insertion(+) commit 43afc19417ca92cf237095947f597f21d86fd2a7 Author: Vitaly Wool <vitalywool@gmail.com> Date: Fri Jun 3 14:55:47 2016 -0700 mm/z3fold.c: avoid modifying HEADLESS page and minor cleanup Fix erroneous z3fold header access in a HEADLESS page in reclaim function, and change one remaining direct handle-to-buddy conversion to use the appropriate helper. Link: http://lkml.kernel.org/r/5748706F.9020208@gmail.com Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Reviewed-by: Dan Streetman <ddstreet@ieee.org> Cc: Seth Jennings <sjenning@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/z3fold.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) commit 3a06bb78ceeceacc86a1e31133a7944013f9775b Author: Tejun Heo <tj@kernel.org> Date: Fri Jun 3 14:55:44 2016 -0700 memcg: add RCU locking around css_for_each_descendant_pre() in memcg_offline_kmem() memcg_offline_kmem() may be called from memcg_free_kmem() after a css init failure. memcg_free_kmem() is a ->css_free callback which is called without cgroup_mutex and memcg_offline_kmem() ends up using css_for_each_descendant_pre() without any locking. Fix it by adding rcu read locking around it. mkdir: cannot create directory `65530': No space left on device =============================== [ INFO: suspicious RCU usage. ] 4.6.0-work+ #321 Not tainted ------------------------------- kernel/cgroup.c:4008 cgroup_mutex or RCU read lock required! [ 527.243970] other info that might help us debug this: [ 527.244715] rcu_scheduler_active = 1, debug_locks = 0 2 locks held by kworker/0:5/1664: #0: ("cgroup_destroy"){.+.+..}, at: [<ffffffff81060ab5>] process_one_work+0x165/0x4a0 #1: ((&css->destroy_work)#3){+.+...}, at: [<ffffffff81060ab5>] process_one_work+0x165/0x4a0 [ 527.248098] stack backtrace: CPU: 0 PID: 1664 Comm: kworker/0:5 Not tainted 4.6.0-work+ #321 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.1-1.fc24 04/01/2014 Workqueue: cgroup_destroy css_free_work_fn Call Trace: dump_stack+0x68/0xa1 lockdep_rcu_suspicious+0xd7/0x110 css_next_descendant_pre+0x7d/0xb0 memcg_offline_kmem.part.44+0x4a/0xc0 mem_cgroup_css_free+0x1ec/0x200 css_free_work_fn+0x49/0x5e0 process_one_work+0x1c5/0x4a0 worker_thread+0x49/0x490 kthread+0xea/0x100 ret_from_fork+0x1f/0x40 Link: http://lkml.kernel.org/r/20160526203018.GG23194@mtj.duckdns.org Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Michal Hocko <mhocko@kernel.org> Cc: <stable@vger.kernel.org> [4.5+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memcontrol.c | 3 +++ 1 file changed, 3 insertions(+) commit 2c221325635ed09a6eea10a362d8514d5943ad7d Merge: e603330 dfc2507 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri Jun 3 15:37:27 2016 -0700 Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer bugfix from Thomas Gleixner: "A single bugfix for the error check wreckage we introduced in the merge window" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: time: Make settimeofday error checking work again commit f86e4271978bd93db466d6a95dad4b0fdcdb04f6 Author: Yang Shi <yang.shi@linaro.org> Date: Fri Jun 3 14:55:38 2016 -0700 mm: check the return value of lookup_page_ext for all call sites Per the discussion with Joonsoo Kim [1], we need check the return value of lookup_page_ext() for all call sites since it might return NULL in some cases, although it is unlikely, i.e. memory hotplug. Tested with ltp with "page_owner=0". [1] http://lkml.kernel.org/r/20160519002809.GA10245@js1304-P5Q-DELUXE [akpm@linux-foundation.org: fix build-breaking typos] [arnd@arndb.de: fix build problems from lookup_page_ext] Link: http://lkml.kernel.org/r/6285269.2CksypHdYp@wuerfel [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/1464023768-31025-1-git-send-email-yang.shi@linaro.org Signed-off-by: Yang Shi <yang.shi@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/page_idle.h | 43 ++++++++++++++++++++++++++++++++++++------- mm/page_alloc.c | 6 ++++++ mm/page_owner.c | 26 ++++++++++++++++++++++++++ mm/page_poison.c | 8 +++++++- mm/vmstat.c | 2 ++ 5 files changed, 77 insertions(+), 8 deletions(-) commit d8bae33dddc03dc652e1d8cfceebf4f753939de7 Author: Corey Minyard <cminyard@mvista.com> Date: Fri Jun 3 14:55:36 2016 -0700 kdump: fix dmesg gdbmacro to work with record based printk Commit 7ff9554bb578 ("printk: convert byte-buffer to variable-length record buffer") introduced a record based printk buffer. Modify gdbmacros.txt to parse this new structure so dmesg will work properly. Link: http://lkml.kernel.org/r/1463515794-1599-1-git-send-email-minyard@acm.org Signed-off-by: Corey Minyard <cminyard@mvista.com> Cc: Dave Young <dyoung@redhat.com> Cc: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/kdump/gdbmacros.txt | 93 ++++++++++++++++++++++++++++++++++----- 1 file changed, 82 insertions(+), 11 deletions(-) commit 65ee03c4b9f89e1b088defd97273be6da169d798 Author: Guillermo Julián Moreno <guillermo.julian@naudit.es> Date: Fri Jun 3 14:55:33 2016 -0700 mm: fix overflow in vm_map_ram() When remapping pages accounting for 4G or more memory space, the operation 'count << PAGE_SHIFT' overflows as it is performed on an integer. Solution: cast before doing the bitshift. [akpm@linux-foundation.org: fix vm_unmap_ram() also] [akpm@linux-foundation.org: fix vmap() as well, per Guillermo] Link: http://lkml.kernel.org/r/etPan.57175fb3.7a271c6b.2bd@naudit.es Signed-off-by: Guillermo Julián Moreno <guillermo.julian@naudit.es> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/vmalloc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit e603330c867fea506ea861892bd28d963c07c978 Merge: d29e472 e2dfb4b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri Jun 3 14:39:29 2016 -0700 Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM fix from Russell King: "Just one fix to the ptrace code, spotted by Simon Marchi, where if a thread migrates to a different CPU and the VFP registers are changed through ptrace, the application doesn't see the updated VFP registers" * 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: fix PTRACE_SETVFPREGS on SMP systems commit d29e4723017b50a3f10395439f19f8d169515c01 Merge: 5306d76 aed7eb8 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri Jun 3 14:29:47 2016 -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 here is reviving hugetlb support using contiguous ptes, which we ended up reverting at the last minute in 4.5 pending a fix which went into the core mm/ code during the recent merge window. - Revert a previous revert and get hugetlb going with contiguous hints - Wire up missing compat syscalls - Enable CONFIG_SET_MODULE_RONX by default - Add missing line to our compat /proc/cpuinfo output - Clarify levels in our page table dumps - Fix booting with RANDOMIZE_TEXT_OFFSET enabled - Misc fixes to the ARM CPU PMU driver (refcounting, probe failure) - Remove some dead code and update a comment" * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: fix alignment when RANDOMIZE_TEXT_OFFSET is enabled arm64: move {PAGE,CONT}_SHIFT into Kconfig arm64: mm: dump: log span level arm64: update stale PAGE_OFFSET comment drivers/perf: arm_pmu: Avoid leaking pmu->irq_affinity on error drivers/perf: arm_pmu: Defer the setting of __oprofile_cpu_pmu drivers/perf: arm_pmu: Fix reference count of a device_node in of_pmu_irq_cfg arm64: report CPU number in bad_mode arm64: unistd32.h: wire up missing syscalls for compat tasks arm64: Provide "model name" in /proc/cpuinfo for PER_LINUX32 tasks arm64: enable CONFIG_SET_MODULE_RONX by default arm64: Remove orphaned __addr_ok() definition Revert "arm64: hugetlb: partial revert of 66b3923a1a0f" commit 5306d766f15e72bc79c61d88f77e5a6b1fcc0e68 Merge: 4340fa5 7cc8510 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri Jun 3 14:20:22 2016 -0700 Merge tag 'powerpc-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc fixes from Michael Ellerman: - Handle RTAS delay requests in configure_bridge from Russell Currey - Refactor the configure_bridge RTAS tokens from Russell Currey - Fix definition of SIAR and SDAR registers from Thomas Huth - Use privileged SPR number for MMCR2 from Thomas Huth - Update LPCR only if it is powernv from Aneesh Kumar K.V - Fix the reference bit update when handling hash fault from Aneesh Kumar K.V - Add missing tlb flush from Aneesh Kumar K.V - Add POWER8NVL support to ibm,client-architecture-support call from Thomas Huth * tag 'powerpc-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: powerpc/pseries: Add POWER8NVL support to ibm,client-architecture-support call powerpc/mm/radix: Add missing tlb flush powerpc/mm/hash: Fix the reference bit update when handling hash fault powerpc/mm/radix: Update LPCR only if it is powernv powerpc: Use privileged SPR number for MMCR2 powerpc: Fix definition of SIAR and SDAR registers powerpc/pseries/eeh: Refactor the configure_bridge RTAS tokens powerpc/pseries/eeh: Handle RTAS delay requests in configure_bridge commit 60c07f80b04698f6c054b675cb67ec5e7ee8db27 Merge: 7f9bef9 9f9cd7e 8631475 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Fri Jun 3 22:35:05 2016 +0200 Merge branches 'acpica-fixes', 'acpi-video' and 'acpi-processor' * acpica-fixes: ACPICA / Hardware: Fix old register check in acpi_hw_get_access_bit_width() * acpi-video: ACPI / Thermal / video: fix max_level incorrect value * acpi-processor: ACPI / processor: Avoid reserving IO regions too early commit 8cd8cbd4906126951f1bd6ab8a28ee57f0dc1efc Merge: 1a695a9 b9af694 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Fri Jun 3 22:34:18 2016 +0200 Merge branch 'pm-cpufreq-fixes' * pm-cpufreq-fixes: cpufreq: Fix clamp_val() usage in cpufreq_driver_fast_switch() cpufreq: intel_pstate: Downgrade print level for _PPC commit 8dff9c85341032767d7b519217a79ea04cd676b0 Author: Chris Mason <clm@fb.com> Date: Sat Sep 19 11:28:25 2015 -0700 Btrfs: deal with duplciates during extent_map insertion in btrfs_get_extent When dealing with inline extents, btrfs_get_extent will incorrectly try to insert a duplicate extent_map. The dup hits -EEXIST from add_extent_map, but then we try to merge with the existing one and end up trying to insert a zero length extent_map. This actually works most of the time, except when there are extent maps past the end of the inline extent. rocksdb will trigger this sometimes because it preallocates an extent and then truncates down. Josef made a script to trigger with xfs_io: #!/bin/bash xfs_io -f -c "pwrite 0 1000" inline xfs_io -c "falloc -k 4k 1M" inline xfs_io -c "pread 0 1000" -c "fadvise -d 0 1000" -c "pread 0 1000" inline xfs_io -c "fadvise -d 0 1000" inline cat inline You'll get EIOs trying to read inline after this because add_extent_map is returning EEXIST Signed-off-by: Chris Mason <clm@fb.com> fs/btrfs/inode.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit b223d6242c372a81cca3bb81998f53d3b3e3fb70 Author: Chen-Yu Tsai <wens@csie.org> Date: Wed May 11 13:23:14 2016 +0800 ARM: dts: sun6i: yones-toptech-bs1078-v2: Drop constraints on dc1sw regulator This is the same issue fixed in commit dcf5341f0150 ("ARM: dts: sun8i-q8-common: Do not set constraints on dc1sw regulator"). Commit message copied: dc1sw is an on/off only regulator and as such it cannot have constraints. This is a limitation of the kernel regulator implementation which resolves supplies on the first regulator_get(), which is done after applying constraints, and applying the constrains will fail because it calls _regulator_get_voltage() and _regulator_do_set_voltage() both of which will fail on a switch regulator when there is no supply (yet). This causes registering of all axp22x regulators to fail with the following errors: [ 1.395249] vcc-lcd: failed to get the current voltage(-22) [ 1.405131] axp20x-regulator axp20x-regulator: Failed to register dc1sw [ 1.412436] axp20x-regulator: probe of axp20x-regulator failed with error -22 This commit removes the constrains on dc1sw / vcc-lcd fixing this problem. Note that dcdc1 itself is contrained to the exact same values, so this does not change anything. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Chen-Yu Tsai <wens@csie.org> Cc: <stable@vger.kernel.org> # 4.6 Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Olof Johansson <olof@lixom.net> arch/arm/boot/dts/sun6i-a31s-yones-toptech-bs1078-v2.dts | 2 -- 1 file changed, 2 deletions(-) commit cb84f6c0a25eb76b1f838eb63e212705c0c06b5f Author: Chen-Yu Tsai <wens@csie.org> Date: Wed May 11 13:23:13 2016 +0800 ARM: dts: sun6i: primo81: Drop constraints on dc1sw regulator This is the same issue fixed in commit dcf5341f0150 ("ARM: dts: sun8i-q8-common: Do not set constraints on dc1sw regulator"). Commit message copied: dc1sw is an on/off only regulator and as such it cannot have constraints. This is a limitation of the kernel regulator implementation which resolves supplies on the first regulator_get(), which is done after applying constraints, and applying the constrains will fail because it calls _regulator_get_voltage() and _regulator_do_set_voltage() both of which will fail on a switch regulator when there is no supply (yet). This causes registering of all axp22x regulators to fail with the following errors: [ 1.395249] vcc-lcd: failed to get the current voltage(-22) [ 1.405131] axp20x-regulator axp20x-regulator: Failed to register dc1sw [ 1.412436] axp20x-regulator: probe of axp20x-regulator failed with error -22 This commit removes the constrains on dc1sw / vcc-lcd fixing this problem. Note that dcdc1 itself is contrained to the exact same values, so this does not change anything. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Chen-Yu Tsai <wens@csie.org> Cc: <stable@vger.kernel.org> # 4.6 Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Olof Johansson <olof@lixom.net> arch/arm/boot/dts/sun6i-a31s-primo81.dts | 2 -- 1 file changed, 2 deletions(-) commit 80084632e2abf9968f0a582ef044889c686e2954 Merge: c2b8d92 a1f6ad1 Author: Olof Johansson <olof@lixom.net> Date: Fri Jun 3 12:28:10 2016 -0700 Merge tag 'omap-for-v4.7-dts-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes DTS fixes for omaps for v4.7 merge window for issues noted with patches in Linux next: - Fix omap5 and am57xx-idk input voltages to fix micro-sd probing at least for some omap5-uevm configurations - Fix unhandled fault for igepv5 audio - Fix UART wakeirqs for omap5 by removing WAKUP_EN flags, those are managed by the wakeirq and can currently confuse the wakeirqs as there is no handler necessarily registered - Fix LDO7 source for igepv5 Also included are few minor changes not strictly fixes are good to have merged: - Fix HP T410 boot time warnings for eMMC and disable the unused MMC interfaces while at it - Add dra7 gpmc dma channel - Add igep00x0 SD card detect and write protect GPIOs * tag 'omap-for-v4.7-dts-fixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: dts: igep0020: Add SD card write-protect pin. ARM: dts: igep00x0: Add SD card-detect. ARM: dts: am57xx-idk-common: Fix input supply names ARM: dts: dra7: Add gpmc dma channel ARM: dts: disable mmc by default and enable when needed for dm814x ARM: dts: Add non-removable to hsmmc on hp-t410 ARM: dts: Fix ldo7 source for HDMI on igepv5 ARM: dts: Fix uart wakeirq on omap5 by removing WAKEUP_EN for omaps ARM: dts: Fix igepv5 audiopwon-gpio ARM: dts: omap5-board-common: Describe the voltage supply mapping accurately Signed-off-by: Olof Johansson <olof@lixom.net> commit c2b8d9200fc61298cd74b258a453b526ffa74d17 Merge: 5fdb884 65db875 Author: Olof Johansson <olof@lixom.net> Date: Fri Jun 3 12:27:08 2016 -0700 Merge tag 'omap-for-v4.7/fixes-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes Two fixes for omaps for v4.7 merge window, one to enable ARM errata for am437x, and the other to add ARM errtum workaround for dra7. AFAIK these both can wait for v4.7, we can then request them for stable kernels as needed. * tag 'omap-for-v4.7/fixes-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: ARM: OMAP2+: AM43XX: Enable fixes for Cortex-A9 errata ARM: OMAP5 / DRA7: Introduce workaround for 801819 Signed-off-by: Olof Johansson <olof@lixom.net> commit 5fdb884267890b26fdfd5ff5ddaf596745b9ab43 Author: Olliver Schinagl <oliver@schinagl.nl> Date: Fri May 13 21:57:16 2016 +0200 ARM: dts: sunxi: Add OLinuXino Lime2 eMMC to the Makefile commit 27dd9af6bc000ab21fd ("ARM: dts: sunxi: Add a olinuxino-lime2-emmc") added the new emmc equipped lime2 but forgot its Makefile. This patch adds an entry to the Makefile. Signed-off-by: Olliver Schinagl <oliver@schinagl.nl> Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Olof Johansson <olof@lixom.net> arch/arm/boot/dts/Makefile | 1 + 1 file changed, 1 insertion(+) commit c3d66602e0bb93c8070a02a901cc80963b5482b9 Merge: 15b7cc7 8a6f71c Author: Olof Johansson <olof@lixom.net> Date: Fri Jun 3 12:15:00 2016 -0700 Merge tag 'samsung-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into fixes Two fixes for v4.7 cycle for build issues: 1. Fix samsung-keypad build error if INPUT is selected as module. The error though depends on some uncommon build settings so it is not as easy to trigger. 2. Get rid of 'samsung_device_dma_mask' defined but not used warning. * tag 'samsung-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: exynos: don't select keyboard driver ARM: samsung: improve static dma_mask definition Signed-off-by: Olof Johansson <olof@lixom.net> commit 15b7cc78f0951e418c940d8b3b6a7a3b962b7748 Author: Masahiro Yamada <yamada.masahiro@socionext.com> Date: Mon May 30 11:12:33 2016 +0900 arm64: dts: drop "arm,amba-bus" in favor of "simple-bus" part 2 Tree-wide replacement was done by commit 2ef7d5f342c1 (ARM, ARM64: dts: drop "arm,amba-bus" in favor of "simple-bus"), but we have some new users of "arm,amba-bus" at Linux 4.7-rc1. Eliminate them now. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Heiko Stuebner <heiko@sntech.de> Acked-by: Chanho Min <chanho.min@lge.com> Signed-off-by: Olof Johansson <olof@lixom.net> arch/arm64/boot/dts/lg/lg1312.dtsi | 2 +- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 665f05e0b836d46b22f0b712eb76d8b7f69a5ea0 Author: Tony Luck <tony.luck@intel.com> Date: Thu Jun 2 10:58:08 2016 -0700 EDAC, sb_edac: Readd accidentally dropped Broadwell-D support In commit 2c1ea4c700af ("EDAC, sb_edac: Use cpu family/model in driver detection") we switched from using PCI ids to determine which platform we are running on to using CPU model instead. I forgot that Broadwell-DE has its own distinct model number different from Broadwell-EP or -EX. Fixing this isn't just adding a line to the array of cpuids - the exising code assumed a 1:1 mapping between entries in that array and the "enum type" values. Added the type to pci_id_table structure to remove this dependency and allows two Broadwell cpu models. Signed-off-by: Tony Luck <tony.luck@intel.com> Cc: Aristeu Rozanski <arozansk@redhat.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: linux-edac <linux-edac@vger.kernel.org> Fixes: 2c1ea4c700af ("EDAC, sb_edac: Use cpu family/model in driver detection") Link: http://lkml.kernel.org/r/b3cffe40dec6dfe0235a5d52a504f0ba86a07ce7.1464902605.git.tony.luck@intel.com Signed-off-by: Borislav Petkov <bp@suse.de> drivers/edac/sb_edac.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) commit 62d0e71df063101e4551327bd9fa9aaa3535c86b Author: Shawn Lin <shawn.lin@rock-chips.com> Date: Fri Jun 3 08:54:18 2016 +0800 clk: rockchip: release io resource when failing to init clk on rk3399 We should call iounmap to relase reg_base since it's not going to be used any more if failing to init clk. This was missing on the newly added rk3399 clock tree. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk-rk3399.c | 2 ++ 1 file changed, 2 insertions(+) commit 2eec3707a33fbf1c2e0a88ffc9fc0e465c2a59fd Merge: 59fa586 0de6b99 Author: Thomas Gleixner <tglx@linutronix.de> Date: Fri Jun 3 15:05:51 2016 +0200 Merge tag 'irqchip-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/urgent Merge irqchip updates from Marc Zyngier: - A number of embarassing buglets (GICv3, PIC32) - A more substential errata workaround for Cavium's GICv3 ITS (kept for post-rc1 due to its dependency on NUMA) commit f83803305b008ca3d75b00092b6493bc19eda60b Author: Joshua Clayton <stillcompiling@gmail.com> Date: Wed Jun 1 08:55:00 2016 -0700 of: add vendor prefix for UniWest United Western Technologies Corp, known primarily as UniWest, is a manufacturer of eddy current and ultrasonic testing equipment. Signed-off-by: Joshua Clayton <stillcompiling@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 53e1941ce8a25543eef2016b8de69d155f5151a5 Author: Wei-Ning Huang <wnhuang@chromium.org> Date: Wed Jun 1 11:09:24 2016 +0800 dt: bindings: fix documentation for MARVELL's bt-sd8xxx wireless device The property marvell,wakeup-pin and marvell,wakeup-gap-ms are read as u16 in the driver. Fix documentation and example accordingly. Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org> Signed-off-by: Rob Herring <robh@kernel.org> Documentation/devicetree/bindings/net/marvell-bt-sd8xxx.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e93aeeae0bf8cba43e05484ae4ad17213ac6c3a7 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Wed May 25 01:15:04 2016 +0000 of: add missing const for of_parse_phandle_with_args() in !CONFIG_OF commit 93c667ca2598bd84f1bd3f2fa176af69707699fe ("of: *node argument to of_parse_phandle_with_args should be const") changed to const for struct device node *np, but it cares CONFIG_OF case only, !CONFIG_OF case need it too. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Rob Herring <robh@kernel.org> include/linux/of.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aaaab56dba9af4fe75461e0ee13231c1a6ea174d Author: Stephen Rothwell <sfr@canb.auug.org.au> Date: Tue May 31 09:38:56 2016 +1000 of: silence warnings due to max() usage pageblock_order can be (at least) an unsigned int or an unsigned long depending on the kernel config and architecture, so use max_t(unsigned long ...) when comparing it. fixes these warnings: In file included from include/linux/list.h:8:0, from include/linux/kobject.h:20, from include/linux/of.h:21, from drivers/of/of_reserved_mem.c:17: drivers/of/of_reserved_mem.c: In function ‘__reserved_mem_alloc_size’: include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast (void) (&_max1 == &_max2); \ ^ include/linux/kernel.h:747:9: note: in definition of macro ‘max’ typeof(y) _max2 = (y); \ ^ drivers/of/of_reserved_mem.c:131:48: note: in expansion of macro ‘max’ align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_ord ^ include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast (void) (&_max1 == &_max2); \ ^ include/linux/kernel.h:747:21: note: in definition of macro ‘max’ typeof(y) _max2 = (y); \ ^ drivers/of/of_reserved_mem.c:131:48: note: in expansion of macro ‘max’ align = max(align, (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_ord ^ Fixes: 1cc8e3458b51 ("drivers: of: of_reserved_mem: fixup the alignment with CMA setup") Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/of_reserved_mem.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 94bef000f1d4aa111f4ddda1482cf3b30ad069ce Author: Matt Ranostay <mranostay@gmail.com> Date: Sun May 29 19:52:02 2016 -0700 iio: hudmidity: hdc100x: fix incorrect shifting and scaling Shifting sensor data to the right 2 bits was incorrect and caused the scaling values + offsets to be invalid. Reported-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Matt Ranostay <mranostay@gmail.com> Tested-by: Alison Schofield <amsfield22@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/humidity/hdc100x.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 7d482813bb3518cbfeae1b987a5afd76a88c7eb3 Author: Jaewon <jaewon31.kim@samsung.com> Date: Wed May 25 13:29:50 2016 +0900 drivers: of: of_reserved_mem: fixup the CMA alignment not to affect dma-coherent There was an alignment mismatch issue for CMA and it was fixed by commit 1cc8e3458b51 ("drivers: of: of_reserved_mem: fixup the alignment with CMA setup"). However the way of the commit considers not only dma-contiguous(CMA) but also dma-coherent which has no that requirement. This patch checks more to distinguish dma-contiguous(CMA) from dma-coherent. Signed-off-by: Jaewon Kim <jaewon31.kim@samsung.com> Acked-by: Jason Liu <r64343@freescale.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> [robh: remove erroneous opening bracket] Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/of_reserved_mem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 3993546646baf1dab5f5c4f7d9bb58f2046fd1c1 Author: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Date: Sat May 28 23:02:50 2016 +0300 of: irq: fix of_irq_get[_byname]() kernel-doc The kernel-doc for the of_irq_get[_byname]() is clearly inadequate in describing the return values -- of_irq_get_byname() is documented better than of_irq_get() but it still doesn't mention that 0 is returned iff irq_create_of_mapping() fails (it doesn't return an error code in this case). Document all possible return value variants, making the writing of the word "IRQ" consistent, while at it... Fixes: 9ec36cafe43b ("of/irq: do irq resolution in platform_get_irq") Fixes: ad69674e73a1 ("of/irq: do irq resolution in platform_get_irq_byname()") Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> CC: stable@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/irq.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 590b92a30242dd3f73de3d9a51d9924f1ab33e93 Author: Yong Li <sdliyong@gmail.com> Date: Thu May 5 16:10:49 2016 +0800 iio: light apds9960: Add the missing dev.parent Without this, the iio:deviceX is missing in the /sys/bus/i2c/devices/0-0039 Some userspace tools use this path to identify a specific instance of the device. Signed-off-by: Yong Li <sdliyong@gmail.com> Reviewed-By: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/light/apds9960.c | 1 + 1 file changed, 1 insertion(+) commit 99543823357966ac938d9a310947e731b67338e6 Author: Crestez Dan Leonard <leonard.crestez@intel.com> Date: Tue May 3 15:27:09 2016 +0300 iio: Fix error handling in iio_trigger_attach_poll_func When attaching a pollfunc iio_trigger_attach_poll_func will allocate a virtual irq and call the driver's set_trigger_state function. Fix error handling to undo previous steps if any fails. In particular this fixes handling errors from a driver's set_trigger_state function. When using triggered buffers a failure to enable the trigger used to make the buffer unusable. Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/industrialio-trigger.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit aed7eb8367939244ba19445292ffdfc398e0d66a Author: Mark Rutland <mark.rutland@arm.com> Date: Tue May 31 15:58:00 2016 +0100 arm64: fix alignment when RANDOMIZE_TEXT_OFFSET is enabled With ARM64_64K_PAGES and RANDOMIZE_TEXT_OFFSET enabled, we hit the following issue on the boot: kernel BUG at arch/arm64/mm/mmu.c:480! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP Modules linked in: CPU: 0 PID: 0 Comm: swapper Not tainted 4.6.0 #310 Hardware name: ARM Juno development board (r2) (DT) task: ffff000008d58a80 ti: ffff000008d30000 task.ti: ffff000008d30000 PC is at map_kernel_segment+0x44/0xb0 LR is at paging_init+0x84/0x5b0 pc : [<ffff000008c450b4>] lr : [<ffff000008c451a4>] pstate: 600002c5 Call trace: [<ffff000008c450b4>] map_kernel_segment+0x44/0xb0 [<ffff000008c451a4>] paging_init+0x84/0x5b0 [<ffff000008c42728>] setup_arch+0x198/0x534 [<ffff000008c40848>] start_kernel+0x70/0x388 [<ffff000008c401bc>] __primary_switched+0x30/0x74 Commit 7eb90f2ff7e3 ("arm64: cover the .head.text section in the .text segment mapping") removed the alignment between the .head.text and .text sections, and used the _text rather than the _stext interval for mapping the .text segment. Prior to this commit _stext was always section aligned and didn't cause any issue even when RANDOMIZE_TEXT_OFFSET was enabled. Since that alignment has been removed and _text is used to map the .text segment, we need ensure _text is always page aligned when RANDOMIZE_TEXT_OFFSET is enabled. This patch adds logic to TEXT_OFFSET fuzzing to ensure that the offset is always aligned to the kernel page size. To ensure this, we rely on the PAGE_SHIFT being available via Kconfig. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reported-by: Sudeep Holla <sudeep.holla@arm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Fixes: 7eb90f2ff7e3 ("arm64: cover the .head.text section in the .text segment mapping") Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 030c4d24447cbf2bd612baea5695952e5f62c042 Author: Mark Rutland <mark.rutland@arm.com> Date: Tue May 31 15:57:59 2016 +0100 arm64: move {PAGE,CONT}_SHIFT into Kconfig In some cases (e.g. the awk for CONFIG_RANDOMIZE_TEXT_OFFSET) we would like to make use of PAGE_SHIFT outside of code that can include the usual header files. Add a new CONFIG_ARM64_PAGE_SHIFT for this, likewise with ARM64_CONT_SHIFT for consistency. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/Kconfig | 12 ++++++++++++ arch/arm64/include/asm/page.h | 12 ++---------- 2 files changed, 14 insertions(+), 10 deletions(-) commit 48dd73c55d45d60037ea8d73eab60f2033d90721 Author: Mark Rutland <mark.rutland@arm.com> Date: Tue May 31 14:49:02 2016 +0100 arm64: mm: dump: log span level The page table dump code logs spans of entries at the same level (pgd/pud/pmd/pte) which have the same attributes. While we log the (decoded) attributes, we don't log the level, which leaves the output ambiguous and/or confusing in some cases. For example: 0xffff800800000000-0xffff800980000000 6G RW NX SHD AF BLK UXN MEM/NORMAL If using 4K pages, this may describe a span of 6 1G block entries at the PGD/PUD level, or 3072 2M block entries at the PMD level. This patch adds the page table level to each output line, removing this ambiguity. For the example above, this will produce: 0xffffffc800000000-0xffffffc980000000 6G PUD RW NX SHD AF BLK UXN MEM/NORMAL When 3 level tables are in use, and we use the asm-generic/nopud.h definitions, the dump code treats each entry in the PGD as a 1 element table at the PUD level, and logs spans as being PUDs, which can be confusing. To counteract this, the "PUD" mnemonic is replaced with "PGD" when CONFIG_PGTABLE_LEVELS <= 3. Likewise for "PMD" when CONFIG_PGTABLE_LEVELS <= 2. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Huang Shijie <shijie.huang@arm.com> Cc: Laura Abbott <labbott@fedoraproject.org> Cc: Steve Capper <steve.capper@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/mm/dump.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a13e3a5b54e59ffdeba738ea6cb57a7856425206 Author: Mark Rutland <mark.rutland@arm.com> Date: Wed Jun 1 12:07:17 2016 +0100 arm64: update stale PAGE_OFFSET comment Commit ab893fb9f1b17f02 ("arm64: introduce KIMAGE_VADDR as the virtual base of the kernel region") logically split KIMAGE_VADDR from PAGE_OFFSET, and since commit f9040773b7bbbd9e ("arm64: move kernel image to base of vmalloc area") the two have been distinct values. Unfortunately, neither commit updated the comment above these definitions, which now erroneously states that PAGE_OFFSET is the start of the kernel image rather than the start of the linear mapping. This patch fixes said comment, and introduces an explanation of KIMAGE_VADDR. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/include/asm/memory.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5988a363edb9eb9f31486ceb2cd10e8b45f05dda Author: Julien Grall <julien.grall@arm.com> Date: Tue May 31 12:41:23 2016 +0100 drivers/perf: arm_pmu: Avoid leaking pmu->irq_affinity on error pmu->irq_affinity will not be freed if an error occurred within arm_pmu_device_probe after of_pmu_irq_cfg has been called. Note that in the case of_pmu_irq_cfg is returning an error, pmu->irq_affinity will not be set, but it should be NULL as pmu was kzalloc'd. Therefore the result kfree(NULL) is benign. Signed-off-by: Julien Grall <julien.grall@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> drivers/perf/arm_pmu.c | 1 + 1 file changed, 1 insertion(+) commit 0f254c7671e851243412bce6c2e618732831d0f8 Author: Julien Grall <julien.grall@arm.com> Date: Tue May 31 12:41:22 2016 +0100 drivers/perf: arm_pmu: Defer the setting of __oprofile_cpu_pmu The global variable __oprofile_cpu_pmu is set before the PMU is fully initialized. If an error occurs before the end of the initialization, the PMU will be freed and the variable will contain an invalid pointer. This will result in a kernel crash when perf will be used. Fix it by moving the setting of __oprofile_cpu_pmu when the PMU is fully initialized (i.e when it is no longer possible to fail). Cc: <stable@vger.kernel.org> Signed-off-by: Julien Grall <julien.grall@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> drivers/perf/arm_pmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 121323ae668e456d0ed328f5b77c22bf5dd8e4de Author: Julien Grall <julien.grall@arm.com> Date: Tue May 31 12:41:21 2016 +0100 drivers/perf: arm_pmu: Fix reference count of a device_node in of_pmu_irq_cfg The only function called by of_pmu_irq_cfg that will increment the reference count on dn is of_parse_phandle. Each time we successfully parse a possible CPU from an interrupt-affinity property, we increment the refcount of that CPU node once via of_parse_handle. After validating the CPU is possible, we decrement the refcount once. Subsequently, we decrement the refcount again, either as part of an early break if we don't have a matching SPI, or as part of the end of the loop body. This will lead to decrementing twice the refcounnt. Remove the second pairs of call to of_node_put as nobody is using dn between the first and second call to of_node_put. Signed-off-by: Julien Grall <julien.grall@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> drivers/perf/arm_pmu.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 8051f4d16ef1d037e7b12abab79c3e0b960f4d36 Author: Mark Rutland <mark.rutland@arm.com> Date: Tue May 31 12:07:47 2016 +0100 arm64: report CPU number in bad_mode If we take an exception we don't expect (e.g. SError), we report this in the bad_mode handler with pr_crit. Depending on the configured log level, we may or may not log additional information in functions called subsequently. Notably, the messages in dump_stack (including the CPU number) are printed with KERN_DEFAULT and may not appear. Some exceptions have an IMPLEMENTATION DEFINED ESR_ELx.ISS encoding, and knowing the CPU number is crucial to correctly decode them. To ensure that this is always possible, we should log the CPU number along with the ESR_ELx value, so we are not reliant on subsequent logs or additional printk configuration options. This patch logs the CPU number in bad_mode such that it is possible for a developer to decode these exceptions, provided access to sufficient documentation. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Reported-by: Al Grant <Al.Grant@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Dave Martin <dave.martin@arm.com> Cc: Robin Murphy <robin.murphy@arm.com> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/kernel/traps.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit fbedcaf43fba35677c01a4ae51e6f79edf4049ba Author: Nicholas Krause <xerofoify@gmail.com> Date: Thu May 19 18:45:58 2016 -0400 EDAC: Fix workqueues poll period resetting After the workqueue cleanup, we're registering workqueues based on the presence of an ->edac_check function. When that is the case, we're setting OP_RUNNING_POLL. But we forgot to check that in edac_mc_reset_delay_period(), leading to: BUG: unable to handle kernel paging request at 0000000000015d10 IP: [ .. ] queued_spin_lock_slowpath PGD 3ffcc8067 PUD 3ffc56067 PMD 0 Oops: 0002 [#1] SMP Modules linked in: ... CPU: 1 PID: 2792 Comm: edactest Not tainted 4.6.0-dirty #1 Hardware name: HP ProLiant MicroServer, BIOS O41 10/01/2013 Stack: Call Trace: ? _raw_spin_lock_irqsave ? lock_timer_base.isra.34 ? del_timer ? try_to_grab_pending ? mod_delayed_work_on ? edac_mc_reset_delay_period ? edac_set_poll_msec ? param_attr_store ? module_attr_store ? kernfs_fop_write ? __vfs_write ? __vfs_read ? __alloc_fd ? vfs_write ? SyS_write ? entry_SYSCALL_64_fastpath Code: RIP [ .. ] queued_spin_lock_slowpath RSP <> CR2: 0000000000015d10 ---[ end trace 3f286bc71cca15d1 ]--- Kernel panic - not syncing: Fatal exception Fix it. Signed-off-by: Nicholas Krause <xerofoify@gmail.com> Cc: <stable@vger.kernel.org> # 4.5 Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1463697958-13406-1-git-send-email-xerofoify@gmail.com [ Rewrite commit message. ] Signed-off-by: Borislav Petkov <bp@suse.de> drivers/edac/edac_mc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 31143e2933d1675c4c1ba6ce125cdd95870edd85 Author: Franky Lin <franky.lin@broadcom.com> Date: Thu Jun 2 02:00:27 2016 -0700 brcmfmac: add eth_type_trans back for PCIe full dongle A regression was introduced in commit 9c349892ccc9 ("brcmfmac: revise handling events in receive path") which moves eth_type_trans() call to brcmf_rx_frame(). Msgbuf layer doesn't use brcmf_rx_frame() but invokes brcmf_netif_rx() directly. In such case the Ethernet header was not stripped out resulting in null pointer dereference in the networking stack. BUG: unable to handle kernel NULL pointer dereference at 0000000000000048 IP: [<ffffffff814c3ce6>] enqueue_to_backlog+0x56/0x260 PGD 0 Oops: 0000 [#1] PREEMPT SMP Modules linked in: fuse ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype [...] rtsx_pci scsi_mod usbcore usb_common i8042 serio nvme nvme_core CPU: 7 PID: 1340 Comm: irq/136-brcmf_p Not tainted 4.7.0-rc1-mainline #1 Hardware name: Dell Inc. XPS 15 9550/0N7TVV, BIOS 01.02.00 04/07/2016 task: ffff8804a0c5bd00 ti: ffff88049e124000 task.ti: ffff88049e124000 RIP: 0010:[<ffffffff814c3ce6>] [<ffffffff814c3ce6>] enqueue_to_backlog+0x56/0x260 RSP: 0018:ffff88049e127ca0 EFLAGS: 00010046 RAX: 0000000000000000 RBX: ffff8804bddd7c40 RCX: 000000000000002f RDX: 0000000000000000 RSI: 0000000000000007 RDI: ffff8804bddd7d4c RBP: ffff88049e127ce8 R08: 0000000000000000 R09: 0000000000000000 R10: ffff8804bddd12c0 R11: 000000000000149e R12: 0000000000017c40 R13: ffff88049e127d08 R14: ffff8804a9bd6d00 R15: ffff8804bddd7d4c FS: 0000000000000000(0000) GS:ffff8804bddc0000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000048 CR3: 0000000001806000 CR4: 00000000003406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff8804bdddad00 ffff8804ad089e00 0000000000000000 0000000000000282 0000000000000000 ffff8804a9bd6d00 ffff8804a1b27e00 ffff8804a9bd6d00 ffff88002ee88000 ffff88049e127d28 ffffffff814c3f3b ffffffff81311fc3 Call Trace: [<ffffffff814c3f3b>] netif_rx_internal+0x4b/0x170 [<ffffffff81311fc3>] ? swiotlb_tbl_unmap_single+0xf3/0x120 [<ffffffff814c5467>] netif_rx_ni+0x27/0xc0 [<ffffffffa08519e9>] brcmf_netif_rx+0x49/0x70 [brcmfmac] [<ffffffffa08564d4>] brcmf_msgbuf_process_rx+0x2b4/0x570 [brcmfmac] [<ffffffff81020017>] ? __xen_set_pgd_hyper+0x57/0xd0 [<ffffffff810d60b0>] ? irq_forced_thread_fn+0x70/0x70 [<ffffffffa0857381>] brcmf_proto_msgbuf_rx_trigger+0x31/0xe0 [brcmfmac] [<ffffffffa0861e8f>] brcmf_pcie_isr_thread+0x7f/0x110 [brcmfmac] [<ffffffff810d60d0>] irq_thread_fn+0x20/0x50 [<ffffffff810d63ad>] irq_thread+0x12d/0x1c0 [<ffffffff815d07d5>] ? __schedule+0x2f5/0x7a0 [<ffffffff810d61d0>] ? wake_threads_waitq+0x30/0x30 [<ffffffff810d6280>] ? irq_thread_dtor+0xb0/0xb0 [<ffffffff81098ea8>] kthread+0xd8/0xf0 [<ffffffff815d4b7f>] ret_from_fork+0x1f/0x40 [<ffffffff81098dd0>] ? kthread_worker_fn+0x170/0x170 Code: 1c f5 60 9a 8e 81 9c 58 0f 1f 44 00 00 48 89 45 d0 fa 66 0f 1f 44 00 00 4c 8d bb 0c 01 00 00 4c 89 ff e8 5e 08 11 00 49 8b 56 20 <48> 8b 52 48 83 e2 01 74 10 8b 8b 08 01 00 00 8b 15 59 c5 42 00 RIP [<ffffffff814c3ce6>] enqueue_to_backlog+0x56/0x260 RSP <ffff88049e127ca0> CR2: 0000000000000048 Fixes: 9c349892ccc9 ("brcmfmac: revise handling events in receive path") Reported-by: Rafal Milecki <zajec5@gmail.com> Reported-by: Grey Christoforo <grey@christoforo.net> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Signed-off-by: Franky Lin <franky.lin@broadcom.com> [arend@broadcom.com: rephrased the commit message] Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/broadcom/brcm80211/brcmfmac/msgbuf.c | 2 ++ 1 file changed, 2 insertions(+) commit c7103f650a11328f28b9fa1c95027db331b7774b Author: Tony Luck <tony.luck@intel.com> Date: Tue May 31 11:50:28 2016 -0700 EDAC, sb_edac: Fix rank lookup on Broadwell Broadwell made a small change to the rank target register moving the target rank ID field up from bits 16:19 to bits 20:23. Also found that the offset field grew by one bit in the IVY_BRIDGE to HASWELL transition, so fix the RIR_OFFSET() macro too. Signed-off-by: Tony Luck <tony.luck@intel.com> Cc: stable@vger.kernel.org # v3.19+ Cc: Aristeu Rozanski <arozansk@redhat.com> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/2943fb819b1f7e396681165db9c12bb3df0e0b16.1464735623.git.tony.luck@intel.com Signed-off-by: Borislav Petkov <bp@suse.de> drivers/edac/sb_edac.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit c75343972b79ef5bd44c498a63b326e37470bbfc Author: Dennis Chen <dennis.chen@arm.com> Date: Tue May 31 11:23:44 2016 +0100 efi/arm: Fix the format of EFI debug messages When both EFI and memblock debugging is enabled on the kernel command line: 'efi=debug memblock=debug' .. the debug messages for early_con look the following way: [ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC] [ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c [ 0.000000] * ... Note the misplaced '*' line, which happened because the memblock debug message was printed while the EFI debug message was still being constructed.. This patch fixes the output to be the expected: [ 0.000000] efi: 0x0000e1050000-0x0000e105ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e1300000-0x0000e1300fff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x0000e8200000-0x0000e827ffff [Memory Mapped I/O |RUN| | | | | | | | | | |UC] [ 0.000000] efi: 0x008000000000-0x008001e7ffff [Runtime Data |RUN| | | | | | | |WB|WT|WC|UC]* [ 0.000000] memblock_add: [0x00008000000000-0x00008001e7ffff] flags 0x0 early_init_dt_add_memory_arch+0x54/0x5c ... Note how the '*' is now in the proper EFI debug message line. Signed-off-by: Dennis Chen <dennis.chen@arm.com> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Acked-by: Mark Rutland <mark.rutland@arm.com> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mark Salter <msalter@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steve Capper <steve.capper@arm.com> Cc: Steve McIntyre <steve@einval.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will.deacon@arm.com> Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/1464690224-4503-3-git-send-email-matt@codeblueprint.co.uk [ Made the changelog more readable. ] Signed-off-by: Ingo Molnar <mingo@kernel.org> drivers/firmware/efi/arm-init.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit 55f1ea15216a5a14c96738bd5284100a00ffa9dc Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Tue May 31 11:23:43 2016 +0100 efi: Fix for_each_efi_memory_desc_in_map() for empty memmaps Commit: 78ce248faa3c ("efi: Iterate over efi.memmap in for_each_efi_memory_desc()") introduced a regression for systems booted with the 'noefi' kernel option. In particular, I observed an early kernel hang in efi_find_mirror()'s for_each_efi_memory_desc() call. As we don't have efi memmap on this system we enter this iterator with the following parameters: efi.memmap.map = 0, efi.memmap.map_end = 0, efi.memmap.desc_size = 28 ... then for_each_efi_memory_desc_in_map() does the following comparison: (md) <= (efi_memory_desc_t *)((m)->map_end - (m)->desc_size); ... where md = 0, (m)->map_end = 0 and (m)->desc_size = 28 but when we subtract something from a NULL pointer wrap around happens and we end up returning invalid pointer and crash. Fix it by using the correct pointer arithmetics. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: K. Y. Srinivasan <kys@microsoft.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mark Salter <msalter@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-efi@vger.kernel.org Fixes: 78ce248faa3c ("efi: Iterate over efi.memmap in for_each_efi_memory_desc()") Link: http://lkml.kernel.org/r/1464690224-4503-2-git-send-email-matt@codeblueprint.co.uk [ Made the changelog more readable. ] Signed-off-by: Ingo Molnar <mingo@kernel.org> include/linux/efi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f90d83b301701026b2e4c437a3613f377f63290e Author: AceLan Kao <acelan.kao@canonical.com> Date: Fri Jun 3 14:45:25 2016 +0800 ALSA: hda - Fix headset mic detection problem for Dell machine Add the pin configuration value of this machine into the pin_quirk table to make DELL1_MIC_NO_PRESENCE apply to this machine. Signed-off-by: AceLan Kao <acelan.kao@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/patch_realtek.c | 4 ++++ 1 file changed, 4 insertions(+) commit 3b94a891667c30fb4624221497d77fc65d950345 Author: Kan Liang <kan.liang@intel.com> Date: Fri May 27 04:12:20 2016 -0700 perf/x86/intel/uncore: Remove SBOX support for Broadwell server There was a report that on certain Broadwell-EP systems writing any bit of the SBOX PMU initialization MSR would #GP at boot. This did not happen on all systems. My test systems booted fine. Considering both DE and EP may have such issues, this patch removes SBOX support for all Broadwell platforms for now. Reported-and-tested-by: Mark van Dijk <mark@voidzero.net> Signed-off-by: Kan Liang <kan.liang@intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Link: http://lkml.kernel.org/r/1464347540-5763-1-git-send-email-kan.liang@intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/events/intel/uncore_snbep.c | 21 --------------------- 1 file changed, 21 deletions(-) commit 0422e83d84ae24b933e4b0d4c1e0f0b4ae8a0a3b Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu May 26 21:08:17 2016 +0100 locking/ww_mutex: Report recursive ww_mutex locking early Recursive locking for ww_mutexes was originally conceived as an exception. However, it is heavily used by the DRM atomic modesetting code. Currently, the recursive deadlock is checked after we have queued up for a busy-spin and as we never release the lock, we spin until kicked, whereupon the deadlock is discovered and reported. A simple solution for the now common problem is to move the recursive deadlock discovery to the first action when taking the ww_mutex. Suggested-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1464293297-19777-1-git-send-email-chris@chris-wilson.co.uk Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/locking/mutex.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 55eed755c6e30a89be3a791a6b0ad208aadd9bdc Author: Peter Zijlstra <peterz@infradead.org> Date: Fri May 27 13:11:17 2016 +0200 locking/seqcount: Re-fix raw_read_seqcount_latch() Commit 50755bc1c305 ("seqlock: fix raw_read_seqcount_latch()") broke raw_read_seqcount_latch(). If you look at the comment that was modified; the thing that changes is the seq count, not the latch pointer. * void latch_modify(struct latch_struct *latch, ...) * { * smp_wmb(); <- Ensure that the last data[1] update is visible * latch->seq++; * smp_wmb(); <- Ensure that the seqcount update is visible * * modify(latch->data[0], ...); * * smp_wmb(); <- Ensure that the data[0] update is visible * latch->seq++; * smp_wmb(); <- Ensure that the seqcount update is visible * * modify(latch->data[1], ...); * } * * The query will have a form like: * * struct entry *latch_query(struct latch_struct *latch, ...) * { * struct entry *entry; * unsigned seq, idx; * * do { * seq = lockless_dereference(latch->seq); So here we have: seq = READ_ONCE(latch->seq); smp_read_barrier_depends(); Which is exactly what we want; the new code: seq = ({ p = READ_ONCE(latch); smp_read_barrier_depends(); p })->seq; is just wrong; because it looses the volatile read on seq, which can now be torn or worse 'optimized'. And the read_depend barrier is also placed wrong, we want it after the load of seq, to match the above data[] up-to-date wmb()s. Such that when we dereference latch->data[] below, we're guaranteed to observe the right data. * * idx = seq & 0x01; * entry = data_query(latch->data[idx], ...); * * smp_rmb(); * } while (seq != latch->seq); * * return entry; * } So yes, not passing a pointer is not pretty, but the code was correct, and isn't anymore now. Change to explicit READ_ONCE()+smp_read_barrier_depends() to avoid confusion and allow strict lockless_dereference() checking. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Paul McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: 50755bc1c305 ("seqlock: fix raw_read_seqcount_latch()") Link: http://lkml.kernel.org/r/20160527111117.GL3192@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org> include/linux/seqlock.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 31b2a32f708bb33b3f35b03ce3d2cb31f7d1e684 Author: Roger Quadros <rogerq@ti.com> Date: Wed May 18 15:28:06 2016 +0300 phy: ti-pipe3: Program the DPLL even if it was already locked If bootloader has set a wrong DPLL then we must trash those values and re-program it anyways. This fixes USB3 devices not being enumerated on beagle-x15 if usb was started in u-boot. We don't re-program SATA DPLL if it is locked as it was causing SATA failures if device was hotpluged after boot. Reported-by: Robert Nelson <robertcnelson@gmail.com> Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> drivers/phy/phy-ti-pipe3.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 4693fc734d675c5518ea9bd4c9623db45bc37402 Author: Stephan Mueller <smueller@chronox.de> Date: Thu May 26 23:38:12 2016 +0200 KEYS: Add placeholder for KDF usage with DH The values computed during Diffie-Hellman key exchange are often used in combination with key derivation functions to create cryptographic keys. Add a placeholder for a later implementation to configure a key derivation function that will transform the Diffie-Hellman result returned by the KEYCTL_DH_COMPUTE command. [This patch was stripped down from a patch produced by Mat Martineau that had a bug in the compat code - so for the moment Stephan's patch simply requires that the placeholder argument must be NULL] Original-signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Stephan Mueller <smueller@chronox.de> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: James Morris <james.l.morris@oracle.com> Documentation/security/keys.txt | 5 ++++- security/keys/compat.c | 2 +- security/keys/dh.c | 8 +++++++- security/keys/internal.h | 5 +++-- security/keys/keyctl.c | 4 ++-- 5 files changed, 17 insertions(+), 7 deletions(-) commit 0fbbbf8b599ff840ff1a3c0cc00dd67ba8a52c9c Author: Oded Gabbay <oded.gabbay@gmail.com> Date: Sun May 29 08:21:53 2016 +0300 drm/amdkfd: print once about mem_banks truncation This print can really spam the kernel log in case we are truncating mem_banks, so just print this info once. It should also not be classified as warning. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc4755a4bd1845ef6e88ac8c62f12e05bb530256 Author: Oded Gabbay <oded.gabbay@gmail.com> Date: Thu May 26 08:41:48 2016 +0300 drm/amdkfd: destroy dbgmgr in notifier release amdkfd need to destroy the debug manager in case amdkfd's notifier function is called before the unbind function, because in that case, the unbind function will exit without destroying debug manager. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> CC: Stable <stable@vger.kernel.org> drivers/gpu/drm/amd/amdkfd/kfd_process.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 121b78e679ee3ffab780115e260b2775d0cc1f73 Author: Oded Gabbay <oded.gabbay@gmail.com> Date: Thu May 26 08:41:08 2016 +0300 drm/amdkfd: unbind only existing processes When unbinding a process from a device (initiated by amd_iommu_v2), the driver needs to make sure that process still exists in the process table. There is a possibility that amdkfd's own notifier handler - kfd_process_notifier_release() - was called before the unbind function and it already removed the process from the process table. v2: Because there can be only one process with the specified pasid, and because *p can't be NULL inside the hash_for_each_rcu macro, it is more reasonable to just put the whole code inside the if statement that compares the pasid value. That way, when we exit hash_for_each_rcu, we simply exit the function as well. Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> CC: Stable <stable@vger.kernel.org> drivers/gpu/drm/amd/amdkfd/kfd_process.c | 60 +++++++++++++++++++------------- 1 file changed, 35 insertions(+), 25 deletions(-) commit ab3ab68493aaac6fea4ad1bb597def9f48f41c71 Author: Dave Airlie <airlied@redhat.com> Date: Fri Jun 3 14:39:41 2016 +1000 drm/omap: fix unused variable warning. Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/omapdrm/dss/hdmi4.c | 1 - 1 file changed, 1 deletion(-) commit f1777aaf8468c674e2ef962fca6ef0e716755e00 Merge: b160245 d0196c8 Author: Dave Airlie <airlied@redhat.com> Date: Fri Jun 3 14:35:00 2016 +1000 Merge tag 'omapdrm-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux into drm-fixes omapdrm fixes for 4.7 * multiple compile break fixes for missing includes, bad kconfig dependencies. * remove regulator API misuse causing deprecation warnings * OMAP5 HDMI fixes for DDC and AVI infoframe * OMAP4 HDMI fix for CEC * tag 'omapdrm-4.7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: drm/omap: include gpio/consumer.h where needed drm/omap: include linux/seq_file.h where needed Revert "drm/omap: no need to select OMAP2_DSS" drm/omap: Remove regulator API abuse OMAPDSS: HDMI5: Change DDC timings OMAPDSS: HDMI5: Fix AVI infoframe drm/omap: fix OMAP4 hdmi_core_powerdown_disable() drm/omap: Fix missing includes drm/omapdrm: include pinctrl/consumer.h where needed commit 4116def2337991b39919f3b448326e21c40e0dbb Author: Kangjie Lu <kangjielu@gmail.com> Date: Thu Jun 2 04:11:20 2016 -0400 rds: fix an infoleak in rds_inc_info_copy The last field "flags" of object "minfo" is not initialized. Copying this object out may leak kernel stack data. Assign 0 to it to avoid leak. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/rds/recv.c | 2 ++ 1 file changed, 2 insertions(+) commit 5d2be1422e02ccd697ccfcd45c85b4a26e6178e2 Author: Kangjie Lu <kangjielu@gmail.com> Date: Thu Jun 2 04:04:56 2016 -0400 tipc: fix an infoleak in tipc_nl_compat_link_dump link_info.str is a char array of size 60. Memory after the NULL byte is not initialized. Sending the whole object out can cause a leak. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net> net/tipc/netlink_compat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b1602452cb80239b121addc598803b6fc1223872 Merge: 35962ea 151787b Author: Dave Airlie <airlied@redhat.com> Date: Fri Jun 3 14:11:49 2016 +1000 Merge tag 'imx-drm-next-2016-06-01' of git://git.pengutronix.de/git/pza/linux into drm-fixes imx-drm updates - add support for reading LVDS panel EDID over DDC - enable UYVY/VYUY support - add support for pixel clock polarity configuration - honor the native-mode DT property for LVDS - various fixes and cleanups * tag 'imx-drm-next-2016-06-01' of git://git.pengutronix.de/git/pza/linux: drm/imx: plane: Don't set plane->crtc in ipu_plane_update() drm/imx: ipuv3-plane: Constify ipu_plane_funcs drm/imx: imx-ldb: honor 'native-mode' property when selecting video mode from DT drm/imx: parallel-display: remove dead code drm/imx: use bus_flags for pixel clock polarity drm/imx: ipuv3-plane: enable UYVY and VYUY formats drm/imx: parallel-display: use of_graph_get_endpoint_by_regs helper drm/imx: imx-ldb: use of_graph_get_endpoint_by_regs helper dt-bindings: imx: ldb: Add ddc-i2c-bus property drm/imx: imx-ldb: Add DDC support commit 35962eaef44166fd8d4fff7cb4e9c64a2da536ee Merge: 6572c8c 58a2ab3 Author: Dave Airlie <airlied@redhat.com> Date: Fri Jun 3 14:08:20 2016 +1000 Merge tag 'drm-atmel-hlcdc-fixes/for-4.7-rc2' of github.com:bbrezillon/linux-at91 into drm-fixes Two trivial bugfixes for the atmel-hlcdc driver. The first one is making use of __drm_atomic_helper_crtc_destroy_state() instead of duplicating its logic in atmel_hlcdc_crtc_reset() and risking memory leaks if other objects are added to the common CRTC state. The second one is fixing a possible NULL pointer dereference. * tag 'drm-atmel-hlcdc-fixes/for-4.7-rc2' of github.com:bbrezillon/linux-at91: drm: atmel-hlcdc: fix a NULL check drm: atmel-hlcdc: fix atmel_hlcdc_crtc_reset() implementation commit 6572c8c637278d64dfd355e84a6dcb64b9d6cf28 Merge: a9bf7d6 f6c68b4 Author: Dave Airlie <airlied@redhat.com> Date: Fri Jun 3 14:07:42 2016 +1000 Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes "I have accumulated some cleanup patches for HDLCD, partly triggered by Daniel Vetter's work on non-blocking atomic operations, that I would like to integrate into v4.7. My first patch is important for the newly enabled hibernate option for AArch64 on Juno, the others are fixing behaviour in HDLCD and adding a debugfs entry to help track the underlying framebuffer usage. I'm also taking one of Daniel's patches from his non-blocking series to help with the integration of his patches later." * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld: drm: hdlcd: Add information about the underlying framebuffers in debugfs drm: hdlcd: Cleanup the atomic plane operations drm/hdlcd: Fix up crtc_state->event handling drm: hdlcd: Revamp runtime power management commit ce25d66ad5f8d921bac5fe2d32d62fa30c0f9a70 Author: Eric Dumazet <edumazet@google.com> Date: Thu Jun 2 14:52:43 2016 -0700 Possible problem with e6afc8ac ("udp: remove headers from UDP packets before queueing") Paul Moore tracked a regression caused by a recent commit, which mistakenly assumed that sk_filter() could be avoided if socket had no current BPF filter. The intent was to avoid udp_lib_checksum_complete() overhead. But sk_filter() also checks skb_pfmemalloc() and security_sock_rcv_skb(), so better call it. Fixes: e6afc8ace6dd ("udp: remove headers from UDP packets before queueing") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Paul Moore <paul@paul-moore.com> Tested-by: Paul Moore <paul@paul-moore.com> Tested-by: Stephen Smalley <sds@tycho.nsa.gov> Cc: samanthakumar <samanthakumar@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv4/udp.c | 10 +++++----- net/ipv6/udp.c | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) commit fcdec35e54dc8a7659f59482e23aad1fe9c3ef5a Author: Rob Herring <robh@kernel.org> Date: Thu Mar 24 15:40:25 2016 -0500 MAINTAINERS: DeviceTree maintainer updates Grant stepped down as kernel DT maintainer and his linaro.org email will be bouncing soon, so remove him now. Pawel, Ian and Kumar either said they don't want to remain maintainers or didn't reply, so removing them as binding maintainers. Update the DT git tree to mine. Grant's has not been active for a while now. I'm actively using patchwork for binding review tracking, so add its URL. Cc: Grant Likely <grant.likely@secretlab.ca> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Frank Rowand <frowand.list@gmail.com> Signed-off-by: Rob Herring <robh@kernel.org> MAINTAINERS | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 4340fa55298d17049e71c7a34e04647379c269f3 Merge: 719af93 d14bdb5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu Jun 2 15:08:06 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM fixes from Radim Krčmář: "ARM: - two fixes for 4.6 vgic [Christoffer] (cc stable) - six fixes for 4.7 vgic [Marc] x86: - six fixes from syzkaller reports [Paolo] (two of them cc stable) - allow OS X to boot [Dmitry] - don't trust compilers [Nadav]" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS KVM: x86: avoid vmalloc(0) in the KVM_SET_CPUID KVM: irqfd: fix NULL pointer dereference in kvm_irq_map_gsi KVM: fail KVM_SET_VCPU_EVENTS with invalid exception number KVM: x86: avoid vmalloc(0) in the KVM_SET_CPUID kvm: x86: avoid warning on repeated KVM_SET_TSS_ADDR KVM: Handle MSR_IA32_PERF_CTL KVM: x86: avoid write-tearing of TDP KVM: arm/arm64: vgic-new: Removel harmful BUG_ON arm64: KVM: vgic-v3: Relax synchronization when SRE==1 arm64: KVM: vgic-v3: Prevent the guest from messing with ICC_SRE_EL1 arm64: KVM: Make ICC_SRE_EL1 access return the configured SRE value KVM: arm/arm64: vgic-v3: Always resample level interrupts KVM: arm/arm64: vgic-v2: Always resample level interrupts KVM: arm/arm64: vgic-v3: Clear all dirty LRs KVM: arm/arm64: vgic-v2: Clear all dirty LRs commit 9bd616e3dbedfc103f158197c8ad93678849b1ed Author: Catalin Marinas <catalin.marinas@arm.com> Date: Wed Jun 1 18:52:16 2016 +0100 cpuidle: Do not access cpuidle_devices when !CONFIG_CPU_IDLE The cpuidle_devices per-CPU variable is only defined when CPU_IDLE is enabled. Commit c8cc7d4de7a4 ("sched/idle: Reorganize the idle loop") removed the #ifdef CONFIG_CPU_IDLE around cpuidle_idle_call() with the compiler optimising away __this_cpu_read(cpuidle_devices). However, with CONFIG_UBSAN && !CONFIG_CPU_IDLE, this optimisation no longer happens and the kernel fails to link since cpuidle_devices is not defined. This patch introduces an accessor function for the current CPU cpuidle device (returning NULL when !CONFIG_CPU_IDLE) and uses it in cpuidle_idle_call(). Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: 4.5+ <stable@vger.kernel.org> # 4.5+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> include/linux/cpuidle.h | 3 +++ kernel/sched/idle.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) commit f55d84b07c4e7340473a25dc82b462607578402c Author: Vincent Palatin <vpalatin@chromium.org> Date: Wed Jun 1 08:53:48 2016 -0700 stmmac: do not sleep in atomic context for mdio_reset stmmac_mdio_reset() has been updated to use msleep rather udelay (as some PHY requires a one second delay there). It called from stmmac_resume() within the spin_lock_irqsave block atomic context triggering 'scheduling while atomic'. The stmmac_priv lock usage is not fully documented, but it seems to protect the access to the MAC registers / DMA structures rather than the MDIO bus or the PHY (which have separate locking), so we can push the spin_lock after the stmmac_mdio_reset call. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 87c279e613f848c691111b29d49de8df3f4f56da Author: Omar Sandoval <osandov@fb.com> Date: Wed Jun 1 22:18:48 2016 -0700 blk-mq: really fix plug list flushing for nomerge queues Commit 0809e3ac6231 ("block: fix plug list flushing for nomerge queues") updated blk_mq_make_request() to set request_count even when blk_queue_nomerges() returns true. However, blk_mq_make_request() only does limited plugging and doesn't use request_count; blk_sq_make_request() is the one that should have been fixed. Do that and get rid of the unnecessary work in the mq version. Fixes: 0809e3ac6231 ("block: fix plug list flushing for nomerge queues") Signed-off-by: Omar Sandoval <osandov@fb.com> Reviewed-by: Ming Lei <tom.leiming@gmail.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com> block/blk-mq.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) commit b9ef22dedde08ab1b4ccd5f53344984c4dcb89f4 Author: Feifei Xu <xufeifei@linux.vnet.ibm.com> Date: Wed Jun 1 19:18:25 2016 +0800 Btrfs: self-tests: Support non-4k page size self-tests code assumes 4k as the sectorsize and nodesize. This commit fix hardcoded 4K. Enables the self-tests code to be executed on non-4k page sized systems (e.g. ppc64). Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Feifei Xu <xufeifei@linux.vnet.ibm.com> Signed-off-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/ctree.c | 6 +- fs/btrfs/disk-io.c | 8 +- fs/btrfs/disk-io.h | 2 +- fs/btrfs/extent_io.c | 10 +- fs/btrfs/extent_io.h | 4 +- fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/super.c | 16 +- fs/btrfs/tests/btrfs-tests.c | 6 +- fs/btrfs/tests/btrfs-tests.h | 27 +-- fs/btrfs/tests/extent-buffer-tests.c | 11 +- fs/btrfs/tests/extent-io-tests.c | 27 +-- fs/btrfs/tests/free-space-tests.c | 68 ++++--- fs/btrfs/tests/free-space-tree-tests.c | 30 +-- fs/btrfs/tests/inode-tests.c | 344 ++++++++++++++++++--------------- fs/btrfs/tests/qgroup-tests.c | 85 ++++---- 15 files changed, 355 insertions(+), 291 deletions(-) commit 0ef6447a3d2f014e49069c4da33f905ed803aa2a Author: Feifei Xu <xufeifei@linux.vnet.ibm.com> Date: Wed Jun 1 19:18:24 2016 +0800 Btrfs: Fix integer overflow when calculating bytes_per_bitmap On ppc64, bytes_per_bitmap will be (65536*8*65536). Hence append UL to fix integer overflow. Reviewed-by: Josef Bacik <jbacik@fb.com> Reviewed-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: Feifei Xu <xufeifei@linux.vnet.ibm.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/free-space-cache.c | 12 ++++++------ fs/btrfs/tests/free-space-tests.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) commit 5473e0c426ffaeaa19734987b153c2a7f33b8706 Author: Feifei Xu <xufeifei@linux.vnet.ibm.com> Date: Wed Jun 1 19:18:23 2016 +0800 Btrfs: test_check_exists: Fix infinite loop when searching for free space entries On a ppc64 machine using 64K as the block size, assume that the RB tree at btrfs_free_space_ctl->free_space_offset contains following two entries: 1. A bitmap entry having an offset value of 0 and having the bits corresponding to the address range [128M+512K, 128M+768K] set. 2. An extent entry corresponding to the address range [128M-256K, 128M-128K] In such a scenario, test_check_exists() invoked for checking the existence of address range [128M+768K, 256M] can lead to an infinite loop as explained below: - Checking for the extent entry fails. - Checking for a bitmap entry results in the free space info in range [128M+512K, 128M+768K] beng returned. - rb_prev(info) returns NULL because the bitmap entry starting from offset 0 comes first in the RB tree. - current_node = bitmap node. - while (current_node) tmp = rb_next(bitmap_node);/*tmp is extent based free space entry*/ Since extent based free space entry's last address is smaller than the address being searched for (i.e. 128M+768K) we incorrectly again obtain the extent node as the "next right node" of the RB tree and thus end up looping infinitely. This patch fixes the issue by checking the "tmp" variable which point to the most recently searched free space node. Reviewed-by: Josef Bacik <jbacik@fb.com> Reviewed-by: Chandan Rajendra <chandan@linux.vnet.ibm.com> Signed-off-by: Feifei Xu <xufeifei@linux.vnet.ibm.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/free-space-cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0de6b9979e2e10c79e5702d2d902cd7284d17689 Author: Joshua Henderson <digitalpeer@digitalpeer.com> Date: Tue May 17 10:35:53 2016 +0530 irqchip/irq-pic32-evic: Fix bug with external interrupts. The wrong external interrupt bits are being set, offset by 1. Signed-off-by: Joshua Henderson <digitalpeer@digitalpeer.com> Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-pic32-evic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fbf8f40e1658cb2f17452dbd3c708e329c5d27e0 Author: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> Date: Wed May 25 15:29:20 2016 +0200 irqchip/gicv3-its: numa: Enable workaround for Cavium thunderx erratum 23144 The erratum fixes the hang of ITS SYNC command by avoiding inter node io and collections/cpu mapping on thunderx dual-socket platform. This fix is only applicable for Cavium's ThunderX dual-socket platform. Reviewed-by: Robert Richter <rrichter@cavium.com> Signed-off-by: Ganapatrao Kulkarni <gkulkarni@caviumnetworks.com> Signed-off-by: Robert Richter <rrichter@cavium.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Documentation/arm64/silicon-errata.txt | 1 + arch/arm64/Kconfig | 9 +++++++ drivers/irqchip/irq-gic-v3-its.c | 49 ++++++++++++++++++++++++++++++++-- 3 files changed, 57 insertions(+), 2 deletions(-) commit cf1d9d11e25053a264c0001aa86be7680bb1ecc1 Author: Andrew Jones <drjones@redhat.com> Date: Wed May 11 21:23:17 2016 +0200 irqchip/gic-v3: Fix quiescence check in gic_enable_redist Make sure the two sides of the bitwise operation are bool. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic-v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fab0cdc30d81694d2d5524b24e42c43414971719 Author: Andrew Jones <drjones@redhat.com> Date: Thu May 12 10:46:34 2016 +0200 irqchip/gic-v3: Fix copy+paste mistakes in defines ICC_SGI1R_AFFINITY_{2,3}_MASK are unused, which is good because they were defined with the wrong shifts. Signed-off-by: Andrew Jones <drjones@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> include/linux/irqchip/arm-gic-v3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit dd5f1b049dc139876801db3cdd0f20d21fd428cc Author: Marc Zyngier <marc.zyngier@arm.com> Date: Thu Jun 2 09:00:28 2016 +0100 irqchip/gic-v3: Fix ICC_SGI1R_EL1.INTID decoding mask The INTID mask is wrong, and is made a signed value, which has nteresting effects in the KVM emulation. Let's sanitize it. Cc: stable@vger.kernel.org Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> include/linux/irqchip/arm-gic-v3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6c68b4bd4a98033d1e79479212bbd376e145728 Author: Liviu Dudau <Liviu.Dudau@arm.com> Date: Wed Jun 1 15:07:02 2016 +0100 drm: hdlcd: Add information about the underlying framebuffers in debugfs drm_fb_cma code has a nice helper function to display in the debugfs information about the underlying framebuffers used by HDLCD: $ cat /sys/kernel/debug/dri/0/fb fb: 1920x1200@XR24 0: offset=0 pitch=7680, obj: 0 ( 2) 001011ba 0x00000000fc300000 ffffff800a27c000 9338880 fb: 1920x1200@XR24 0: offset=0 pitch=7680, obj: 0 ( 2) 001008ca 0x00000000fba00000 ffffff8009987000 9338880 fb: 1920x1200@XR24 0: offset=0 pitch=7680, obj: 0 ( 1) 00100000 0x00000000fb100000 ffffff8008fdc000 9216000 Add the entry in HDLCD's debugfs node. Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> drivers/gpu/drm/arm/hdlcd_drv.c | 1 + 1 file changed, 1 insertion(+) commit 96ebb1f3ed4dca25c6f5d1868b0de61f9366612a Author: Liviu Dudau <Liviu.Dudau@arm.com> Date: Wed Jun 1 15:00:15 2016 +0100 drm: hdlcd: Cleanup the atomic plane operations Harden the plane_check() code to drop attempts at scaling because that is not supported. Make hdlcd_plane_atomic_update() set the pitch and line length registers that correctly reflect the plane's values. And make hdlcd_crtc_mode_set_nofb() a helper function for hdlcd_crtc_enable() rather than an exposed hook. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> drivers/gpu/drm/arm/hdlcd_crtc.c | 45 ++++++++++++++++++++++++++-------------- drivers/gpu/drm/arm/hdlcd_drv.h | 1 - 2 files changed, 29 insertions(+), 17 deletions(-) commit 38c8c22c12e99b70fc59ea7ef4d0bb24c11e5ddd Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue May 31 18:21:13 2016 +0200 drm/hdlcd: Fix up crtc_state->event handling event_list just reimplemented what drm_crtc_arm_vblank_event does. And we also need to send out drm events when shutting down a pipe. With this it's possible to use the new nonblocking commit support in the helpers. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> drivers/gpu/drm/arm/hdlcd_crtc.c | 18 ++++++++---------- drivers/gpu/drm/arm/hdlcd_drv.c | 19 +------------------ drivers/gpu/drm/arm/hdlcd_drv.h | 1 - 3 files changed, 9 insertions(+), 29 deletions(-) commit a95acec16d932ac78c2f70dc95a83bd162595d6c Author: Liviu Dudau <Liviu.Dudau@arm.com> Date: Tue May 17 10:06:54 2016 +0100 drm: hdlcd: Revamp runtime power management Because the HDLCD driver acts as a component master it can end up enabling the runtime PM functionality before the encoders are initialised. This can cause crashes if the component slave never probes (missing module) or if the PM operations kick in before the probe finishes. Move the enabling of the runtime PM after the component master has finished collecting the slave components and use the DRM atomic helpers to suspend and resume the device. Tested-by: Robin Murphy <Robin.Murphy@arm.com> Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com> drivers/gpu/drm/arm/hdlcd_crtc.c | 23 +++++++++---------- drivers/gpu/drm/arm/hdlcd_drv.c | 48 ++++++++++++++++++++++------------------ drivers/gpu/drm/arm/hdlcd_drv.h | 3 +-- 3 files changed, 39 insertions(+), 35 deletions(-) commit d14bdb553f9196169f003058ae1cdabe514470e6 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Wed Jun 1 14:09:23 2016 +0200 KVM: x86: fix OOPS after invalid KVM_SET_DEBUGREGS MOV to DR6 or DR7 causes a #GP if an attempt is made to write a 1 to any of bits 63:32. However, this is not detected at KVM_SET_DEBUGREGS time, and the next KVM_RUN oopses: general protection fault: 0000 [#1] SMP CPU: 2 PID: 14987 Comm: a.out Not tainted 4.4.9-300.fc23.x86_64 #1 Hardware name: LENOVO 2325F51/2325F51, BIOS G2ET32WW (1.12 ) 05/30/2012 [...] Call Trace: [<ffffffffa072c93d>] kvm_arch_vcpu_ioctl_run+0x141d/0x14e0 [kvm] [<ffffffffa071405d>] kvm_vcpu_ioctl+0x33d/0x620 [kvm] [<ffffffff81241648>] do_vfs_ioctl+0x298/0x480 [<ffffffff812418a9>] SyS_ioctl+0x79/0x90 [<ffffffff817a0f2e>] entry_SYSCALL_64_fastpath+0x12/0x71 Code: 55 83 ff 07 48 89 e5 77 27 89 ff ff 24 fd 90 87 80 81 0f 23 fe 5d c3 0f 23 c6 5d c3 0f 23 ce 5d c3 0f 23 d6 5d c3 0f 23 de 5d c3 <0f> 23 f6 5d c3 0f 0b 66 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 RIP [<ffffffff810639eb>] native_set_debugreg+0x2b/0x40 RSP <ffff88005836bd50> Testcase (beautified/reduced from syzkaller output): #include <unistd.h> #include <sys/syscall.h> #include <string.h> #include <stdint.h> #include <linux/kvm.h> #include <fcntl.h> #include <sys/ioctl.h> long r[8]; int main() { struct kvm_debugregs dr = { 0 }; r[2] = open("/dev/kvm", O_RDONLY); r[3] = ioctl(r[2], KVM_CREATE_VM, 0); r[4] = ioctl(r[3], KVM_CREATE_VCPU, 7); memcpy(&dr, "\x5d\x6a\x6b\xe8\x57\x3b\x4b\x7e\xcf\x0d\xa1\x72" "\xa3\x4a\x29\x0c\xfc\x6d\x44\x00\xa7\x52\xc7\xd8" "\x00\xdb\x89\x9d\x78\xb5\x54\x6b\x6b\x13\x1c\xe9" "\x5e\xd3\x0e\x40\x6f\xb4\x66\xf7\x5b\xe3\x36\xcb", 48); r[7] = ioctl(r[4], KVM_SET_DEBUGREGS, &dr); r[6] = ioctl(r[4], KVM_RUN, 0); } Reported-by: Dmitry Vyukov <dvyukov@google.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> arch/x86/kvm/x86.c | 5 +++++ 1 file changed, 5 insertions(+) commit f8c1b85b2523da59c8c03ea94e9d0fac04155943 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Wed Jun 1 14:09:22 2016 +0200 KVM: x86: avoid vmalloc(0) in the KVM_SET_CPUID This causes an ugly dmesg splat. Beautified syzkaller testcase: #include <unistd.h> #include <sys/syscall.h> #include <sys/ioctl.h> #include <fcntl.h> #include <linux/kvm.h> long r[8]; int main() { struct kvm_irq_routing ir = { 0 }; r[2] = open("/dev/kvm", O_RDWR); r[3] = ioctl(r[2], KVM_CREATE_VM, 0); r[4] = ioctl(r[3], KVM_SET_GSI_ROUTING, &ir); return 0; } Reported-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> virt/kvm/kvm_main.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit c622a3c21ede892e370b56e1ceb9eb28f8bbda6b Author: Paolo Bonzini <pbonzini@redhat.com> Date: Wed Jun 1 14:09:21 2016 +0200 KVM: irqfd: fix NULL pointer dereference in kvm_irq_map_gsi Found by syzkaller: BUG: unable to handle kernel NULL pointer dereference at 0000000000000120 IP: [<ffffffffa0797202>] kvm_irq_map_gsi+0x12/0x90 [kvm] PGD 6f80b067 PUD b6535067 PMD 0 Oops: 0000 [#1] SMP CPU: 3 PID: 4988 Comm: a.out Not tainted 4.4.9-300.fc23.x86_64 #1 [...] Call Trace: [<ffffffffa0795f62>] irqfd_update+0x32/0xc0 [kvm] [<ffffffffa0796c7c>] kvm_irqfd+0x3dc/0x5b0 [kvm] [<ffffffffa07943f4>] kvm_vm_ioctl+0x164/0x6f0 [kvm] [<ffffffff81241648>] do_vfs_ioctl+0x298/0x480 [<ffffffff812418a9>] SyS_ioctl+0x79/0x90 [<ffffffff817a1062>] tracesys_phase2+0x84/0x89 Code: b5 71 a7 e0 5b 41 5c 41 5d 5d f3 c3 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 8b 8f 10 2e 00 00 31 c0 48 89 e5 <39> 91 20 01 00 00 76 6a 48 63 d2 48 8b 94 d1 28 01 00 00 48 85 RIP [<ffffffffa0797202>] kvm_irq_map_gsi+0x12/0x90 [kvm] RSP <ffff8800926cbca8> CR2: 0000000000000120 Testcase: #include <unistd.h> #include <sys/syscall.h> #include <string.h> #include <stdint.h> #include <linux/kvm.h> #include <fcntl.h> #include <sys/ioctl.h> long r[26]; int main() { memset(r, -1, sizeof(r)); r[2] = open("/dev/kvm", 0); r[3] = ioctl(r[2], KVM_CREATE_VM, 0); struct kvm_irqfd ifd; ifd.fd = syscall(SYS_eventfd2, 5, 0); ifd.gsi = 3; ifd.flags = 2; ifd.resamplefd = ifd.fd; r[25] = ioctl(r[3], KVM_IRQFD, &ifd); return 0; } Reported-by: Dmitry Vyukov <dvyukov@google.com> Cc: stable@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> virt/kvm/irqchip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 78e546c824fa8f96d323b7edd6f5cad5b74af057 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Wed Jun 1 14:09:20 2016 +0200 KVM: fail KVM_SET_VCPU_EVENTS with invalid exception number This cannot be returned by KVM_GET_VCPU_EVENTS, so it is okay to return EINVAL. It causes a WARN from exception_type: WARNING: CPU: 3 PID: 16732 at arch/x86/kvm/x86.c:345 exception_type+0x49/0x50 [kvm]() CPU: 3 PID: 16732 Comm: a.out Tainted: G W 4.4.6-300.fc23.x86_64 #1 Hardware name: LENOVO 2325F51/2325F51, BIOS G2ET32WW (1.12 ) 05/30/2012 0000000000000286 000000006308a48b ffff8800bec7fcf8 ffffffff813b542e 0000000000000000 ffffffffa0966496 ffff8800bec7fd30 ffffffff810a40f2 ffff8800552a8000 0000000000000000 00000000002c267c 0000000000000001 Call Trace: [<ffffffff813b542e>] dump_stack+0x63/0x85 [<ffffffff810a40f2>] warn_slowpath_common+0x82/0xc0 [<ffffffff810a423a>] warn_slowpath_null+0x1a/0x20 [<ffffffffa0924809>] exception_type+0x49/0x50 [kvm] [<ffffffffa0934622>] kvm_arch_vcpu_ioctl_run+0x10a2/0x14e0 [kvm] [<ffffffffa091c04d>] kvm_vcpu_ioctl+0x33d/0x620 [kvm] [<ffffffff81241248>] do_vfs_ioctl+0x298/0x480 [<ffffffff812414a9>] SyS_ioctl+0x79/0x90 [<ffffffff817a04ee>] entry_SYSCALL_64_fastpath+0x12/0x71 ---[ end trace b1a0391266848f50 ]--- Testcase (beautified/reduced from syzkaller output): #include <unistd.h> #include <sys/syscall.h> #include <string.h> #include <stdint.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/kvm.h> long r[31]; int main() { memset(r, -1, sizeof(r)); r[2] = open("/dev/kvm", O_RDONLY); r[3] = ioctl(r[2], KVM_CREATE_VM, 0); r[7] = ioctl(r[3], KVM_CREATE_VCPU, 0); struct kvm_vcpu_events ve = { .exception.injected = 1, .exception.nr = 0xd4 }; r[27] = ioctl(r[7], KVM_SET_VCPU_EVENTS, &ve); r[30] = ioctl(r[7], KVM_RUN, 0); return 0; } Reported-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> arch/x86/kvm/x86.c | 4 ++++ 1 file changed, 4 insertions(+) commit 83676e923895adf2af392cfd36a05709950aaeef Author: Paolo Bonzini <pbonzini@redhat.com> Date: Wed Jun 1 14:09:19 2016 +0200 KVM: x86: avoid vmalloc(0) in the KVM_SET_CPUID This causes an ugly dmesg splat. Beautified syzkaller testcase: #include <unistd.h> #include <sys/syscall.h> #include <sys/ioctl.h> #include <fcntl.h> #include <linux/kvm.h> long r[8]; int main() { struct kvm_cpuid2 c = { 0 }; r[2] = open("/dev/kvm", O_RDWR); r[3] = ioctl(r[2], KVM_CREATE_VM, 0); r[4] = ioctl(r[3], KVM_CREATE_VCPU, 0x8); r[7] = ioctl(r[4], KVM_SET_CPUID, &c); return 0; } Reported-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> arch/x86/kvm/cpuid.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit b21629da120dd6145d14dbd6d028e1bba680a92b Author: Paolo Bonzini <pbonzini@redhat.com> Date: Wed Jun 1 14:09:18 2016 +0200 kvm: x86: avoid warning on repeated KVM_SET_TSS_ADDR Found by syzkaller: WARNING: CPU: 3 PID: 15175 at arch/x86/kvm/x86.c:7705 __x86_set_memory_region+0x1dc/0x1f0 [kvm]() CPU: 3 PID: 15175 Comm: a.out Tainted: G W 4.4.6-300.fc23.x86_64 #1 Hardware name: LENOVO 2325F51/2325F51, BIOS G2ET32WW (1.12 ) 05/30/2012 0000000000000286 00000000950899a7 ffff88011ab3fbf0 ffffffff813b542e 0000000000000000 ffffffffa0966496 ffff88011ab3fc28 ffffffff810a40f2 00000000000001fd 0000000000003000 ffff88014fc50000 0000000000000000 Call Trace: [<ffffffff813b542e>] dump_stack+0x63/0x85 [<ffffffff810a40f2>] warn_slowpath_common+0x82/0xc0 [<ffffffff810a423a>] warn_slowpath_null+0x1a/0x20 [<ffffffffa09251cc>] __x86_set_memory_region+0x1dc/0x1f0 [kvm] [<ffffffffa092521b>] x86_set_memory_region+0x3b/0x60 [kvm] [<ffffffffa09bb61c>] vmx_set_tss_addr+0x3c/0x150 [kvm_intel] [<ffffffffa092f4d4>] kvm_arch_vm_ioctl+0x654/0xbc0 [kvm] [<ffffffffa091d31a>] kvm_vm_ioctl+0x9a/0x6f0 [kvm] [<ffffffff81241248>] do_vfs_ioctl+0x298/0x480 [<ffffffff812414a9>] SyS_ioctl+0x79/0x90 [<ffffffff817a04ee>] entry_SYSCALL_64_fastpath+0x12/0x71 Testcase: #include <unistd.h> #include <sys/ioctl.h> #include <fcntl.h> #include <string.h> #include <linux/kvm.h> long r[8]; int main() { memset(r, -1, sizeof(r)); r[2] = open("/dev/kvm", O_RDONLY|O_TRUNC); r[3] = ioctl(r[2], KVM_CREATE_VM, 0x0ul); r[5] = ioctl(r[3], KVM_SET_TSS_ADDR, 0x20000000ul); r[7] = ioctl(r[3], KVM_SET_TSS_ADDR, 0x20000000ul); return 0; } Reported-by: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> arch/x86/kvm/x86.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0c2df2a1affd183ba9c114915f42a2d464b4f58f Author: Dmitry Bilunov <kmeaw@yandex-team.ru> Date: Tue May 31 17:38:24 2016 +0300 KVM: Handle MSR_IA32_PERF_CTL Intel CPUs having Turbo Boost feature implement an MSR to provide a control interface via rdmsr/wrmsr instructions. One could detect the presence of this feature by issuing one of these instructions and handling the #GP exception which is generated in case the referenced MSR is not implemented by the CPU. KVM's vCPU model behaves exactly as a real CPU in this case by injecting a fault when MSR_IA32_PERF_CTL is called (which KVM does not support). However, some operating systems use this register during an early boot stage in which their kernel is not capable of handling #GP correctly, causing #DP and finally a triple fault effectively resetting the vCPU. This patch implements a dummy handler for MSR_IA32_PERF_CTL to avoid the crashes. Signed-off-by: Dmitry Bilunov <kmeaw@yandex-team.ru> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> arch/x86/kvm/x86.c | 1 + 1 file changed, 1 insertion(+) commit b19ee2ff3b287fea48a2896a381e31319394fe58 Author: Nadav Amit <nadav.amit@gmail.com> Date: Wed May 11 08:04:29 2016 -0700 KVM: x86: avoid write-tearing of TDP In theory, nothing prevents the compiler from write-tearing PTEs, or split PTE writes. These partially-modified PTEs can be fetched by other cores and cause mayhem. I have not really encountered such case in real-life, but it does seem possible. For example, the compiler may try to do something creative for kvm_set_pte_rmapp() and perform multiple writes to the PTE. Signed-off-by: Nadav Amit <nadav.amit@gmail.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> arch/x86/kvm/mmu.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 13e98fd1efc7f65cab1bba6cfab7859840f9aa66 Merge: e28e909 05fb05a Author: Radim Krčmář <rkrcmar@redhat.com> Date: Thu Jun 2 17:28:04 2016 +0200 Merge tag 'kvm-arm-for-v4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm KVM/ARM Fixes for v4.7-rc2 Fixes for the vgic, 2 of the patches address a bug introduced in v4.6 while the rest are for the new vgic. commit e2dfb4b880146bfd4b6aa8e138c0205407cebbaf Author: Russell King <rmk+kernel@armlinux.org.uk> Date: Mon May 30 23:14:56 2016 +0100 ARM: fix PTRACE_SETVFPREGS on SMP systems PTRACE_SETVFPREGS fails to properly mark the VFP register set to be reloaded, because it undoes one of the effects of vfp_flush_hwstate(). Specifically vfp_flush_hwstate() sets thread->vfpstate.hard.cpu to an invalid CPU number, but vfp_set() overwrites this with the original CPU number, thereby rendering the hardware state as apparently "valid", even though the software state is more recent. Fix this by reverting the previous change. Cc: <stable@vger.kernel.org> Fixes: 8130b9d7b9d8 ("ARM: 7308/1: vfp: flush thread hwstate before copying ptrace registers") Acked-by: Will Deacon <will.deacon@arm.com> Tested-by: Simon Marchi <simon.marchi@ericsson.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> arch/arm/kernel/ptrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7b7eba0f3515fca3296b8881d583f7c1042f5226 Author: Florian Westphal <fw@strlen.de> Date: Wed Jun 1 02:04:44 2016 +0200 netfilter: x_tables: don't reject valid target size on some architectures Quoting John Stultz: In updating a 32bit arm device from 4.6 to Linus' current HEAD, I noticed I was having some trouble with networking, and realized that /proc/net/ip_tables_names was suddenly empty. Digging through the registration process, it seems we're catching on the: if (strcmp(t->u.user.name, XT_STANDARD_TARGET) == 0 && target_offset + sizeof(struct xt_standard_target) != next_offset) return -EINVAL; Where next_offset seems to be 4 bytes larger then the offset + standard_target struct size. next_offset needs to be aligned via XT_ALIGN (so we can access all members of ip(6)t_entry struct). This problem didn't show up on i686 as it only needs 4-byte alignment for u64, but iptables userspace on other 32bit arches does insert extra padding. Reported-by: John Stultz <john.stultz@linaro.org> Tested-by: John Stultz <john.stultz@linaro.org> Fixes: 7ed2abddd20cf ("netfilter: x_tables: check standard target size too") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/netfilter/x_tables.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6de7df8d1b1a45a07d6ecc6b4f94179e1e68f5ec Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 31 23:12:00 2016 +0200 ASoC: hdmi-codec: select CONFIG_HDMI SND_SOC_HDMI_CODEC can be enabled without HDMI support, leading to a link error: In function `hdmi_codec_hw_params': sound/soc/codecs/hdmi-codec.c:188: undefined reference to `hdmi_audio_infoframe_init' sound/built-in.o:(.debug_addr+0x1a5c0): undefined reference to `hdmi_audio_infoframe_init' This changes the Kconfig file to select HDMI, as the other codec using hdmi_audio_infoframe_init already does. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/Kconfig | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 8e1cc0e4bab7b44a55ea59d26683b618b34950bc Author: Peter Ujfalusi <peter.ujfalusi@ti.com> Date: Thu Jun 2 12:55:05 2016 +0300 ASoC: davinci-mcasp: Fix dra7 DMA offset when using CFG port The TX and RX offset is different for each serializers when using the CFG port for DMA access. When using the CFG port only one serializer can be used per direction so print error message and only configure the first serializer's offset. Reported-by: Misael Lopez Cruz <misael.lopez@ti.com> Suggested-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/davinci/davinci-mcasp.c | 56 ++++++++++++++++++++++++++++++++++++--- sound/soc/davinci/davinci-mcasp.h | 4 +-- 2 files changed, 54 insertions(+), 6 deletions(-) commit 05fb05a6ca25e02ad8c31bc440b3c4996864f379 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Thu Jun 2 09:24:06 2016 +0100 KVM: arm/arm64: vgic-new: Removel harmful BUG_ON When changing the active bit from an MMIO trap, we decide to explode if the intid is that of a private interrupt. This flawed logic comes from the fact that we were assuming that kvm_vcpu_kick() as called by kvm_arm_halt_vcpu() would not return before the called vcpu responded, but this is not the case, so we need to perform this wait even for private interrupts. Dropping the BUG_ON seems like the right thing to do. [ Commit message tweaked by Christoffer ] Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit afefc102df1bf5b75d7106771ecbe0ef546edc96 Author: Chen-Yu Tsai <wens@csie.org> Date: Sun May 29 15:04:44 2016 +0800 mmc: sunxi: Re-enable eMMC HS-DDR modes on Allwinner A80 Now the the HS-DDR mode clock timings have been corrected, we can re-enable these modes on the A80. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/sunxi-mmc.c | 5 ----- 1 file changed, 5 deletions(-) commit 0175249efa9310eed79650209600a75ace656bc9 Author: Chen-Yu Tsai <wens@csie.org> Date: Sun May 29 15:04:43 2016 +0800 mmc: sunxi: Fix DDR MMC timings for A80 The MMC clock timings were incorrectly calculated, when the conversion from delay value to delay phase was done. The 50M DDR and 50M DDR 8bit timings are off, and make eMMC DDR unusable. Unfortunately it seems different controllers on the same SoC have different timings. The new settings are taken from mmc2, which is commonly used with eMMC. The settings for the slower timing modes seem to work despite being wrong, so leave them be. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/sunxi-mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f741494363c6c90e6744117d2771bbdf0fb3c455 Author: Chen-Yu Tsai <wens@csie.org> Date: Sun May 29 15:04:42 2016 +0800 mmc: fix mmc mode selection for HS-DDR and higher When IS_ERR_VALUE was removed from the mmc core code, it was replaced with a simple not-zero check. This does not work, as the value checked is the return value for mmc_select_bus_width, which returns the set bit width on success. This made eMMC modes higher than HS-DDR unusable. Fix this by checking for a positive return value instead. Fixes: 287980e49ffc ("remove lots of IS_ERR_VALUE abuses") Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Acked-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Tested-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/core/mmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ed6aefed726a305bd36344e230d2a9e9301226fc Author: Vineet Gupta <vgupta@synopsys.com> Date: Tue May 31 16:35:09 2016 +0530 Revert "ARCv2: spinlock/rwlock/atomics: Delayed retry of failed SCOND with exponential backoff" This reverts commit e78fdfef84be13a5c2b8276e12203cdf24778596. The issue was fixed in hardware in HS2.1C release and there are no known external users of affected RTL so revert the whole delayed retry series ! Signed-off-by: Vineet Gupta <vgupta@synopsys.com> arch/arc/Kconfig | 5 - arch/arc/include/asm/atomic.h | 46 +------ arch/arc/include/asm/spinlock.h | 293 ---------------------------------------- 3 files changed, 4 insertions(+), 340 deletions(-) commit 819f3602dcbd6b021cd50e18f5d05da30bca5b07 Author: Vineet Gupta <vgupta@synopsys.com> Date: Tue May 31 16:33:29 2016 +0530 Revert "ARCv2: spinlock/rwlock: Reset retry delay when starting a new spin-wait cycle" This reverts commit b89aa12c177477e34caa722818536fb5d0bffd76. The issue was fixed in hardware in HS2.1C release and there are no known external users of affected RTL so revert the whole delayed retry series ! Signed-off-by: Vineet Gupta <vgupta@synopsys.com> arch/arc/include/asm/spinlock.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 42316a201a60be38b07db1ebc3a1633107ed7209 Author: Vineet Gupta <vgupta@synopsys.com> Date: Tue May 31 16:31:33 2016 +0530 Revert "ARCv2: spinlock/rwlock/atomics: reduce 1 instruction in exponential backoff" This reverts commit 10971638701dedadb58c88ce4d31c9375b224ed6. The issue was fixed in hardware in HS2.1C release and there are no known external users of affected RTL - so revert thw whole delayed retry series ! Signed-off-by: Vineet Gupta <vgupta@synopsys.com> arch/arc/include/asm/atomic.h | 3 ++- arch/arc/include/asm/spinlock.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 14b84e8654c89ed59f433654e6bb64c886d095cd Author: Arnd Bergmann <arnd@arndb.de> Date: Wed Jun 1 15:29:13 2016 +0200 qed: fix qed_fill_link() error handling gcc warns about qed_fill_link possibly accessing uninitialized data: drivers/net/ethernet/qlogic/qed/qed_main.c: In function 'qed_fill_link': drivers/net/ethernet/qlogic/qed/qed_main.c:1170:35: error: 'link_caps' may be used uninitialized in this function [-Werror=maybe-uninitialized] While this warning is only about the specific case of CONFIG_QED_SRIOV being disabled but the function getting called for a VF (which should never happen), another possibility is that qed_mcp_get_*() fails without returning data. This rearranges the code so we bail out in either of the two cases and print a warning instead of accessing the uninitialized data. The qed_link_output structure remains untouched in this case, but all callers first call memset() on it, so at least we are not leaking stack data then. As discussed, we also use a compile-time check to ensure we never use any of the VF code if CONFIG_QED_SRIOV is disabled, and the PCI device table is updated to no longer bind to virtual functions in that configuration. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_main.c | 45 ++++++++++++++++++++++------ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 4 ++- drivers/net/ethernet/qlogic/qede/qede_main.c | 2 ++ 3 files changed, 41 insertions(+), 10 deletions(-) commit bfa49cfc526201119623de6593d284c96563bede Author: Colin Ian King <colin.king@canonical.com> Date: Wed Jun 1 14:16:50 2016 +0100 net/ethoc: fix null dereference on error exit path priv is assigned to NULL however some of the early error exit paths to label 'free' dereference priv, causing a null pointer dereference. Move the label 'free' to just the free_netdev statement, and add a new exit path 'free2' for the error cases were clk_disable_unprepare needs calling before the final free. Fixes issue found by CoverityScan, CID#113260 Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/ethoc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 77154fd969df749f5bf83f639af19fca199de033 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Jun 2 12:42:32 2016 +1000 drm/nouveau/core: swap the order of imem/fb Fixes a use-after-free reported by valgrind and KASAN. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f045f459d925138fe7d6193a8c86406bda7e49da Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Jun 2 12:23:31 2016 +1000 drm/nouveau/fbcon: fix out-of-bounds memory accesses Reported by KASAN. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nouveau_fbcon.c | 1 + drivers/gpu/drm/nouveau/nv04_fbcon.c | 7 ++----- drivers/gpu/drm/nouveau/nv50_fbcon.c | 6 ++---- drivers/gpu/drm/nouveau/nvc0_fbcon.c | 6 ++---- 4 files changed, 7 insertions(+), 13 deletions(-) commit 383d0a419f8e63e3d65e706c3c515fa9505ce364 Author: Ben Skeggs <bskeggs@redhat.com> Date: Wed Jun 1 16:20:10 2016 +1000 drm/nouveau/gr/gf100-: update sm error decoding from gk20a nvgpu headers Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 37 +++++++++++++++++++------- 1 file changed, 28 insertions(+), 9 deletions(-) commit 9057c8d75018f05bbc769d7b4602de3b8b20f8aa Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri May 27 12:01:27 2016 +1000 drm/nouveau/ltc/gm107-: fix typo in the address of NV_PLTCG_LTC0_LTS0_INTR Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm107.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/gm200.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit bc9139d23f6b038e32bcd2dffdee70a8d76b3976 Author: Ben Skeggs <bskeggs@redhat.com> Date: Wed May 25 10:56:24 2016 +1000 drm/nouveau/bios/disp: fix handling of "match any protocol" entries As it turns out, a value of 0xff means "any protocol" and not "VGA". Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Cc: stable@vger.kernel.org drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/disp.h | 5 +++-- drivers/gpu/drm/nouveau/nvkm/engine/disp/gf119.c | 13 +++++-------- drivers/gpu/drm/nouveau/nvkm/engine/disp/nv50.c | 12 ++++-------- drivers/gpu/drm/nouveau/nvkm/subdev/bios/disp.c | 8 +++++--- 4 files changed, 17 insertions(+), 21 deletions(-) commit 6b7e9cde49691e04314342b7dce90c67ad567fcc Author: Martin K. Petersen <martin.petersen@oracle.com> Date: Thu May 12 22:17:34 2016 -0400 sd: Fix rw_max for devices that report an optimal xfer size For historic reasons, io_opt is in bytes and max_sectors in block layer sectors. This interface inconsistency is error prone and should be fixed. But for 4.4--4.7 let's make the unit difference explicit via a wrapper function. Fixes: d0eb20a863ba ("sd: Optimal I/O size is in bytes, not sectors") Cc: stable@vger.kernel.org # 4.4+ Reported-by: Fam Zheng <famz@redhat.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Andrew Patterson <andrew.patterson@hpe.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/sd.c | 8 ++++---- drivers/scsi/sd.h | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) commit fc14963f249f9aca1ac84c9c8659b4f35e0a315e Merge: 31843af 893e093 Author: David S. Miller <davem@davemloft.net> Date: Wed Jun 1 17:54:19 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Fix incorrect timestamp in nfnetlink_queue introduced when addressing y2038 safe timestamp, from Florian Westphal. 2) Get rid of leftover conntrack definition from the previous merge window, oneliner from Florian. 3) Make nf_queue handler pernet to resolve race on dereferencing the hook state structure with netns removal, from Eric Biederman. 4) Ensure clean exit on unregistered helper ports, from Taehee Yoo. 5) Restore FLOWI_FLAG_KNOWN_NH in nf_dup_ipv6. This got lost while generalizing xt_TEE to add packet duplication support in nf_tables, from Paolo Abeni. 6) Insufficient netlink NFTA_SET_TABLE attribute check in nf_tables_getset(), from Phil Turnbull. 7) Reject helper registration on duplicated ports via modparams. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 31843af4dc6acb71c4bd287afe7921c81b0b6fcb Merge: 6b15d66 6fe0412 Author: David S. Miller <davem@davemloft.net> Date: Wed Jun 1 17:53:19 2016 -0700 Merge tag 'mac80211-for-davem-2016-06-01' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 Johannes Berg says: ==================== Three small fixes for the current cycle: * missing netlink attribute check in hwsim wmediumd (Martin) * fast xmit structure alignment fix (Felix) * mesh path flush/synchronisation fix (Bob) ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit f881dd29bf31fb9e8072a3a47c834fa804f7d249 Merge: 56244ef b5de8d0 Author: Chris Mason <clm@fb.com> Date: Wed Jun 1 17:03:50 2016 -0700 Merge branch 'dev-replace-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.7 commit 86314751c7945fa0c67f459beeda2e7c610ca429 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Thu Jun 2 01:57:50 2016 +0200 ACPI / processor: Avoid reserving IO regions too early Roland Dreier reports that one of his systems cannot boot because of the changes made by commit ac212b6980d8 (ACPI / processor: Use common hotplug infrastructure). The problematic part of it is the request_region() call in acpi_processor_get_info() that used to run at module init time before the above commit and now it runs much earlier. Unfortunately, the region(s) reserved by it fall into a range the PCI subsystem attempts to reserve for AHCI IO BARs. As a result, the PCI reservation fails and AHCI doesn't work, while previously the PCI reservation would be made before acpi_processor_get_info() and it would succeed. That request_region() call, however, was overlooked by commit ac212b6980d8, as it is not necessary for the enumeration of the processors. It only is needed when the ACPI processor driver actually attempts to handle them which doesn't happen before loading the ACPI processor driver module. Therefore that call should have been moved from acpi_processor_get_info() into that module. Address the problem by moving the request_region() call in question out of acpi_processor_get_info() and use the observation that the region reserved by it is only needed if the FADT-based CPU throttling method is going to be used, which means that it should be sufficient to invoke it from acpi_processor_get_throttling_fadt(). Fixes: ac212b6980d8 (ACPI / processor: Use common hotplug infrastructure) Reported-by: Roland Dreier <roland@purestorage.com> Tested-by: Roland Dreier <roland@purestorage.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/acpi_processor.c | 9 --------- drivers/acpi/processor_throttling.c | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) commit 72ad679aa7182d23d269cbe4d655f7e129d3b057 Author: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Date: Mon May 16 12:45:36 2016 -0300 clk: nxp: Select MFD_SYSCON for creg driver Commit 378523d15003 ("clk: add lpc18xx creg clk driver") added a new clock driver but missed the proper MFD_SYSCON select. Fix it. Fixes: 378523d15003 ("clk: add lpc18xx creg clk driver") Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> drivers/clk/Kconfig | 1 + 1 file changed, 1 insertion(+) commit ae4185cd13a3017259d30149e606f8c83857acf2 Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Sun May 22 11:05:48 2016 +0200 MAINTAINERS: Add file patterns for clock device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: linux-clk@vger.kernel.org Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 7b2c17f829545df27a910e8d82e133c21c9a8c9c Author: Andrew Goodbody <andrew.goodbody@cambrionix.com> Date: Tue May 31 10:05:27 2016 -0500 usb: musb: Stop bulk endpoint while queue is rotated Ensure that the endpoint is stopped by clearing REQPKT before clearing DATAERR_NAKTIMEOUT before rotating the queue on the dedicated bulk endpoint. This addresses an issue where a race could result in the endpoint receiving data before it was reprogrammed resulting in a warning about such data from musb_rx_reinit before it was thrown away. The data thrown away was a valid packet that had been correctly ACKed which meant the host and device got out of sync. Signed-off-by: Andrew Goodbody <andrew.goodbody@cambrionix.com> Cc: stable@vger.kernel.org Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_host.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit f3eec0cf784e0d6c47822ca6b66df3d5812af7e6 Author: Andrew Goodbody <andrew.goodbody@cambrionix.com> Date: Tue May 31 10:05:26 2016 -0500 usb: musb: Ensure rx reinit occurs for shared_fifo endpoints shared_fifo endpoints would only get a previous tx state cleared out, the rx state was only cleared for non shared_fifo endpoints Change this so that the rx state is cleared for all endpoints. This addresses an issue that resulted in rx packets being dropped silently. Signed-off-by: Andrew Goodbody <andrew.goodbody@cambrionix.com> Cc: stable@vger.kernel.org Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_host.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit 04471eb8c3158c0ad9df4b24da845a63b2e8f23a Author: Bin Liu <b-liu@ti.com> Date: Tue May 31 10:05:25 2016 -0500 usb: musb: host: correct cppi dma channel for isoch transfer Incorrect cppi dma channel is referenced in musb_rx_dma_iso_cppi41(), which causes kernel NULL pointer reference oops later when calling cppi41_dma_channel_program(). Fixes: 069a3fd (usb: musb: Remove ifdefs for musb_host_rx in musb_host.c part1) Cc: <stable@vger.kernel.org> # v4.2+ Reported-by: Matwey V. Kornilov <matwey@sai.msu.ru> Acked-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 84ac5d1140f716a616522f952734e850448d2556 Author: Bin Liu <b-liu@ti.com> Date: Tue May 31 10:05:24 2016 -0500 usb: musb: only restore devctl when session was set in backup If the session bit was not set in the backup of devctl register, restoring devctl would clear the session bit. Therefor, only restore devctl register when the session bit was set in the backup. This solves the device enumeration failure in otg mode exposed by commit 56f487c (PM / Runtime: Update last_busy in rpm_resume). Cc: <stable@vger.kernel.org> # v4.2+ Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b6a619a883c38e3f01749afe13dd23395c94a058 Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:23 2016 -0500 usb: phy: Check initial state for twl6030 We need to check the state for the PHY with delayed_work as otherwise MUSB will get confused and idles immediately. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/phy/phy-twl6030-usb.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit aec373c1e5d87d791525a675fe726c11d64b84a8 Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:22 2016 -0500 usb: musb: Use normal module_init for 2430 glue There's no longer any need for custom initcall level for musb. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/omap2430.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 1c4d0b4e18068b49e0eb9bf5125ff25c6d1452cd Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:21 2016 -0500 usb: musb: Remove pm_runtime_set_irq_safe With the pull up being handled with delayed work, we can now finally remove pm_runtime_set_irq_safe that blocks the MUSB glue from idling. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_core.c | 6 ------ 1 file changed, 6 deletions(-) commit 87326e858448c40e32f142c0b8dcc59d7b27c641 Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:20 2016 -0500 usb: musb: Remove extra PM runtime calls from 2430 glue layer With PM runtime behaving, these are all now unnecessary. Doing pm_runtime_get(musb->controller) will keep the parent glue layer also active. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/omap2430.c | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) commit 12b7db2bf8b88938798c60416172b53225207b1f Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:19 2016 -0500 usb: musb: Return error value from musb_mailbox At least on n900 we have phy-twl4030-usb only generating cable interrupts, and then have a separate USB PHY. In order for musb to know the real cable status, we need to clear any cached state until musb is ready. Otherwise the cable status interrupts will get just ignored if the status does not change from the initial state. To do this, let's add a return value to musb_mailbox(), and reset cached linkstat to MUSB_UNKNOWN on error. Sorry to cause a bit of churn here, I should have added that already last time patching musb_mailbox(). Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/phy/phy-twl4030-usb.c | 14 ++++++++++---- drivers/usb/musb/musb_core.c | 7 ++++--- drivers/usb/musb/musb_core.h | 2 +- drivers/usb/musb/omap2430.c | 8 +++++--- drivers/usb/phy/phy-twl6030-usb.c | 12 +++++++++--- include/linux/usb/musb.h | 5 +++-- 6 files changed, 32 insertions(+), 16 deletions(-) commit a118df07f5b19e4879fd67e98a69f4644136877f Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:18 2016 -0500 usb: musb: Don't set d+ high before enable for 2430 glue layer At least 2430 glue layer pulls d+ high on start up even if there are no gadgets configured. This is bad at least for anything using a separate battery charger chip as it can confuse the charger detection. Let's fix the issue by removing the bogus glue layer code tinkering with the SESSION bit. As pointed out Bin Liu <b-liu@ti.com> and Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>, the SESSION bit just starts host mode if ID pin is grounded, and starts the srp is ID pin is floating. So without the ID pin changing, it's unable to force musb mode to anything. And just for starting a host mode, things work fine without this code. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/omap2430.c | 11 ----------- 1 file changed, 11 deletions(-) commit 4dc2fe7a94d07c6148eea5722e23d4c1dbecc9e3 Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:17 2016 -0500 usb: musb: Remove try_idle for 2430 glue layer This is no longer needed with PM runtime at least for 2430 glue. We can now rely only on PM runtime and cable detection. The other glue layers can probably remove try_idle too, but that needs to be tested for each platform before doing it. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/omap2430.c | 91 --------------------------------------------- 1 file changed, 91 deletions(-) commit a83e17d0f73b2c53ffd40773c227bf4b901365d8 Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:16 2016 -0500 usb: musb: Improve PM runtime and phy handling for 2430 glue layer This simplifies things and allows idling both MUSB and PHY when nothing is configured. Let's just return early from PM runtime if musb is not yet initialized. Let's also warn if PHY is not configured. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/omap2430.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit 21f77beece2b6f479648192a87ededd2fb8f1716 Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:15 2016 -0500 usb: musb: Handle cable status better for 2430 glue layer We may have drivers loaded but no configured gadgets and MUSB may be in host mode. If gadgets are configured during host mode, PM runtime will get confused. Disable PM runtime from gadget state, and do it based on the cable and last state. Note that we may get multiple cable events, so we need to keep track of the power state. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/omap2430.c | 68 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 60 insertions(+), 8 deletions(-) commit 517bafffcaf8f882299a74e310082e7b6b2288ad Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:14 2016 -0500 usb: musb: Use delayed for musb_gadget_pullup We have MUSB setting pm_runtime_irq_safe with the following commits: 30a70b026b4c ("usb: musb: fix obex in g_nokia.ko causing kernel panic") 3e43a0725637 ("usb: musb: core: add pm_runtime_irq_safe()") Let's fix things to use delayed work so we can remove the pm_runtime_irq_safe. Note that we may want to set this up in a generic way in the gadget framework eventually. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_core.h | 1 + drivers/usb/musb/musb_gadget.c | 24 ++++++++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) commit 30647217909ea8ce4d8f4905b15fa1bb09d80859 Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:13 2016 -0500 usb: musb: Remove conditional PM runtime calls for musb_gadget The conditional use of PM runtime does not work properly for musb gadget. On cable disconnect we may not get any USB_EVENT_NONE leaving the PM runtime call unpaired. Let's fix the issue by making sure the PM runtime calls are paired within the functions. The glue layer will take care of the rest. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_gadget.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit f730f205cc5116b6edfedf568fdfbb4935248e8e Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:12 2016 -0500 usb: musb: Split PM runtime between wrapper IP and musb core Let's not tinker with the PM runtime of musb core from the omap2430 wrapper. This allows us to initialize PM runtime for musb core later on instead of doing it in stages. And omap2430 wrapper has no need to for accessing musb core at this point. Note that this does not remove all the PM runtime calls from the glue layer, those will get removed in a later patch. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_core.c | 39 +++++++++++++++++---------------------- drivers/usb/musb/omap2430.c | 10 ---------- 2 files changed, 17 insertions(+), 32 deletions(-) commit 7099dbc5b3eb9f52efdb78406826f7463f07d71c Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:11 2016 -0500 usb: musb: Update to use PM runtime autosuspend Let's make the PM runtime use the standard autosuspend calls. Commit 5de85b9d57ab ("PM / runtime: Re-init runtime PM states at probe error and driver unbind") means we must pair use_autosuspend with dont_use_autosuspend and then use put_sync to properly idle the device. Note that we'll be removing the PM runtime calls from the glue layer to the MUSB core in the next patch. And we can also remove the pointless FIXME comment now. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_core.c | 9 ++++++--- drivers/usb/musb/musb_gadget.c | 3 ++- drivers/usb/musb/omap2430.c | 5 +++-- 3 files changed, 11 insertions(+), 6 deletions(-) commit 302f6802395f58dceb225b1c9e603de72f09b8b0 Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:10 2016 -0500 usb: musb: Remove unnecessary shutdown function We have remove() already calling shutdown(), so let's drop it and move the code to remove(). No code changes, we'll drop the the FIXME in the following patch with more clean-up. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_core.c | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) commit 7e1704dcf6b0a895f99e386ccc9ca631117e6d5b Author: Tony Lindgren <tony@atomide.com> Date: Tue May 31 10:05:09 2016 -0500 usb: musb: Fix idling after host mode by increasing autosuspend delay Looks like at least 2430 glue won't idle reliably with the 200 ms autosuspend delay. This causes deeper idle states being blocked for the whole SoC when disconnecting OTG A cable. Increasing the delay to 500 ms seems to idle both MUSB and the PHY reliably. This is probably because of time needed by the hardware based negotiation between MUSB and the PHY. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit a60d541a2d402c8645d5bb2ec8dabe474b66e018 Author: Hans de Goede <hdegoede@redhat.com> Date: Tue May 31 10:05:08 2016 -0500 usb: musb: sunxi: Set state to A_WAIT_VRISE when enabling Vbus When the board is powering attached usb devices via the otg port sometimes / on some devices it takes slightly too long for the Vbus detection code in phy-sun4i-usb.c to signal that Vbus is high after enabling Vbus and the musb hardware signals a MUSB_INTR_VBUSERROR interrupt. This commit sets the otg state to A_WAIT_VRISE upon enabling Vbus making musb_stage0_irq() ignore the first VBUSERR_RETRY_COUNT VBUSERROR interrupts, fixing connection issues in these cases. Signed-off-by: Hans de Goede <hdegoede@redhat.com> [b-liu@ti.com: revise subject prefix] Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/sunxi.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 37f30d887a41775066b78f8c0fa9a4929638db07 Author: Hans de Goede <hdegoede@redhat.com> Date: Tue May 31 10:05:07 2016 -0500 usb: musb: sunxi: Add set_mode platform function Move the mode handling to the platform_set_mode callback. Signed-off-by: Hans de Goede <hdegoede@redhat.com> [b-liu@ti.com: revise subject prefix] Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/sunxi.c | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) commit b6a6631dc322b1ca187752a77bc5f74155017ecb Author: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Date: Tue May 31 10:05:06 2016 -0500 usb: musb: host: make musb_tx_dma_set_mode_*() *void* Now that the DMA engine check was moved to musb_tx_dma_porgram(), both musb_tx_dma_set_mode_cppi_tusb() and musb_tx_dma_set_mode_mentor() always return 0, so we can make both these functions *void*. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> [b-liu@ti.com: revise subject prefix] Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_host.c | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) commit 858b9be7fda1d4232e8f06d70e4793bc21583ffc Author: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Date: Tue May 31 10:05:05 2016 -0500 usb: musb: host: move DMA engine check from musb_tx_dma_set_mode_cppi_tusb() to its caller Commit 754fe4a92c07 ("usb: musb: Remove ifdefs for TX DMA for musb_host.c") looks incomplete: the DMA engine checks are done outside the Mentor/UX500 handler but inside the CPPI/TUSB handler. Move the checks out of the CPPI/ TUSB handler into its caller, musb_tx_dma_program(). Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> [b-liu@ti.com: revise subject prefix] Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_host.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit dbac5d07d13e330e6706813c9fde477140fb5d80 Author: Bin Liu <b-liu@ti.com> Date: Tue May 31 10:05:04 2016 -0500 usb: musb: host: don't start next rx urb if current one failed urb->status is set when endpoint csr RXSTALL, H_ERROR, DATAERROR or INCOMPRX bit is set. Those bits mean a broken pipe, so don't start next urb when any of these bits is set by checking urb->status. To minimize the risk of regression, only do so for RX, until we have a test case to understand the behavior of TX. The patch fixes system freeze issue caused by repeatedly invoking RX ISR while removing a usb uart device connected to a hub, in which case the hub has no chance to report the disconnect event due to the kernel is busy in processing the RX interrupt flooding. Fix checkpatch complaint (qh != NULL) as while. Reported-by: Max Uvarov <muvarov@gmail.com> Tested-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_host.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit b5801212229f6ca5c418c68cd1e0548f4b53f624 Author: Bin Liu <b-liu@ti.com> Date: Tue May 31 10:05:03 2016 -0500 usb: musb: host: clear rxcsr error bit if set The MUSB Programming Guide states that the driver should clear RXCSR bit2 when the controller sets the bit. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/musb/musb_host.c | 3 +++ 1 file changed, 3 insertions(+) commit d95815ba6a0f287213118c136e64d8c56daeaeab Author: Hans de Goede <hdegoede@redhat.com> Date: Wed Jun 1 21:01:29 2016 +0200 USB: xhci: Add broken streams quirk for Frescologic device id 1009 I got one of these cards for testing uas with, it seems that with streams it dma-s all over the place, corrupting memory. On my first tests it managed to dma over the BIOS of the motherboard somehow and completely bricked it. Tests on another motherboard show that it does work with streams disabled. Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-pci.c | 5 +++++ 1 file changed, 5 insertions(+) commit b9610e74586fd183b2d1c7fe5316bce8b6cc534f Author: Stephen Boyd <sboyd@codeaurora.org> Date: Wed Jun 1 14:56:57 2016 -0700 clk: Remove CLK_IS_ROOT flag Now that we've gotten rid of all the users of this flag we can retire the number, leaving a slot open for a future flag user. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> include/linux/clk-provider.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 85e3990bea49a50cb389015fea564b58899ab7c1 Author: Alan Stern <stern@rowland.harvard.edu> Date: Thu May 19 16:29:50 2016 -0400 USB: EHCI: avoid undefined pointer arithmetic and placate UBSAN Several people have reported that UBSAN doesn't like the pointer arithmetic in ehci_hub_control(): u32 __iomem *status_reg = &ehci->regs->port_status[ (wIndex & 0xff) - 1]; u32 __iomem *hostpc_reg = &ehci->regs->hostpc[(wIndex & 0xff) - 1]; If wIndex is 0 (and it often is), these calculations underflow and UBSAN complains. According to the C standard, pointer computations leading to locations outside the bounds of an array object (other than 1 position past the end) are undefined. In this case, the compiler would be justified in concluding the wIndex can never be 0 and then optimizing away the tests for !wIndex that occur later in the subroutine. (Although, since ehci->regs->port_status and ehci->regs->hostpc are both 0-length arrays and are thus GCC extensions to the C standard, it's not clear what the compiler is really allowed to do.) At any rate, we can avoid all these difficulties, at the cost of making the code slightly longer, by not decrementing the index when it is equal to 0. The runtime effect is minimal, and anyway ehci_hub_control() is not on a hot path. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> Reported-by: Meelis Roos <mroos@linux.ee> Reported-by: Martin_MOKREJÅ <mmokrejs@gmail.com> Reported-by: "Navin P.S" <navinp1912@gmail.com> CC: Andrey Ryabinin <ryabinin.a.a@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/ehci-hub.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) commit 593224ea77b1ca842f45cf76f4deeef44dfbacd1 Author: Hans de Goede <hdegoede@redhat.com> Date: Tue May 31 09:18:03 2016 +0200 USB: uas: Fix slave queue_depth not being set Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") removed the scsi_change_queue_depth() call from uas_slave_configure() assuming that the slave would inherit the host's queue_depth, which that commit sets to the same value. This is incorrect, without the scsi_change_queue_depth() call the slave's queue_depth defaults to 1, introducing a performance regression. This commit restores the call, fixing the performance regression. Cc: stable@vger.kernel.org Fixes: 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") Reported-by: Tom Yan <tom.ty89@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/storage/uas.c | 1 + 1 file changed, 1 insertion(+) commit 5fc363232ae76805d7f570dbb61758095a540591 Author: Tom Yan <tom.ty89@gmail.com> Date: Tue May 24 03:28:44 2016 +0800 uas: remove can_queue set in host template Commit 198de51dbc34 ("USB: uas: Limit qdepth at the scsi-host level") made qdepth limit set in host template (`.can_queue = MAX_CMNDS`) redundant. Removing it to avoid confusion. Signed-off-by: Tom Yan <tom.ty89@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/storage/uas.c | 1 - 1 file changed, 1 deletion(-) commit 32cb0b37098f4beeff5ad9e325f11b42a6ede56c Author: Hans de Goede <hdegoede@redhat.com> Date: Thu May 19 17:12:20 2016 +0200 usb: quirks: Add no-lpm quirk for Acer C120 LED Projector The Acer C120 LED Projector is a USB-3 connected pico projector which takes both its power and video data from USB-3. In combination with some hubs this device does not play well with lpm, so disable lpm for it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) commit 81099f97bd31e25ff2719a435b1860fc3876122f Author: Hans de Goede <hdegoede@redhat.com> Date: Thu May 19 17:12:19 2016 +0200 usb: quirks: Fix sorting Properly sort all the entries by vendor id. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/core/quirks.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 757de492f2d5711d4f5b386eb9bdd5cdc99eb30e Author: Mathias Nyman <mathias.nyman@linux.intel.com> Date: Wed Jun 1 18:09:10 2016 +0300 xhci: fix platform quirks overwrite regression in 4.7-rc1 commit b1c127ae990b ("usb: host: xhci: plat: make use of new methods in xhci_plat_priv") sets xhci->quirks before calling xhci_gen_setup(), which will overwrite them. Don't overwite the quirks, just add the new ones Fixes: b1c127ae990b ("usb: host: xhci: plat: make use of new methods in xhci_plat_priv") Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Cc: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de95c40d5beaa47f6dc8fe9ac4159b4672b51523 Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Date: Wed Jun 1 18:09:09 2016 +0300 usb: xhci-plat: properly handle probe deferral for devm_clk_get() On some platforms, the clocks might be registered by a platform driver. When this is the case, the clock platform driver may very well be probed after xhci-plat, in which case the first probe() invocation of xhci-plat will receive -EPROBE_DEFER as the return value of devm_clk_get(). The current code handles that as a normal error, and simply assumes that this means that the system doesn't have a clock for the XHCI controller, and continues probing without calling clk_prepare_enable(). Unfortunately, this doesn't work on systems where the XHCI controller does have a clock, but that clock is provided by another platform driver. In order to fix this situation, we handle the -EPROBE_DEFER error condition specially, and abort the XHCI controller probe(). It will be retried later automatically, the clock will be available, devm_clk_get() will succeed, and the probe() will continue with the clock prepared and enabled as expected. In practice, such issue is seen on the ARM64 Marvell 7K/8K platform, where the clocks are registered by a platform driver. Cc: <stable@vger.kernel.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-plat.c | 3 +++ 1 file changed, 3 insertions(+) commit 3425aa03f484d45dc21e0e791c2f6c74ea656421 Author: Mathias Nyman <mathias.nyman@linux.intel.com> Date: Wed Jun 1 18:09:08 2016 +0300 xhci: Fix handling timeouted commands on hosts in weird states. If commands timeout we mark them for abortion, then stop the command ring, and turn the commands to no-ops and finally restart the command ring. If the host is working properly the no-op commands will finish and pending completions are called. If we notice the host is failing, driver clears the command ring and completes, deletes and frees all pending commands. There are two separate cases reported where host is believed to work properly but is not. In the first case we successfully stop the ring but no abort or stop command ring event is ever sent and host locks up. The second case is if a host is removed, command times out and driver believes the ring is stopped, and assumes it will be restarted, but actually ends up timing out on the same command forever. If one of the pending commands has the xhci->mutex held it will block xhci_stop() in the remove codepath which otherwise would cleanup pending commands. Add a check that clears all pending commands in case host is removed, or we are stuck timing out on the same command. Also restart the command timeout timer when stopping the command ring to ensure we recive an ring stop/abort event. Cc: stable <stable@vger.kernel.org> Tested-by: Joe Lawrence <joe.lawrence@stratus.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-ring.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) commit 27a41a83ec54d0edfcaf079310244e7f013a7701 Author: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Date: Wed Jun 1 18:09:07 2016 +0300 xhci: Cleanup only when releasing primary hcd Under stress occasions some TI devices might not return early when reading the status register during the quirk invocation of xhci_irq made by usb_hcd_pci_remove. This means that instead of returning, we end up handling this interruption in the middle of a shutdown. Since xhci->event_ring has already been freed in xhci_mem_cleanup, we end up accessing freed memory, causing the Oops below. commit 8c24d6d7b09d ("usb: xhci: stop everything on the first call to xhci_stop") is the one that changed the instant in which we clean up the event queue when stopping a device. Before, we didn't call xhci_mem_cleanup at the first time xhci_stop is executed (for the shared HCD), instead, we only did it after the invocation for the primary HCD, much later at the removal path. The code flow for this oops looks like this: xhci_pci_remove() usb_remove_hcd(xhci->shared) xhci_stop(xhci->shared) xhci_halt() xhci_mem_cleanup(xhci); // Free the event_queue usb_hcd_pci_remove(primary) xhci_irq() // Access the event_queue if STS_EINT is set. Crash. xhci_stop() xhci_halt() // return early The fix modifies xhci_stop to only cleanup the xhci data when releasing the primary HCD. This way, we still have the event_queue configured when invoking xhci_irq. We still halt the device on the first call to xhci_stop, though. I could reproduce this issue several times on the mainline kernel by doing a bind-unbind stress test with a specific storage gadget attached. I also ran the same test over-night with my patch applied and didn't observe the issue anymore. [ 113.334124] Unable to handle kernel paging request for data at address 0x00000028 [ 113.335514] Faulting instruction address: 0xd00000000d4f767c [ 113.336839] Oops: Kernel access of bad area, sig: 11 [#1] [ 113.338214] SMP NR_CPUS=1024 NUMA PowerNV [c000000efe47ba90] c000000000720850 usb_hcd_irq+0x50/0x80 [c000000efe47bac0] c00000000073d328 usb_hcd_pci_remove+0x68/0x1f0 [c000000efe47bb00] d00000000daf0128 xhci_pci_remove+0x78/0xb0 [xhci_pci] [c000000efe47bb30] c00000000055cf70 pci_device_remove+0x70/0x110 [c000000efe47bb70] c00000000061c6bc __device_release_driver+0xbc/0x190 [c000000efe47bba0] c00000000061c7d0 device_release_driver+0x40/0x70 [c000000efe47bbd0] c000000000619510 unbind_store+0x120/0x150 [c000000efe47bc20] c0000000006183c4 drv_attr_store+0x64/0xa0 [c000000efe47bc60] c00000000039f1d0 sysfs_kf_write+0x80/0xb0 [c000000efe47bca0] c00000000039e14c kernfs_fop_write+0x18c/0x1f0 [c000000efe47bcf0] c0000000002e962c __vfs_write+0x6c/0x190 [c000000efe47bd90] c0000000002eab40 vfs_write+0xc0/0x200 [c000000efe47bde0] c0000000002ec85c SyS_write+0x6c/0x110 [c000000efe47be30] c000000000009260 system_call+0x38/0x108 Signed-off-by: Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com> Cc: Roger Quadros <rogerq@ti.com> Cc: joel@jms.id.au Cc: stable@vger.kernel.org Reviewed-by: Roger Quadros <rogerq@ti.com> Cc: <stable@vger.kernel.org> #v4.3+ Tested-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/host/xhci-ring.c | 3 ++- drivers/usb/host/xhci.c | 27 +++++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) commit 3c7f4f54578b983c964eb992229a7dd153ce5ee0 Author: Stephen Boyd <sboyd@codeaurora.org> Date: Wed Jun 1 14:52:54 2016 -0700 clk: microchip: Remove CLK_IS_ROOT This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Cc: Purna Chandra Mandal <purna.mandal@microchip.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: <linux-mips@linux-mips.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> drivers/clk/microchip/clk-pic32mzda.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 3fb9c41286e594d52d23ca58404c69a7e2c39c41 Author: Stephen Boyd <sboyd@codeaurora.org> Date: Tue Apr 19 18:31:12 2016 -0700 powerpc/512x: clk: Remove CLK_IS_ROOT This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Cc: Gerhard Sittig <gsi@denx.de> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> arch/powerpc/platforms/512x/clock-commonclk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6399232feb64816b28e2a01ee874ace1a6975c99 Merge: 1a695a9 50c763f Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Wed Jun 1 14:49:12 2016 -0700 Merge tag 'fixes-for-v4.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-linus Felipe writes: Here's the first set of fixes for v4.7-rc cycle. Nothing extra fancy this time around. Patches range from MS OS Descriptor usage fixes, to Clear Stall EP command fix on dwc3, to some f_fs fixes and out of bounds accesses on renesas driver. commit b52fc2183f40170489692852fd66d8750cbaa324 Author: Stephen Boyd <sboyd@codeaurora.org> Date: Tue Apr 19 18:36:55 2016 -0700 vexpress/spc: Remove CLK_IS_ROOT This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Acked-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> arch/arm/mach-vexpress/spc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 540c26087bfbad6ea72758b76b16ae6282a73fea Author: Cameron Gutman <aicommander@gmail.com> Date: Wed Jun 1 11:32:51 2016 -0700 Input: xpad - fix rumble on Xbox One controllers with 2015 firmware Xbox One controllers that shipped with or were upgraded to the 2015 firmware discard the current rumble packets we send. This patch changes the Xbox One rumble packet to a form that both the newer and older firmware will accept. It is based on changes made to support newer Xbox One controllers in the SteamOS brewmaster-4.1 kernel branch. Signed-off-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/joystick/xpad.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a9bf7d60c273763d3f0f4f991bd96fbc411bfd73 Merge: d3922b6 2ea9f31 Author: Dave Airlie <airlied@redhat.com> Date: Thu Jun 2 06:57:20 2016 +1000 Merge tag 'mediatek-drm-fixes-2016-06-01' of git://git.pengutronix.de/git/pza/linux into drm-fixes mediatek-drm fixes - remove an invalid, unreachable error message and NULL pointer dereference - remove a spurious drm_connector_unregister call from the DSI driver * tag 'mediatek-drm-fixes-2016-06-01' of git://git.pengutronix.de/git/pza/linux: drm/mediatek: mtk_dsi: Remove spurious drm_connector_unregister drm/mediatek: mtk_dpi: remove invalid error message commit 7f9bef9debafcb767d00efb177d0f2edd4940eab Author: Lv Zheng <lv.zheng@intel.com> Date: Wed Jun 1 11:03:20 2016 +0800 ACPICA / Hardware: Fix old register check in acpi_hw_get_access_bit_width() The address check in acpi_hw_get_access_bit_width() should be byte width based, not bit width based. This patch fixes this mistake. For those who want to review acpi_hw_access_bit_width(), here is the concerns and the design details of the function: It is supposed that the GAS Address field should be aligned to the byte width indicated by the GAS AccessSize field. Similarly, for the old non GAS register, it is supposed that its Address should be aligned to its Length. For the "AccessSize = 0 (meaning ANY)" case, we try to return the maximum instruction width (64 for MMIO or 32 for PIO) or the user expected access bit width (64 for acpi_read()/acpi_write() or 32 for acpi_hw_read()/ acpi_hw_write()) and it is supposed that the GAS Address field should always be aligned to the maximum expected access bit width (otherwise it can't be accessed using ANY access bit width). The problem is in acpi_tb_init_generic_address(), where the non GAS register's Length is converted into the GAS BitWidth field, its Address is converted into the GAS Address field, and the GAS AccessSize field is left 0 but most of the registers actually cannot be accessed using "ANY" accesses. As a conclusion, when AccessSize = 0 (ANY), the Address should either be aligned to the BitWidth (wrong conversion) or aligned to 32 for PIO or 64 for MMIO (real GAS). Since currently, max_bit_width is 32, then: 1. BitWidth for the wrong conversion is 8,16,32; and 2. The Address of the real GAS should always be aligned to 8,16,32. The address alignment check to exclude false matched real GAS is not necessary. Thus this patch fixes the issue by removing the address alignment check. On the other hand, we in fact could use a simpler check of "reg->bit_width < max_bit_width" to exclude the "BitWidth=64 PIO" case that may be issued from acpi_read()/acpi_write() in the future. Fixes: b314a172ee96 (ACPICA: Hardware: Add optimized access bit width support) Reported-and-tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Acked-by: Mike Marshall <hubcap@omnibond.com> Suggested-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/acpica/hwregs.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) commit b9af694802b40d50852f1949ec94d4dcc43d7355 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Wed Jun 1 22:36:26 2016 +0200 cpufreq: Fix clamp_val() usage in cpufreq_driver_fast_switch() The return value of clamp_val() has to be stored actually. Fixes: b7898fda5bc7 (cpufreq: Support for fast frequency switching) Reported-by: Steve Muckle <steve.muckle@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 719af93ab78eaaccdb2fa727268da6b477804bfb Merge: ebb8cb2 5edf673 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed Jun 1 12:38:50 2016 -0700 Merge tag 'pinctrl-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: "Here are three pin control fixes for v4.7. Not much, and just driver fixes: - add device tree matches to MAINTAINERS - inversion bug in the Nomadik driver - dual edge handling bug in the mediatek driver" * tag 'pinctrl-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: mediatek: fix dual-edge code defect MAINTAINERS: Add file patterns for pinctrl device tree bindings pinctrl: nomadik: fix inversion of gpio direction commit ebb8cb2bae0344ef45cc173cdf5402ec91198abd Merge: 6b15d66 b02da6f Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed Jun 1 12:32:25 2016 -0700 Merge tag 'dma-buf-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf Pull dma-buf updates from Sumit Semwal: - use of vma_pages instead of explicit computation - DocBook and headerdoc updates for dma-buf * tag 'dma-buf-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sumits/dma-buf: dma-buf: use vma_pages() fence: add missing descriptions for fence doc: update/fixup dma-buf related DocBook reservation: add headerdoc comments dma-buf: headerdoc fixes commit dfc2507b26af22b0bbc85251b8545b36d8bc5d72 Author: John Stultz <john.stultz@linaro.org> Date: Wed Jun 1 11:53:26 2016 -0700 time: Make settimeofday error checking work again In commit 86d3473224b0 some of the checking for a valid timeval was subtley changed which caused -EINVAL to be returned whenever the timeval was null. However, it is possible to set the timezone data while specifying a NULL timeval, which is usually done to handle systems where the RTC keeps local time instead of UTC. Thus the patch causes such systems to have the time incorrectly set. This patch addresses the issue by handling the error conditionals in the same way as was done previously. Fixes: 86d3473224b0 "time: Introduce do_sys_settimeofday64()" Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: John Stultz <john.stultz@linaro.org> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Baolin Wang <baolin.wang@linaro.org> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Shuah Khan <shuahkh@osg.samsung.com> Link: http://lkml.kernel.org/r/1464807207-16530-2-git-send-email-john.stultz@linaro.org Signed-off-by: Thomas Gleixner <tglx@linutronix.de> include/linux/timekeeping.h | 3 +++ 1 file changed, 3 insertions(+) commit 10fdf8513f776c8b2588bb7b924fb243ae2462d6 Author: Will Deacon <will.deacon@arm.com> Date: Wed Jun 1 18:48:20 2016 +0100 arm64: unistd32.h: wire up missing syscalls for compat tasks We're missing entries for mlock2, copy_file_range, preadv2 and pwritev2 in our compat syscall table, so hook them up. Only the last two need compat wrappers. Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/include/asm/unistd.h | 2 +- arch/arm64/include/asm/unistd32.h | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 5a5e78cd706ce0577ed6356634a34552c866cc10 Author: Caesar Wang <wxt@rock-chips.com> Date: Wed May 18 23:01:39 2016 +0800 thermal: add the note for set_trip_temp Fixes commit 60f9ce3ada53 ("thermal: of-thermal: allow setting trip_temp on hardware") Signed-off-by: Caesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Signed-off-by: Zhang Rui <rui.zhang@intel.com> include/linux/thermal.h | 2 ++ 1 file changed, 2 insertions(+) commit f840ab18bdf2e415dac21d09fbbbd2873111bd48 Author: Lukasz Luba <lukasz.luba@arm.com> Date: Tue May 31 11:32:02 2016 +0100 thermal: cpu_cooling: fix improper order during initialization The freq_table array is not populated before calling thermal_of_cooling_register. The code which populates the freq table was introduced in commit f6859014. This should be done before registering new thermal cooling device. The log shows effects of this wrong decision. [ 2.172614] cpu cpu1: Failed to get voltage for frequency 1984518656000: -34 [ 2.220863] cpu cpu0: Failed to get voltage for frequency 1984524416000: -34 Cc: <stable@vger.kernel.org> # 3.19+ Fixes: f6859014c7e7 ("thermal: cpu_cooling: Store frequencies in descending order") Signed-off-by: Lukasz Luba <lukasz.luba@arm.com> Acked-by: Javi Merino <javi.merino@arm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Zhang Rui <rui.zhang@intel.com> drivers/thermal/cpu_cooling.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 2ea9f31799adce35d8c9a0bb3bc1d2b515702c6f Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Thu May 26 16:08:18 2016 +0200 drm/mediatek: mtk_dsi: Remove spurious drm_connector_unregister Connectors are unregistered by mtk_drm_drv via drm_connector_unregister_all(). Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/mediatek/mtk_dsi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 515ba6a59cbab44c989f25b2518b82491deb832e Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Thu May 26 17:19:39 2016 +0200 drm/mediatek: mtk_dpi: remove invalid error message Do not try to dereference dpi if it is NULL. Since dpi can never be NULL when mtk_dpi_set_display_mode() is called, remove the message. Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/mediatek/mtk_dpi.c | 5 ----- 1 file changed, 5 deletions(-) commit a80e803a2ae4efa5efbcfa97dcbbc48d15226cf9 Author: Benjamin Tissoires <benjamin.tissoires@redhat.com> Date: Tue May 31 17:31:15 2016 +0200 HID: multitouch: Add MT_QUIRK_NOT_SEEN_MEANS_UP to Surface Pro 3 The firmware found in the touch screen of an SP3 is buggy and may miss to send lift off reports for contacts. Try to work around that issue by using MT_QUIRK_NOT_SEEN_MEANS_UP. based on a patch from: Daniel Martin <consume.noise@gmail.com> Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> drivers/hid/hid-multitouch.c | 5 +++++ 1 file changed, 5 insertions(+) commit 58a2ab3af722550b2e4e8155eb08660e16c20ee6 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Mon Apr 25 12:04:54 2016 +0300 drm: atmel-hlcdc: fix a NULL check If kmalloc() returned NULL we would end up dereferencing "state" a couple lines later. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit c2e4c99444f418b3c3b13b58dad4d951aa2f7f1b Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Fri Apr 22 21:28:32 2016 +0200 drm: atmel-hlcdc: fix atmel_hlcdc_crtc_reset() implementation Reset crtc->state to NULL after freeing the state object and call __drm_atomic_helper_crtc_destroy_state() helper instead of manually calling drm_property_unreference_blob(). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit ed596a4a88bd161f868ccba078557ee7ede8a6ef Author: Oliver Neukum <oneukum@suse.com> Date: Tue May 31 14:48:15 2016 +0200 HID: elo: kill not flush the work Flushing a work that reschedules itself is not a sensible operation. It needs to be killed. Failure to do so leads to a kernel panic in the timer code. CC: stable@vger.kernel.org Signed-off-by: Oliver Neukum <ONeukum@suse.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> drivers/hid/hid-elo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f6973c09490c919398fc87d9c6bec9c0b670c4c4 Author: Yan, Zheng <zyan@redhat.com> Date: Fri May 20 16:57:29 2016 +0800 ceph: use i_version to check validity of fscache Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/cache.c | 3 +++ 1 file changed, 3 insertions(+) commit f7f7e7a0635dedd5064fba255cb3facfa87b06d6 Author: Yan, Zheng <zyan@redhat.com> Date: Wed May 18 20:31:55 2016 +0800 ceph: improve fscache revalidation There are several issues in fscache revalidation code. - In ceph_revalidate_work(), fscache_invalidate() is called when fscache_check_consistency() return 0. This is complete wrong because 0 means cache is valid. - Handle_cap_grant() calls ceph_queue_revalidate() if client already has CAP_FILE_CACHE. This code is confusing. Client should revalidate the cache each time it got CAP_FILE_CACHE anew. - In Handle_cap_grant(), fscache_invalidate() is called if MDS revokes CAP_FILE_CACHE. This is inconsistency with the case that inode get evicted. In the later case, the cache is not discarded. Client may use the cache when inode is reloaded. This patch moves the fscache revalidation into ceph_get_caps(). Client revalidates the cache after it gets CAP_FILE_CACHE. i_rdcache_gen should keep constance while CAP_FILE_CACHE is used. If i_fscache_gen is not equal to i_rdcache_gen, client needs to check cache's consistency. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/cache.c | 84 ++++++++++++--------------------------------------------- fs/ceph/cache.h | 20 +++++++++++--- fs/ceph/caps.c | 16 +++++------ fs/ceph/super.h | 4 +-- 4 files changed, 41 insertions(+), 83 deletions(-) commit 46b59b2be05a71d80d76883d2f495f182d768f47 Author: Yan, Zheng <zyan@redhat.com> Date: Wed May 18 15:25:03 2016 +0800 ceph: disable fscache when inode is opened for write All other filesystems do not add dirty pages to fscache. They all disable fscache when inode is opened for write. Only ceph adds dirty pages to fscache, but the code is buggy. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/addr.c | 2 -- fs/ceph/cache.c | 54 ++++++++++++++++++++++++++++++++++++++---------------- fs/ceph/cache.h | 30 ++++++++++++------------------ fs/ceph/file.c | 19 ++----------------- 4 files changed, 52 insertions(+), 53 deletions(-) commit 1464975816c79a7cd28dc314384f060a122a9d55 Author: Yan, Zheng <zyan@redhat.com> Date: Fri May 20 15:41:20 2016 +0800 ceph: avoid unnecessary fscache invalidation/revlidation ceph_fill_file_size() has already called ceph_fscache_invalidate() if it return true. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/caps.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 368e35857dfab264f512d040c4486c9b13297988 Author: Yan, Zheng <zyan@redhat.com> Date: Tue May 17 11:58:02 2016 +0800 ceph: call __fscache_uncache_page() if readpages fails If readpages fails, fscache needs to cleanup its internal state. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/addr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 480ce08a70e4179f34808a3bdbfe6627f624cf54 Author: Yan, Zheng <zyan@redhat.com> Date: Fri May 20 18:32:31 2016 +0800 FS-Cache: make check_consistency callback return int __fscache_check_consistency() calls check_consistency() callback and return the callback's return value. But the return type of check_consistency() is bool. So __fscache_check_consistency() return 1 if the cache is inconsistent. This is inconsistent with the document. Signed-off-by: Yan, Zheng <zyan@redhat.com> Acked-by: David Howells <dhowells@redhat.com> fs/cachefiles/interface.c | 2 +- include/linux/fscache-cache.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d2138455286f9db8fbff9b50b53b51766f6c1f92 Author: Yan, Zheng <zyan@redhat.com> Date: Tue May 17 11:52:48 2016 +0800 FS-Cache: wake write waiter after invalidating writes Signed-off-by: Yan, Zheng <zyan@redhat.com> Acked-by: David Howells <dhowells@redhat.com> fs/fscache/page.c | 2 ++ 1 file changed, 2 insertions(+) commit 50c763f8c1bac0dc00f7788a75f227276c0efd54 Author: John Youn <johnyoun@synopsys.com> Date: Tue May 31 17:49:56 2016 -0700 usb: dwc3: Set the ClearPendIN bit on Clear Stall EP command As of core revision 2.60a the recommended programming model is to set the ClearPendIN bit when issuing a Clear Stall EP command for IN endpoints. This is to prevent an issue where some (non-compliant) hosts may not send ACK TPs for pending IN transfers due to a mishandled error condition. Synopsys STAR 9000614252. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/dwc3/core.h | 1 + drivers/usb/dwc3/gadget.c | 30 ++++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) commit 6b15d6650c5301ce023d8df0cc3a60b1a76d377e Merge: 58c1f99 faf8dcc Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 31 22:28:28 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes from David Miller: 1) Fix negative error code usage in ATM layer, from Stefan Hajnoczi. 2) If CONFIG_SYSCTL is disabled, the default TTL is not initialized properly. From Ezequiel Garcia. 3) Missing spinlock init in mvneta driver, from Gregory CLEMENT. 4) Missing unlocks in hwmb error paths, also from Gregory CLEMENT. 5) Fix deadlock on team->lock when propagating features, from Ivan Vecera. 6) Work around buffer offset hw bug in alx chips, from Feng Tang. 7) Fix double listing of SCTP entries in sctp_diag dumps, from Xin Long. 8) Various statistics bug fixes in mlx4 from Eric Dumazet. 9) Fix some randconfig build errors wrt fou ipv6 from Arnd Bergmann. 10) All of l2tp was namespace aware, but the ipv6 support code was not doing so. From Shmulik Ladkani. 11) Handle on-stack hrtimers properly in pktgen, from Guenter Roeck. 12) Propagate MAC changes properly through VLAN devices, from Mike Manning. 13) Fix memory leak in bnx2x_init_one(), from Vitaly Kuznetsov. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (62 commits) sfc: Track RPS flow IDs per channel instead of per function usbnet: smsc95xx: fix link detection for disabled autonegotiation virtio_net: fix virtnet_open and virtnet_probe competing for try_fill_recv bnx2x: avoid leaking memory on bnx2x_init_one() failures fou: fix IPv6 Kconfig options openvswitch: update checksum in {push,pop}_mpls sctp: sctp_diag should dump sctp socket type net: fec: update dirty_tx even if no skb vlan: Propagate MAC address to VLANs atm: iphase: off by one in rx_pkt() atm: firestream: add more reserved strings vxlan: Accept user specified MTU value when create new vxlan link net: pktgen: Call destroy_hrtimer_on_stack() timer: Export destroy_hrtimer_on_stack() net: l2tp: Make l2tp_ip6 namespace aware Documentation: ip-sysctl.txt: clarify secure_redirects sfc: use flow dissector helpers for aRFS ieee802154: fix logic error in ieee802154_llsec_parse_dev_addr net: nps_enet: Disable interrupts before napi reschedule net/lapb: tuse %*ph to dump buffers ... commit d3922b69617b62bb2509936b68301f837229d9f0 Author: Mathieu Larouche <mathieu.larouche@matrox.com> Date: Fri May 27 15:12:50 2016 -0400 drm/mgag200: Black screen fix for G200e rev 4 - Fixed black screen for some resolutions of G200e rev4 - Fixed testm & testn which had predetermined value. Reported-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Mathieu Larouche <mathieu.larouche@matrox.com> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/mgag200/mgag200_mode.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 58c1f9950ffc6acbb907051b0a4e56aaf4baa9ce Merge: 367d3fd 7cafc0b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 31 22:20:56 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc fixes from David Miller: "sparc64 mmu context allocation and trap return bug fixes" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Fix return from trap window fill crashes. sparc: Harden signal return frame checks. sparc64: Take ctx_alloc_lock properly in hugetlb_setup(). commit afe705be38f1e65b173868486944377186b9f206 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue May 31 22:25:52 2016 +0100 drm: Wrap direct calls to driver->gem_free_object from CMA Since the introduction of (struct_mutex) lockless GEM bo freeing, there are a pair of driver vfuncs for freeing the GEM bo, of which the driver may choose to only implement driver->gem_object_free_unlocked (and so avoid taking the struct_mutex along the free path). However, the CMA GEM helpers were still calling driver->gem_free_object directly, now NULL, and promptly dying on the fancy new lockless drivers. Oops. Robert Foss bisected this to b82caafcf2303 (drm/vc4: Use lockless gem BO free callback) on his vc4 device, but that just serves as an enabler for 9f0ba539d13ae (drm/gem: support BO freeing without dev->struct_mutex). Reported-by: Robert Foss <robert.foss@collabora.com> Fixes: 9f0ba539d13ae (drm/gem: support BO freeing without dev->struct_mutex) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Robert Foss <robert.foss@collabora.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Eric Anholt <eric@anholt.net> Cc: Alex Deucher <alexdeucher@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Tested-by: Robert Foss <robert.foss@collabora.com> Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- drivers/gpu/drm/drm_gem_cma_helper.c | 12 +++--------- 2 files changed, 4 insertions(+), 10 deletions(-) commit 1e8985a835fdffc99f823c25ace54833656c505a Author: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Tue May 31 15:03:18 2016 +0300 drm: fix fb refcount issue with atomic modesetting After commit 027b3f8ba9277410c3191d72d1ed2c6146d8a668 ("drm/modes: stop handling framebuffer special") extra fb refs are left around when doing atomic modesetting. The problem is that the new drm_property_change_valid_get() does not return anything in the '**ref' parameter, which causes drm_property_change_valid_put() to do nothing. For some reason this doesn't cause problems with legacy API. Also, previously the code only set the 'ref' variable for fbs, with this patch the 'ref' is set for all objects. Fixes: 027b3f8ba927 ("drm/modes: stop handling framebuffer special") Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/drm_crtc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6709887c448d1cff51b52d09763c7b834ea5f0be Author: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Tue May 31 15:03:17 2016 +0300 drm: make drm_atomic_set_mode_prop_for_crtc() more reliable drm_atomic_set_mode_prop_for_crtc() does not clear the state->mode, so old data may be left there when a new mode is set, possibly causing odd issues. This patch improves the situation by always clearing the state->mode first. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: stable@vger.kernel.org Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/drm_atomic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 84e5a795228980adc6bd737765964d7afba7017e Author: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Tue May 31 15:03:16 2016 +0300 drm/sti: remove extra mode fixup Commit 652353e6e561c2aeeac62df183f721f6f9b5b45f ("drm/sti: set CRTC modesetting parameters") added a hack to avoid warnings related to setting mode with atomic API. With the previous patch, the hack should no longer be necessary. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/sti/sti_crtc.c | 10 ---------- 1 file changed, 10 deletions(-) commit b201e743f42d143f4bcdcb14587caf7cb1d99229 Author: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Tue May 31 15:03:15 2016 +0300 drm: add missing drm_mode_set_crtcinfo call When setting mode via MODE_ID property, drm_atomic_set_mode_prop_for_crtc() does not call drm_mode_set_crtcinfo() which possibly causes: "[drm:drm_calc_timestamping_constants [drm]] *ERROR* crtc 32: Can't calculate constants, dotclock = 0!" Whether the error is seen depends on the previous data in state->mode, as state->mode is not cleared when setting new mode. This patch adds drm_mode_set_crtcinfo() call to drm_mode_convert_umode(), which is called in both legacy and atomic paths. This should be fine as there's no reason to call drm_mode_convert_umode() without also setting the crtc related fields. drm_mode_set_crtcinfo() is removed from the legacy drm_mode_setcrtc() as that is no longer needed. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/drm_crtc.c | 2 -- drivers/gpu/drm/drm_modes.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) commit 7cc851039d643a2ee7df4d18177150f2c3a484f5 Author: Thomas Huth <thuth@redhat.com> Date: Tue May 31 07:51:17 2016 +0200 powerpc/pseries: Add POWER8NVL support to ibm,client-architecture-support call If we do not provide the PVR for POWER8NVL, a guest on this system currently ends up in PowerISA 2.06 compatibility mode on KVM, since QEMU does not provide a generic PowerISA 2.07 mode yet. So some new instructions from POWER8 (like "mtvsrd") get disabled for the guest, resulting in crashes when using code compiled explicitly for POWER8 (e.g. with the "-mcpu=power8" option of GCC). Fixes: ddee09c099c3 ("powerpc: Add PVR for POWER8NVL processor") Cc: stable@vger.kernel.org # v4.0+ Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/prom_init.c | 1 + 1 file changed, 1 insertion(+) commit 157d4d0620879b7d89ca1e3cd7bf0be1e29be198 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Tue May 31 11:56:31 2016 +0530 powerpc/mm/radix: Add missing tlb flush This should not have any impact on hash, because hash does tlb invalidate with every pte update and we don't implement flush_tlb_* functions for hash. With radix we should make an explicit call to flush tlb outside pte update. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/pgtable-book3s64.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit dc47c0c1f8099fccb2c1e2f3775855066a9e4484 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Tue May 31 11:56:30 2016 +0530 powerpc/mm/hash: Fix the reference bit update when handling hash fault When we converted the asm routines to C functions, we missed updating HPTE_R_R based on _PAGE_ACCESSED. ASM code used to copy over the lower bits from pte via. andi. r3,r30,0x1fe /* Get basic set of flags */ We also update the code such that we won't update the Change bit ('C' bit) always. This was added by commit c5cf0e30bf3d8 ("powerpc: Fix buglet with MMU hash management"). With hash64, we need to make sure that hardware doesn't do a pte update directly. This is because we do end up with entries in TLB with no hash page table entry. This happens because when we find a hash bucket full, we "evict" a more/less random entry from it. When we do that we don't invalidate the TLB (hpte_remove) because we assume the old translation is still technically "valid". For more info look at commit 0608d692463("powerpc/mm: Always invalidate tlb on hpte invalidate and update"). Thus it's critical that valid hash PTEs always have reference bit set and writeable ones have change bit set. We do this by hashing a non-dirty linux PTE as read-only and always setting _PAGE_ACCESSED (and thus R) when hashing anything else in. Any attempt by Linux at clearing those bits also removes the corresponding hash entry. Commit 5cf0e30bf3d8 did that for 'C' bit by enabling 'C' bit always. We don't really need to do that because we never map a RW pte entry without setting 'C' bit. On READ fault on a RW pte entry, we still map it READ only, hence a store update in the page will still cause a hash pte fault. This patch reverts the part of commit c5cf0e30bf3d8 ("[PATCH] powerpc: Fix buglet with MMU hash management") and retain the updatepp part. - If we hit the updatepp path on native, the old code without that commit, would fail to set C bcause native_hpte_updatepp() was implemented to filter the same bits as H_PROTECT and not let C through thus we would "upgrade" a RO HPTE to RW without setting C thus causing the bug. So the real fix in that commit was the change to native_hpte_updatepp Fixes: 89ff725051d1 ("powerpc/mm: Convert __hash_page_64K to C") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/hash_utils_64.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) commit d6c886006c948141f24e84acebfb757d3200f20c Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Tue May 31 11:56:29 2016 +0530 powerpc/mm/radix: Update LPCR only if it is powernv LPCR cannot be updated when running in guest mode. Fixes: 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routines") Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/pgtable-radix.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) commit faf8dcc12c2780bfec61eb95e5ad74af2ff4f82f Author: Jon Cooper <jcooper@solarflare.com> Date: Tue May 31 19:12:32 2016 +0100 sfc: Track RPS flow IDs per channel instead of per function Otherwise we get confused when two flows on different channels get the same flow ID. Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/sfc/efx.c | 32 +++++++++++++++++++++++++++----- drivers/net/ethernet/sfc/net_driver.h | 12 ++++++++---- drivers/net/ethernet/sfc/rx.c | 29 +++++++++++++++++++++-------- 3 files changed, 56 insertions(+), 17 deletions(-) commit ce7585f3c4d76bca1dff4b66ae1ea32552954f9e Author: Alex Williamson <alex.williamson@redhat.com> Date: Tue May 31 21:25:52 2016 -0600 vfio/pci: Allow VPD short read The size of the VPD area is not necessarily 4-byte aligned, so a pci_vpd_read() might return less than 4 bytes. Zero our buffer and accept anything other than an error. Intel X710 NICs exercise this. Fixes: 4e1a635552d3 ("vfio/pci: Use kernel VPD access functions") Signed-off-by: Alex Williamson <alex.williamson@redhat.com> drivers/vfio/pci/vfio_pci_config.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fbd83006e3e536fcb103228d2422ea63129ccb03 Author: Ewan D. Milne <emilne@redhat.com> Date: Tue May 31 09:42:29 2016 -0400 scsi: Add QEMU CD-ROM to VPD Inquiry Blacklist Linux fails to boot as a guest with a QEMU CD-ROM: [ 4.439488] ata2.00: ATAPI: QEMU CD-ROM, 0.8.2, max UDMA/100 [ 4.443649] ata2.00: configured for MWDMA2 [ 4.450267] scsi 1:0:0:0: CD-ROM QEMU QEMU CD-ROM 0.8. PQ: 0 ANSI: 5 [ 4.464317] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 4.464319] ata2.00: BMDMA stat 0x5 [ 4.464339] ata2.00: cmd a0/01:00:00:00:01/00:00:00:00:00/a0 tag 0 dma 16640 in [ 4.464339] Inquiry 12 01 00 00 ff 00res 48/20:02:00:24:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation) [ 4.464341] ata2.00: status: { DRDY DRQ } [ 4.465864] ata2: soft resetting link [ 4.625971] ata2.00: configured for MWDMA2 [ 4.628290] ata2: EH complete [ 4.646670] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen [ 4.646671] ata2.00: BMDMA stat 0x5 [ 4.646683] ata2.00: cmd a0/01:00:00:00:01/00:00:00:00:00/a0 tag 0 dma 16640 in [ 4.646683] Inquiry 12 01 00 00 ff 00res 48/20:02:00:24:00/00:00:00:00:00/a0 Emask 0x2 (HSM violation) [ 4.646685] ata2.00: status: { DRDY DRQ } [ 4.648193] ata2: soft resetting link ... Fix this by suppressing VPD inquiry for this device. Signed-off-by: Ewan D. Milne <emilne@redhat.com> Reported-by: Jan Stancek <jstancek@redhat.com> Tested-by: Jan Stancek <jstancek@redhat.com> Cc: <stable@vger.kernel.org> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_devinfo.c | 1 + 1 file changed, 1 insertion(+) commit 65d4f4c151a5fa7b2dacaaf70def3f95001766d7 Author: Josef Bacik <jbacik@fb.com> Date: Wed Sep 23 15:00:37 2015 -0400 Btrfs: end transaction if we abort when creating uuid root We still need to call btrfs_end_transaction if we call btrfs_abort_transaction, otherwise we hang and make me super grumpy. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/volumes.c | 1 + 1 file changed, 1 insertion(+) commit e7c31f6f25b84fed961dc0dce6248878527693ae Author: Robert Foss <robert.foss@collabora.com> Date: Tue May 3 13:48:20 2016 -0400 drm/vc4: Return -EBUSY if there's already a pending flip event. As per the documentation in drm_crtc.h, atomic_commit should return -EBUSY if an asynchronous update is requested and there is an earlier update pending. v2: Rebase on the s/async/nonblock/ change. Signed-off-by: Robert Foss <robert.foss@collabora.com> Reviewed-by: Eric Anholt <eric@anholt.net> drivers/gpu/drm/vc4/vc4_kms.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit ee7c10e10b632e2319ed1d2d49d63df51a611e62 Author: Mario Kleiner <mario.kleiner.de@gmail.com> Date: Fri May 6 19:26:06 2016 +0200 drm/vc4: Fix drm_vblank_put/get imbalance in page flip path. The async page flip path was missing drm_crtc_vblank_get/put completely. The sync flip path was missing a vblank put, so async flips only reported proper pageflip completion events by chance, and vblank irq's never turned off after a first vsync'ed page flip until system reboot. Tested against Raspian kernel 4.4.8 tree on RPi 2B. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Fixes: b501bacc6060 ("drm/vc4: Add support for async pageflips.") drivers/gpu/drm/vc4/vc4_crtc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 792293cfd516a173bbd687b4b26da0f97f97abd2 Author: Mario Kleiner <mario.kleiner.de@gmail.com> Date: Fri May 6 19:26:05 2016 +0200 drm/vc4: Fix get_vblank_counter with proper no-op for Linux 4.4+ get_vblank_counter hooked up to drm_vblank_count() which alway was non-sensical but didn't hurt in the past. Since Linux 4.4 it triggers a WARN_ON_ONCE in drm_update_vblank_count on first vblank irq disable, so fix it by hooking to drm_vblank_no_hw_counter(). Tested against Raspian kernel 4.4.8 tree on RPi 2B. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Fixes: c8b75bca92cb ("drm/vc4: Add KMS support for Raspberry Pi.") drivers/gpu/drm/vc4/vc4_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d69d169493463e6b1da9a1965d35126e479aa27f Author: Christoph Fritz <chf.fritz@googlemail.com> Date: Thu May 26 04:06:47 2016 +0200 usbnet: smsc95xx: fix link detection for disabled autonegotiation To detect link status up/down for connections where autonegotiation is explicitly disabled, we don't get an irq but need to poll the status register for link up/down detection. This patch adds a workqueue to poll for link status. Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/usb/smsc95xx.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) commit f00e35e259948b995aa1f3ee7fddb05f34a50157 Author: wangyunjian <wangyunjian@huawei.com> Date: Tue May 31 11:52:43 2016 +0800 virtio_net: fix virtnet_open and virtnet_probe competing for try_fill_recv In function virtnet_open() and virtnet_probe(), func try_fill_recv() may be executed at the same time. VQ in virtqueue_add() has not been protected well and BUG_ON will be triggered when virito_net.ko being removed. Signed-off-by: Yunjian Wang <wangyunjian@huawei.com> Acked-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/virtio_net.c | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) commit bae5499cc55d2329ea0fbf09cb22298f4ca2f9bd Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Mon May 30 15:00:54 2016 +0200 bnx2x: avoid leaking memory on bnx2x_init_one() failures bnx2x_init_bp() allocates memory with bnx2x_alloc_mem_bp() so if we fail later in bnx2x_init_one() we need to free this memory with bnx2x_free_mem_bp() to avoid leakages. E.g. I'm observing memory leaks reported by kmemleak when a failure (unrelated) happens in bnx2x_vfpf_acquire(). Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit 95e4daa82086e2bd7b7163f33a4f455bf8ecdf48 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 31 22:42:11 2016 +0200 fou: fix IPv6 Kconfig options The Kconfig options I added to work around broken compilation ended up screwing up things more, as I used the wrong symbol to control compilation of the file, resulting in IPv6 fou support to never be built into the kernel. Changing CONFIG_NET_FOU_IPV6_TUNNELS to CONFIG_IPV6_FOU fixes that problem, I had renamed the symbol in one location but not the other, and as the file is never being used by other kernel code, this did not lead to a build failure that I would have caught. After that fix, another issue with the same patch becomes obvious, as we 'select INET6_TUNNEL', which is related to IPV6_TUNNEL, but not the same, and this can still cause the original build failure when IPV6_TUNNEL is not built-in but IPV6_FOU is. The fix is equally trivial, we just need to select the right symbol. I have successfully build 350 randconfig kernels with this patch and verified that the driver is now being built. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reported-by: Valentin Rothberg <valentinrothberg@gmail.com> Fixes: fabb13db448e ("fou: add Kconfig options for IPv6 support") Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/Kconfig | 2 +- net/ipv6/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bc7cc5999fd392cc799630d7e375b2f4e29cc398 Author: Simon Horman <simon.horman@netronome.com> Date: Mon May 30 14:04:25 2016 +0900 openvswitch: update checksum in {push,pop}_mpls In the case of CHECKSUM_COMPLETE the skb checksum should be updated in {push,pop}_mpls() as they the type in the ethernet header. As suggested by Pravin Shelar. Cc: Pravin Shelar <pshelar@nicira.com> Fixes: 25cd9ba0abc0 ("openvswitch: Add basic MPLS support to kernel") Signed-off-by: Simon Horman <simon.horman@netronome.com> Acked-by: Pravin B Shelar <pshelar@ovn.org> Signed-off-by: David S. Miller <davem@davemloft.net> net/openvswitch/actions.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) commit becc7ae544c61395b5eba7b9913e14aa567ca07a Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Sun May 22 11:06:06 2016 +0200 MAINTAINERS: Add file patterns for mtd device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: David Woodhouse <dwmw2@infradead.org> Cc: linux-mtd@lists.infradead.org Signed-off-by: Brian Norris <computersforpeace@gmail.com> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 40eb90e9ccc3f96f937ea1db79d0f9cb61553ed5 Author: Xin Long <lucien.xin@gmail.com> Date: Sun May 29 17:42:13 2016 +0800 sctp: sctp_diag should dump sctp socket type Now we cannot distinguish that one sk is a udp or sctp style when we use ss to dump sctp_info. it's necessary to dump it as well. For sctp_diag, ss support is not officially available, thus there are no official users of this yet, so we can add this field in the middle of sctp_info without breaking user API. v1->v2: - move 'sctpi_s_type' field to the end of struct sctp_info, so that it won't cause incompatibility with applications already built. - add __reserved3 in sctp_info to make sure sctp_info is 8-byte alignment. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/linux/sctp.h | 2 ++ net/sctp/socket.c | 1 + 2 files changed, 3 insertions(+) commit 7fafe803749a0c238feb5d38cb4ddee53eca5aa0 Author: Troy Kisky <troy.kisky@boundarydevices.com> Date: Fri May 27 13:30:40 2016 -0700 net: fec: update dirty_tx even if no skb If dirty_tx isn't updated, then dma_unmap_single can be called twice. This fixes a [ 58.420980] ------------[ cut here ]------------ [ 58.425667] WARNING: CPU: 0 PID: 377 at /home/schurig/d/mkarm/linux-4.5/lib/dma-debug.c:1096 check_unmap+0x9d0/0xab8() [ 58.436405] fec 2188000.ethernet: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x0000000000000000] [size=66 bytes] encountered by Holger Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Tested-by: <holgerschurig@gmail.com> Acked-by: Fugang Duan <fugang.duan@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/fec_main.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 308453aa9156a3b8ee382c0949befb507a32b0c1 Author: Mike Manning <mmanning@brocade.com> Date: Fri May 27 17:45:07 2016 +0100 vlan: Propagate MAC address to VLANs The MAC address of the physical interface is only copied to the VLAN when it is first created, resulting in an inconsistency after MAC address changes of only newly created VLANs having an up-to-date MAC. The VLANs should continue inheriting the MAC address of the physical interface until the VLAN MAC address is explicitly set to any value. This allows IPv6 EUI64 addresses for the VLAN to reflect any changes to the MAC of the physical interface and thus for DAD to behave as expected. Signed-off-by: Mike Manning <mmanning@brocade.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/8021q/vlan.c | 5 +++++ net/8021q/vlan.h | 2 ++ net/8021q/vlan_dev.c | 20 +++++++++++++++++--- 3 files changed, 24 insertions(+), 3 deletions(-) commit f2633d2eaaab773ea8b29cea3785cf0f8a8872a5 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Fri May 27 13:34:35 2016 +0300 atm: iphase: off by one in rx_pkt() The iadev->rx_open[] array holds "iadev->num_vc" pointers (this code assumes that pointers are 32 bits). So the > here should be >= or else we could end up reading a garbage pointer from one element beyond the end of the array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/atm/iphase.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 86f04396ff6d36146ec335d429191a7c8e2209af Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Fri May 27 13:33:50 2016 +0300 atm: firestream: add more reserved strings This bug was there when the driver was first added in back in year 2000. It causes a Smatch warning: drivers/atm/firestream.c:849 process_incoming() error: buffer overflow 'res_strings' 60 <= 63 There are supposed to be 64 entries in this array and the missing strings are clearly in the 30 40 range. I added them as reserved 37 to reserved 40. It's possible that strings are really supposed to be added in the middle instead of at the end, but this approach is safe, in that it fixes the bug and doesn't break anything that wasn't already broken. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/atm/firestream.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit ce577668a426c6a9e2470a09dcd07fbd6e45272a Author: Chen Haiquan <oc@yunify.com> Date: Fri May 27 10:49:11 2016 +0800 vxlan: Accept user specified MTU value when create new vxlan link When create a new vxlan link, example: ip link add vtap mtu 1440 type vxlan vni 1 dev eth0 The argument "mtu" has no effect, because it is not set to conf->mtu. The default value is used in vxlan_dev_configure function. This problem was introduced by commit 0dfbdf4102b9 (vxlan: Factor out device configuration). Fixes: 0dfbdf4102b9 (vxlan: Factor out device configuration) Signed-off-by: Chen Haiquan <oc@yunify.com> Acked-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/vxlan.c | 3 +++ 1 file changed, 3 insertions(+) commit bcf91bdb44d2e6d84ffc5b7ab0400d5ff1c27645 Author: Guenter Roeck <linux@roeck-us.net> Date: Thu May 26 17:21:06 2016 -0700 net: pktgen: Call destroy_hrtimer_on_stack() If CONFIG_DEBUG_OBJECTS_TIMERS=y, hrtimer_init_on_stack() requires a matching call to destroy_hrtimer_on_stack() to clean up timer debug objects. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net> net/core/pktgen.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c08376ac97cb202ec65320f3d90d5c4c5e2adb0b Author: Guenter Roeck <linux@roeck-us.net> Date: Thu May 26 17:21:05 2016 -0700 timer: Export destroy_hrtimer_on_stack() hrtimer_init_on_stack() needs a matching call to destroy_hrtimer_on_stack(), so both need to be exported. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net> kernel/time/hrtimer.c | 1 + 1 file changed, 1 insertion(+) commit 3ac066e2227cb272c097f34475247fa0a6cdd2ff Author: Jean-Jacques Hiblot <jjhiblot@ti.com> Date: Tue May 31 17:56:23 2016 +0200 spi: spi-ti-qspi: Suspend the queue before removing the device Before disabling the pm_runtime, we must ensure that there is no transfer in progress nor will a new one be started. Otherwise the message pump will fail and in the end, the process requesting the transfer will be stuck. This behavior has been observed when transferring data from a SPI flash with dd while removing the module on a DRA7x-evm. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-ti-qspi.c | 7 +++++++ 1 file changed, 7 insertions(+) commit e47b020a323d1b2a7b1e9aac86e99eae19463630 Author: Catalin Marinas <catalin.marinas@arm.com> Date: Tue May 31 15:55:03 2016 +0100 arm64: Provide "model name" in /proc/cpuinfo for PER_LINUX32 tasks This patch brings the PER_LINUX32 /proc/cpuinfo format more in line with the 32-bit ARM one by providing an additional line: model name : ARMv8 Processor rev X (v8l) Cc: <stable@vger.kernel.org> Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/include/asm/elf.h | 4 ++-- arch/arm64/kernel/cpuinfo.c | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) commit b02da6f8236148009c22167cd7013d5ce04a2d37 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Mon May 23 17:08:42 2016 +0530 dma-buf: use vma_pages() Replace explicit computation of vma page count by a call to vma_pages(). Also, include <linux/mm.h> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> drivers/dma-buf/dma-buf.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 4320c2a22df12f954edd4997f71ca3a4216312b2 Author: Luis de Bethencourt <luisbg@osg.samsung.com> Date: Mon Apr 11 12:48:55 2016 +0100 fence: add missing descriptions for fence The members child_list and active_list were added to the fence struct without descriptions for the Documentation. Adding these. Fixes: b55b54b5db33 ("staging/android: remove struct sync_pt") Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> include/linux/fence.h | 2 ++ 1 file changed, 2 insertions(+) commit eae1760fc838d5f569a80939f72483f02ac049c5 Author: Rob Clark <robdclark@gmail.com> Date: Thu Mar 31 16:26:52 2016 -0400 doc: update/fixup dma-buf related DocBook Split out dma-buf related parts into their own section, add missing files, and write a bit of overview about how it all fits together. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Documentation/DocBook/device-drivers.tmpl | 36 +++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) commit 367d3fd50566a313946fa9c5b2116a81bf3807e4 Merge: 5eca831 cf0d44d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 31 09:43:24 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Martin Schwidefsky: "Three bugs fixes and an update for the default configuration" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390: fix info leak in do_sigsegv s390/config: update default configuration s390/bpf: fix recache skb->data/hlen for skb_vlan_push/pop s390/bpf: reduce maximum program size to 64 KB commit dad6c3945fd25384c2b92306a90ba033e1130428 Author: Rob Clark <robdclark@gmail.com> Date: Thu Mar 31 16:26:51 2016 -0400 reservation: add headerdoc comments Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> drivers/dma-buf/reservation.c | 72 ++++++++++++++++++++++++++++++++++++++++--- include/linux/reservation.h | 53 +++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 4 deletions(-) commit e2082e3ab801b989d8d5337b2ecbfc61d09781cb Author: Rob Clark <robdclark@gmail.com> Date: Thu Mar 31 16:26:50 2016 -0400 dma-buf: headerdoc fixes Apparently nobody noticed that dma-buf.h wasn't actually pulled into docbook build. And as a result the headerdoc comments bitrot a bit. Add missing params/fields. Signed-off-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> include/linux/dma-buf.h | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) commit 5eca83174264a8eacf854685c59e08b7e1d628a3 Merge: 852f42a 545ebd9 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 31 09:27:00 2016 -0700 Merge tag 'gpio-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO fixes from Linus Walleij: "A bunch of GPIO fixes for the v4.7 series: - Drop the lock before reading out the GPIO direction setting in drivers supporting the .get_direction() callback: some of them may be slowpath. - Flush GPIO direction setting before locking a GPIO as an IRQ: some electronics or other poking around in the registers behind our back may have happened, so flush the direction status before trying to lock the line for use by IRQs. - Bail out silently when asked to perform operations on NULL GPIO descriptors. That is what all the get_*_optional() is about: we get optional GPIO handles, if they are not there, we get NULL. - Handle compatible ioctl() correctly: we need to convert the ioctl() pointer using compat_ptr() here like everyone else. - Disable the broken .to_irq() on the LPC32xx platform. The whole irqchip infrastructure was replaced in the last merge window, and a new implementation will be needed" * tag 'gpio-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: drop lock before reading GPIO direction gpio: bail out silently on NULL descriptors gpio: handle compatible ioctl() pointers gpio: flush direction status in gpiochip_lock_as_irq() gpio: lpc32xx: disable broken to_irq support commit c714a588fc39dc8c8f70014f5691217717983fb3 Author: Axel Lin <axel.lin@ingics.com> Date: Tue May 31 17:26:00 2016 +0800 regulator: tps51632: Fix setting ramp delay According to the datasheet: SLEW Register(Address = 07h) b7 b6 b5 b4 b3 b2 b1 b0 48mV/us 42mV/us 36mV/us 30mV/us 24mV/us 18mV/us 12mV/us 6mV/us Current code does not set correct slew rate in some cases: e.g. Assume ramp_delay is 10000, current code sets slew register to 6mV/us. Fix the logic to set slew register. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/tps51632-regulator.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 0358ccc8ffd8d9b76992b8deab58fb9a721fb18a Author: Robert P. J. Day <rpjday@crashcourse.ca> Date: Tue May 31 09:12:04 2016 -0400 ALSA: uapi: Add three missing header files to Kbuild file include/uapi/sound/Kbuild was missing the inclusion of three header files in that directory. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Takashi Iwai <tiwai@suse.de> include/uapi/sound/Kbuild | 3 +++ 1 file changed, 3 insertions(+) commit c58513284029229842844929ddeaca44d013c128 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Wed May 25 15:26:39 2016 +0100 arm64: KVM: vgic-v3: Relax synchronization when SRE==1 The GICv3 backend of the vgic is quite barrier heavy, in order to ensure synchronization of the system registers and the memory mapped view for a potential GICv2 guest. But when the guest is using a GICv3 model, there is absolutely no need to execute all these heavy barriers, and it is actually beneficial to avoid them altogether. This patch makes the synchonization conditional, and ensures that we do not change the EL1 SRE settings if we do not need to. Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> arch/arm64/kvm/hyp/vgic-v3-sr.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit a057001e9e446f2195c34bc55c57e5cf353c99d6 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Wed May 25 15:26:38 2016 +0100 arm64: KVM: vgic-v3: Prevent the guest from messing with ICC_SRE_EL1 Both our GIC emulations are "strict", in the sense that we either emulate a GICv2 or a GICv3, and not a GICv3 with GICv2 legacy support. But when running on a GICv3 host, we still allow the guest to tinker with the ICC_SRE_EL1 register during its time slice: it can switch SRE off, observe that it is off, and yet on the next world switch, find the SRE bit to be set again. Not very nice. An obvious solution is to always trap accesses to ICC_SRE_EL1 (by clearing ICC_SRE_EL2.Enable), and to let the handler return the programmed value on a read, or ignore the write. That way, the guest can always observe that our GICv3 is SRE==1 only. Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> arch/arm64/kvm/hyp/vgic-v3-sr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit b34f2bcbf59fe2d27c37d6553c33611754677103 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Wed May 25 15:26:37 2016 +0100 arm64: KVM: Make ICC_SRE_EL1 access return the configured SRE value When we trap ICC_SRE_EL1, we handle it as RAZ/WI. It would be more correct to actual make it RO, and return the configured value when read. Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> arch/arm64/kvm/sys_regs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) commit 637d122baac7ff386c8e96df38ac88cee1551db9 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Wed May 25 15:26:36 2016 +0100 KVM: arm/arm64: vgic-v3: Always resample level interrupts When reading back from the list registers, we need to perform two actions for level interrupts: 1) clear the soft-pending bit if the interrupt is not pending anymore *in the list register* 2) resample the line level and propagate it to the pending state But these two actions shouldn't be linked, and we should *always* resample the line level, no matter what state is in the list register. Otherwise, we may end-up injecting spurious interrupts that have been already retired. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-v3.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit df7942d17e1623d7358fe895377293637de5521b Author: Marc Zyngier <marc.zyngier@arm.com> Date: Wed May 25 15:26:35 2016 +0100 KVM: arm/arm64: vgic-v2: Always resample level interrupts When reading back from the list registers, we need to perform two actions for level interrupts: 1) clear the soft-pending bit if the interrupt is not pending anymore *in the list register* 2) resample the line level and propagate it to the pending state But these two actions shouldn't be linked, and we should *always* resample the line level, no matter what state is in the list register. Otherwise, we may end-up injecting spurious interrupts that have been already retired. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-v2.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit fa89c77e891917b5913f9be080f9131a9457bb3e Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Wed May 25 15:26:34 2016 +0100 KVM: arm/arm64: vgic-v3: Clear all dirty LRs When saving the state of the list registers, it is critical to reset them zero, as we could otherwise leave unexpected EOI interrupts pending for virtual level interrupts. Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> arch/arm64/kvm/hyp/vgic-v3-sr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4d3afc9bad2b67b118a0cc204dc94703f7a44e74 Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Wed May 25 15:26:33 2016 +0100 KVM: arm/arm64: vgic-v2: Clear all dirty LRs When saving the state of the list registers, it is critical to reset them zero, as we could otherwise leave unexpected EOI interrupts pending for virtual level interrupts. Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> virt/kvm/arm/hyp/vgic-v2-sr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 500e06b9a3f50d3db992eb3b8dc309f695d33f63 Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 31 19:09:55 2016 +0530 ASoC: hdac_hdmi: Fix potential NULL dereference Static checker warns: Pointer 'hlink' returned from call to function 'snd_hdac_ext_bus_get_link' at line may be NULL and will be dereferenced" So we should always check the return of snd_hdac_ext_bus_get_link() before referencing the link pointer Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/hdac_hdmi.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 604c8e676e609da9f17a2abb36f2b2067bb86561 Author: Mark Rutland <mark.rutland@arm.com> Date: Fri May 13 12:20:36 2016 +0100 arm64: enable CONFIG_SET_MODULE_RONX by default The SET_MODULE_RONX protections are effectively the same as the DEBUG_RODATA protections we enabled by default back in commit 57efac2f7108e325 ("arm64: enable CONFIG_DEBUG_RODATA by default"). It seems unusual to have one but not the other. As evidenced by the help text, the rationale appears to be that SET_MODULE_RONX interacts poorly with tracing and patching, but both of these make use of the insn framework, which takes SET_MODULE_RONX into account. Any remaining issues are bugs which should be fixed regardless of the default state of the option. This patch enables DEBUG_SET_MODULE_RONX by default, and replaces the help text with a new wording derived from the DEBUG_RODATA help text, which better describes the functionality. Previously, the DEBUG_RODATA entry was inconsistently indented with spaces, which are replaced with tabs as with the other Kconfig entries. Additionally, the wording of recommended defaults is made consistent for all options. These are placed in a new paragraph, unquoted, as a full sentence (with a period/full stop) as this appears to be the most common form per $(git grep 'in doubt'). Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Laura Abbott <labbott@fedoraproject.org> Acked-by: Kees Cook <keescook@chromium.org> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/Kconfig.debug | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit db413b51c0d023b336634ffbf5eb29128245df8d Author: Robin Murphy <robin.murphy@arm.com> Date: Tue May 24 18:55:40 2016 +0100 arm64: Remove orphaned __addr_ok() definition Since commit 12a0ef7b0ac3 ("arm64: use generic strnlen_user and strncpy_from_user functions"), the definition of __addr_ok() has been languishing unused; eradicate the sucker. CC: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/include/asm/uaccess.h | 13 ------------- 1 file changed, 13 deletions(-) commit 6fe04128f158c5ad27e7504bfdf1b12e63331bc9 Author: Felix Fietkau <nbd@nbd.name> Date: Thu May 19 17:34:38 2016 +0200 mac80211: fix fast_tx header alignment The header field is defined as u8[] but also accessed as struct ieee80211_hdr. Enforce an alignment of 2 to prevent unnecessary unaligned accesses, which can be very harmful for performance on many platforms. Fixes: e495c24731a2 ("mac80211: extend fast-xmit for more ciphers") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name> Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/mac80211/sta_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe7a7c57629e8dcbc0e297363a9b2366d67a6dc5 Author: Bob Copeland <me@bobcopeland.com> Date: Sun May 15 13:19:16 2016 -0400 mac80211: mesh: flush mesh paths unconditionally Currently, the mesh paths associated with a nexthop station are cleaned up in the following code path: __sta_info_destroy_part1 synchronize_net() __sta_info_destroy_part2 -> cleanup_single_sta -> mesh_sta_cleanup -> mesh_plink_deactivate -> mesh_path_flush_by_nexthop However, there are a couple of problems here: 1) the paths aren't flushed at all if the MPM is running in userspace (e.g. when using wpa_supplicant or authsae) 2) there is no synchronize_rcu between removing the path and readers accessing the nexthop, which means the following race is possible: CPU0 CPU1 ~~~~ ~~~~ sta_info_destroy_part1() synchronize_net() rcu_read_lock() mesh_nexthop_resolve() mpath = mesh_path_lookup() [...] -> mesh_path_flush_by_nexthop() sta = rcu_dereference( mpath->next_hop) kfree(sta) access sta <-- CRASH Fix both of these by unconditionally flushing paths before destroying the sta, and by adding a synchronize_net() after path flush to ensure no active readers can still dereference the sta. Fixes this crash: [ 348.529295] BUG: unable to handle kernel paging request at 00020040 [ 348.530014] IP: [<f929245d>] ieee80211_mps_set_frame_flags+0x40/0xaa [mac80211] [ 348.530014] *pde = 00000000 [ 348.530014] Oops: 0000 [#1] PREEMPT [ 348.530014] Modules linked in: drbg ansi_cprng ctr ccm ppp_generic slhc ipt_MASQUERADE nf_nat_masquerade_ipv4 8021q ] [ 348.530014] CPU: 0 PID: 20597 Comm: wget Tainted: G O 4.6.0-rc5-wt=V1 #1 [ 348.530014] Hardware name: To Be Filled By O.E.M./To be filled by O.E.M., BIOS 080016 11/07/2014 [ 348.530014] task: f64fa280 ti: f4f9c000 task.ti: f4f9c000 [ 348.530014] EIP: 0060:[<f929245d>] EFLAGS: 00010246 CPU: 0 [ 348.530014] EIP is at ieee80211_mps_set_frame_flags+0x40/0xaa [mac80211] [ 348.530014] EAX: f4ce63e0 EBX: 00000088 ECX: f3788416 EDX: 00020008 [ 348.530014] ESI: 00000000 EDI: 00000088 EBP: f6409a4c ESP: f6409a40 [ 348.530014] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 [ 348.530014] CR0: 80050033 CR2: 00020040 CR3: 33190000 CR4: 00000690 [ 348.530014] Stack: [ 348.530014] 00000000 f4ce63e0 f5f9bd80 f6409a64 f9291d80 0000ce67 f5d51e00 f4ce63e0 [ 348.530014] f3788416 f6409a80 f9291dc1 f4ce8320 f4ce63e0 f5d51e00 f4ce63e0 f4ce8320 [ 348.530014] f6409a98 f9277f6f 00000000 00000000 0000007c 00000000 f6409b2c f9278dd1 [ 348.530014] Call Trace: [ 348.530014] [<f9291d80>] mesh_nexthop_lookup+0xbb/0xc8 [mac80211] [ 348.530014] [<f9291dc1>] mesh_nexthop_resolve+0x34/0xd8 [mac80211] [ 348.530014] [<f9277f6f>] ieee80211_xmit+0x92/0xc1 [mac80211] [ 348.530014] [<f9278dd1>] __ieee80211_subif_start_xmit+0x807/0x83c [mac80211] [ 348.530014] [<c04df012>] ? sch_direct_xmit+0xd7/0x1b3 [ 348.530014] [<c022a8c6>] ? __local_bh_enable_ip+0x5d/0x7b [ 348.530014] [<f956870c>] ? nf_nat_ipv4_out+0x4c/0xd0 [nf_nat_ipv4] [ 348.530014] [<f957e036>] ? iptable_nat_ipv4_fn+0xf/0xf [iptable_nat] [ 348.530014] [<c04c6f45>] ? netif_skb_features+0x14d/0x30a [ 348.530014] [<f9278e10>] ieee80211_subif_start_xmit+0xa/0xe [mac80211] [ 348.530014] [<c04c769c>] dev_hard_start_xmit+0x1f8/0x267 [ 348.530014] [<c04c7261>] ? validate_xmit_skb.isra.120.part.121+0x10/0x253 [ 348.530014] [<c04defc6>] sch_direct_xmit+0x8b/0x1b3 [ 348.530014] [<c04c7a9c>] __dev_queue_xmit+0x2c8/0x513 [ 348.530014] [<c04c7cfb>] dev_queue_xmit+0xa/0xc [ 348.530014] [<f91bfc7a>] batadv_send_skb_packet+0xd6/0xec [batman_adv] [ 348.530014] [<f91bfdc4>] batadv_send_unicast_skb+0x15/0x4a [batman_adv] [ 348.530014] [<f91b5938>] batadv_dat_send_data+0x27e/0x310 [batman_adv] [ 348.530014] [<f91c30b5>] ? batadv_tt_global_hash_find.isra.11+0x8/0xa [batman_adv] [ 348.530014] [<f91b63f3>] batadv_dat_snoop_outgoing_arp_request+0x208/0x23d [batman_adv] [ 348.530014] [<f91c0cd9>] batadv_interface_tx+0x206/0x385 [batman_adv] [ 348.530014] [<c04c769c>] dev_hard_start_xmit+0x1f8/0x267 [ 348.530014] [<c04c7261>] ? validate_xmit_skb.isra.120.part.121+0x10/0x253 [ 348.530014] [<c04defc6>] sch_direct_xmit+0x8b/0x1b3 [ 348.530014] [<c04c7a9c>] __dev_queue_xmit+0x2c8/0x513 [ 348.530014] [<f80cbd2a>] ? igb_xmit_frame+0x57/0x72 [igb] [ 348.530014] [<c04c7cfb>] dev_queue_xmit+0xa/0xc [ 348.530014] [<f843a326>] br_dev_queue_push_xmit+0xeb/0xfb [bridge] [ 348.530014] [<f843a35f>] br_forward_finish+0x29/0x74 [bridge] [ 348.530014] [<f843a23b>] ? deliver_clone+0x3b/0x3b [bridge] [ 348.530014] [<f843a714>] __br_forward+0x89/0xe7 [bridge] [ 348.530014] [<f843a336>] ? br_dev_queue_push_xmit+0xfb/0xfb [bridge] [ 348.530014] [<f843a234>] deliver_clone+0x34/0x3b [bridge] [ 348.530014] [<f843a68b>] ? br_flood+0x95/0x95 [bridge] [ 348.530014] [<f843a66d>] br_flood+0x77/0x95 [bridge] [ 348.530014] [<f843a809>] br_flood_forward+0x13/0x1a [bridge] [ 348.530014] [<f843a68b>] ? br_flood+0x95/0x95 [bridge] [ 348.530014] [<f843b877>] br_handle_frame_finish+0x392/0x3db [bridge] [ 348.530014] [<c04e9b2b>] ? nf_iterate+0x2b/0x6b [ 348.530014] [<f843baa6>] br_handle_frame+0x1e6/0x240 [bridge] [ 348.530014] [<f843b4e5>] ? br_handle_local_finish+0x6a/0x6a [bridge] [ 348.530014] [<c04c4ba0>] __netif_receive_skb_core+0x43a/0x66b [ 348.530014] [<f843b8c0>] ? br_handle_frame_finish+0x3db/0x3db [bridge] [ 348.530014] [<c023cea4>] ? resched_curr+0x19/0x37 [ 348.530014] [<c0240707>] ? check_preempt_wakeup+0xbf/0xfe [ 348.530014] [<c0255dec>] ? ktime_get_with_offset+0x5c/0xfc [ 348.530014] [<c04c4fc1>] __netif_receive_skb+0x47/0x55 [ 348.530014] [<c04c57ba>] netif_receive_skb_internal+0x40/0x5a [ 348.530014] [<c04c61ef>] napi_gro_receive+0x3a/0x94 [ 348.530014] [<f80ce8d5>] igb_poll+0x6fd/0x9ad [igb] [ 348.530014] [<c0242bd8>] ? swake_up_locked+0x14/0x26 [ 348.530014] [<c04c5d29>] net_rx_action+0xde/0x250 [ 348.530014] [<c022a743>] __do_softirq+0x8a/0x163 [ 348.530014] [<c022a6b9>] ? __hrtimer_tasklet_trampoline+0x19/0x19 [ 348.530014] [<c021100f>] do_softirq_own_stack+0x26/0x2c [ 348.530014] <IRQ> [ 348.530014] [<c022a957>] irq_exit+0x31/0x6f [ 348.530014] [<c0210eb2>] do_IRQ+0x8d/0xa0 [ 348.530014] [<c058152c>] common_interrupt+0x2c/0x40 [ 348.530014] Code: e7 8c 00 66 81 ff 88 00 75 12 85 d2 75 0e b2 c3 b8 83 e9 29 f9 e8 a7 5f f9 c6 eb 74 66 81 e3 8c 005 [ 348.530014] EIP: [<f929245d>] ieee80211_mps_set_frame_flags+0x40/0xaa [mac80211] SS:ESP 0068:f6409a40 [ 348.530014] CR2: 0000000000020040 [ 348.530014] ---[ end trace 48556ac26779732e ]--- [ 348.530014] Kernel panic - not syncing: Fatal exception in interrupt [ 348.530014] Kernel Offset: disabled Cc: stable@vger.kernel.org Reported-by: Fred Veldini <fred.veldini@gmail.com> Tested-by: Fred Veldini <fred.veldini@gmail.com> Signed-off-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/mac80211/mesh.c | 4 ++++ 1 file changed, 4 insertions(+) commit 62397da50bb20a6b812c949ef465d7e69fe54bb6 Author: Martin Willi <martin@strongswan.org> Date: Fri May 13 12:41:48 2016 +0200 mac80211_hwsim: Add missing check for HWSIM_ATTR_SIGNAL A wmediumd that does not send this attribute causes a NULL pointer dereference, as the attribute is accessed even if it does not exist. The attribute was required but never checked ever since userspace frame forwarding has been introduced. The issue gets more problematic once we allow wmediumd registration from user namespaces. Cc: stable@vger.kernel.org Fixes: 7882513bacb1 ("mac80211_hwsim driver support userspace frame tx/rx") Signed-off-by: Martin Willi <martin@strongswan.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com> drivers/net/wireless/mac80211_hwsim.c | 1 + 1 file changed, 1 insertion(+) commit 8dd75ccb571f3c92c48014b3dabd3d51a115ab41 Author: Thomas Huth <thuth@redhat.com> Date: Thu May 12 13:29:11 2016 +0200 powerpc: Use privileged SPR number for MMCR2 We are already using the privileged versions of MMCR0, MMCR1 and MMCRA in the kernel, so for MMCR2, we should better use the privileged versions, too, to be consistent. Fixes: 240686c13687 ("powerpc: Initialise PMU related regs on Power8") Cc: stable@vger.kernel.org # v3.10+ Suggested-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d23fac2b27d94aeb7b65536a50d32bfdc21fe01e Author: Thomas Huth <thuth@redhat.com> Date: Thu May 12 13:26:44 2016 +0200 powerpc: Fix definition of SIAR and SDAR registers The SIAR and SDAR registers are available twice, one time as SPRs 780 / 781 (unprivileged, but read-only), and one time as the SPRs 796 / 797 (privileged, but read and write). The Linux kernel code currently uses the unprivileged SPRs - while this is OK for reading, writing to that register of course does not work. Since the KVM code tries to write to this register, too (see the mtspr in book3s_hv_rmhandlers.S), the contents of this register sometimes get lost for the guests, e.g. during migration of a VM. To fix this issue, simply switch to the privileged SPR numbers instead. Cc: stable@vger.kernel.org Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/reg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab2e1b89230fa80328262c91d2d0a539a2790d6f Author: Will Deacon <will.deacon@arm.com> Date: Tue May 31 11:00:09 2016 +0100 Revert "arm64: hugetlb: partial revert of 66b3923a1a0f" This reverts commit ff7925848b50050732ac0401e0acf27e8b241d7b. Now that the contiguous-hint hugetlb regression has been debugged and fixed upstream by 66ee95d16a7f ("mm: exclude HugeTLB pages from THP page_mapped() logic"), we can revert the previous partial revert of this feature. Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/mm/hugetlbpage.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 893e093c786c4256d52809eed697e9d70a6f6643 Author: Pablo Neira Ayuso <pablo@netfilter.org> Date: Tue May 24 11:23:51 2016 +0200 netfilter: nf_ct_helper: bail out on duplicated helpers Don't allow registration of helpers using the same tuple: { l3proto, l4proto, src-port } We lookup for the helper from the packet path using this tuple through __nf_ct_helper_find(). Therefore, we have to avoid having two helpers with the same tuple to ensure predictible behaviour. Don't compare the helper string names anymore since it is valid to register two helpers with the same name, but using different tuples. This is also implicitly fixing up duplicated helper registration via ports= modparam since the name comparison was defeating the tuple duplication validation. Reported-by: Feng Gao <gfree.wind@gmail.com> Reported-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/netfilter/nf_conntrack_helper.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 27a0faafdca53bda21ed340ca8f8960696dda049 Author: Peter Griffin <peter.griffin@linaro.org> Date: Wed May 11 17:33:11 2016 +0100 usb: dwc3: st: Fix USB_DR_MODE_PERIPHERAL configuration. Set USB3_FORCE_VBUSVALID when configured for USB_DR_MODE_PERIPHERAL mode, as it is required to have a working setup. This worked on the internal driver by relying on the reset value of the syscfg register as the bits aren't explicity cleared and set like the upstream driver. Also add a comment about what setting this bit means. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/dwc3/dwc3-st.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 7e14f47a55ed67c9d8a8acea6023412f92bac936 Author: William Wu <william.wu@rock-chips.com> Date: Fri May 13 18:30:42 2016 +0800 usb: gadget: composite: don't queue OS desc req if length is invalid In OS descriptors handling, if ctrl->bRequestType is USB_RECIP_DEVICE and w_index != 0x4 or (w_value >> 8) is true, it will not assign a valid value to req->length, but use the default value(-EOPNOTSUPP), and queue an OS desc request with the invalid req->length. It always happens on the platforms which use os_desc (for example: rk3366, rk3399), and cause kernel panic as follows (use dwc3 driver): Unable to handle kernel paging request at virtual address ffffffc0f7e00000 Internal error: Oops: 96000146 [#1] PREEMPT SMP PC is at __dma_clean_range+0x18/0x30 LR is at __swiotlb_map_page+0x50/0x64 Call trace: [<ffffffc0000930f8>] __dma_clean_range+0x18/0x30 [<ffffffc00062214c>] usb_gadget_map_request+0x134/0x1b0 [<ffffffc0005c289c>] __dwc3_ep0_do_control_data+0x110/0x14c [<ffffffc0005c2d38>] __dwc3_gadget_ep0_queue+0x198/0x1b8 [<ffffffc0005c2e18>] dwc3_gadget_ep0_queue+0xc0/0xe8 [<ffffffc00061cfec>] composite_ep0_queue.constprop.14+0x34/0x98 [<ffffffc00061dfb0>] composite_setup+0xf60/0x100c [<ffffffc0006204dc>] android_setup+0xd8/0x138 [<ffffffc0005c29a4>] dwc3_ep0_delegate_req+0x34/0x50 [<ffffffc0005c3534>] dwc3_ep0_interrupt+0x5dc/0xb58 [<ffffffc0005c0c3c>] dwc3_thread_interrupt+0x15c/0xa24 With this patch, the gadget driver will not queue a request and return immediately if req->length is invalid. And the usb controller driver can handle the unsupport request correctly. Signed-off-by: William Wu <william.wu@rock-chips.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/composite.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit c6010c8b4d2c6e75853ca63c602c9af56fcbead5 Author: Jim Lin <jilin@nvidia.com> Date: Fri May 13 20:32:16 2016 +0800 usb: gadget: f_fs: Fix kernel panic if use_os_string not set If c->cdev->use_os_string flag is not set, don't need to invoke ffs_do_os_descs() in _ffs_func_bind. So uninitialized ext_compat_id pointer won't be accessed by __ffs_func_bind_do_os_desc to cause kernel panic. Signed-off-by: Jim Lin <jilin@nvidia.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/function/f_fs.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit e877b729c649c2850f61f2ae37296ae701f9ad63 Author: Heinrich Schuchardt <xypron.glpk@gmx.de> Date: Sun May 8 22:50:12 2016 +0200 usb: gadget: f_tcm: out of bound access in usbg_drop_tpg Commit dc8c46a5ae77 ("usb: gadget: f_tcm: convert to new function interface with backward compatibility") introduced a possible out of bounds memory access: If tpg is not found in function usbg_drop_tpg, tpg_instances[TPG_INSTANCES] is accessed. Fixes: dc8c46a5ae77 ("usb: gadget: f_tcm: convert to new function interface with backward compatibility") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/function/f_tcm.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit ffeee83aa0461992e8a99a59db2df31933e60362 Author: Heinrich Schuchardt <xypron.glpk@gmx.de> Date: Sun May 8 23:20:59 2016 +0200 usb: gadget: avoid exposing kernel stack Function in_rq_cur copies random bytes from the stack. Zero the memory instead. Fixes: 132fcb460839 ("usb: gadget: Add Audio Class 2.0 Driver") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/function/f_uac2.c | 1 + 1 file changed, 1 insertion(+) commit 23e3439296a55affce3ef0ab78f1c2e03aec8767 Author: Arnd Bergmann <arnd@arndb.de> Date: Fri May 13 15:52:27 2016 +0200 usb: dwc2: fix regression on big-endian PowerPC/ARM systems A patch that went into Linux-4.4 to fix big-endian mode on a Lantiq MIPS system unfortunately broke big-endian operation on PowerPC APM82181 as reported by Christian Lamparter, and likely other systems. It actually introduced multiple issues: - it broke big-endian ARM kernels: any machine that was working correctly with a little-endian kernel is no longer using byteswaps on big-endian kernels, which clearly breaks them. - On PowerPC the same thing must be true: if it was working before, using big-endian kernels is now broken. Unlike ARM, 32-bit PowerPC usually uses big-endian kernels, so they are likely all broken. - The barrier for dwc2_writel is on the wrong side of the __raw_writel(), so the MMIO no longer synchronizes with DMA operations. - On architectures that require specific CPU instructions for MMIO access, using the __raw_ variant may turn this into a pointer dereference that does not have the same effect as the readl/writel. This patch is a simple revert for all architectures other than MIPS, in the hope that we can more easily backport it to fix the regression on PowerPC and ARM systems without breaking the Lantiq system again. We should follow this up with a more elaborate change to add runtime detection of endianness, to make sure it also works on all other combinations of architectures and implementations of the usb-dwc2 device. That patch however will be fairly large and not appropriate for backports to stable kernels. Felipe suggested a different approach, using an endianness switching register to always put the device into LE mode, but unfortunately the dwc2 hardware does not provide a generic way to do that. Also, I see no practical way of addressing the problem more generally by patching architecture specific code on MIPS. Fixes: 95c8bc360944 ("usb: dwc2: Use platform endianness when accessing registers") Acked-by: John Youn <johnyoun@synopsys.com> Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/dwc2/core.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 5edf673d07fdcb6498be24914f3f38f8d8843199 Author: hongkun.cao <hongkun.cao@mediatek.com> Date: Sat May 21 15:23:39 2016 +0800 pinctrl: mediatek: fix dual-edge code defect When a dual-edge irq is triggered, an incorrect irq will be reported on condition that the external signal is not stable and this incorrect irq has been registered. Correct the register offset. Cc: stable@vger.kernel.org Signed-off-by: Hongkun Cao <hongkun.cao@mediatek.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/mediatek/pinctrl-mtk-common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 53642399aa71b7c3b15d0305dc54738c4222bb1e Author: Jim Lin <jilin@nvidia.com> Date: Fri May 20 18:13:19 2016 +0800 usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT Current __ffs_data_do_os_desc() of f_fs.c will check reserved1 field of OS_DESC_EXT_COMPAT and return -EINVAL if it's 1. But MS OS 1.0 Descriptors http://msdn.microsoft.com/en-us/library/windows/hardware/gg463179.aspx defines that field to be 1. Signed-off-by: Jim Lin <jilin@nvidia.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc50dc28da9109d585416595fc23ebb2171f3b2f Author: Krzysztof Opasiak <k.opasiak@samsung.com> Date: Sun May 22 11:08:15 2016 +0200 usb: gadget: storage-common: Fix old comment about qualifier descriptor Device qualifier descriptor is now generated by composite.c code. So let's fix this old comment by removing parts which are no longer valid. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Krzysztof Opasiak <kopasiak90@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/function/storage_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d4529f9be1d72919f75f76f31773c4e98d03ce6b Author: Krzysztof Opasiak <k.opasiak@samsung.com> Date: Sun May 22 11:08:14 2016 +0200 usb: gadget: uac2: Drop unused device qualifier descriptor This descriptor is never used. Currently device qualifier descriptor is generated by compossite code so no need to keep it in function file. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Krzysztof Opasiak <kopasiak90@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/function/f_uac2.c | 12 ------------ 1 file changed, 12 deletions(-) commit e5a89162161d498170e7e39e6cfd2f71458c2b00 Author: Krzysztof Opasiak <k.opasiak@samsung.com> Date: Sun May 22 11:08:13 2016 +0200 usb: gadget: printer: Drop unused device qualifier descriptor This descriptor is never used. Currently device qualifier descriptor is generated by compossite code, so no need to keep it in function file. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Krzysztof Opasiak <kopasiak90@gmail.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/function/f_printer.c | 8 -------- 1 file changed, 8 deletions(-) commit 375f62e7dd38440f9b7b31d99a36cc4286f47004 Author: Alexandre Belloni <alexandre.belloni@free-electrons.com> Date: Sun May 22 15:35:13 2016 +0200 Documentation: configfs-usb-gadget-uvc: fix kernel version v3.20 doesn't exist, it is actually v4.0. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Documentation/ABI/testing/configfs-usb-gadget-uvc | 58 +++++++++++------------ 1 file changed, 29 insertions(+), 29 deletions(-) commit 15186f1011b088432a10f435aa6e2df5ab177503 Author: Vahram Aharonyan <vahrama@synopsys.com> Date: Mon May 23 22:41:59 2016 -0700 usb: dwc2: gadget: Do not halt isochronous endpoints Add a check in dwc2_hsotg_ep_sethalt() so that it does not halt isochronous endpoints. Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com> Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/dwc2/gadget.c | 5 +++++ 1 file changed, 5 insertions(+) commit 51da43b555ba19e0230ff5a5acc58eb0fffb6026 Author: Vahram Aharonyan <vahrama@synopsys.com> Date: Mon May 23 22:41:57 2016 -0700 usb: dwc2: gadget: Do not halt endpoint if active The gadget API function usb_ep_set_halt() expects the gadget to return -EAGAIN if the ep is active. Add support for this behavior. Otherwise this may break mass storage protocol if a STALL is attempted on the endpoint. Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com> Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/dwc2/gadget.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit d246dcb2331c5783743720e6510892eb1d2801d9 Author: Bin Liu <b-liu@ti.com> Date: Thu May 26 11:43:45 2016 -0500 usb: gadget: fix spinlock dead lock in gadgetfs [ 40.467381] ============================================= [ 40.473013] [ INFO: possible recursive locking detected ] [ 40.478651] 4.6.0-08691-g7f3db9a #37 Not tainted [ 40.483466] --------------------------------------------- [ 40.489098] usb/733 is trying to acquire lock: [ 40.493734] (&(&dev->lock)->rlock){-.....}, at: [<bf129288>] ep0_complete+0x18/0xdc [gadgetfs] [ 40.502882] [ 40.502882] but task is already holding lock: [ 40.508967] (&(&dev->lock)->rlock){-.....}, at: [<bf12a420>] ep0_read+0x20/0x5e0 [gadgetfs] [ 40.517811] [ 40.517811] other info that might help us debug this: [ 40.524623] Possible unsafe locking scenario: [ 40.524623] [ 40.530798] CPU0 [ 40.533346] ---- [ 40.535894] lock(&(&dev->lock)->rlock); [ 40.540088] lock(&(&dev->lock)->rlock); [ 40.544284] [ 40.544284] *** DEADLOCK *** [ 40.544284] [ 40.550461] May be due to missing lock nesting notation [ 40.550461] [ 40.557544] 2 locks held by usb/733: [ 40.561271] #0: (&f->f_pos_lock){+.+.+.}, at: [<c02a6114>] __fdget_pos+0x40/0x48 [ 40.569219] #1: (&(&dev->lock)->rlock){-.....}, at: [<bf12a420>] ep0_read+0x20/0x5e0 [gadgetfs] [ 40.578523] [ 40.578523] stack backtrace: [ 40.583075] CPU: 0 PID: 733 Comm: usb Not tainted 4.6.0-08691-g7f3db9a #37 [ 40.590246] Hardware name: Generic AM33XX (Flattened Device Tree) [ 40.596625] [<c010ffbc>] (unwind_backtrace) from [<c010c1bc>] (show_stack+0x10/0x14) [ 40.604718] [<c010c1bc>] (show_stack) from [<c04207fc>] (dump_stack+0xb0/0xe4) [ 40.612267] [<c04207fc>] (dump_stack) from [<c01886ec>] (__lock_acquire+0xf68/0x1994) [ 40.620440] [<c01886ec>] (__lock_acquire) from [<c0189528>] (lock_acquire+0xd8/0x238) [ 40.628621] [<c0189528>] (lock_acquire) from [<c06ad6b4>] (_raw_spin_lock_irqsave+0x38/0x4c) [ 40.637440] [<c06ad6b4>] (_raw_spin_lock_irqsave) from [<bf129288>] (ep0_complete+0x18/0xdc [gadgetfs]) [ 40.647339] [<bf129288>] (ep0_complete [gadgetfs]) from [<bf10a728>] (musb_g_giveback+0x118/0x1b0 [musb_hdrc]) [ 40.657842] [<bf10a728>] (musb_g_giveback [musb_hdrc]) from [<bf108768>] (musb_g_ep0_queue+0x16c/0x188 [musb_hdrc]) [ 40.668772] [<bf108768>] (musb_g_ep0_queue [musb_hdrc]) from [<bf12a944>] (ep0_read+0x544/0x5e0 [gadgetfs]) [ 40.678963] [<bf12a944>] (ep0_read [gadgetfs]) from [<c0284470>] (__vfs_read+0x20/0x110) [ 40.687414] [<c0284470>] (__vfs_read) from [<c0285324>] (vfs_read+0x88/0x114) [ 40.694864] [<c0285324>] (vfs_read) from [<c0286150>] (SyS_read+0x44/0x9c) [ 40.702051] [<c0286150>] (SyS_read) from [<c0107820>] (ret_fast_syscall+0x0/0x1c) This is caused by the spinlock bug in ep0_read(). Fix the two other deadlock sources in gadgetfs_setup() too. Cc: <stable@vger.kernel.org> # v3.16+ Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/legacy/inode.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 0015f9156092d07b3ec06d37d014328419d5832e Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Sat May 28 07:48:10 2016 +0300 usb: f_fs: off by one bug in _ffs_func_bind() This loop is supposed to set all the .num[] values to -1 but it's off by one so it skips the first element and sets one element past the end of the array. I've cleaned up the loop a little as well. Fixes: ddf8abd25994 ('USB: f_fs: the FunctionFS driver') Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/function/f_fs.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 4879efb34f7d49235fac334d76d9c6a77a021413 Author: Steinar H. Gunderson <sesse@google.com> Date: Tue May 24 20:13:15 2016 +0200 usb: dwc3: exynos: Fix deferred probing storm. dwc3-exynos has two problems during init if the regulators are slow to come up (for instance if the I2C bus driver is not on the initramfs) and return probe deferral. First, every time this happens, the driver leaks the USB phys created; they need to be deallocated on error. Second, since the phy devices are created before the regulators fail, this means that there's a new device to re-trigger deferred probing, which causes it to essentially go into a busy loop of re-probing the device until the regulators come up. Move the phy creation to after the regulators have succeeded, and also fix cleanup on failure. On my ODROID XU4 system (with Debian's initramfs which doesn't contain the I2C driver), this reduces the number of probe attempts (for each of the two controllers) from more than 2000 to eight. Signed-off-by: Steinar H. Gunderson <sesse@google.com> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Reviewed-by: Vivek Gautam <gautam.vivek@samsung.com> Fixes: d720f057fda4 ("usb: dwc3: exynos: add nop transceiver support") Cc: <stable@vger.kernel.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/dwc3/dwc3-exynos.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit f1bddbb3de60872acc2446eee97dbeb0a6d57acb Author: Krzysztof Opasiak <k.opasiak@samsung.com> Date: Thu May 5 10:46:05 2016 +0200 usb: gadget: Fix binding to UDC via configfs interface By default user could store only valid UDC name in configfs UDC attr by doing: echo $UDC_NAME > UDC Commit (855ed04 "usb: gadget: udc-core: independent registration of gadgets and gadget drivers") broke this behavior and allowed to store any arbitrary string in UDC file and udc core was waiting for such controller to appear. echo "any arbitrary string here" > UDC This commit fix this by adding a flag which prevents configfs gadget from being added to list of pending drivers if UDC with given name has not been found. Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> drivers/usb/gadget/configfs.c | 1 + drivers/usb/gadget/udc/udc-core.c | 12 ++++++++---- include/linux/usb/gadget.h | 3 +++ 3 files changed, 12 insertions(+), 4 deletions(-) commit d140b9bfcad9e53f1da67ad09dd5092b44d55c7b Author: Vineet Gupta <vgupta@synopsys.com> Date: Tue May 31 11:46:47 2016 +0530 ARC: don't enable DISCONTIGMEM unconditionally Signed-off-by: Vineet Gupta <vgupta@synopsys.com> arch/arc/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d0196c8d5d3057c5c21a82f3d0113ca8e501033b Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 11 18:05:39 2016 +0200 drm/omap: include gpio/consumer.h where needed A lot of the display drivers for OMAP use the gpio descriptor functions that are only available in linux/gpio.h if GPIOLIB is enabled and otherwise produce a build error: drivers/gpu/drm/omapdrm/displays/encoder-opa362.c: In function 'opa362_enable': drivers/gpu/drm/omapdrm/displays/encoder-opa362.c:101:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration] drivers/gpu/drm/omapdrm/displays/panel-dpi.c: In function 'panel_dpi_probe_pdata': drivers/gpu/drm/omapdrm/displays/panel-dpi.c:189:23: error: implicit declaration of function 'gpio_to_desc' [-Werror=implicit-function-declaration] drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c: In function 'sharp_ls_enable': drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c:120:3: error: implicit declaration of function 'gpiod_set_value_cansleep' [-Werror=implicit-function-declaration] This replaces the existing linux/gpio.h with linux/gpio/consumer.h where needed. In case of panel-lgphilips-lb035q02.c however, we also have to include linux/gpio.h to get the definition of gpio_is_valid and gpio_set_value_cansleep that are used for the non-DT case. Signed-off-by: Arnd Bergmann <arnd@arndb.de> [tomi.valkeinen@ti.com: resolved conflicts] Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/gpu/drm/omapdrm/displays/connector-hdmi.c | 1 + drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | 1 - drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 1 - drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c | 2 +- drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c | 2 +- 9 files changed, 6 insertions(+), 8 deletions(-) commit 2d8024534a9ae8426ed249f317106b3404594c2d Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 11 18:01:45 2016 +0200 drm/omap: include linux/seq_file.h where needed The omapdrm driver relies on this header to be included implicitly, but this does not always work, and I get this error in randconfig builds: gpu/drm/omapdrm/dss/hdmi_phy.c: In function 'hdmi_phy_dump': gpu/drm/omapdrm/dss/hdmi_phy.c:34:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] gpu/drm/omapdrm/dss/hdmi_wp.c: In function 'hdmi_wp_dump': gpu/drm/omapdrm/dss/hdmi_wp.c:26:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] gpu/drm/omapdrm/dss/hdmi_pll.c: In function 'hdmi_pll_dump': gpu/drm/omapdrm/dss/hdmi_pll.c:30:2: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] This adds the #include statements in all files that have a seq_printf statement. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | 1 + drivers/gpu/drm/omapdrm/dss/hdmi_pll.c | 1 + drivers/gpu/drm/omapdrm/dss/hdmi_wp.c | 1 + drivers/gpu/drm/omapdrm/omap_debugfs.c | 2 ++ drivers/gpu/drm/omapdrm/omap_dmm_tiler.c | 1 + drivers/gpu/drm/omapdrm/omap_fb.c | 2 ++ drivers/gpu/drm/omapdrm/omap_gem.c | 1 + 7 files changed, 9 insertions(+) commit 62cb0751c87cb2d0af0629d68cfb12d67f39badf Author: Peter Ujfalusi <peter.ujfalusi@ti.com> Date: Thu Apr 28 15:42:49 2016 +0300 Revert "drm/omap: no need to select OMAP2_DSS" This reverts commit 1c278e5e3718d15475ec08ee2135f37a6b13361c. If DRM_OMAP does not select OMAP2_DSS it is possible to build a kernel with DRM_OMAP only and not selecting OMAP2_DSS. Since omapdrm depends on OMAP2_DSS this will result on broken kernel build. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/gpu/drm/omapdrm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 973999aa0140481e590e791c320009d25a88d377 Author: Peter Ujfalusi <peter.ujfalusi@ti.com> Date: Thu Apr 28 15:42:18 2016 +0300 drm/omap: Remove regulator API abuse regulator_can_change_voltage() is deprecated and it's use is not necessary as commit: 6a0028b3dd67b regulator: Deprecate regulator_can_change_voltage() describers it clearly. Also, regulator_set_voltage() is misused in the driver, as it is supposed to be used only in cases where the regulator voltage needs to be changed dynamically at runtime. In DSS's case, we always want a fixed voltage, set in the .dts files. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/gpu/drm/omapdrm/dss/dsi.c | 9 --------- drivers/gpu/drm/omapdrm/dss/hdmi4.c | 9 --------- drivers/gpu/drm/omapdrm/dss/hdmi5.c | 9 --------- 3 files changed, 27 deletions(-) commit 4bafcbc77fb0b26b0052dbd577ccc888a63e6404 Author: Jim Lodes <jim.lodes@garmin.com> Date: Thu Apr 21 12:27:49 2016 -0500 OMAPDSS: HDMI5: Change DDC timings The DDC scl high and low times were set to the minimum values from the i2c specification, but the i2c specification takes into account the rise time and fall time to calculate the frequency. To pass HDMI certification DDC can not exceed 100kHz therefore in a system where the rise times and fall times are negligible the high and low times for scl need to be 10us. Signed-off-by: Jim Lodes <jim.lodes@garmin.com> Signed-off-by: J.D. Schroeder <jay.schroeder@garmin.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 4 ++-- drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 08f707ac3eb1fa86c43c705f9f78c1e40c49aba1 Author: Jim Lodes <jim.lodes@garmin.com> Date: Thu Apr 21 12:49:00 2016 -0500 OMAPDSS: HDMI5: Fix AVI infoframe The AVI infoframe R0-R3 in the 2nd data byte represents the Active Format Aspect Ratio. It is four bits long not two bits. This fixes that mask used to extract the bits before writing the bits to the hardware registers. Signed-off-by: Jim Lodes <jim.lodes@garmin.com> Signed-off-by: J.D. Schroeder <jay.schroeder@garmin.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 2 +- drivers/video/fbdev/omap2/omapfb/dss/hdmi5_core.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 91cd220aadc88dff6650127e7b19a85569ef8b7c Author: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Fri Apr 1 10:29:29 2016 +0300 drm/omap: fix OMAP4 hdmi_core_powerdown_disable() hdmi_core_powerdown_disable() is supposed to disable HDMI core's power-down mode. However, the function sets the power-down bit to 0, which means "enable power-down". This hasn't caused any issues as the PD seems to affect only interrupts from HDMI core, and none of those interrupts are used at the moment. CEC functionality requires core interrupts, and the PD mode needs to be fixed. This patch fixes hdmi_core_powerdown_disable() to actually disable the PD mode. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Hans Verkuil <hverkuil@xs4all.nl> drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d9e32ecda41bb6b6301fd2a0945003bb8f4e2ba1 Author: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Fri Mar 18 09:02:18 2016 +0200 drm/omap: Fix missing includes With certain kernel config options many omapdrm files fail to compile due to missing include of linux/gpio/consumer.h and linux/of.h. This patch adds those includes. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reported-by: Dan Murphy <dmurphy@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> drivers/gpu/drm/omapdrm/displays/encoder-opa362.c | 1 + drivers/gpu/drm/omapdrm/displays/panel-dpi.c | 1 + drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c | 1 + drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 1 + drivers/gpu/drm/omapdrm/dss/hdmi4.c | 1 + drivers/gpu/drm/omapdrm/dss/hdmi5.c | 1 + 6 files changed, 6 insertions(+) commit 2639d6b9be19e029869158a6b8cbc5d253cd7bbc Author: Arnd Bergmann <arnd@arndb.de> Date: Mon May 9 23:51:27 2016 +0200 drm/omapdrm: include pinctrl/consumer.h where needed In some configurations, we can build the OMAP dss driver without implictly including the pinctrl consumer definitions, causing a build error: gpu/drm/omapdrm/dss/dss.c: In function 'dss_runtime_suspend': gpu/drm/omapdrm/dss/dss.c:1268:2: error: implicit declaration of function 'pinctrl_pm_select_sleep_state' [-Werror=implicit-function-declaration] This adds an explicit #include. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/gpu/drm/omapdrm/dss/dss.c | 1 + 1 file changed, 1 insertion(+) commit b5de8d0df80fa87f1f97fbcc4bbc8cad0a018802 Author: Filipe Manana <fdmanana@suse.com> Date: Fri May 27 22:21:27 2016 +0100 Btrfs: fix race between device replace and read repair While we are finishing a device replace operation we can have a concurrent task trying to do a read repair operation, in which case it will call btrfs_map_block() to get a struct btrfs_bio which can have a stripe that points to the source device of the device replace operation. This allows for the read repair task to dereference the stripe's device pointer after the device replace operation has freed the source device, resulting in an invalid memory access. This is similar to the problem solved by my previous patch in the same series and named "Btrfs: fix race between device replace and discard". So fix this by surrounding the call to btrfs_map_block() and the code that uses the returned struct btrfs_bio with calls to btrfs_bio_counter_inc_blocked() and btrfs_bio_counter_dec(), giving the proper serialization with the finishing phase of the device replace operation. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/extent_io.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 2999241daa8d77947f108dfbde35c268cd7bd709 Author: Filipe Manana <fdmanana@suse.com> Date: Fri May 27 17:42:05 2016 +0100 Btrfs: fix race between device replace and discard While we are finishing a device replace operation, we can make a discard operation (fs mounted with -o discard) do an invalid memory access like the one reported by the following trace: [ 3206.384654] general protection fault: 0000 [#1] PREEMPT SMP [ 3206.387520] Modules linked in: dm_mod btrfs crc32c_generic xor raid6_pq acpi_cpufreq tpm_tis psmouse tpm ppdev sg parport_pc evdev i2c_piix4 parport processor serio_raw i2c_core pcspkr button loop autofs4 ext4 crc16 jbd2 mbcache sr_mod cdrom ata_generic sd_mod virtio_scsi ata_piix libata virtio_pci virtio_ring scsi_mod e1000 virtio floppy [last unloaded: btrfs] [ 3206.388595] CPU: 14 PID: 29194 Comm: fsstress Not tainted 4.6.0-rc7-btrfs-next-29+ #1 [ 3206.388595] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [ 3206.388595] task: ffff88017ace0100 ti: ffff880171b98000 task.ti: ffff880171b98000 [ 3206.388595] RIP: 0010:[<ffffffff8124d233>] [<ffffffff8124d233>] blkdev_issue_discard+0x5c/0x2a7 [ 3206.388595] RSP: 0018:ffff880171b9bb80 EFLAGS: 00010246 [ 3206.388595] RAX: ffff880171b9bc28 RBX: 000000000090d000 RCX: 0000000000000000 [ 3206.388595] RDX: ffffffff82fa1b48 RSI: ffffffff8179f46c RDI: ffffffff82fa1b48 [ 3206.388595] RBP: ffff880171b9bcc0 R08: 0000000000000000 R09: 0000000000000001 [ 3206.388595] R10: ffff880171b9bce0 R11: 000000000090f000 R12: ffff880171b9bbe8 [ 3206.388595] R13: 0000000000000010 R14: 0000000000004868 R15: 6b6b6b6b6b6b6b6b [ 3206.388595] FS: 00007f6182e4e700(0000) GS:ffff88023fdc0000(0000) knlGS:0000000000000000 [ 3206.388595] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 3206.388595] CR2: 00007f617c2bbb18 CR3: 000000017ad9c000 CR4: 00000000000006e0 [ 3206.388595] Stack: [ 3206.388595] 0000000000004878 0000000000000000 0000000002400040 0000000000000000 [ 3206.388595] 0000000000000000 ffff880171b9bbe8 ffff880171b9bbb0 ffff880171b9bbb0 [ 3206.388595] ffff880171b9bbc0 ffff880171b9bbc0 ffff880171b9bbd0 ffff880171b9bbd0 [ 3206.388595] Call Trace: [ 3206.388595] [<ffffffffa042899e>] btrfs_issue_discard+0x12f/0x143 [btrfs] [ 3206.388595] [<ffffffffa042899e>] ? btrfs_issue_discard+0x12f/0x143 [btrfs] [ 3206.388595] [<ffffffffa042e862>] btrfs_discard_extent+0x87/0xde [btrfs] [ 3206.388595] [<ffffffffa04303b5>] btrfs_finish_extent_commit+0xb2/0x1df [btrfs] [ 3206.388595] [<ffffffff8149c246>] ? __mutex_unlock_slowpath+0x150/0x15b [ 3206.388595] [<ffffffffa04464c4>] btrfs_commit_transaction+0x7fc/0x980 [btrfs] [ 3206.388595] [<ffffffff8149c246>] ? __mutex_unlock_slowpath+0x150/0x15b [ 3206.388595] [<ffffffffa0459af6>] btrfs_sync_file+0x38f/0x428 [btrfs] [ 3206.388595] [<ffffffff811a8292>] vfs_fsync_range+0x8c/0x9e [ 3206.388595] [<ffffffff811a82c0>] vfs_fsync+0x1c/0x1e [ 3206.388595] [<ffffffff811a8417>] do_fsync+0x31/0x4a [ 3206.388595] [<ffffffff811a8637>] SyS_fsync+0x10/0x14 [ 3206.388595] [<ffffffff8149e025>] entry_SYSCALL_64_fastpath+0x18/0xa8 [ 3206.388595] [<ffffffff81100c6b>] ? time_hardirqs_off+0x9/0x14 [ 3206.388595] [<ffffffff8108e87d>] ? trace_hardirqs_off_caller+0x1f/0xaa This happens because when we call btrfs_map_block() from btrfs_discard_extent() to get a btrfs_bio structure, the device replace operation has not finished yet, but before we use the device of one of the stripes from the returned btrfs_bio structure, the device object is freed. This is illustrated by the following diagram. CPU 1 CPU 2 btrfs_dev_replace_start() (...) btrfs_dev_replace_finishing() btrfs_start_transaction() btrfs_commit_transaction() (...) btrfs_sync_file() btrfs_start_transaction() (...) btrfs_commit_transaction() btrfs_finish_extent_commit() btrfs_discard_extent() btrfs_map_block() --> returns a struct btrfs_bio with a stripe that has a device field pointing to source device of the replace operation (the device that is being replaced) mutex_lock(&uuid_mutex) mutex_lock(&fs_info->fs_devices->device_list_mutex) mutex_lock(&fs_info->chunk_mutex) btrfs_dev_replace_update_device_in_mapping_tree() --> iterates the mapping tree and for each extent map that has a stripe pointing to the source device, it updates the stripe to point to the target device instead btrfs_rm_dev_replace_blocked() --> waits for fs_info->bio_counter to go down to 0 btrfs_rm_dev_replace_remove_srcdev() --> removes source device from the list of devices mutex_unlock(&fs_info->chunk_mutex) mutex_unlock(&fs_info->fs_devices->device_list_mutex) mutex_unlock(&uuid_mutex) btrfs_rm_dev_replace_free_srcdev() --> frees the source device --> iterates over all stripes of the returned struct btrfs_bio --> for each stripe it dereferences its device pointer --> it ends up finding a pointer to the device used as the source device for the replace operation and that was already freed So fix this by surrounding the call to btrfs_map_block(), and the code that uses the returned struct btrfs_bio, with calls to btrfs_bio_counter_inc_blocked() and btrfs_bio_counter_dec(), so that the finishing phase of the device replace operation blocks until the the bio counter decreases to zero before it frees the source device. This is the same approach we do at btrfs_map_bio() for example. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/extent-tree.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 852f42a69b93dc71507adedeed876d57b8c2c2fa Merge: 4469854 bc9dc9d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 30 15:27:07 2016 -0700 Merge branch 'uuid' (lib/uuid fixes from Andy) Merge lib/uuid fixes from Andy Shevchenko. * emailed patches from Andy Shevchenko <andriy.shevchenko@linux.intel.com>: lib/uuid.c: use correct offset in uuid parser lib/uuid: add a test module commit bc9dc9d5eec908806f1b15c9ec2253d44dcf7835 Author: Bjørn Mork <bjorn@mork.no> Date: Mon May 30 17:40:42 2016 +0300 lib/uuid.c: use correct offset in uuid parser Use '+ 0' and '+ 1' as offsets, like they were intended, instead of adding to the result. Fixes: 2b1b0d66704a ("lib/uuid.c: introduce a few more generic helpers") Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/uuid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit cfaff0e515b544fa0a9cdc58a975cc629ff3bc17 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Mon May 30 17:40:41 2016 +0300 lib/uuid: add a test module It appears that somehow I missed a test of the latest UUID rework which landed in the kernel. Present a small test module to avoid such cases in the future. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/Kconfig.debug | 3 ++ lib/Makefile | 1 + lib/test_uuid.c | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 137 insertions(+) commit 446985428d2cd10efd5d139c33de16c50ee771ba Merge: b02b1fb ab6a11a Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 30 15:20:18 2016 -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: - missing selection in public_key that may result in a build failure - Potential crash in error path in omap-sham - ccp AES XTS bug that affects requests larger than 4096" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: ccp - Fix AES XTS error for request sizes above 4096 crypto: public_key: select CRYPTO_AKCIPHER crypto: omap-sham - potential Oops on error in probe commit 4a3262b17c96b6ff332134c9e57f193a20226eb2 Author: Ilya Dryomov <idryomov@gmail.com> Date: Mon May 30 18:33:32 2016 +0200 libceph: use %s instead of %pE in dout()s Commit d30291b985d1 ("libceph: variable-sized ceph_object_id") changed dout()s in what is now encode_request() and ceph_object_locator_to_pg() to use %pE, mostly to document that, although all rbd and cephfs object names are NULL-terminated strings, ceph_object_id will handle any RADOS object name, including the one containing NULs, just fine. However, it turns out that vbin_printf() can't handle anything but ints and %s - all %p suffixes are ignored. The buffer %p** points to isn't recorded, resulting in trash in the messages if the buffer had been reused by the time bstr_printf() got to it. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 6 +++--- net/ceph/osdmap.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) commit dc045a9168c83b2dc590930a0565e066346de382 Author: Ilya Dryomov <idryomov@gmail.com> Date: Fri May 27 15:18:34 2016 +0200 libceph: put request only if it's done in handle_reply() handle_reply() may be called twice on the same request: on ack and then on commit. This occurs on btrfs-formatted OSDs or if cephfs sync write path is triggered - CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK. handle_reply() handles this with the help of done_request(). Fixes: 5aea3dcd5021 ("libceph: a major OSD client update") Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b7ec35b304b64af2830027350cc99d31e6e537c2 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:25 2016 +0200 libceph: change ceph_osdmap_flag() to take osdc For the benefit of every single caller, take osdc instead of map. Also, now that osdc->osdmap can't ever be NULL, drop the check. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> fs/ceph/file.c | 8 ++++---- include/linux/ceph/osd_client.h | 5 +++++ include/linux/ceph/osdmap.h | 5 ----- net/ceph/osd_client.c | 39 +++++++++++++++++++-------------------- 4 files changed, 28 insertions(+), 29 deletions(-) commit 60f2b4b8af548150cc56bf6fd213e47897964794 Author: Vineet Gupta <vgupta@synopsys.com> Date: Mon May 30 19:21:22 2016 +0530 ARC: [intc-compact] simplify code for 2 priority levels ARC700 support for 2 interrupt priorities historically allowed even slow perpherals such as emac and uart to setup high priority interrupts which was wrong from the beginning as they could possibly delay the more critical timer interrupt. The hardware support for 2 level interrupts in ARCompact is less than ideal anyways (judging from the "hacks" in low level entry code and thus is not used in productions systems I know of. So reduce the scope of this to timer only, thereby reducing a bunch of complexity. Signed-off-by: Vineet Gupta <vgupta@synopsys.com> arch/arc/Kconfig | 22 ++-------------------- arch/arc/kernel/entry-compact.S | 18 ++---------------- arch/arc/kernel/intc-compact.c | 6 ++---- 3 files changed, 6 insertions(+), 40 deletions(-) commit 99cf4b267e4863b95c7d33f59371b6ccdfd4a4ce Author: Fabio Estevam <fabio.estevam@nxp.com> Date: Wed May 25 10:49:52 2016 -0300 ASoC: ak4613: Remove owner assignment from platform_driver This platform_driver does not need to set an owner as it will be populated by the driver core. Generated by scripts/coccinelle/api/platform_no_drv_owner.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/ak4613.c | 1 - 1 file changed, 1 deletion(-) commit 545ebd9a9be6bcbcf3e8dc24b874bfd634131946 Author: Linus Walleij <linus.walleij@linaro.org> Date: Mon May 30 17:11:59 2016 +0200 gpio: drop lock before reading GPIO direction When adding the gpiochip, the GPIO HW drivers' callback get_direction() could get called in atomic context. Some of the GPIO HW drivers may sleep when accessing the register. Move the lock before initializing the descriptors. Reported-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpiolib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 54d77198fdfbc4f0fe11b4252c1d9c97d51a3264 Author: Linus Walleij <linus.walleij@linaro.org> Date: Mon May 30 16:48:39 2016 +0200 gpio: bail out silently on NULL descriptors In fdeb8e1547cb9dd39d5d7223b33f3565cf86c28e ("gpio: reflect base and ngpio into gpio_device") assumed that GPIO descriptors are either valid or error pointers, but gpiod_get_[index_]optional() actually return NULL descriptors and then all subsequent calls should just bail out. Cc: stable@vger.kernel.org Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Andrew Lunn <andrew@lunn.ch> Fixes: fdeb8e1547cb ("gpio: reflect base and ngpio into gpio_device") Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpiolib.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 62a584fe05eef1f80ed49a286a29328f1a224fb9 Author: Tejun Heo <tj@kernel.org> Date: Fri May 27 14:34:46 2016 -0400 writeback: use higher precision calculation in domain_dirty_limits() As vm.dirty_[background_]bytes can't be applied verbatim to multiple cgroup writeback domains, they get converted to percentages in domain_dirty_limits() and applied the same way as vm.dirty_[background]ratio. However, if the specified bytes is lower than 1% of available memory, the calculated ratios become zero and the writeback domain gets throttled constantly. Fix it by using per-PAGE_SIZE instead of percentage for ratio calculations. Also, the updated DIV_ROUND_UP() usages now should yield 1/4096 (0.0244%) as the minimum ratio as long as the specified bytes are above zero. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Miao Xie <miaoxie@huawei.com> Link: http://lkml.kernel.org/g/57333E75.3080309@huawei.com Cc: stable@vger.kernel.org # v4.2+ Fixes: 9fc3a43e1757 ("writeback: separate out domain_dirty_limits()") Reviewed-by: Jan Kara <jack@suse.cz> Adjusted comment based on Jan's suggestion. Signed-off-by: Jens Axboe <axboe@fb.com> mm/page-writeback.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) commit 8b92e17efe029cc19f435f9fcbdfb1e7b9beb0ef Author: Linus Walleij <linus.walleij@linaro.org> Date: Fri May 27 14:24:04 2016 +0200 gpio: handle compatible ioctl() pointers If we're using the compatible ioctl() we need to handle the argument pointer in a special way or there will be trouble. Fixes: 3c702e9987e2 ("gpio: add a userspace chardev ABI for GPIOs") Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpiolib.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit 089f1c6b2daeab750fd92a28529928bc13c95d97 Author: Alex Williamson <alex.williamson@redhat.com> Date: Mon May 30 07:58:10 2016 -0600 vfio/type1: Fix build warning This function cannot actually be called with npage = 0, so in practice this doesn't return an uninitialized value. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> drivers/vfio/vfio_iommu_type1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 956b56a984ddf10aa69b25318dc04430101beed6 Author: Alex Williamson <alex.williamson@redhat.com> Date: Mon May 30 07:50:10 2016 -0600 vfio/pci: Fix ordering of eventfd vs virqfd shutdown Both the INTx and MSI/X disable paths do an eventfd_ctx_put() for the trigger eventfd before calling vfio_virqfd_disable() any potential mask and unmask eventfds. This opens a use-after-free race where an inopportune irqfd can reference the freed signalling eventfd. Reorder to avoid this possibility. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> drivers/vfio/pci/vfio_pci_intrs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6cacd115a8aafdc3f0f47c30af9d3a55a18074db Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Date: Sun May 29 23:31:23 2016 -0700 cpufreq: intel_pstate: Downgrade print level for _PPC Downgrade pr_info to pr_debug for the "_PPC limits will be enforced" message. In server systems with many cores this message is annoying. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> [ rjw: Changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/intel_pstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06061dc63bff8d609bc8d64f5d3ef59d0a673b25 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 11 14:49:53 2016 +0200 phy: exynos-mipi-video: avoid uninitialized variable use A rework of the exynos-mipi-video driver caused a warning about the new __set_phy_state function potentially accessing a variable before its initialization: drivers/phy/phy-exynos-mipi-video.c: In function '__set_phy_state': drivers/phy/phy-exynos-mipi-video.c:238:13: error: 'val' may be used uninitialized in this function [-Werror=maybe-uninitialized] return val & data->resetn_val; ~~~~^~~~~~~~~~~~~~~~~~ drivers/phy/phy-exynos-mipi-video.c:235:6: note: 'val' was declared here u32 val; The failure scenario here is the offset passed into a the stub regmap_read() function that does not modify its output, however regmap_read() can also fail for other reasons, so adding error handling (in this case, returning zero from is_running) seems the best solution. Note that this warning showed up with the ARM s5pv210_defconfig, indicating that we most likely want to either enable CONFIG_REGMAP in that defconfig as well, or disable the phy-exynos-mipi-video driver. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Fixes: 97a3042f7616 ("phy: exynos-mipi-video: Rewrite handling of phy registers") Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> drivers/phy/phy-exynos-mipi-video.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 6fbae35a3170c3e2b1b9d7b9cc943cbe48771362 Author: Kailang Yang <kailang@realtek.com> Date: Mon May 30 16:44:20 2016 +0800 ALSA: hda/realtek - Add support for new codecs ALC700/ALC701/ALC703 Support new codecs for ALC700/ALC701/ALC703. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/patch_realtek.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e69e7e03ed225abf3e1c43545aa3bcb68dc81d5f Author: Kailang Yang <kailang@realtek.com> Date: Mon May 30 15:58:28 2016 +0800 ALSA: hda/realtek - ALC256 speaker noise issue That is some different register for ALC255 and ALC256. ALC256 can't fit with some ALC255 register. This issue is cause from LDO output voltage control. This patch is updated the right LDO register value. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/patch_realtek.c | 52 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) commit 22ab04e814f4fe2ce72a13d291491f98ef6ac757 Author: Filipe Manana <fdmanana@suse.com> Date: Wed May 18 20:29:44 2016 +0100 Btrfs: fix race between device replace and chunk allocation While iterating and copying extents from the source device, the device replace code keeps adjusting a left cursor that is used to make sure that once we finish processing a device extent, any future writes to extents from the corresponding block group will get into both the source and target devices. This left cursor is also used for resuming the device replace operation at mount time. However using this left cursor to decide whether writes go into both devices or only the source device is not enough to guarantee we don't miss copying extents into the target device. There are two cases where the current approach fails. The first one is related to when there are holes in the device and they get allocated for new block groups while the device replace operation is iterating the device extents (more on this explained below). The second one is that when that loop over the device extents finishes, we start dellaloc, wait for all ordered extents and then commit the current transaction, we might have got new block groups allocated that are now using a device extent that has an offset greater then or equals to the value of the left cursor, in which case writes to extents belonging to these new block groups will get issued only to the source device. For the first case where the current approach of using a left cursor fails, consider the source device currently has the following layout: [ extent bg A ] [ hole, unallocated space ] [extent bg B ] 3Gb 4Gb 5Gb While we are iterating the device extents from the source device using the commit root of the device tree, the following happens: CPU 1 CPU 2 <we are at transaction N> scrub_enumerate_chunks() --> searches the device tree for extents belonging to the source device using the device tree's commit root --> 1st iteration finds extent belonging to block group A --> sets block group A to RO mode (btrfs_inc_block_group_ro) --> sets cursor left to found_key.offset which is 3Gb --> scrub_chunk() starts copies all allocated extents from block group's A stripe at source device into target device btrfs_alloc_chunk() --> allocates device extent in the range [4Gb, 5Gb[ from the source device for a new block group C extent allocated from block group C for a direct IO, buffered write or btree node/leaf extent is written to, perhaps in response to a writepages() call from the VM or directly through direct IO the write is made only against the source device and not against the target device because the extent's offset is in the interval [4Gb, 5Gb[ which is larger then the value of cursor_left (3Gb) --> scrub_chunks() finishes --> updates left cursor from 3Gb to 4Gb --> btrfs_dec_block_group_ro() sets block group A back to RW mode <we are still at transaction N> --> 2nd iteration finds extent belonging to block group B - it did not find the new extent in the range [4Gb, 5Gb[ for block group C because we are using the device tree's commit root or even because the block group's items are not all yet inserted in the respective btrees, that is, the block group is still attached to some transaction handle's new_bgs list and btrfs_create_pending_block_groups() was not called yet against that transaction handle, so the device extent items were not yet inserted into the devices tree <we are still at transaction N> --> so we end not copying anything from the newly allocated device extent from the source device to the target device So fix this by making __btrfs_map_block() always redirect writes to the target device as well, independently of the left cursor's value. With this change the left cursor is now used only for the purpose of tracking progress and allow a mount operation to resume a device replace. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/volumes.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) commit 1a1a8b732c7e958e6eba0680439e814efde2362d Author: Filipe Manana <fdmanana@suse.com> Date: Sat May 14 19:44:40 2016 +0100 Btrfs: fix race setting block group back to RW mode during device replace After it finishes processing a device extent, the device replace code sets back the block group to RW mode and then after that it sets the left cursor to match the logical end address of the block group, so that future writes into extents belonging to the block group go both the source (old) and target (new) devices. However from the moment we turn the block group back to RW mode we have a short time window, that lasts until we update the left cursor's value, where extents can be allocated from the block group and written to, in which case they will not be copied/written to the target (new) device. Fix this by updating the left cursor's value before turning the block group back to RW mode. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/scrub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 81e87a736c5581e83f52dc054b368993ec7f16d7 Author: Filipe Manana <fdmanana@suse.com> Date: Sat May 14 16:32:35 2016 +0100 Btrfs: fix unprotected assignment of the left cursor for device replace We were assigning new values to fields of the device replace object without holding the respective lock after processing each device extent. This is important for the left cursor field which can be accessed by a concurrent task running __btrfs_map_block (which, correctly, takes the device replace lock). So change these fields while holding the device replace lock. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/scrub.c | 4 ++++ 1 file changed, 4 insertions(+) commit f0e9b7d6401959816599191d1d9db90b6fd750db Author: Filipe Manana <fdmanana@suse.com> Date: Sat May 14 09:12:53 2016 +0100 Btrfs: fix race setting block group readonly during device replace When we do a device replace, for each device extent we find from the source device, we set the corresponding block group to readonly mode to prevent writes into it from happening while we are copying the device extent from the source to the target device. However just before we set the block group to readonly mode some concurrent task might have already allocated an extent from it or decided it could perform a nocow write into one of its extents, which can make the device replace process to miss copying an extent since it uses the extent tree's commit root to search for extents and only once it finishes searching for all extents belonging to the block group it does set the left cursor to the logical end address of the block group - this is a problem if the respective ordered extents finish while we are searching for extents using the extent tree's commit root and no transaction commit happens while we are iterating the tree, since it's the delayed references created by the ordered extents (when they complete) that insert the extent items into the extent tree (using the non-commit root of course). Example: CPU 1 CPU 2 btrfs_dev_replace_start() btrfs_scrub_dev() scrub_enumerate_chunks() --> finds device extent belonging to block group X <transaction N starts> starts buffered write against some inode writepages is run against that inode forcing dellaloc to run btrfs_writepages() extent_writepages() extent_write_cache_pages() __extent_writepage() writepage_delalloc() run_delalloc_range() cow_file_range() btrfs_reserve_extent() --> allocates an extent from block group X (which is not yet in RO mode) btrfs_add_ordered_extent() --> creates ordered extent Y flush_epd_write_bio() --> bio against the extent from block group X is submitted btrfs_inc_block_group_ro(bg X) --> sets block group X to readonly scrub_chunk(bg X) scrub_stripe(device extent from srcdev) --> keeps searching for extent items belonging to the block group using the extent tree's commit root --> it never blocks due to fs_info->scrub_pause_req as no one tries to commit transaction N --> copies all extents found from the source device into the target device --> finishes search loop bio completes ordered extent Y completes and creates delayed data reference which will add an extent item to the extent tree when run (typically at transaction commit time) --> so the task doing the scrub/device replace at CPU 1 misses this and does not copy this extent into the new/target device btrfs_dec_block_group_ro(bg X) --> turns block group X back to RW mode dev_replace->cursor_left is set to the logical end offset of block group X So fix this by waiting for all cow and nocow writes after setting a block group to readonly mode. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/ordered-data.c | 6 +++++- fs/btrfs/ordered-data.h | 2 +- fs/btrfs/scrub.c | 40 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) commit 57ba4cb85bffc0c7c6567c89d23713721fea9655 Author: Filipe Manana <fdmanana@suse.com> Date: Fri May 20 04:34:23 2016 +0100 Btrfs: fix race between device replace and block group removal When it's finishing, the device replace code iterates all extent maps representing block group and for each one that has a stripe that refers to the source device, it replaces its device with the target device. However when it replaces the source device with the target device it, the target device still has an ID of 0ULL (BTRFS_DEV_REPLACE_DEVID), only after its ID is changed to match the one from the source device. This leads to races with the chunk removal code that can temporarly see a device with an ID of 0ULL and then attempt to use that ID to remove items from the device tree and fail, causing a transaction abort: [ 9238.594364] BTRFS info (device sdf): dev_replace from /dev/sdf (devid 3) to /dev/sde finished [ 9238.594377] ------------[ cut here ]------------ [ 9238.594402] WARNING: CPU: 14 PID: 21566 at fs/btrfs/volumes.c:2771 btrfs_remove_chunk+0x2e5/0x793 [btrfs] [ 9238.594403] BTRFS: Transaction aborted (error 1) [ 9238.594416] Modules linked in: btrfs crc32c_generic acpi_cpufreq xor tpm_tis tpm raid6_pq ppdev parport_pc processor psmouse parport i2c_piix4 evdev sg i2c_core se rio_raw pcspkr 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 fl oppy [last unloaded: btrfs] [ 9238.594418] CPU: 14 PID: 21566 Comm: btrfs-cleaner Not tainted 4.6.0-rc7-btrfs-next-29+ #1 [ 9238.594419] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [ 9238.594421] 0000000000000000 ffff88017f1dbc60 ffffffff8126b42c ffff88017f1dbcb0 [ 9238.594422] 0000000000000000 ffff88017f1dbca0 ffffffff81052b14 00000ad37f1dbd18 [ 9238.594423] 0000000000000001 ffff88018068a558 ffff88005c4b9c00 ffff880233f60db0 [ 9238.594424] Call Trace: [ 9238.594428] [<ffffffff8126b42c>] dump_stack+0x67/0x90 [ 9238.594430] [<ffffffff81052b14>] __warn+0xc2/0xdd [ 9238.594432] [<ffffffff81052b7a>] warn_slowpath_fmt+0x4b/0x53 [ 9238.594434] [<ffffffff8116c311>] ? kmem_cache_free+0x128/0x188 [ 9238.594450] [<ffffffffa04d43f5>] btrfs_remove_chunk+0x2e5/0x793 [btrfs] [ 9238.594452] [<ffffffff8108e456>] ? arch_local_irq_save+0x9/0xc [ 9238.594464] [<ffffffffa04a26fa>] btrfs_delete_unused_bgs+0x317/0x382 [btrfs] [ 9238.594476] [<ffffffffa04a961d>] cleaner_kthread+0x1ad/0x1c7 [btrfs] [ 9238.594489] [<ffffffffa04a9470>] ? btree_invalidatepage+0x8e/0x8e [btrfs] [ 9238.594490] [<ffffffff8106f403>] kthread+0xd4/0xdc [ 9238.594494] [<ffffffff8149e242>] ret_from_fork+0x22/0x40 [ 9238.594495] [<ffffffff8106f32f>] ? kthread_stop+0x286/0x286 [ 9238.594496] ---[ end trace 183efbe50275f059 ]--- The sequence of steps leading to this is like the following: CPU 1 CPU 2 btrfs_dev_replace_finishing() at this point dev_replace->tgtdev->devid == BTRFS_DEV_REPLACE_DEVID (0ULL) ... btrfs_start_transaction() btrfs_commit_transaction() btrfs_delete_unused_bgs() btrfs_remove_chunk() looks up for the extent map corresponding to the chunk lock_chunks() (chunk_mutex) check_system_chunk() unlock_chunks() (chunk_mutex) locks fs_info->chunk_mutex btrfs_dev_replace_update_device_in_mapping_tree() --> iterates fs_info->mapping_tree and replaces the device in every extent map's map->stripes[] with dev_replace->tgtdev, which still has an id of 0ULL (BTRFS_DEV_REPLACE_DEVID) iterates over all stripes from the extent map --> calls btrfs_free_dev_extent() passing it the target device that still has an ID of 0ULL --> btrfs_free_dev_extent() fails --> aborts current transaction finishes setting up the target device, namely it sets tgtdev->devid to the value of srcdev->devid (which is necessarily > 0) frees the srcdev unlocks fs_info->chunk_mutex So fix this by taking the device list mutex while processing the stripes for the chunk's extent map. This is similar to the race between device replace and block group creation that was fixed by commit 50460e37186a ("Btrfs: fix race when finishing dev replace leading to transaction abort"). Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/volumes.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit ce7791ffee1e1ee9f97193b817c7dd1fa6746aad Author: Filipe Manana <fdmanana@suse.com> Date: Fri May 20 01:57:20 2016 +0100 Btrfs: fix race between readahead and device replace/removal The list of devices is protected by the device_list_mutex and the device replace code, in its finishing phase correctly takes that mutex before removing the source device from that list. However the readahead code was iterating that list without acquiring the respective mutex leading to crashes later on due to invalid memory accesses: [125671.831036] general protection fault: 0000 [#1] PREEMPT SMP [125671.832129] Modules linked in: btrfs dm_flakey dm_mod crc32c_generic xor raid6_pq acpi_cpufreq tpm_tis tpm ppdev evdev parport_pc psmouse sg parport processor ser [125671.834973] CPU: 10 PID: 19603 Comm: kworker/u32:19 Tainted: G W 4.6.0-rc7-btrfs-next-29+ #1 [125671.834973] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [125671.834973] Workqueue: btrfs-readahead btrfs_readahead_helper [btrfs] [125671.834973] task: ffff8801ac520540 ti: ffff8801ac918000 task.ti: ffff8801ac918000 [125671.834973] RIP: 0010:[<ffffffff81270479>] [<ffffffff81270479>] __radix_tree_lookup+0x6a/0x105 [125671.834973] RSP: 0018:ffff8801ac91bc28 EFLAGS: 00010206 [125671.834973] RAX: 0000000000000000 RBX: 6b6b6b6b6b6b6b6a RCX: 0000000000000000 [125671.834973] RDX: 0000000000000000 RSI: 00000000000c1bff RDI: ffff88002ebd62a8 [125671.834973] RBP: ffff8801ac91bc70 R08: 0000000000000001 R09: 0000000000000000 [125671.834973] R10: ffff8801ac91bc70 R11: 0000000000000000 R12: ffff88002ebd62a8 [125671.834973] R13: 0000000000000000 R14: 0000000000000000 R15: 00000000000c1bff [125671.834973] FS: 0000000000000000(0000) GS:ffff88023fd40000(0000) knlGS:0000000000000000 [125671.834973] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [125671.834973] CR2: 000000000073cae4 CR3: 00000000b7723000 CR4: 00000000000006e0 [125671.834973] Stack: [125671.834973] 0000000000000000 ffff8801422d5600 ffff8802286bbc00 0000000000000000 [125671.834973] 0000000000000001 ffff8802286bbc00 00000000000c1bff 0000000000000000 [125671.834973] ffff88002e639eb8 ffff8801ac91bc80 ffffffff81270541 ffff8801ac91bcb0 [125671.834973] Call Trace: [125671.834973] [<ffffffff81270541>] radix_tree_lookup+0xd/0xf [125671.834973] [<ffffffffa04ae6a6>] reada_peer_zones_set_lock+0x3e/0x60 [btrfs] [125671.834973] [<ffffffffa04ae8b9>] reada_pick_zone+0x29/0x103 [btrfs] [125671.834973] [<ffffffffa04af42f>] reada_start_machine_worker+0x129/0x2d3 [btrfs] [125671.834973] [<ffffffffa04880be>] btrfs_scrubparity_helper+0x185/0x3aa [btrfs] [125671.834973] [<ffffffffa0488341>] btrfs_readahead_helper+0xe/0x10 [btrfs] [125671.834973] [<ffffffff81069691>] process_one_work+0x271/0x4e9 [125671.834973] [<ffffffff81069dda>] worker_thread+0x1eb/0x2c9 [125671.834973] [<ffffffff81069bef>] ? rescuer_thread+0x2b3/0x2b3 [125671.834973] [<ffffffff8106f403>] kthread+0xd4/0xdc [125671.834973] [<ffffffff8149e242>] ret_from_fork+0x22/0x40 [125671.834973] [<ffffffff8106f32f>] ? kthread_stop+0x286/0x286 So fix this by taking the device_list_mutex in the readahead code. We can't use here the lighter approach of using a rcu_read_lock() and rcu_read_unlock() pair together with a list_for_each_entry_rcu() call because we end up doing calls to sleeping functions (kzalloc()) in the respective code path. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/reada.c | 2 ++ 1 file changed, 2 insertions(+) commit 9f9cd7ee2c05881f151e5ee4889e667a031dd8d9 Author: Aaron Lu <aaron.lu@intel.com> Date: Sat May 21 15:30:46 2016 +0800 ACPI / Thermal / video: fix max_level incorrect value commit 059500940def (ACPI/video: export acpi_video_get_levels) mistakenly dropped the correct value of max_level and that caused the set_level function following failed and the acpi_video backlight interface didn't get created. Fix this by passing back the correct max_level value. While at it, also fix the param used in acpi_video_device_lcd_query_levels where acpi_handle is expected but acpi_video_device is passed. Fixes: 059500940def (ACPI/video: export acpi_video_get_levels) Reported-and-tested-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/acpi_video.c | 9 ++++++--- drivers/thermal/int340x_thermal/int3406_thermal.c | 2 +- include/acpi/video.h | 6 ++++-- 3 files changed, 11 insertions(+), 6 deletions(-) commit 1691cf160048c0753036d0b3fad7f239234dab56 Author: Vinson Lee <vlee@freedesktop.org> Date: Sat May 28 07:04:38 2016 +0000 btrfs: Use __u64 in exported linux/btrfs.h. This patch fixes this build error. /usr/include/linux/btrfs.h:121:3: error: unknown type name ‘u64’ u64 devid; ^~~ Fixes: 6b526ed70cf1 ("btrfs: introduce device delete by devid") Signed-off-by: Vinson Lee <vlee@freedesktop.org> Signed-off-by: David Sterba <dsterba@suse.com> include/uapi/linux/btrfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit eaa2bcd6d1d410a52df8c7b05e76d86c0319b7b0 Author: Phil Turnbull <phil.turnbull@oracle.com> Date: Fri May 27 13:34:04 2016 -0400 netfilter: nf_tables: validate NFTA_SET_TABLE parameter If the NFTA_SET_TABLE parameter is missing and the NLM_F_DUMP flag is not set, then a NULL pointer dereference is triggered in nf_tables_set_lookup because ctx.table is NULL. Signed-off-by: Phil Turnbull <phil.turnbull@oracle.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/netfilter/nf_tables_api.c | 2 ++ 1 file changed, 2 insertions(+) commit 83170f3beccccd7ceb4f9a0ac0c4dc736afde90c Author: Paolo Abeni <pabeni@redhat.com> Date: Thu May 26 19:08:10 2016 +0200 netfilter: nf_dup_ipv6: set again FLOWI_FLAG_KNOWN_NH at flowi6_flags With the commit 48e8aa6e3137 ("ipv6: Set FLOWI_FLAG_KNOWN_NH at flowi6_flags") ip6_pol_route() callers were asked to to set the FLOWI_FLAG_KNOWN_NH properly and xt_TEE was updated accordingly, but with the later refactor in commit bbde9fc1824a ("netfilter: factor out packet duplication for IPv4/IPv6") the flowi6_flags update was lost. This commit re-add it just before the routing decision. Fixes: bbde9fc1824a ("netfilter: factor out packet duplication for IPv4/IPv6") Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/ipv6/netfilter/nf_dup_ipv6.c | 1 + 1 file changed, 1 insertion(+) commit b7a8daa9f3d1688e994f5557577d3252c94ec282 Author: Taehee Yoo <ap420073@gmail.com> Date: Sat May 14 22:19:53 2016 +0900 netfilter: nf_ct_helper: Fix helper unregister count. helpers should unregister the only registered ports. but, helper cannot have correct registered ports value when failed to register. Signed-off-by: Taehee Yoo <ap420073@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/netfilter/nf_conntrack_ftp.c | 1 + net/netfilter/nf_conntrack_irc.c | 1 + net/netfilter/nf_conntrack_sane.c | 1 + net/netfilter/nf_conntrack_sip.c | 1 + net/netfilter/nf_conntrack_tftp.c | 1 + 5 files changed, 5 insertions(+) commit 9feeed94d0a8f2586f15490c8e31e1e0954fc290 Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Sun May 22 11:06:13 2016 +0200 MAINTAINERS: Add file patterns for pinctrl device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: linux-gpio@vger.kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 6b1a7c9ecde434adb515e1c9a89a579a6feb3070 Author: Linus Walleij <linus.walleij@linaro.org> Date: Tue May 24 14:39:47 2016 +0200 pinctrl: nomadik: fix inversion of gpio direction The input/output directions were inversed on the GPIO direction read function. Loose a ! and it is correct. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/nomadik/pinctrl-nomadik.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c10280d85c14a20751ab6c1185ad725172936d6 Author: Linus Walleij <linus.walleij@linaro.org> Date: Wed May 25 10:56:03 2016 +0200 gpio: flush direction status in gpiochip_lock_as_irq() As irqchip and gpiochip functions are orthogonal, the IRQ set-up or something else can have changed the direction of the GPIO line from what the GPIO descriptor knows when we get into gpiochip_lock_as_irq(). Make sure to re-read the direction setting if we have the .get_direction() callback enabled for the chip. Else we get problems like this: iio iio:device2: interrupts on the rising edge gpio gpiochip2: (8012e080.gpio): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ gpio gpiochip2: (8012e080.gpio): unable to lock HW IRQ 0 for IRQ genirq: Failed to request resources for l3g4200d-trigger (irq 111) on irqchip nmk1-32-63 iio iio:device2: failed to request trigger IRQ. st-gyro-i2c: probe of 2-0068 failed with error -22 Fixes: 72d320006177 ("gpio: set up initial state from .get_direction()") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpiolib.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 320a6480ef24b03655e1854bd01c9b0a8b8d4a3f Author: Sylvain Lemieux <slemieux@tycoint.com> Date: Wed May 11 13:40:00 2016 -0400 gpio: lpc32xx: disable broken to_irq support The "to_irq" functionality is broken inside this driver since commit 76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler"). The addition of the new lpc32xx irqchip driver in 4.7, fixed the lpc32xx platform interrupt issue. When switching to the new lpc32xx irqchip driver, a warning appear in the lpc32xx gpio driver: warning: "NR_IRQS" redefined. To remove this warning (temporary solution), this patch disables the broken "to_irq" mapping functionality support. Signed-off-by: Sylvain Lemieux <slemieux@tycoint.com> Acked-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpio-lpc32xx.c | 48 +-------------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) commit 3183c0d519ff83af2926382c11716496f01d34bf Author: Xing Zheng <zhengxing@rock-chips.com> Date: Thu May 26 21:49:08 2016 +0800 clk: rockchip: fix cpuclk registration error handling It maybe due to a copy-paste error the error handing should be cclk not clk when checking if the cpuclk registration succeeded. Reported-by: Lin Huang <lin.huang@rock-chips.com> Signed-off-by: Xing Zheng <zhengxing@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk-cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4715f81afc342996f680b08c944a712d9cbef11b Author: Douglas Anderson <dianders@chromium.org> Date: Thu May 12 11:03:16 2016 -0700 clk: rockchip: Revert "clk: rockchip: reset init state before mmc card initialization" This reverts commit 7a03fe6f48f3 ("clk: rockchip: reset init state before mmc card initialization"). Though not totally obvious from the commit message nor from the source code, that commit appears to be trying to reset the "_drv" MMC clocks to 90 degrees (note that the "_sample" MMC clocks have a shift of 0 so are not touched). The major problem here is that it doesn't properly reset things. The phase is a two bit field and the commit only touches one of the two bits. Thus the commit had the following affect: - phase 0 => phase 90 - phase 90 => phase 90 - phase 180 => phase 270 - phase 270 => phase 270 Things get even weirder if you happen to have a bootloader that was actually using delay elements (should be no reason to, but you never know), since those are additional bits that weren't touched by the original patch. This is unlikely to be what we actually want. Checking on rk3288-veyron devices, I can see that the bootloader leaves these clocks as: - emmc: phase 180 - sdmmc: phase 90 - sdio0: phase 90 Thus on rk3288-veyron devices the commit we're reverting had the effect of changing the eMMC clock to phase 270. This probably explains the scattered reports I've heard of eMMC devices not working on some veyron devices when using the upstream kernel. The original commit was presumably made because previously the kernel didn't touch the "_drv" phase at all and relied on whatever value was there when the kernel started. If someone was using a bootloader that touched the "_drv" phase then, indeed, we should have code in the kernel to fix that. ...and also, to get ideal timings, we should also have the kernel change the phase depending on the speed mode. In fact, that's the subject of a recent patch I posted at <https://patchwork.kernel.org/patch/9075141/>. Ideally, we should take both the patch posted to dw_mmc and this revert. Since those will likely go through different trees, here I describe behavior with the combos: 1. Just this revert: likely will fix rk3288-veyron eMMC on some devices + other cases; might break someone with a strange bootloader that sets the phase to 0 or one that uses delay elements (pretty unpredicable what would happen in that case). 2. Just dw_mmc patch: fixes everyone. Effectly the dw_mmc patch will totally override the broken patch and fix everything. 3. Both patches: fixes everyone. Once dw_mmc is initting properly then any defaults from the clock code doesn't mattery. Fixes: 7a03fe6f48f3 ("clk: rockchip: reset init state before mmc card initialization") Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> [emmc and sdmmc still work on all current boards in mainline after this revert, so they should take precedence over any out-of-tree board that will hopefully again get fixed with the better upcoming dw_mmc change.] Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk-mmc-phase.c | 11 ----------- 1 file changed, 11 deletions(-) commit 3bd14ae9da9194d369334556a70a7ff73ef94491 Author: Xing Zheng <zhengxing@rock-chips.com> Date: Fri May 13 11:42:17 2016 -0700 clk: rockchip: fix incorrect parent for rk3399's {c,g}pll_aclk_perihp_src There was a typo, swapping 'c' <--> 'g'. Signed-off-by: Xing Zheng <zhengxing@rock-chips.com> Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk-rk3399.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 176df69cb080c8cd813e51f800069e13ee607641 Author: Brian Norris <briannorris@chromium.org> Date: Fri May 13 11:42:16 2016 -0700 clk: rockchip: mark rk3399 GIC clocks as critical We never want to kill the GIC. Noticed when making other clock fixups, and seeing the newly-constructed clock tree try to disable cpll, where we had this parent structure: aclk_gic <------\ |--- aclk_gic_pre <-- cpll <-- pll_cpll aclk_gic_noc <--/ Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk-rk3399.c | 2 ++ 1 file changed, 2 insertions(+) commit 595144c1141c951a3c6bb9004ae6a2bc29aad66f Author: Heiko Stuebner <heiko@sntech.de> Date: Tue May 17 20:57:50 2016 +0200 clk: rockchip: initialize flags of clk_init_data in mmc-phase clock The flags element of clk_init_data was never initialized for mmc- phase-clocks resulting in the element containing a random value and thus possibly enabling unwanted clock flags. Fixes: 89bf26cbc1a0 ("clk: rockchip: Add support for the mmc clock phases using the framework") Cc: stable@vger.kernel.org Signed-off-by: Heiko Stuebner <heiko@sntech.de> drivers/clk/rockchip/clk-mmc-phase.c | 1 + 1 file changed, 1 insertion(+) commit 151787ba0562fd70e7b669a1b5a398875e4fc8e7 Author: Liu Ying <gnuiyl@gmail.com> Date: Tue May 24 18:10:41 2016 +0800 drm/imx: plane: Don't set plane->crtc in ipu_plane_update() Since the drm core sets plane->crtc correctly, we don't need to do that. Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/imx/ipuv3-plane.c | 1 - 1 file changed, 1 deletion(-) commit 8b3ce87377dfd462c7300a1e8aa8c2c1966716c7 Author: Liu Ying <gnuiyl@gmail.com> Date: Tue May 24 18:10:40 2016 +0800 drm/imx: ipuv3-plane: Constify ipu_plane_funcs Signed-off-by: Liu Ying <gnuiyl@gmail.com> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/imx/ipuv3-plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c82b4d73e2cd32fff41be0cd6e75ea83d32943b3 Author: Lothar Waßmann <LW@KARO-electronics.de> Date: Tue May 24 08:31:49 2016 +0200 drm/imx: imx-ldb: honor 'native-mode' property when selecting video mode from DT This patch allows to select a specific video mode from a list of modes defined in DT by setting the 'native-mode' property appropriately. This change does not affect the behaviour of existing platforms, since they either: - have just one display-timings subnode - have the native-mode property pointing to the first entry - let the bootloader select the appropriate timing Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/imx/imx-ldb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 97a6075d7cfabd0d45f8667a89da2a5fd13b4e70 Author: Lothar Waßmann <LW@KARO-electronics.de> Date: Tue May 24 08:31:51 2016 +0200 drm/imx: parallel-display: remove dead code The 'mode_valid' flag is never set in this driver. Remove it and the code that depends on it. Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/imx/parallel-display.c | 12 ------------ 1 file changed, 12 deletions(-) commit 4ed094fd73a7c0b8534685d2ed0f0f3ccdb96bdf Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Mon May 9 17:02:13 2016 +0200 drm/imx: use bus_flags for pixel clock polarity This patch allows panels to set pixel clock and data enable pin polarity other than the default of driving data at the falling pixel clock edge and active high display enable. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/imx/imx-drm-core.c | 13 ++++++++----- drivers/gpu/drm/imx/imx-drm.h | 7 ++++--- drivers/gpu/drm/imx/imx-tve.c | 6 ++++-- drivers/gpu/drm/imx/ipuv3-crtc.c | 10 +++++++--- drivers/gpu/drm/imx/parallel-display.c | 4 ++-- 5 files changed, 25 insertions(+), 15 deletions(-) commit 7932131f6381e5d2d4a78d9134f5f6bf45900ae5 Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Fri Feb 12 14:35:55 2016 +0100 drm/imx: ipuv3-plane: enable UYVY and VYUY formats Advertise the DRM_FORMAT_UYVY and DRM_FORMAT_VYUY formats to userspace. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/imx/ipuv3-plane.c | 2 ++ 1 file changed, 2 insertions(+) commit 3a1c117f8bf13435f6db78f294d5754b2eb6185b Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Tue May 3 14:39:29 2016 +0200 drm/imx: parallel-display: use of_graph_get_endpoint_by_regs helper Instead of using of_graph_get_port_by_id() to get the port and then of_get_child_by_name() to get the first endpoint, get to the endpoint in a single step. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/imx/parallel-display.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit 620011e0477e485fc6112ace3c0a772130e8fd4f Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Tue May 3 14:37:13 2016 +0200 drm/imx: imx-ldb: use of_graph_get_endpoint_by_regs helper Instead of using of_graph_get_port_by_id() to get the port and then of_get_child_by_name() to get the first endpoint, get to the endpoint in a single step. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/imx/imx-ldb.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit ee89686631174fa576e61400ac3580722edac120 Author: Akshay Bhat <akshay.bhat@timesys.com> Date: Wed Apr 27 16:23:34 2016 -0400 dt-bindings: imx: ldb: Add ddc-i2c-bus property Document the ddc-i2c-bus property used by imx-ldb driver to read EDID information via I2C interface. Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Documentation/devicetree/bindings/display/imx/ldb.txt | 1 + 1 file changed, 1 insertion(+) commit a6d206e28abe468aac5bb589669c6beb855b1a66 Author: Steve Longerbeam <steve_longerbeam@mentor.com> Date: Wed Apr 27 16:23:33 2016 -0400 drm/imx: imx-ldb: Add DDC support Add support for reading EDID over Display Data Channel. If no DDC adapter is available, falls back to hardcoded EDID or display-timings node as before. Signed-off-by: Steve Longerbeam <steve_longerbeam@mentor.com> Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com> Acked-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> drivers/gpu/drm/imx/imx-ldb.c | 42 ++++++++++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 8 deletions(-) commit 0e6b5259824e97a0f7e7b450421ff12865d3b0e2 Author: Shmulik Ladkani <shmulik.ladkani@gmail.com> Date: Thu May 26 20:16:36 2016 +0300 net: l2tp: Make l2tp_ip6 namespace aware l2tp_ip6 tunnel and session lookups were still using init_net, although the l2tp core infrastructure already supports lookups keyed by 'net'. As a result, l2tp_ip6_recv discarded packets for tunnels/sessions created in namespaces other than the init_net. Fix, by using dev_net(skb->dev) or sock_net(sk) where appropriate. Signed-off-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/l2tp/l2tp_ip6.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 13fef095bde04228316046f997eb963285d8532e Author: Chen-Yu Tsai <wens@csie.org> Date: Tue May 17 23:56:06 2016 +0800 drm: sun4i: do cleanup if RGB output init fails sun4i_rgb_init() can fail, which results in TCON failing to bind. In this case we need to do cleanup, specificly unregistering the dotclock, which is regmap based, and the regmap is registered as part of the sun4i_tcon_bind(). Failing to do so results in a NULL pointer reference when the CCF tries to turn off unused clocks. Fixes: 29e57fab97fc ("drm: sun4i: Add RGB output") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/sun4i_tcon.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 7aa2e2b731b337a7bc74cd076bbcd6b8b4b95fbf Author: Maxime Ripard <maxime.ripard@free-electrons.com> Date: Wed May 11 19:04:18 2016 +0200 drm/sun4i: Convert to connector register helpers Now that connector register helpers have been created, switch to them. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/sun4i_drv.c | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) commit 3d6bd9065b7acf8499d414d70bdb4b4955856299 Author: Maxime Ripard <maxime.ripard@free-electrons.com> Date: Wed May 11 16:52:50 2016 +0200 drm/sun4i: remove simplefb at probe If simplefb was setup by our bootloader and enabled in the DT, we will have a first framebuffer loaded in our system. However, as soon as our DRM driver will load, it will reset the controller, initialise it and, if the framebuffer emulation is enabled, register a second framebuffer device. This is obviously pretty bad, since the first framebuffer will be some kind of a black hole, with memory still reserved that we can write to safely, but not displayed anywhere. Make sure we remove that framebuffer when we probe so we don't end up in that situation. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/sun4i_drv.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 0de6e914a035076b1241f5738c06c9d3820abd6e Author: Maxime Ripard <maxime.ripard@free-electrons.com> Date: Wed May 4 17:37:58 2016 +0200 drm/sun4i: rgb: panel is an error pointer In case of an error, our pointer to the drm_panel structure attached to our encoder will hold an error pointer, not a NULL pointer. Make sure we check the right thing. Fixes: 29e57fab97fc ("drm: sun4i: Add RGB output") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0bbbb00bda57e6f091275b0103445596322b9277 Author: Maxime Ripard <maxime.ripard@free-electrons.com> Date: Wed May 4 17:38:32 2016 +0200 drm/sun4i: defer only if we didn't find our panel Our code currently defers our probe on any error, even if we were not expecting to have one at all. Make sure we return -EPROBE_DEFER only when we were supposed to have a panel, but it's not probed yet. Also fix a typo while we're at it. Fixes: 29e57fab97fc ("drm: sun4i: Add RGB output") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/sun4i_tcon.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit bb43d40d7c830da5f623e3938fef908b003b7523 Author: Maxime Ripard <maxime.ripard@free-electrons.com> Date: Thu Apr 21 11:25:26 2016 +0200 drm/sun4i: rgb: Validate the clock rate Our pixel clock cannot reach a high enough rate for some rather high while common resolutions (like 1080p60). Make sure we filter the resolutions we cannot reach in our mode_valid function. Fixes: 29e57fab97fc ("drm: sun4i: Add RGB output") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/sun4i_rgb.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit 4731a72df273bdbd225445424057c15dbb8d3495 Author: Maxime Ripard <maxime.ripard@free-electrons.com> Date: Sat Apr 2 12:30:11 2016 +0200 drm/sun4i: request exact rates to our parents Our pixel clock currently only tries to deal with the current parent rate. While that works when the resolution is the same than the one already program, or when we can compute directly the rate from the current parent rate, it cannot work in most situation when we want to change the frequency, and we end up with an improper pixel clock rate, which obviously doesn't work as expected. Ask our parent for all the possible dividers if it can reach that frequency, and return the best parent rate to the clock framework so that we can use it. Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/sun4i_dotclock.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) commit 9fa2568d9fe0c6dbf3253af6840de9389f4e89cb Author: Arnd Bergmann <arnd@arndb.de> Date: Thu May 5 22:10:52 2016 +0200 drm: sun4i: fix probe error handling gcc points out a possible uninitialized variable use in sun4i_dclk_create(): drivers/gpu/drm/sun4i/sun4i_dotclock.c: In function 'sun4i_dclk_create': drivers/gpu/drm/sun4i/sun4i_dotclock.c:139:12: error: 'clk_name' may be used uninitialized in this function [-Werror=maybe-uninitialized] init.name = clk_name; The warning only shows up when CONFIG_OF is disabled, and the property is never filled, but the same bug can show up even when CONFIG_OF is enabled but of_property_read_string_index returns another error. To fix it, this ensures that sun4i_dclk_create propagates any error from of_property_read_string_index. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/sun4i_dotclock.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit f1b78f0e759b174ec4f5e3b0dd27a079a2416b66 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 3 17:23:28 2016 +0200 drm: sun4i: print DMA address correctly The newly added sun4i drm driver prints a dma address using the %x format string, which cannot work when dma_addr_t is 64 bit, and gcc warns about this configuration: drm/sun4i/sun4i_backend.c: In function 'sun4i_backend_update_layer_buffer': drm/sun4i/sun4i_backend.c:193:84: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] DRM_DEBUG_DRIVER("Using GEM @ 0x%x\n", gem->paddr); drm/sun4i/sun4i_backend.c:201:84: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'dma_addr_t {aka long long unsigned int}' [-Werror=format=] DRM_DEBUG_DRIVER("Setting buffer address to 0x%x\n", paddr); This changes the code to use the explicit %pad format string, which always prints the right length. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/sun4i_backend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bebef39842c8615180e711c0ff3e8c9c40c397da Author: Arnd Bergmann <arnd@arndb.de> Date: Mon May 2 12:59:48 2016 +0200 drm/sun4i: add COMMON_CLK dependency The sun4i drm driver uses the clk-provider interfaces, which are not available when CONFIG_COMMON_CLK is disabled: drivers/gpu/drm/sun4i/sun4i_dotclock.c:19:16: error: field 'hw' has incomplete type struct clk_hw hw; In file included from ../include/asm-generic/bug.h:13:0, from ../arch/arm/include/asm/bug.h:59, from ../include/linux/bug.h:4, from ../include/linux/io.h:23, from ../include/linux/clk-provider.h:14, from ../drivers/gpu/drm/sun4i/sun4i_dotclock.c:13: drivers/gpu/drm/sun4i/sun4i_dotclock.c: In function 'hw_to_dclk': include/linux/kernel.h:831:48: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types] ... This adds a Kconfig dependency to prevent the driver from being enabled in this case. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 9026e0d122ac ("drm: Add Allwinner A10 Display Engine support") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> drivers/gpu/drm/sun4i/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 176b346b37f0b9c03e91eb6f1460e00f3c0c3edf Author: Eric Garver <e@erig.me> Date: Thu May 26 12:28:05 2016 -0400 Documentation: ip-sysctl.txt: clarify secure_redirects Clarify how secure_redirects works. Mention that RFC1122 always applies. Signed-off-by: Eric Garver <e@erig.me> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/networking/ip-sysctl.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 68bb399e656f244d3d173a20a8280c167632fca8 Author: Edward Cree <ecree@solarflare.com> Date: Thu May 26 21:46:05 2016 +0100 sfc: use flow dissector helpers for aRFS Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/sfc/rx.c | 75 ++++++++++++------------------------------- 1 file changed, 21 insertions(+), 54 deletions(-) commit 421eeea10d0a5e52256bce9544de477938104fdb Author: Baozeng Ding <sploving1@gmail.com> Date: Thu May 26 21:07:42 2016 +0800 ieee802154: fix logic error in ieee802154_llsec_parse_dev_addr Fix a logic error to avoid potential null pointer dereference. Signed-off-by: Baozeng Ding <sploving1@gmail.com> Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ieee802154/nl802154.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 86651650d16a359e4142c6a8b0467c87e48c4c94 Author: Elad Kanfi <eladkan@mellanox.com> Date: Thu May 26 15:00:06 2016 +0300 net: nps_enet: Disable interrupts before napi reschedule Since NAPI works by shutting down event interrupts when theres work and turning them on when theres none, the net driver must make sure that interrupts are disabled when it reschedules polling. By calling napi_reschedule, the driver switches to polling mode, therefor there should be no interrupt interference. Any received packets will be handled in nps_enet_poll by polling the HW indication of received packet until all packets are handled. Signed-off-by: Elad Kanfi <eladkan@mellanox.com> Acked-by: Noam Camus <noamca@mellanox.com> Tested-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/ezchip/nps_enet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 0d08df6c493898e679d9c517e77ea95c063d40ec Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Thu May 26 14:43:52 2016 +0300 net/lapb: tuse %*ph to dump buffers Use %*ph specifier to dump small buffers in hex format instead doing this byte-by-byte. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/lapb/lapb_in.c | 5 ++--- net/lapb/lapb_out.c | 4 +--- net/lapb/lapb_subr.c | 14 +++++--------- 3 files changed, 8 insertions(+), 15 deletions(-) commit 6756325a9a1e2d36b6210f4a42f77501c917ebb9 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Thu May 26 09:46:22 2016 +0300 ptp: oops in ptp_ioctl() If we pass ERR_PTR(-EFAULT) to kfree() then it's going to oops. Fixes: 2ece068e1b1d ('ptp: use memdup_user().') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/ptp/ptp_chardev.c | 1 + 1 file changed, 1 insertion(+) commit fabb13db448efc23c47851550867fc46519de97e Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 25 16:50:46 2016 +0200 fou: add Kconfig options for IPv6 support A previous patch added the fou6.ko module, but that failed to link in a couple of configurations: net/built-in.o: In function `ip6_tnl_encap_add_fou_ops': net/ipv6/fou6.c:88: undefined reference to `ip6_tnl_encap_add_ops' net/ipv6/fou6.c:94: undefined reference to `ip6_tnl_encap_add_ops' net/ipv6/fou6.c:97: undefined reference to `ip6_tnl_encap_del_ops' net/built-in.o: In function `ip6_tnl_encap_del_fou_ops': net/ipv6/fou6.c:106: undefined reference to `ip6_tnl_encap_del_ops' net/ipv6/fou6.c:107: undefined reference to `ip6_tnl_encap_del_ops' If CONFIG_IPV6=m, ip6_tnl_encap_add_ops/ip6_tnl_encap_del_ops are in a module, but fou6.c can still be built-in, and that obviously fails to link. Also, if CONFIG_IPV6=y, but CONFIG_IPV6_TUNNEL=m or CONFIG_IPV6_TUNNEL=n, the same problem happens for a different reason. This adds two new silent Kconfig symbols to work around both problems: - CONFIG_IPV6_FOU is now always set to 'm' if either CONFIG_NET_FOU=m or CONFIG_IPV6=m - CONFIG_IPV6_FOU_TUNNEL is set implicitly when IPV6_FOU is enabled and NET_FOU_IP_TUNNELS is also turned out, and it will ensure that CONFIG_IPV6_TUNNEL is also available. The options could be made user-visible as well, to give additional room for configuration, but it seems easier not to bother users with more choice here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: aa3463d65e7b ("fou: Add encap ops for IPv6 tunnels") Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/Kconfig | 9 +++++++++ net/ipv6/Makefile | 2 +- net/ipv6/fou6.c | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) commit 9791d8e7627d1c4dbf8819646833f2f576b4f8f3 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 25 16:50:45 2016 +0200 ipv6: hide ip6_encap_hlen/ip6_tnl_encap definitions A recent cleanup moved MAX_IPTUN_ENCAP_OPS along with some other definitions, but it is now invisible when CONFIG_INET is not defined, but still referenced from ip6_tunnel.h: In file included from net/xfrm/xfrm_input.c:17:0: include/net/ip6_tunnel.h:67:17: error: 'MAX_IPTUN_ENCAP_OPS' undeclared here (not in a function) ip6tun_encaps[MAX_IPTUN_ENCAP_OPS]; ^~~~~~~~~~~~~~~~~~~ This hides the ip6_encap_hlen and ip6_tnl_encap functions inside of CONFIG_INET so we don't run into the the problem. Alternatively we could move the macro out of the #ifdef again to restore the previous behavior Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 55c2bc143224 ("net: Cleanup encap items in ip_tunnels.h") Signed-off-by: David S. Miller <davem@davemloft.net> include/net/ip6_tunnel.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9295c41d77ca93aac79cfca6fa09fa1ca5cab66f Author: Ludovic Desroches <ludovic.desroches@atmel.com> Date: Thu May 12 16:54:10 2016 +0200 dmaengine: at_xdmac: double FIFO flush needed to compute residue Due to the way CUBC register is updated, a double flush is needed to compute an accurate residue. First flush aim is to get data from the DMA FIFO and second one ensures that we won't report data which are not in memory. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Cc: stable@vger.kernel.org #v4.1 and later Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/at_xdmac.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) commit 53398f488821c2b5b15291e3debec6ad33f75d3d Author: Ludovic Desroches <ludovic.desroches@atmel.com> Date: Thu May 12 16:54:09 2016 +0200 dmaengine: at_xdmac: fix residue corruption An unexpected value of CUBC can lead to a corrupted residue. A more complex sequence is needed to detect an inaccurate value for NCA or CUBC. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Cc: stable@vger.kernel.org #v4.1 and later Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/at_xdmac.c | 54 ++++++++++++++++++++++++++++++-------------------- 1 file changed, 32 insertions(+), 22 deletions(-) commit 4a9723e8df68cfce4048517ee32e37f78854b6fb Author: Ludovic Desroches <ludovic.desroches@atmel.com> Date: Thu May 12 16:54:08 2016 +0200 dmaengine: at_xdmac: align descriptors on 64 bits Having descriptors aligned on 64 bits allows update CNDA and CUBC in an atomic way. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver") Cc: stable@vger.kernel.org #v4.1 and later Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/at_xdmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c56d329e28cff2d7a1e77cafc2f9c7e986ba11cb Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Sun May 22 11:05:52 2016 +0200 MAINTAINERS: Add file patterns for dma device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Vinod Koul <vinod.koul@intel.com> Cc: dmaengine@vger.kernel.org Signed-off-by: Vinod Koul <vinod.koul@intel.com> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 49acadff2a0cb4f7ff4efe0fb6c23f5fad81a3b3 Author: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Date: Wed May 25 15:11:29 2016 +0300 arc: Get rid of root core-frequency property Now when we switched to usage of real clk devices for CPU core frequency those root properties make no sense any longer. Se we're just getting rid of them here to not confuse readers of our .dts files. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Christian Ruppert <christian.ruppert@alitech.com> Cc: Noam Camus <noamca@mellanox.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> arch/arc/boot/dts/abilis_tb100.dtsi | 2 -- arch/arc/boot/dts/abilis_tb101.dtsi | 2 -- arch/arc/boot/dts/axc001.dtsi | 1 - arch/arc/boot/dts/axc003.dtsi | 1 - arch/arc/boot/dts/axc003_idu.dtsi | 1 - arch/arc/boot/dts/eznps.dts | 1 - arch/arc/boot/dts/nsim_700.dts | 1 - arch/arc/boot/dts/nsimosci.dts | 1 - arch/arc/boot/dts/nsimosci_hs.dts | 1 - arch/arc/boot/dts/nsimosci_hs_idu.dts | 1 - arch/arc/boot/dts/skeleton.dtsi | 1 - arch/arc/boot/dts/skeleton_hs.dtsi | 1 - arch/arc/boot/dts/skeleton_hs_idu.dtsi | 1 - arch/arc/boot/dts/vdk_axc003.dtsi | 1 - arch/arc/boot/dts/vdk_axc003_idu.dtsi | 1 - 15 files changed, 17 deletions(-) commit 2547476a5e4061f6addb88d5fc837d3a950f54c4 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 13:45:35 2016 +0200 Fix typos Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> arch/arc/Makefile | 2 +- arch/arc/include/asm/entry-compact.h | 4 ++-- arch/arc/include/asm/mmu_context.h | 2 +- arch/arc/include/asm/pgtable.h | 2 +- arch/arc/include/asm/processor.h | 2 +- arch/arc/include/asm/smp.h | 2 +- arch/arc/include/asm/thread_info.h | 2 +- arch/arc/include/asm/uaccess.h | 2 +- arch/arc/include/uapi/asm/swab.h | 2 +- arch/arc/kernel/perf_event.c | 2 +- arch/arc/kernel/setup.c | 2 +- arch/arc/kernel/signal.c | 2 +- arch/arc/kernel/troubleshoot.c | 2 +- arch/arc/mm/cache.c | 6 +++--- arch/arc/mm/dma.c | 2 +- 15 files changed, 18 insertions(+), 18 deletions(-) commit bd000b82e86503d5e8b9e6d40a3257bc9dddb96d Author: Russell Currey <ruscur@russell.cc> Date: Thu Apr 7 16:28:27 2016 +1000 powerpc/pseries/eeh: Refactor the configure_bridge RTAS tokens The RTAS calls "ibm,configure-pe" and "ibm,configure-bridge" perform the same actions, however the former can skip configuration if unnecessary. The existing code treats them as different tokens even though only one will ever be called. Refactor this by making a single token that is assigned during init. Signed-off-by: Russell Currey <ruscur@russell.cc> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/pseries/eeh_pseries.c | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) commit 871e178e0f2c4fa788f694721a10b4758d494ce1 Author: Russell Currey <ruscur@russell.cc> Date: Thu Apr 7 16:28:26 2016 +1000 powerpc/pseries/eeh: Handle RTAS delay requests in configure_bridge In the "ibm,configure-pe" and "ibm,configure-bridge" RTAS calls, the spec states that values of 9900-9905 can be returned, indicating that software should delay for 10^x (where x is the last digit, i.e. 990x) milliseconds and attempt the call again. Currently, the kernel doesn't know about this, and respecting it fixes some PCI failures when the hypervisor is busy. The delay is capped at 0.2 seconds. Cc: <stable@vger.kernel.org> # 3.10+ Signed-off-by: Russell Currey <ruscur@russell.cc> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/pseries/eeh_pseries.c | 51 ++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 15 deletions(-) commit 7cafc0b8bf130f038b0ec2dcdd6a9de6dc59b65a Author: David S. Miller <davem@davemloft.net> Date: Sat May 28 20:41:12 2016 -0700 sparc64: Fix return from trap window fill crashes. We must handle data access exception as well as memory address unaligned exceptions from return from trap window fill faults, not just normal TLB misses. Otherwise we can get an OOPS that looks like this: ld-linux.so.2(36808): Kernel bad sw trap 5 [#1] CPU: 1 PID: 36808 Comm: ld-linux.so.2 Not tainted 4.6.0 #34 task: fff8000303be5c60 ti: fff8000301344000 task.ti: fff8000301344000 TSTATE: 0000004410001601 TPC: 0000000000a1a784 TNPC: 0000000000a1a788 Y: 00000002 Not tainted TPC: <do_sparc64_fault+0x5c4/0x700> g0: fff8000024fc8248 g1: 0000000000db04dc g2: 0000000000000000 g3: 0000000000000001 g4: fff8000303be5c60 g5: fff800030e672000 g6: fff8000301344000 g7: 0000000000000001 o0: 0000000000b95ee8 o1: 000000000000012b o2: 0000000000000000 o3: 0000000200b9b358 o4: 0000000000000000 o5: fff8000301344040 sp: fff80003013475c1 ret_pc: 0000000000a1a77c RPC: <do_sparc64_fault+0x5bc/0x700> l0: 00000000000007ff l1: 0000000000000000 l2: 000000000000005f l3: 0000000000000000 l4: fff8000301347e98 l5: fff8000024ff3060 l6: 0000000000000000 l7: 0000000000000000 i0: fff8000301347f60 i1: 0000000000102400 i2: 0000000000000000 i3: 0000000000000000 i4: 0000000000000000 i5: 0000000000000000 i6: fff80003013476a1 i7: 0000000000404d4c I7: <user_rtt_fill_fixup+0x6c/0x7c> Call Trace: [0000000000404d4c] user_rtt_fill_fixup+0x6c/0x7c The window trap handlers are slightly clever, the trap table entries for them are composed of two pieces of code. First comes the code that actually performs the window fill or spill trap handling, and then there are three instructions at the end which are for exception processing. The userland register window fill handler is: add %sp, STACK_BIAS + 0x00, %g1; \ ldxa [%g1 + %g0] ASI, %l0; \ mov 0x08, %g2; \ mov 0x10, %g3; \ ldxa [%g1 + %g2] ASI, %l1; \ mov 0x18, %g5; \ ldxa [%g1 + %g3] ASI, %l2; \ ldxa [%g1 + %g5] ASI, %l3; \ add %g1, 0x20, %g1; \ ldxa [%g1 + %g0] ASI, %l4; \ ldxa [%g1 + %g2] ASI, %l5; \ ldxa [%g1 + %g3] ASI, %l6; \ ldxa [%g1 + %g5] ASI, %l7; \ add %g1, 0x20, %g1; \ ldxa [%g1 + %g0] ASI, %i0; \ ldxa [%g1 + %g2] ASI, %i1; \ ldxa [%g1 + %g3] ASI, %i2; \ ldxa [%g1 + %g5] ASI, %i3; \ add %g1, 0x20, %g1; \ ldxa [%g1 + %g0] ASI, %i4; \ ldxa [%g1 + %g2] ASI, %i5; \ ldxa [%g1 + %g3] ASI, %i6; \ ldxa [%g1 + %g5] ASI, %i7; \ restored; \ retry; nop; nop; nop; nop; \ b,a,pt %xcc, fill_fixup_dax; \ b,a,pt %xcc, fill_fixup_mna; \ b,a,pt %xcc, fill_fixup; And the way this works is that if any of those memory accesses generate an exception, the exception handler can revector to one of those final three branch instructions depending upon which kind of exception the memory access took. In this way, the fault handler doesn't have to know if it was a spill or a fill that it's handling the fault for. It just always branches to the last instruction in the parent trap's handler. For example, for a regular fault, the code goes: winfix_trampoline: rdpr %tpc, %g3 or %g3, 0x7c, %g3 wrpr %g3, %tnpc done All window trap handlers are 0x80 aligned, so if we "or" 0x7c into the trap time program counter, we'll get that final instruction in the trap handler. On return from trap, we have to pull the register window in but we do this by hand instead of just executing a "restore" instruction for several reasons. The largest being that from Niagara and onward we simply don't have enough levels in the trap stack to fully resolve all possible exception cases of a window fault when we are already at trap level 1 (which we enter to get ready to return from the original trap). This is executed inline via the FILL_*_RTRAP handlers. rtrap_64.S's code branches directly to these to do the window fill by hand if necessary. Now if you look at them, we'll see at the end: ba,a,pt %xcc, user_rtt_fill_fixup; ba,a,pt %xcc, user_rtt_fill_fixup; ba,a,pt %xcc, user_rtt_fill_fixup; And oops, all three cases are handled like a fault. This doesn't work because each of these trap types (data access exception, memory address unaligned, and faults) store their auxiliary info in different registers to pass on to the C handler which does the real work. So in the case where the stack was unaligned, the unaligned trap handler sets up the arg registers one way, and then we branched to the fault handler which expects them setup another way. So the FAULT_TYPE_* value ends up basically being garbage, and randomly would generate the backtrace seen above. Reported-by: Nick Alcock <nix@esperi.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net> arch/sparc/include/asm/head_64.h | 4 ++ arch/sparc/include/asm/ttable.h | 8 ++-- arch/sparc/kernel/Makefile | 1 + arch/sparc/kernel/rtrap_64.S | 57 ++++------------------- arch/sparc/kernel/urtt_fill.S | 98 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+), 52 deletions(-) commit b02b1fbdd338f70e49efa9ca9899214134526701 Merge: 1a695a9 787ab6e Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun May 29 13:28:39 2016 -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 set of four fixes noticed in the merge window. The aacraid one is an optimisation, the mp3sas one fixes a spurious printk, the sd_check_events one fixes a theoretical race and the failed zero length commands fixes a bug in our completion/retry routines that has been causing problems in the field" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: aacraid: do not activate events on non-SRC adapters mpt3sas: add missing curly braces sd: get disk reference in sd_check_events() scsi_lib: correctly retry failed zero length REQ_TYPE_FS commands commit 99147606155f09feccac67c65387dc62260b749b Author: Crestez Dan Leonard <leonard.crestez@intel.com> Date: Fri May 13 21:43:34 2016 +0300 iio: st_sensors: Disable DRDY at init time This fixes odd behavior after reboot. The fact that we set the device to powerdown mode is not sufficient to prevent DRDY being active because we might still have an unread sample. Even if powerdown was sufficient keeping DRDY disabled while trigger is not active is a good idea. Cc: Giuseppe Barba <giuseppe.barba@st.com> Cc: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/common/st_sensors/st_sensors_core.c | 5 +++++ 1 file changed, 5 insertions(+) commit ff05916f94f912b25e8efcf9b02c10d481977bab Author: Crestez Dan Leonard <leonard.crestez@intel.com> Date: Fri May 13 21:43:33 2016 +0300 iio: st_sensors: Init trigger before irq request This fixes a possible race where an interrupt arrives before complete initialization and crashes because iio_trigger_get_drvdata returns NULL. Cc: Giuseppe Barba <giuseppe.barba@st.com> Cc: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/common/st_sensors/st_sensors_trigger.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 65925b65ed98ffdb277cf5ea1af45731dac0b30b Author: Linus Walleij <linus.walleij@linaro.org> Date: Sat May 21 20:43:16 2016 +0200 iio: st_sensors: switch to a threaded interrupt commit 98ad8b41f58dff6b30713d7f09ae3834b8df7ded ("iio: st_sensors: verify interrupt event to status") caused a regression when reading ST sensors from a HRTimer trigger rather than the intrinsic interrupts: the HRTimer may trigger faster than the sensor provides new values, and as the check against new values available as a cause of the interrupt trigger was done in the poll function, this would bail out of the HRTimer interrupt with IRQ_NONE. So clearly we need to only check the new values available from the proper interrupt handler and not from the poll function, which should rather just read the raw values from the registers, put them into the buffer and be happy. To achieve this: switch the ST Sensors over to using a true threaded interrupt handler. In the interrupt thread, check if new values are available, else yield to the (potential) next device on the same interrupt line to check the registers. If the interrupt was ours, proceed to poll the values. Instead of relying on iio_trigger_generic_data_rdy_poll() as a top half to wake up the thread that polls the sensor for new data, have the thread call iio_trigger_poll_chained() after determining that is is the proper source of the interrupt. This is modelled on drivers/iio/accel/mma8452.c which is already using a properly threaded interrupt handler. In order to get the same precision in timestamps as previously, where samples would be timestamped in the poll function pf->timestamp when calling iio_trigger_generic_data_rdy_poll() we introduce a local timestamp in the sensor data, set it in the top half (fastpath) of the interrupt handler and provide that to the core when calling iio_push_to_buffers_with_timestamp(). Additionally: if the active scanmask is not set for the sensor no IRQs should be enabled and we need to bail out with IRQ_NONE. This can happen if spurious IRQs fire when installing the threaded interrupt handler. Tested with hard interrupt triggers on LIS331DL, then also tested with hrtimers on the same sensor by creating a 75Hz HRTimer and using it to poll the sensor. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: Giuseppe Barba <giuseppe.barba@st.com> Cc: Denis Ciocca <denis.ciocca@st.com> Reported-by: Crestez Dan Leonard <cdleonard@gmail.com> Tested-by: Crestez Dan Leonard <cdleonard@gmail.com> Tested-by: Jonathan Cameron <jic23@kernel.org> Fixes: 97865fe41322 ("iio: st_sensors: verify interrupt event to status") Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/accel/st_accel_buffer.c | 2 +- drivers/iio/accel/st_accel_core.c | 1 + drivers/iio/common/st_sensors/st_sensors_buffer.c | 25 ++---- drivers/iio/common/st_sensors/st_sensors_core.c | 3 + drivers/iio/common/st_sensors/st_sensors_trigger.c | 88 +++++++++++++++++++++- drivers/iio/gyro/st_gyro_buffer.c | 2 +- drivers/iio/gyro/st_gyro_core.c | 1 + drivers/iio/magnetometer/st_magn_buffer.c | 2 +- drivers/iio/magnetometer/st_magn_core.c | 1 + drivers/iio/pressure/st_pressure_buffer.c | 2 +- drivers/iio/pressure/st_pressure_core.c | 1 + include/linux/iio/common/st_sensors.h | 9 ++- 12 files changed, 111 insertions(+), 26 deletions(-) commit 0dd09ca419d712d315ffd864158f515e6c64261a Author: Linus Walleij <linus.walleij@linaro.org> Date: Wed May 25 09:40:27 2016 +0200 iio: light: bh1780: assign a static name Using the struct i2c_device->id field for naming the light sensor is a bad idea: when booting from the pure device tree this is NULL and that causes the device not to have the "name" property in sysfs and that in turn confuses the "lsiio" command to stop listing devices. So instead of using the device .id, use the hard string "bh1780", which works just fine. Fixes: 1f0477f18306 ("iio: light: new driver for the ROHM BH1780") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/light/bh1780.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13c27e946ddc0e19f3d8b307b14cd8053fcb4844 Author: Linus Walleij <linus.walleij@linaro.org> Date: Wed May 25 09:40:26 2016 +0200 iio: bh1780: dereference the client properly The code in runtime_[suspend|resume] was assuming that the i2c client data was the bh1780 state container, but it contains the IIO device. So first dereference the IIO device from the i2c client, then get the state container using the iio_priv() call. Fixes: 1f0477f18306 ("iio: light: new driver for the ROHM BH1780") Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/light/bh1780.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 09bc0ddaab6cab0fa95a67d5535ec772e2671193 Author: Matt Ranostay <mranostay@gmail.com> Date: Thu May 26 19:55:06 2016 -0700 iio: humidity: hdc100x: fix IIO_TEMP channel reporting IIO_TEMP channel was being incorrectly reported back as Celsius when it should have been milliCelsius. This is via an incorrect scale value being returned to userspace. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/humidity/hdc100x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d11c2a0de2824395656cf8ed15811580c9dd38aa Author: David S. Miller <davem@davemloft.net> Date: Sat May 28 21:21:31 2016 -0700 sparc: Harden signal return frame checks. All signal frames must be at least 16-byte aligned, because that is the alignment we explicitly create when we build signal return stack frames. All stack pointers must be at least 8-byte aligned. Signed-off-by: David S. Miller <davem@davemloft.net> arch/sparc/kernel/signal32.c | 46 +++++++++++++++++++++++++++--------------- arch/sparc/kernel/signal_32.c | 41 +++++++++++++++++++++++-------------- arch/sparc/kernel/signal_64.c | 31 ++++++++++++++++++---------- arch/sparc/kernel/sigutil_32.c | 9 ++++++++- arch/sparc/kernel/sigutil_64.c | 10 +++++++-- 5 files changed, 92 insertions(+), 45 deletions(-) commit 711460514b1c80494f14001bdf30dd70fd401a8f Merge: 275ae41 5ea5888 Author: Ingo Molnar <mingo@kernel.org> Date: Sun May 29 20:15:37 2016 +0200 Merge tag 'perf-urgent-for-mingo-20160527' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/urgent fixes from Arnaldo Carvalho de Melo: - Fix kptr_restrict=2 related 'perf record' segfault (Wang Nan) - Fix CTF/libbabeltrace handling of chinese COMM strings (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 1a695a905c18548062509178b98bc91e67510864 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun May 29 09:29:24 2016 -0700 Linux 4.7-rc1 Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d43a41152f8e9e4c0d19850884d1fada076dee10 Author: Gregor Boirie <gregor.boirie@parrot.com> Date: Tue Apr 19 11:18:33 2016 +0200 iio:st_pressure: fix sampling gains (bring inline with ABI) Temperature channels report scaled samples in Celsius although expected as milli degree Celsius in Documentation/ABI/testing/sysfs-bus-iio. Gains are not implemented at all for LPS001WP pressure and temperature channels. This patch ensures that proper offsets and scales are exposed to userpace for both pressure and temperature channels. Also fix a NULL pointer exception when userspace reads content of sysfs scale attribute when gains are not defined. Signed-off-by: Gregor Boirie <gregor.boirie@parrot.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/pressure/st_pressure_core.c | 80 ++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 30 deletions(-) commit e0ab7af9bd1c25e40b9a1dbeb2a634b88267b9d7 Author: George Spelvin <linux@sciencehorizons.net> Date: Sun May 29 08:05:56 2016 -0400 hash_string: Fix zero-length case for !DCACHE_WORD_ACCESS The self-test was updated to cover zero-length strings; the function needs to be updated, too. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: George Spelvin <linux@sciencehorizons.net> Fixes: fcfd2fbf22d2 ("fs/namei.c: Add hashlen_string() function") Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f2a031b66ec6da1512f9db228e4174ad2c7d2688 Author: George Spelvin <linux@sciencehorizons.net> Date: Sun May 29 01:26:41 2016 -0400 Rename other copy of hash_string to hashlen_string The original name was simply hash_string(), but that conflicted with a function with that name in drivers/base/power/trace.c, and I decided that calling it "hashlen_" was better anyway. But you have to do it in two places. [ This caused build errors for architectures that don't define CONFIG_DCACHE_WORD_ACCESS - Linus ] Signed-off-by: George Spelvin <linux@sciencehorizons.net> Reported-by: Guenter Roeck <linux@roeck-us.net> Fixes: fcfd2fbf22d2 ("fs/namei.c: Add hashlen_string() function") Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 037369b872940cd923835a0a589763180c4a36bc Author: Mikulas Patocka <mikulas@twibright.com> Date: Tue May 24 22:49:18 2016 +0200 hpfs: implement the show_options method The HPFS filesystem used generic_show_options to produce string that is displayed in /proc/mounts. However, there is a problem that the options may disappear after remount. If we mount the filesystem with option1 and then remount it with option2, /proc/mounts should show both option1 and option2, however it only shows option2 because the whole option string is replaced with replace_mount_options in hpfs_remount_fs. To fix this bug, implement the hpfs_show_options function that prints options that are currently selected. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/hpfs/super.c | 43 ++++++++++++++++++++++++++++++++----------- 1 file changed, 32 insertions(+), 11 deletions(-) commit 01d6e08711bf90bc4d7ead14a93a0cbd73b1896a Author: Mikulas Patocka <mikulas@twibright.com> Date: Tue May 24 22:48:33 2016 +0200 affs: fix remount failure when there are no options changed Commit c8f33d0bec99 ("affs: kstrdup() memory handling") checks if the kstrdup function returns NULL due to out-of-memory condition. However, if we are remounting a filesystem with no change to filesystem-specific options, the parameter data is NULL. In this case, kstrdup returns NULL (because it was passed NULL parameter), although no out of memory condition exists. The mount syscall then fails with ENOMEM. This patch fixes the bug. We fail with ENOMEM only if data is non-NULL. The patch also changes the call to replace_mount_options - if we didn't pass any filesystem-specific options, we don't call replace_mount_options (thus we don't erase existing reported options). Fixes: c8f33d0bec99 ("affs: kstrdup() memory handling") Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org # v4.1+ Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/affs/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 44d51706b4685f965cd32acde3fe0fcc1e6198e8 Author: Mikulas Patocka <mikulas@twibright.com> Date: Tue May 24 22:47:00 2016 +0200 hpfs: fix remount failure when there are no options changed Commit ce657611baf9 ("hpfs: kstrdup() out of memory handling") checks if the kstrdup function returns NULL due to out-of-memory condition. However, if we are remounting a filesystem with no change to filesystem-specific options, the parameter data is NULL. In this case, kstrdup returns NULL (because it was passed NULL parameter), although no out of memory condition exists. The mount syscall then fails with ENOMEM. This patch fixes the bug. We fail with ENOMEM only if data is non-NULL. The patch also changes the call to replace_mount_options - if we didn't pass any filesystem-specific options, we don't call replace_mount_options (thus we don't erase existing reported options). Fixes: ce657611baf9 ("hpfs: kstrdup() out of memory handling") Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/hpfs/super.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 4029632c344142e0e92da3ff4937cd41bd647bb4 Merge: d66492b a8c5ddf Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 28 16:41:39 2016 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull more MIPS updates from Ralf Baechle: "This is the secondnd batch of MIPS patches for 4.7. Summary: CPS: - Copy EVA configuration when starting secondary VPs. EIC: - Clear Status IPL. Lasat: - Fix a few off by one bugs. lib: - Mark intrinsics notrace. Not only are the intrinsics uninteresting, it would cause infinite recursion. MAINTAINERS: - Add file patterns for MIPS BRCM device tree bindings. - Add file patterns for mips device tree bindings. MT7628: - Fix MT7628 pinmux typos. - wled_an pinmux gpio. - EPHY LEDs pinmux support. Pistachio: - Enable KASLR VDSO: - Build microMIPS VDSO for microMIPS kernels. - Fix aliasing warning by building with `-fno-strict-aliasing' for debugging but also tracing them might result in recursion. Misc: - Add missing FROZEN hotplug notifier transitions. - Fix clk binding example for varioius PIC32 devices. - Fix cpu interrupt controller node-names in the DT files. - Fix XPA CPU feature separation. - Fix write_gc0_* macros when writing zero. - Add inline asm encoding helpers. - Add missing VZ accessor microMIPS encodings. - Fix little endian microMIPS MSA encodings. - Add 64-bit HTW fields and fix its configuration. - Fix sigreturn via VDSO on microMIPS kernel. - Lots of typo fixes. - Add definitions of SegCtl registers and use them" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (49 commits) MIPS: Add missing FROZEN hotplug notifier transitions MIPS: Build microMIPS VDSO for microMIPS kernels MIPS: Fix sigreturn via VDSO on microMIPS kernel MIPS: devicetree: fix cpu interrupt controller node-names MIPS: VDSO: Build with `-fno-strict-aliasing' MIPS: Pistachio: Enable KASLR MIPS: lib: Mark intrinsics notrace MIPS: Fix 64-bit HTW configuration MIPS: Add 64-bit HTW fields MAINTAINERS: Add file patterns for mips device tree bindings MAINTAINERS: Add file patterns for mips brcm device tree bindings MIPS: Simplify DSP instruction encoding macros MIPS: Add missing tlbinvf/XPA microMIPS encodings MIPS: Fix little endian microMIPS MSA encodings MIPS: Add missing VZ accessor microMIPS encodings MIPS: Add inline asm encoding helpers MIPS: Spelling fix lets -> let's MIPS: VR41xx: Fix typo MIPS: oprofile: Fix typo MIPS: math-emu: Fix typo ... commit d66492bce151ac4c477cf1de97171777c0d62d20 Author: Guenter Roeck <linux@roeck-us.net> Date: Sat May 28 15:26:02 2016 -0700 fs: fix binfmt_aout.c build error Various builds (such as i386:allmodconfig) fail with fs/binfmt_aout.c:133:2: error: expected identifier or '(' before 'return' fs/binfmt_aout.c:134:1: error: expected identifier or '(' before '}' token [ Oops. My bad, I had stupidly thought that "allmodconfig" covered this on x86-64 too, but it obviously doesn't. Egg on my face. - Linus ] Fixes: 5d22fc25d4fc ("mm: remove more IS_ERR_VALUE abuses") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/binfmt_aout.c | 1 - 1 file changed, 1 deletion(-) commit 7e0fb73c52c4037b4d5ef9ff56c7296a3151bd92 Merge: 4e8440b 4684fe9 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 28 16:15:25 2016 -0700 Merge branch 'hash' of git://ftp.sciencehorizons.net/linux Pull string hash improvements from George Spelvin: "This series does several related things: - Makes the dcache hash (fs/namei.c) useful for general kernel use. (Thanks to Bruce for noticing the zero-length corner case) - Converts the string hashes in <linux/sunrpc/svcauth.h> to use the above. - Avoids 64-bit multiplies in hash_64() on 32-bit platforms. Two 32-bit multiplies will do well enough. - Rids the world of the bad hash multipliers in hash_32. This finishes the job started in commit 689de1d6ca95 ("Minimal fix-up of bad hashing behavior of hash_64()") The vast majority of Linux architectures have hardware support for 32x32-bit multiply and so derive no benefit from "simplified" multipliers. The few processors that do not (68000, h8/300 and some models of Microblaze) have arch-specific implementations added. Those patches are last in the series. - Overhauls the dcache hash mixing. The patch in commit 0fed3ac866ea ("namei: Improve hash mixing if CONFIG_DCACHE_WORD_ACCESS") was an off-the-cuff suggestion. Replaced with a much more careful design that's simultaneously faster and better. (My own invention, as there was noting suitable in the literature I could find. Comments welcome!) - Modify the hash_name() loop to skip the initial HASH_MIX(). This would let us salt the hash if we ever wanted to. - Sort out partial_name_hash(). The hash function is declared as using a long state, even though it's truncated to 32 bits at the end and the extra internal state contributes nothing to the result. And some callers do odd things: - fs/hfs/string.c only allocates 32 bits of state - fs/hfsplus/unicode.c uses it to hash 16-bit unicode symbols not bytes - Modify bytemask_from_count to handle inputs of 1..sizeof(long) rather than 0..sizeof(long)-1. This would simplify users other than full_name_hash" Special thanks to Bruce Fields for testing and finding bugs in v1. (I learned some humbling lessons about "obviously correct" code.) On the arch-specific front, the m68k assembly has been tested in a standalone test harness, I've been in contact with the Microblaze maintainers who mostly don't care, as the hardware multiplier is never omitted in real-world applications, and I haven't heard anything from the H8/300 world" * 'hash' of git://ftp.sciencehorizons.net/linux: h8300: Add <asm/hash.h> microblaze: Add <asm/hash.h> m68k: Add <asm/hash.h> <linux/hash.h>: Add support for architecture-specific functions fs/namei.c: Improve dcache hash function Eliminate bad hash multipliers from hash_32() and hash_64() Change hash_64() return value to 32 bits <linux/sunrpc/svcauth.h>: Define hash_str() in terms of hashlen_string() fs/namei.c: Add hashlen_string() function Pull out string hash to <linux/stringhash.h> commit 4684fe95300c071983f77653e354c040fe80a265 Author: George Spelvin <linux@sciencehorizons.net> Date: Wed May 25 14:19:49 2016 -0400 h8300: Add <asm/hash.h> This will improve the performance of hash_32() and hash_64(), but due to complete lack of multi-bit shift instructions on H8, performance will still be bad in surrounding code. Designing H8-specific hash algorithms to work around that is a separate project. (But if the maintainers would like to get in touch...) Signed-off-by: George Spelvin <linux@sciencehorizons.net> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: uclinux-h8-devel@lists.sourceforge.jp arch/h8300/Kconfig | 1 + arch/h8300/include/asm/hash.h | 53 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) commit 7b13277b682972c2ff8f6419e86c333d81936023 Author: George Spelvin <linux@sciencehorizons.net> Date: Wed May 25 11:06:09 2016 -0400 microblaze: Add <asm/hash.h> Microblaze is an FPGA soft core that can be configured various ways. If it is configured without a multiplier, the standard __hash_32() will require a call to __mulsi3, which is a slow software loop. Instead, use a shift-and-add sequence for the constant multiply. GCC knows how to do this, but it's not as clever as some. Signed-off-by: George Spelvin <linux@sciencehorizons.net> Cc: Alistair Francis <alistair.francis@xilinx.com> Cc: Michal Simek <michal.simek@xilinx.com> arch/microblaze/Kconfig | 1 + arch/microblaze/include/asm/hash.h | 81 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) commit 14c44b95b3dcb8ff1d627e6b78f57c4373d375cb Author: George Spelvin <linux@sciencehorizons.net> Date: Thu May 26 11:36:19 2016 -0400 m68k: Add <asm/hash.h> This provides a multiply by constant GOLDEN_RATIO_32 = 0x61C88647 for the original mc68000, which lacks a 32x32-bit multiply instruction. Yes, the amount of optimization effort put in is excessive. :-) Shift-add chain found by Yevgen Voronenko's Hcub algorithm at http://spiral.ece.cmu.edu/mcm/gen.html Signed-off-by: George Spelvin <linux@sciencehorizons.net> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Greg Ungerer <gerg@linux-m68k.org> Cc: Andreas Schwab <schwab@linux-m68k.org> Cc: Philippe De Muyter <phdm@macq.eu> Cc: linux-m68k@lists.linux-m68k.org arch/m68k/Kconfig.cpu | 1 + arch/m68k/include/asm/hash.h | 59 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) commit 468a9428521e7d00fb21250af363eb94dc1d6861 Author: George Spelvin <linux@sciencehorizons.net> Date: Thu May 26 22:11:51 2016 -0400 <linux/hash.h>: Add support for architecture-specific functions This is just the infrastructure; there are no users yet. This is modelled on CONFIG_ARCH_RANDOM; a CONFIG_ symbol declares the existence of <asm/hash.h>. That file may define its own versions of various functions, and define HAVE_* symbols (no CONFIG_ prefix!) to suppress the generic ones. Included is a self-test (in lib/test_hash.c) that verifies the basics. It is NOT in general required that the arch-specific functions compute the same thing as the generic, but if a HAVE_* symbol is defined with the value 1, then equality is tested. Signed-off-by: George Spelvin <linux@sciencehorizons.net> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Greg Ungerer <gerg@linux-m68k.org> Cc: Andreas Schwab <schwab@linux-m68k.org> Cc: Philippe De Muyter <phdm@macq.eu> Cc: linux-m68k@lists.linux-m68k.org Cc: Alistair Francis <alistai@xilinx.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: uclinux-h8-devel@lists.sourceforge.jp arch/Kconfig | 8 ++ fs/namei.c | 6 +- include/linux/hash.h | 27 +++++- lib/Kconfig.debug | 11 +++ lib/Makefile | 1 + lib/test_hash.c | 250 +++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 299 insertions(+), 4 deletions(-) commit 2a18da7a9c7886f1c7307f8d3f23f24318583f03 Author: George Spelvin <linux@sciencehorizons.net> Date: Mon May 23 07:43:58 2016 -0400 fs/namei.c: Improve dcache hash function Patch 0fed3ac866 improved the hash mixing, but the function is slower than necessary; there's a 7-instruction dependency chain (10 on x86) each loop iteration. Word-at-a-time access is a very tight loop (which is good, because link_path_walk() is one of the hottest code paths in the entire kernel), and the hash mixing function must not have a longer latency to avoid slowing it down. There do not appear to be any published fast hash functions that: 1) Operate on the input a word at a time, and 2) Don't need to know the length of the input beforehand, and 3) Have a single iterated mixing function, not needing conditional branches or unrolling to distinguish different loop iterations. One of the algorithms which comes closest is Yann Collet's xxHash, but that's two dependent multiplies per word, which is too much. The key insights in this design are: 1) Barring expensive ops like multiplies, to diffuse one input bit across 64 bits of hash state takes at least log2(64) = 6 sequentially dependent instructions. That is more cycles than we'd like. 2) An operation like "hash ^= hash << 13" requires a second temporary register anyway, and on a 2-operand machine like x86, it's three instructions. 3) A better use of a second register is to hold a two-word hash state. With careful design, no temporaries are needed at all, so it doesn't increase register pressure. And this gets rid of register copying on 2-operand machines, so the code is smaller and faster. 4) Using two words of state weakens the requirement for one-round mixing; we now have two rounds of mixing before cancellation is possible. 5) A two-word hash state also allows operations on both halves to be done in parallel, so on a superscalar processor we get more mixing in fewer cycles. I ended up using a mixing function inspired by the ChaCha and Speck round functions. It is 6 simple instructions and 3 cycles per iteration (assuming multiply by 9 can be done by an "lea" instruction): x ^= *input++; y ^= x; x = ROL(x, K1); x += y; y = ROL(y, K2); y *= 9; Not only is this reversible, two consecutive rounds are reversible: if you are given the initial and final states, but not the intermediate state, it is possible to compute both input words. This means that at least 3 words of input are required to create a collision. (It also has the property, used by hash_name() to avoid a branch, that it hashes all-zero to all-zero.) The rotate constants K1 and K2 were found by experiment. The search took a sample of random initial states (I used 1023) and considered the effect of flipping each of the 64 input bits on each of the 128 output bits two rounds later. Each of the 8192 pairs can be considered a biased coin, and adding up the Shannon entropy of all of them produces a score. The best-scoring shifts also did well in other tests (flipping bits in y, trying 3 or 4 rounds of mixing, flipping all 64*63/2 pairs of input bits), so the choice was made with the additional constraint that the sum of the shifts is odd and not too close to the word size. The final state is then folded into a 32-bit hash value by a less carefully optimized multiply-based scheme. This also has to be fast, as pathname components tend to be short (the most common case is one iteration!), but there's some room for latency, as there is a fair bit of intervening logic before the hash value is used for anything. (Performance verified with "bonnie++ -s 0 -n 1536:-2" on tmpfs. I need a better benchmark; the numbers seem to show a slight dip in performance between 4.6.0 and this patch, but they're too noisy to quote.) Special thanks to Bruce fields for diligent testing which uncovered a nasty fencepost error in an earlier version of this patch. [checkpatch.pl formatting complaints noted and respectfully disagreed with.] Signed-off-by: George Spelvin <linux@sciencehorizons.net> Tested-by: J. Bruce Fields <bfields@redhat.com> fs/namei.c | 121 +++++++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 81 insertions(+), 40 deletions(-) commit ef703f49a6c5b909a85149bb6625c4ed0d697186 Author: George Spelvin <linux@sciencehorizons.net> Date: Thu May 26 23:00:23 2016 -0400 Eliminate bad hash multipliers from hash_32() and hash_64() The "simplified" prime multipliers made very bad hash functions, so get rid of them. This completes the work of 689de1d6ca. To avoid the inefficiency which was the motivation for the "simplified" multipliers, hash_64() on 32-bit systems is changed to use a different algorithm. It makes two calls to hash_32() instead. drivers/media/usb/dvb-usb-v2/af9015.c uses the old GOLDEN_RATIO_PRIME_32 for some horrible reason, so it inherits a copy of the old definition. Signed-off-by: George Spelvin <linux@sciencehorizons.net> Cc: Antti Palosaari <crope@iki.fi> Cc: Mauro Carvalho Chehab <m.chehab@samsung.com> drivers/media/usb/dvb-usb-v2/af9015.c | 2 + include/linux/hash.h | 87 ++++++++++++++--------------------- 2 files changed, 36 insertions(+), 53 deletions(-) commit 92d567740f2ab5937b2c23bee94ea4b284bb1f98 Author: George Spelvin <linux@sciencehorizons.net> Date: Thu May 26 22:22:01 2016 -0400 Change hash_64() return value to 32 bits That's all that's ever asked for, and it makes the return type of hash_long() consistent. It also allows (upcoming patch) an optimized implementation of hash_64 on 32-bit machines. I tried adding a BUILD_BUG_ON to ensure the number of bits requested was never more than 32 (most callers use a compile-time constant), but adding <linux/bug.h> to <linux/hash.h> breaks the tools/perf compiler unless tools/perf/MANIFEST is updated, and understanding that code base well enough to update it is too much trouble. I did the rest of an allyesconfig build with such a check, and nothing tripped. Signed-off-by: George Spelvin <linux@sciencehorizons.net> include/linux/hash.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 917ea166f4672ec085f2cccc135c7c0eec72282c Author: George Spelvin <linux@sciencehorizons.net> Date: Fri May 20 13:31:33 2016 -0400 <linux/sunrpc/svcauth.h>: Define hash_str() in terms of hashlen_string() Finally, the first use of previous two patches: eliminate the separate ad-hoc string hash functions in the sunrpc code. Now hash_str() is a wrapper around hash_string(), and hash_mem() is likewise a wrapper around full_name_hash(). Note that sunrpc code *does* call hash_mem() with a zero length, which is why the previous patch needed to handle that in full_name_hash(). (Thanks, Bruce, for finding that!) This also eliminates the only caller of hash_long which asks for more than 32 bits of output. The comment about the quality of hashlen_string() and full_name_hash() is jumping the gun by a few patches; they aren't very impressive now, but will be improved greatly later in the series. Signed-off-by: George Spelvin <linux@sciencehorizons.net> Tested-by: J. Bruce Fields <bfields@redhat.com> Acked-by: J. Bruce Fields <bfields@redhat.com> Cc: Jeff Layton <jlayton@poochiereds.net> Cc: linux-nfs@vger.kernel.org include/linux/sunrpc/svcauth.h | 40 +++++++++------------------------------- 1 file changed, 9 insertions(+), 31 deletions(-) commit fcfd2fbf22d2587196890103d41e3d554c47da0e Author: George Spelvin <linux@sciencehorizons.net> Date: Fri May 20 08:41:37 2016 -0400 fs/namei.c: Add hashlen_string() function We'd like to make more use of the highly-optimized dcache hash functions throughout the kernel, rather than have every subsystem create its own, and a function that hashes basic null-terminated strings is required for that. (The name is to emphasize that it returns both hash and length.) It's actually useful in the dcache itself, specifically d_alloc_name(). Other uses in the next patch. full_name_hash() is also tweaked to make it more generally useful: 1) Take a "char *" rather than "unsigned char *" argument, to be consistent with hash_name(). 2) Handle zero-length inputs. If we want more callers, we don't want to make them worry about corner cases. Signed-off-by: George Spelvin <linux@sciencehorizons.net> fs/dcache.c | 3 +-- fs/namei.c | 51 +++++++++++++++++++++++++++++++++++++++++----- include/linux/stringhash.h | 8 ++++++-- 3 files changed, 53 insertions(+), 9 deletions(-) commit f4bcbe792b8f434e32487cff9d9e30ab45a3ce02 Author: George Spelvin <linux@sciencehorizons.net> Date: Fri May 20 07:26:00 2016 -0400 Pull out string hash to <linux/stringhash.h> ... so they can be used without the rest of <linux/dcache.h> The hashlen_* macros will make sense next patch. Signed-off-by: George Spelvin <linux@sciencehorizons.net> include/linux/dcache.h | 27 +---------------- include/linux/stringhash.h | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 26 deletions(-) commit 4e8440b3b6b801953b2e53c55491cf98fc8f6c01 Merge: a1842b2 e6be18f Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 28 12:38:50 2016 -0700 Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c fix from Wolfram Sang: "A fix for a regression introduced yesterday. The regression didn't show up here locally because I did not have PAGE_POISONING enabled. And buildbots discovered this only after it hit your tree. Thanks to Dan for the quick response" * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: dev: use after free in detach commit a1842b2b6fc011145c24180744d62d88b895f8e3 Merge: 0723ab4 8d057e3 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 28 12:32:01 2016 -0700 Merge tag 'chrome-platform' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform Pull chrome platform updates from Olof Johansson "A handful of Chrome driver and binding changes this merge window: - a few patches to fix probing and configuration of pstore - a few patches adding Elan touchpad registration on a few devices - EC changes: a security fix dealing with max message sizes and addition of compat_ioctl support. - keyboard backlight control support There was also an accidential duplicate registration of trackpads on 'Leon', which was reverted just recently" * tag 'chrome-platform' of git://git.kernel.org/pub/scm/linux/kernel/git/olof/chrome-platform: Revert "platform/chrome: chromeos_laptop: Add Leon Touch" platform/chrome: chromeos_laptop - Add Elan touchpad for Wolf platform/chrome: chromeos_laptop - Add elan trackpad option for C720 platform/chrome: cros_ec_dev - Populate compat_ioctl platform/chrome: cros_ec_lightbar - use name instead of ID to hide lightbar attributes platform/chrome: cros_ec_dev - Fix security issue platform/chrome: Add Chrome OS keyboard backlight LEDs support platform/chrome: use to_platform_device() platform/chrome: pstore: Move to larger record size. platform/chrome: pstore: probe for ramoops buffer using acpi platform/chrome: chromeos_laptop: Add Leon Touch commit 0723ab4a97a19bf9da135d68529977aeba17570d Merge: 9ba55cf eb4606e Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 28 12:23:12 2016 -0700 Merge tag 'sound-4.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull more sound updates from Takashi Iwai: "This is the second update round for 4.7-rc1. Most of changes are about the pending ASoC updates and fixes, including a few new drivers. Below are some highlights: ASoC: - New drivers for MAX98371 and TAS5720 - SPI support for TLV320AIC32x4, along with the module split - TDM support for STI Uniperf IPs - Remaining topology API fixes / updates HDA: - A couple of Dell quirks and new Realtek codec support" * tag 'sound-4.7-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (63 commits) ALSA: hda - Fix headset mic detection problem for one Dell machine spi: spi-ep93xx: Fix the PTR_ERR() argument ALSA: hda/realtek - Add support for ALC295/ALC3254 ASoC: kirkwood: fix build failure ALSA: hda - Fix headphone noise on Dell XPS 13 9360 ASoC: ak4642: Enable cache usage to fix crashes on resume ASoC: twl6040: Disconnect AUX output pads on digital mute ASoC: tlv320aic32x4: Properly implement the positive and negative pins into the mixers rcar: src: skip disabled-SRC nodes ASoC: max98371 Remove duplicate entry in max98371_reg ASoC: twl6040: Select LPPLL during standby ASoC: rsnd: don't use prohibited number to PDMACHCRn.SRS ASoC: simple-card: Add pm callbacks to platform driver ASoC: pxa: Fix module autoload for platform drivers ASoC: topology: Fix memory leak in widget creation ASoC: Add max98371 codec driver ASoC: rsnd: count .probe/.remove for rsnd_mod_call() ASoC: topology: Check size mismatch of ABI objects before parsing ASoC: topology: Check failure to create a widget ASoC: add support for TAS5720 digital amplifier ... commit 9ba55cf7cfbfd12a7e914d0d55b7581e896b3f0d Merge: 1cbe06c 8f0dfb3 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 28 12:04:17 2016 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending Pull SCSI target updates from Nicholas Bellinger: "Here are the outstanding target pending updates for v4.7-rc1. The highlights this round include: - Allow external PR/ALUA metadata path be defined at runtime via top level configfs attribute (Lee) - Fix target session shutdown bug for ib_srpt multi-channel (hch) - Make TFO close_session() and shutdown_session() optional (hch) - Drop se_sess->sess_kref + convert tcm_qla2xxx to internal kref (hch) - Add tcm_qla2xxx endpoint attribute for basic FC jammer (Laurence) - Refactor iscsi-target RX/TX PDU encode/decode into common code (Varun) - Extend iscsit_transport with xmit_pdu, release_cmd, get_rx_pdu, validate_parameters, and get_r2t_ttt for generic ISO offload (Varun) - Initial merge of cxgb iscsi-segment offload target driver (Varun) The bulk of the changes are Chelsio's new driver, along with a number of iscsi-target common code improvements made by Varun + Co along the way" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (29 commits) iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY race cxgbit: Use type ISCSI_CXGBIT + cxgbit tpg_np attribute iscsi-target: Convert transport drivers to signal rdma_shutdown iscsi-target: Make iscsi_tpg_np driver show/store use generic code tcm_qla2xxx Add SCSI command jammer/discard capability iscsi-target: graceful disconnect on invalid mapping to iovec target: need_to_release is always false, remove redundant check and kfree target: remove sess_kref and ->shutdown_session iscsi-target: remove usage of ->shutdown_session tcm_qla2xxx: introduce a private sess_kref target: make close_session optional target: make ->shutdown_session optional target: remove acl_stop target: consolidate and fix session shutdown cxgbit: add files for cxgbit.ko iscsi-target: export symbols iscsi-target: call complete on conn_logout_comp iscsi-target: clear tx_thread_active iscsi-target: add new offload transport type iscsi-target: use conn_transport->transport_type in text rsp ... commit 1cbe06c3cf542d48eb22180163e00f91760ef8cd Merge: ed2608f 7a226f9 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 28 11:04:16 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull more rdma updates from Doug Ledford: "This is the second group of code for the 4.7 merge window. It looks large, but only in one sense. I'll get to that in a minute. The list of changes here breaks down as follows: - Dynamic counter infrastructure in the IB drivers This is a sysfs based code to allow free form access to the hardware counters RDMA devices might support so drivers don't need to code this up repeatedly themselves - SendOnlyFullMember multicast support - IB router support - A couple misc fixes - The big item on the list: hfi1 driver updates, plus moving the hfi1 driver out of staging There was a group of 15 patches in the hfi1 list that I thought I had in the first pull request but they weren't. So that added to the length of the hfi1 section here. As far as these go, everything but the hfi1 is pretty straight forward. The hfi1 is, if you recall, the driver that Al had complaints about how it used the write/writev interfaces in an overloaded fashion. The write portion of their interface behaved like the write handler in the IB stack proper and did bi-directional communications. The writev interface, on the other hand, only accepts SDMA request structures. The completions for those structures are sent back via an entirely different event mechanism. With the security patch, we put security checks on the write interface, however, we also knew they would be going away soon. Now, we've converted the write handler in the hfi1 driver to use ioctls from the IB reserved magic area for its bidirectional communications. With that change, Intel has addressed all of the items originally on their TODO when they went into staging (as well as many items added to the list later). As such, I moved them out, and since they were the last item in the staging/rdma directory, and I don't have immediate plans to use the staging area again, I removed the staging/rdma area. Because of the move out of staging, as well as a series of 5 patches in the hfi1 driver that removed code people thought should be done in a different way and was optional to begin with (a snoop debug interface, an eeprom driver for an eeprom connected directory to their hfi1 chip and not via an i2c bus, and a few other things like that), the line count, especially the removal count, is high" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (56 commits) staging/rdma: Remove the entire rdma subdirectory of staging IB/core: Make device counter infrastructure dynamic IB/hfi1: Fix pio map initialization IB/hfi1: Correct 8051 link parameter settings IB/hfi1: Update pkey table properly after link down or FM start IB/rdamvt: Fix rdmavt s_ack_queue sizing IB/rdmavt: Max atomic value should be a u8 IB/hfi1: Fix hard lockup due to not using save/restore spin lock IB/hfi1: Add tracing support for send with invalidate opcode IB/hfi1, qib: Add ieth to the packet header definitions IB/hfi1: Move driver out of staging IB/hfi1: Do not free hfi1 cdev parent structure early IB/hfi1: Add trace message in user IOCTL handling IB/hfi1: Remove write(), use ioctl() for user cmds IB/hfi1: Add ioctl() interface for user commands IB/hfi1: Remove unused user command IB/hfi1: Remove snoop/diag interface IB/hfi1: Remove EPROM functionality from data device IB/hfi1: Remove UI char device IB/hfi1: Remove multiple device cdev ... commit 8d057e3a180da16b0d1519056295165e7b8dc8f5 Author: Benson Leung <bleung@chromium.org> Date: Sat May 28 08:25:33 2016 -0700 Revert "platform/chrome: chromeos_laptop: Add Leon Touch" This reverts commit bff3c624dc7261a084a4d25a0b09c3fb0fec872a. Board "Leon" is otherwise known as "Toshiba CB35" and we already have the entry that supports that board as of this commit : 963cb6f platform/chrome: chromeos_laptop - Add Toshiba CB35 Touch Remove this duplicate. Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/chromeos_laptop.c | 15 --------------- 1 file changed, 15 deletions(-) commit e6be18f6d62c1d3b331ae020b76a29c2ccf6b0bf Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Sat May 28 08:01:46 2016 +0300 i2c: dev: use after free in detach The call to put_i2c_dev() frees "i2c_dev" so there is a use after free when we call cdev_del(&i2c_dev->cdev). Fixes: d6760b14d4a1 ('i2c: dev: switch from register_chrdev to cdev API') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/i2c-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8c5ddf08f1f7e587240c44f82f4762bd37df1f3 Author: Anna-Maria Gleixner <anna-maria@linutronix.de> Date: Tue May 24 15:08:47 2016 +0200 MIPS: Add missing FROZEN hotplug notifier transitions The corresponding FROZEN hotplug notifier transitions used on suspend/resume are ignored. Therefore the switch case action argument is masked with the frozen hotplug notifier transition mask. Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: rt@linutronix.de Patchwork: https://patchwork.linux-mips.org/patch/13351/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bb93078e655be1e24d68f28f2756676e62c037ce Author: James Hogan <james.hogan@imgtec.com> Date: Tue May 24 09:35:11 2016 +0100 MIPS: Build microMIPS VDSO for microMIPS kernels MicroMIPS kernels may be expected to run on microMIPS only cores which don't support the normal MIPS instruction set, so be sure to pass the -mmicromips flag through to the VDSO cflags. Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: <stable@vger.kernel.org> # 4.4.x- Patchwork: https://patchwork.linux-mips.org/patch/13349/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/vdso/Makefile | 1 + 1 file changed, 1 insertion(+) commit 13eb192d10bcc9ac518d57356179071d603bcb4e Author: James Hogan <james.hogan@imgtec.com> Date: Tue May 24 09:35:10 2016 +0100 MIPS: Fix sigreturn via VDSO on microMIPS kernel In microMIPS kernels, handle_signal() sets the isa16 mode bit in the vdso address so that the sigreturn trampolines (which are offset from the VDSO) get executed as microMIPS. However commit ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") changed the offsets to come from the VDSO image, which already have the isa16 mode bit set correctly since they're extracted from the VDSO shared library symbol table. Drop the isa16 mode bit handling from handle_signal() to fix sigreturn for cores which support both microMIPS and normal MIPS. This doesn't fix microMIPS only cores, since the VDSO is still built for normal MIPS, but thats a separate problem. Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: <stable@vger.kernel.org> # 4.4.x- Patchwork: https://patchwork.linux-mips.org/patch/13348/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/signal.c | 8 -------- 1 file changed, 8 deletions(-) commit 5214cae77c11f5fdb13ebe478067a6008c4da630 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Mon May 23 14:39:00 2016 +0300 MIPS: devicetree: fix cpu interrupt controller node-names Here is the quote from [1]: The unit-address must match the first address specified in the reg property of the node. If the node has no reg property, the @ and unit-address must be omitted and the node-name alone differentiates the node from other nodes at the same level This patch adjusts MIPS dts-files and devicetree binding documentation in accordance with [1]. [1] Power.org(tm) Standard for Embedded Power Architecture(tm) Platform Requirements (ePAPR). Version 1.1 – 08 April 2011. Chapter 2.2.1.1 Node Name Requirements Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13345/ Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/mips/cpu_irq.txt | 2 +- arch/mips/boot/dts/ingenic/jz4740.dtsi | 2 +- arch/mips/boot/dts/ralink/mt7620a.dtsi | 2 +- arch/mips/boot/dts/ralink/rt2880.dtsi | 2 +- arch/mips/boot/dts/ralink/rt3050.dtsi | 2 +- arch/mips/boot/dts/ralink/rt3883.dtsi | 2 +- arch/mips/boot/dts/xilfpga/nexys4ddr.dts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit 94cc36b84acc29f543b48bc5ed786011b112a666 Author: Maciej W. Rozycki <macro@imgtec.com> Date: Thu May 26 12:55:45 2016 +0100 MIPS: VDSO: Build with `-fno-strict-aliasing' Avoid an aliasing issue causing a build error in VDSO: In file included from include/linux/srcu.h:34:0, from include/linux/notifier.h:15, from ./arch/mips/include/asm/uprobes.h:9, from include/linux/uprobes.h:61, from include/linux/mm_types.h:13, from ./arch/mips/include/asm/vdso.h:14, from arch/mips/vdso/vdso.h:27, from arch/mips/vdso/gettimeofday.c:11: include/linux/workqueue.h: In function 'work_static': include/linux/workqueue.h:186:2: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing] return *work_data_bits(work) & WORK_STRUCT_STATIC; ^ cc1: all warnings being treated as errors make[2]: *** [arch/mips/vdso/gettimeofday.o] Error 1 with a CONFIG_DEBUG_OBJECTS_WORK configuration and GCC 5.2.0. Include `-fno-strict-aliasing' along with compiler options used, as required for kernel code, fixing a problem present since the introduction of VDSO with commit ebb5e78cc634 ("MIPS: Initial implementation of a VDSO"). Thanks to Tejun for diagnosing this properly! Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO") Cc: Tejun Heo <tj@kernel.org> Cc: linux-mips@linux-mips.org Cc: stable@vger.kernel.org # v4.3+ Patchwork: https://patchwork.linux-mips.org/patch/13357/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/vdso/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 41cc07be42835a5c35b409af3914b8fcaedd0d72 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Wed May 25 12:58:40 2016 +0100 MIPS: Pistachio: Enable KASLR Allow KASLR to be selected on Pistachio based systems. Tested on a Creator Ci40. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Andrew Bresticker <abrestic@chromium.org> Cc: Jonas Gorski <jogo@openwrt.org> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13356/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 1 + arch/mips/pistachio/init.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) commit aedcfbe06558a9f53002e82d5be64c6c94687726 Author: Harvey Hunt <harvey.hunt@imgtec.com> Date: Wed May 25 11:06:35 2016 +0100 MIPS: lib: Mark intrinsics notrace On certain MIPS32 devices, the ftrace tracer "function_graph" uses __lshrdi3() during the capturing of trace data. ftrace then attempts to trace __lshrdi3() which leads to infinite recursion and a stack overflow. Fix this by marking __lshrdi3() as notrace. Mark the other compiler intrinsics as notrace in case the compiler decides to use them in the ftrace path. Signed-off-by: Harvey Hunt <harvey.hunt@imgtec.com> Cc: <linux-mips@linux-mips.org> Cc: <linux-kernel@vger.kernel.org> Cc: <stable@vger.kernel.org> # 4.2.x- Patchwork: https://patchwork.linux-mips.org/patch/13354/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/lib/ashldi3.c | 2 +- arch/mips/lib/ashrdi3.c | 2 +- arch/mips/lib/bswapdi.c | 2 +- arch/mips/lib/bswapsi.c | 2 +- arch/mips/lib/cmpdi2.c | 2 +- arch/mips/lib/lshrdi3.c | 2 +- arch/mips/lib/ucmpdi2.c | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) commit aa76042a016474775ccd187c068669148c30c3bb Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 27 22:25:23 2016 +0100 MIPS: Fix 64-bit HTW configuration The Hardware page Table Walker (HTW) is being misconfigured on 64-bit kernels. The PWSize.PS (pointer size) bit determines whether pointers within directories are loaded as 32-bit or 64-bit addresses, but was never being set to 1 for 64-bit kernels where the unsigned long in pgd_t is 64-bits wide. This actually reduces rather than improves performance when the HTW is enabled on P6600 since the HTW is initiated lots, but walks are all aborted due I think to bad intermediate pointers. Since we were already taking the width of the PTEs into account by setting PWSize.PTEW, which is the left shift applied to the page table index *in addition to* the native pointer size, we also need to reduce PTEW by 1 when PS=1. This is done by calculating PTEW based on the relative size of pte_t compared to pgd_t. Finally in order for the HTW to be used when PS=1, the appropriate XK/XS/XU bits corresponding to the different 64-bit segments need to be set in PWCtl. We enable only XU for now to enable walking for XUSeg. Supporting walking for XKSeg would be a bit more involved so is left for a future patch. It would either require the use of a per-CPU top level base directory if supported by the HTW (a bit like pgd_current but with a second entry pointing at swapper_pg_dir), or the HTW would prepend bit 63 of the address to the global directory index which doesn't really match how we split user and kernel page directories. Fixes: cab25bc7537b ("MIPS: Extend hardware table walking support to MIPS64") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13364/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/tlbex.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) commit 6446e6cf440f6ee0f8b64c32968a8434205c1f59 Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 27 22:25:22 2016 +0100 MIPS: Add 64-bit HTW fields Add field definitions for some of the 64-bit specific Hardware page Table Walker (HTW) register fields in PWSize and PWCtl, in preparation for fixing the 64-bit HTW configuration. Also print these fields out along with the others in print_htw_config(). Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13363/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 8 ++++++++ arch/mips/mm/tlbex.c | 8 ++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) commit f46d92e86d21da7eb3b06e0675272ef57e1b8565 Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Sun May 22 11:06:07 2016 +0200 MAINTAINERS: Add file patterns for mips device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13340/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 7ad2410c986b888323b8873df13d6505759c0275 Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Sun May 22 11:05:45 2016 +0200 MAINTAINERS: Add file patterns for mips brcm device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Rafał Miłecki <zajec5@gmail.com> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13339/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 5aadab0c1a3451565dec3b02ebbe162854d39181 Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 20 23:28:41 2016 +0100 MIPS: Simplify DSP instruction encoding macros Simplify the DSP instruction wrapper macros which use explicit encodings for microMIPS and normal MIPS by using the new encoding macros and removing duplication. To me this makes it easier to read since it is much shorter, but it also ensures .insn is used, preventing objdump disassembling the microMIPS code as normal MIPS. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13314/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 107 +++++++-------------------------------- 1 file changed, 17 insertions(+), 90 deletions(-) commit c84700cc575f4625e719817595b3df33c00307c7 Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 20 23:28:40 2016 +0100 MIPS: Add missing tlbinvf/XPA microMIPS encodings Hardcoded MIPS instruction encodings are provided for tlbinvf, mfhc0 & mthc0 instructions, but microMIPS encodings are missing. I doubt any microMIPS cores exist at present which support these instructions, but the microMIPS encodings exist, and microMIPS cores may support them in the future. Add the missing microMIPS encodings using the new macros. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13313/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit 6e1b29c3094688b6803fa1f9d5da676a7d0fbff9 Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 20 23:28:39 2016 +0100 MIPS: Fix little endian microMIPS MSA encodings When the toolchain doesn't support MSA we encode MSA instructions explicitly in assembly. Unfortunately we use .word for both MIPS and microMIPS encodings which is wrong, since 32-bit microMIPS instructions are made up from a pair of halfwords. - The most significant halfword always comes first, so for little endian builds the halves will be emitted in the wrong order. - 32-bit alignment isn't guaranteed, so the assembler may insert a 16-bit nop instruction to pad the instruction stream to a 32-bit boundary. Use the new instruction encoding macros to encode microMIPS MSA instructions correctly. Fixes: d96cc3d1ec5d ("MIPS: Add microMIPS MSA support.") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <Paul.Burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13312/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/asmmacro.h | 99 ++++++++++++++++++++-------------------- arch/mips/include/asm/msa.h | 21 ++++----- 2 files changed, 58 insertions(+), 62 deletions(-) commit 1c48a177351ba8cbf6871f035496fce0e11d8fa3 Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 20 23:28:38 2016 +0100 MIPS: Add missing VZ accessor microMIPS encodings Toolchains may be used which support microMIPS but not VZ instructions (i.e. binutis 2.22 & 2.23), so extend the explicitly encoded versions of the guest COP0 register & guest TLB access macros to support microMIPS encodings too, using the new macros. This prevents non-microMIPS instructions being executed in microMIPS mode during CPU probe on cores supporting VZ (e.g. M5150), which cause reserved instruction exceptions early during boot. Fixes: bad50d79255a ("MIPS: Fix VZ probe gas errors with binutils <2.24") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13311/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) commit 0dfa1c12f300d06f95d861d2718ef198e37473a6 Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 20 23:28:37 2016 +0100 MIPS: Add inline asm encoding helpers To allow simplification of macros which use inline assembly to explicitly encode instructions, add a few simple abstractions to mipsregs.h which expand to specific microMIPS or normal MIPS encodings depending on what type of kernel is being built: _ASM_INSN_IF_MIPS(_enc) : Emit a 32bit MIPS instruction if microMIPS is not enabled. _ASM_INSN32_IF_MM(_enc) : Emit a 32bit microMIPS instruction if enabled. _ASM_INSN16_IF_MM(_enc) : Emit a 16bit microMIPS instruction if enabled. The macros can be used one after another since the MIPS / microMIPS macros are mutually exclusive, for example: __asm__ __volatile__( ".set push\n\t" ".set noat\n\t" "# mfgc0 $1, $%1, %2\n\t" _ASM_INSN_IF_MIPS(0x40610000 | %1 << 11 | %2) _ASM_INSN32_IF_MM(0x002004fc | %1 << 16 | %2 << 11) "move %0, $1\n\t" ".set pop" : "=r" (__res) : "i" (source), "i" (sel)); Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13310/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit 4939788eb8559754a120531c49ffa96bb30fee06 Author: Ralf Baechle <ralf@linux-mips.org> Date: Sun May 22 00:39:18 2016 +0200 MIPS: Spelling fix lets -> let's As noticed by Sergei in the discussion of Andrea Gelmini's patch series. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> arch/mips/include/asm/mach-au1x00/au1xxx_dbdma.h | 2 +- arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h | 2 +- arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h | 2 +- arch/mips/kernel/branch.c | 4 ++-- arch/mips/kernel/elf.c | 2 +- arch/mips/kernel/mips-r2-to-r6-emul.c | 2 +- arch/mips/sgi-ip27/ip27-nmi.c | 2 +- arch/mips/sgi-ip27/ip27-xtalk.c | 2 +- arch/mips/sni/rm200.c | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) commit a320a1156ac987ae45d2a922f8f7355d67658e83 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:02:26 2016 +0200 MIPS: VR41xx: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13338/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/vr41xx/common/cmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5004614b34e8af205356f557ef1fec4a710bba20 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:01:57 2016 +0200 MIPS: oprofile: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: rric@kernel.org Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Cc: oprofile-list@lists.sf.net Patchwork: https://patchwork.linux-mips.org/patch/13334/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/oprofile/op_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e7e3346cc64fff306694bdc41908283d195339c1 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:01:51 2016 +0200 MIPS: math-emu: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: macro@imgtec.com Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13333/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/dsemul.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 209b877833ef256cae4091763f32635ba0b79fdc Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:01:36 2016 +0200 MIPS: lib: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13331/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/lib/memcpy.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a90c59e636da2352ab9d2f51bf0d6c9b2eef3c13 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:01:27 2016 +0200 MIPS: kernel: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: paul.burton@imgtec.com Cc: macro@imgtec.com Cc: james.hogan@imgtec.com Cc: jslaby@suse.cz Cc: adam.buchbinder@gmail.com Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13330/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5be47f5a4b74ca4bc58348a0b2a6aa4c8cba1be Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:01:20 2016 +0200 MIPS: R6: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: macro@imgtec.com Cc: paul.burton@imgtec.com Cc: Leonid.Yegoshin@imgtec.com Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13329/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/mips-r2-to-r6-emul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a9e7e4518c5152023b9ddebf1d47ee0473f3fab4 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:01:12 2016 +0200 MIPS: IP22/IP28: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: adam.buchbinder@gmail.com Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13328/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/sgi/hpc3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da66f8e637b1d9fbe285d9f3d1ea37e4b3029978 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:00:40 2016 +0200 MIPS: Cavium: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: david.daney@cavium.com Cc: janne.huttunen@nokia.com Cc: aaro.koskinen@nokia.com Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13324/ Patchwork: https://patchwork.linux-mips.org/patch/13325/ Patchwork: https://patchwork.linux-mips.org/patch/13326/ Patchwork: https://patchwork.linux-mips.org/patch/13327/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/octeon/cvmx-cmd-queue.h | 2 +- arch/mips/include/asm/octeon/cvmx-helper-board.h | 2 +- arch/mips/include/asm/octeon/cvmx-ipd.h | 2 +- arch/mips/include/asm/octeon/cvmx-pow.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 7a448b57a6165e9ff93adb4440459c22cbfa73a9 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:00:33 2016 +0200 MIPS: MT: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13323/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mips_mt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb0f6e8a2c0f01599bdf88a0ca146a44a0a58b5f Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:00:26 2016 +0200 MIPS: Loongson64: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: chenhc@lemote.com Cc: viresh.kumar@linaro.org Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13322/ Patchwork: https://patchwork.linux-mips.org/patch/13332/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mach-loongson64/loongson_hwmon.h | 2 +- arch/mips/loongson64/loongson-3/hpet.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit dc3c27394d25360ac614c638fd505041792dd450 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:00:18 2016 +0200 MIPS: IP32: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13321/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mach-ip32/dma-coherence.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87fd4e2692a2add7726fb5a497c617c99071de34 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:00:11 2016 +0200 MIPS: IP27: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13320/ Patchwork: https://patchwork.linux-mips.org/patch/13335/ Patchwork: https://patchwork.linux-mips.org/patch/13336/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mach-ip27/dma-coherence.h | 2 +- arch/mips/pci/ops-bridge.c | 4 ++-- arch/mips/sgi-ip27/ip27-hubio.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit e904b94a06c77a4241df7ba239c3b5fd1ddb1809 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:00:04 2016 +0200 MIPS: BCM63xx: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13319/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit be9fde2eff7987067f58bea5d18d575335f9246f Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 13:59:56 2016 +0200 MIPS: Alchemy: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: trivial@kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13318/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mach-au1x00/gpio-au1300.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 20430e7648c8acd1ab70bd056293c6c571ca8fc5 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 13:59:48 2016 +0200 MIPS: hazards.h: Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Cc: chenhc@lemote.com Cc: james.hogan@imgtec.com Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13317/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/hazards.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9b987c4d74ba2ac695d28a155e3cf2a8a48d426f Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Fri Nov 8 12:44:31 2013 +0300 MIPS: Lasat: A couple off by one bugs in picvue_proc.c These should be ">=" instead of ">" or we go past the end of the pvc_lines[] array. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: linux-mips@linux-mips.org Cc: kernel-janitors@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/6124/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/lasat/picvue_proc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2b436a351803f38d0c8ca9c26103472c8aaeb599 Author: Álvaro Fernández Rojas <noltari@gmail.com> Date: Thu May 19 22:07:36 2016 +0200 MIPS: ralink: add MT7628 EPHY LEDs pinmux support Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13308/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ralink/mt7620.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) commit 07b50db6e685172a41b9978aebffb2438166d9b6 Author: Álvaro Fernández Rojas <noltari@gmail.com> Date: Thu May 19 22:07:35 2016 +0200 MIPS: ralink: fix MT7628 wled_an pinmux gpio Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13307/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ralink/mt7620.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d7146829c9da24e285cb1b1f2156b5b3e2d40c07 Author: Álvaro Fernández Rojas <noltari@gmail.com> Date: Thu May 19 22:07:34 2016 +0200 MIPS: ralink: fix MT7628 pinmux typos Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Cc: john@phrozen.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13306/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ralink/mt7620.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f03984ca4fcfb356ee0765ae49a36288e6cdb165 Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 18 17:04:38 2016 +0100 MIPS: Fix write_gc0_* macros when writing zero The versions of the __write_{32,64}bit_gc0_register() macros for when there is no virt support in the assembler use the "J" inline asm constraint to allow integer zero, but this needs to be accompanied by the "z" formatting string so that it turns into $0. Fix both macros to do this. Fixes: bad50d79255a ("MIPS: Fix VZ probe gas errors with binutils <2.24") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13289/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 63a8802f4fb60963d3f91b072f4d0424330ec0d4 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Wed May 18 17:12:36 2016 +0100 MIPS: CPS: Copy EVA configuration when starting secondary VPs. When starting secondary VPEs which support EVA and the SegCtl registers, copy the memory segmentation configuration from the running VPE to ensure that all VPEs in the core have a consistent virtual memory map. The EVA configuration of secondary cores is dealt with when starting the core via the CM. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13291/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cps-vec.S | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 5c33f8b2e54c519c42a30cfb34d9ecb70631bf83 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Wed May 18 17:12:35 2016 +0100 MIPS: Add definitions of SegCtl registers and use them The SegCtl registers are standard for MIPSr3..MIPSr5. Add definitions of these registers and use them rather than constants Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Joshua Kinard <kumba@gentoo.org> Cc: James Hogan <james.hogan@imgtec.com> Cc: Chris Packham <judge.packham@gmail.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13290/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mach-malta/kernel-entry-init.h | 6 +++--- arch/mips/include/asm/mipsregs.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) commit dd317403d057546a29ececb446500fc243d2a704 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Tue May 17 10:36:00 2016 +0530 dt/bindings: Correct clk binding example for PIC32 gpio. Update binding example based on new clock binding scheme. [1] Documentation/devicetree/bindings/clock/microchip,pic32.txt Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Kumar Gala <galak@codeaurora.org> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: linux-gpio@vger.kernel.org Cc: Mark Rutland <mark.rutland@arm.com> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13270/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/gpio/microchip,pic32-gpio.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 761e52bc70c048e93038c52942fee7b4cdda6c22 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Tue May 17 10:35:59 2016 +0530 dt/bindings: Correct clk binding example for PIC32 WDT. Update binding example based on new clock binding scheme. [1] Documentation/devicetree/bindings/clock/microchip,pic32.txt Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Kumar Gala <galak@codeaurora.org> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Joshua Henderson <digitalpeer@digitalpeer.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13269/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/watchdog/microchip,pic32-wdt.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 58c376893bfbf489ba0ad258ec72e067d643fe16 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Tue May 17 10:35:58 2016 +0530 dt/bindings: Correct clk binding example for PIC32 DMT. Update binding example based on new clock binding scheme. [1] Documentation/devicetree/bindings/clock/microchip,pic32.txt Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Kumar Gala <galak@codeaurora.org> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Joshua Henderson <digitalpeer@digitalpeer.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13268/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/watchdog/microchip,pic32-dmt.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9c719d87e97b5b697e4425dfedd62230bda16c35 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Tue May 17 10:35:57 2016 +0530 dt/bindings: Correct clk binding example for PIC32 serial. Update binding example based on new clock binding scheme. [1] Documentation/devicetree/bindings/clock/microchip,pic32.txt Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Kumar Gala <galak@codeaurora.org> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Joshua Henderson <digitalpeer@digitalpeer.com> Cc: Andrei Pistirica <andrei.pistirica@microchip.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13267/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/serial/microchip,pic32-uart.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 82cc37f6d7fa667498b4804ab2888beffab1c8c6 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Tue May 17 10:35:56 2016 +0530 dt/bindings: Correct clk binding example for PIC32 pinctrl Update binding example based on new clock binding scheme. [1] Documentation/devicetree/bindings/clock/microchip,pic32.txt Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Kumar Gala <galak@codeaurora.org> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Joshua Henderson <digitalpeer@digitalpeer.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13266/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/pinctrl/microchip,pic32-pinctrl.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 684b23c1c189b97d4c5426359029c8fc8d5ecd71 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Tue May 17 10:35:55 2016 +0530 dt/bindings: Correct clk binding example for PIC32 SDHCI Update binding example based on new clock binding documentation. [1] Documentation/devicetree/bindings/clock/microchip,pic32.txt Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Kumar Gala <galak@codeaurora.org> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Joshua Henderson <digitalpeer@digitalpeer.com> Cc: Andrei Pistirica <andrei.pistirica@microchip.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13265/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/mmc/microchip,sdhci-pic32.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f2d988d231373bd53d5102bf40792552ed11d87 Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 18 00:08:49 2016 +0100 MIPS: Fix incomplete separation of XPA CPU feature Commit 12822570a29b ("MIPS: Separate XPA CPU feature into LPA and MVH") wasn't fully applied, possibly due to a conflict with commit f270d881fa55 ("MIPS: Detect MIPSr6 Virtual Processor support"). This left decode_config5() referring to the non-existent MIPS_CPU_XPA, which breaks the build when XPA is enabled: arch/mips/kernel/cpu-probe.c In function ‘decode_config5’: arch/mips/kernel/cpu-probe.c:838:17: error: ‘MIPS_CPU_XPA’ undeclared (first use in this function) c->options |= MIPS_CPU_XPA; ^ Apply the missing hunk, dropping the CONFIG_XPA ifdef and setting the MIPS_CPU_MVH option when Config5.MVH is set. Fixes: 12822570a29b ("MIPS: Separate XPA CPU feature into LPA and MVH") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Link: https://patchwork.linux-mips.org/patch/13112/ Patchwork: https://patchwork.linux-mips.org/patch/13277/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cpu-probe.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ba01cf0e1244fc3e4a24b4a111148c0d70025b36 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue May 17 15:31:06 2016 +0100 irqchip: mips-gic: Setup EIC mode on each CPU if it's in use When EIC mode is in use (cpu_has_veic is true) enable it on each CPU during GIC initialisation. Otherwise there may be a mismatch between the hardware default interrupt model & that expected by the kernel. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Matt Redfearn <matt.redfearn@imgtec.com> Tested-by: Matt Redfearn <matt.redfearn@imgtec.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13274/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/irqchip/irq-mips-gic.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit d642e4e7b42f379fb9383ef1505f9d67895fb815 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue May 17 15:31:05 2016 +0100 MIPS: smp-cps: Clear Status IPL field when using EIC When using an external interrupt controller (EIC) the interrupt mask bits in the cop0 Status register are reused for the Interrupt Priority Level, and any interrupts with a priority lower than the field will be ignored. Clear the field to 0 by default such that all interrupts are serviced. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Matt Redfearn <matt.redfearn@imgtec.com> Tested-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Qais Yousef <qsyousef@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13273/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/smp-cps.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 640356a48750ff9ef3303d85158ef9c42c3a18b6 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue May 17 15:31:04 2016 +0100 MIPS: Clear Status IPL field when using EIC When using an external interrupt controller (EIC) the interrupt mask bits in the cop0 Status register are reused for the Interrupt Priority Level, and any interrupts with a priority lower than the field will be ignored. Clear the field to 0 by default such that all interrupts are serviced. Without doing so we default to arbitrarily ignoring all or some subset of interrupts. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Matt Redfearn <matt.redfearn@imgtec.com> Tested-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Cc: Joe Perches <joe@perches.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13272/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/irq.c | 3 +++ 1 file changed, 3 insertions(+) commit ed2608faa0f701b1dbc65277a9e5c7ff7118bfd4 Merge: 06d2e78 f49cf3b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 19:14:35 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull more input subsystem updates from Dmitry Torokhov: "Just a few more driver fixes; new drivers will be coming in the next merge window" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: pwm-beeper - fix - scheduling while atomic Input: xpad - xbox one elite controller support Input: xpad - add more third-party controllers Input: xpad - prevent spurious input from wired Xbox 360 controllers Input: xpad - move pending clear to the correct location Input: uinput - handle compat ioctl for UI_SET_PHYS commit 06d2e7812ecd1b585c5e9e7bda8ee90acebaef8c Merge: 7d8eb50 72a71f8 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 19:07:10 2016 -0700 Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull more i2c updates from Wolfram Sang: "Here is the second pull request from I2C for this merge window: - one new feature (which nearly fell through the cracks): i2c-dev does now use the cdev API so it can handle >256 minors. Seems people do need that. - two fixes for the just added DMA feature for i2c-rcar - some typo fixes" * 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: i2c: dev: don't start function name with 'return' i2c: dev: switch from register_chrdev to cdev API i2c: xlr: rename ARCH_TANGOX to ARCH_TANGO i2c: at91: change log when dma configuration fails misc: at24: Fix typo in at24 header file i2c: rcar: should depend on HAS_DMA i2c: rcar: use dma_request_chan() commit 7d8eb50290e4edf8de36973728862f73ff0b94bc Merge: 23a3e17 a78ff11 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 18:54:59 2016 -0700 Merge branch 'for-linus-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml Pull UML updates from Richard Weinberger: "This contains a nice FPU fixup from Eli Cooper for UML" * 'for-linus-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: add extended processor state save/restore support um: extend fpstate to _xstate to support YMM registers um: fix FPU state preservation around signal handlers commit 23a3e178b9f8be3a900c7b11d795e54b4a131af0 Merge: e0714ec 1112018 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 18:49:29 2016 -0700 Merge tag 'upstream-4.7-rc1' of git://git.infradead.org/linux-ubifs Pull UBI/UBIFS updates from Richard Weinberger: "This contains mostly cleanups and minor improvements of UBI and UBIFS" * tag 'upstream-4.7-rc1' of git://git.infradead.org/linux-ubifs: ubifs: ubifs_dump_inode: Fix dumping field bulk_read UBI: Fix static volume checks when Fastmap is used UBI: Set free_count to zero before walking through erase list UBI: Silence an unintialized variable warning UBI: Clean up return in ubi_remove_volume() UBI: Modify wrong comment in ubi_leb_map function. UBI: Don't read back all data in ubi_eba_copy_leb() UBI: Add ro-mode sysfs attribute commit e0714ec4f9efe7b86828b0dcc077fd8f5d8e5e91 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 17:20:27 2016 -0700 nfs: fix anonymous member initializer build failure with older compilers Older versions of gcc don't understand named initializers inside a anonymous structure or union member. It can be worked around by adding the bracin gin the initializer for the anonymous member. Without this, gcc 4.4.4 will fail the build with CC fs/nfs/nfs4state.o fs/nfs/nfs4state.c:69: error: unknown field ‘data’ specified in initializer fs/nfs/nfs4state.c:69: warning: missing braces around initializer fs/nfs/nfs4state.c:69: warning: (near initialization for ‘zero_stateid.<anonymous>.data’) make[2]: *** [fs/nfs/nfs4state.o] Error 1 introduced in commit 93b717fd81bf ("NFSv4: Label stateids with the type") Reported-and-tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Anna Schumaker <Anna.Schumaker@netapp.com> Cc: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nfs/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d102a56edba7a3f236454716fa09920e66772044 Merge: 0121a32 3767e25 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 17:14:05 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs fixes from Al Viro: "Followups to the parallel lookup work: - update docs - restore killability of the places that used to take ->i_mutex killably now that we have down_write_killable() merged - Additionally, it turns out that I missed a prerequisite for security_d_instantiate() stuff - ->getxattr() wasn't the only thing that could be called before dentry is attached to inode; with smack we needed the same treatment applied to ->setxattr() as well" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: switch ->setxattr() to passing dentry and inode separately switch xattr_handler->set() to passing dentry and inode separately restore killability of old mutex_lock_killable(&inode->i_mutex) users add down_write_killable_nested() update D/f/directory-locking commit 3767e255b390d72f9a33c08d9e86c5f21f25860f Author: Al Viro <viro@zeniv.linux.org.uk> Date: Fri May 27 11:06:05 2016 -0400 switch ->setxattr() to passing dentry and inode separately smack ->d_instantiate() uses ->setxattr(), so to be able to call it before we'd hashed the new dentry and attached it to inode, we need ->setxattr() instances getting the inode as an explicit argument rather than obtaining it from dentry. Similar change for ->getxattr() had been done in commit ce23e64. Unlike ->getxattr() (which is used by both selinux and smack instances of ->d_instantiate()) ->setxattr() is used only by smack one and unfortunately it got missed back then. Reported-by: Seung-Woo Kim <sw0312.kim@samsung.com> Tested-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Documentation/filesystems/porting | 7 +++++++ drivers/staging/lustre/lustre/llite/llite_internal.h | 4 ++-- drivers/staging/lustre/lustre/llite/xattr.c | 6 ++---- fs/bad_inode.c | 4 ++-- fs/ecryptfs/crypto.c | 9 +++++---- fs/ecryptfs/ecryptfs_kernel.h | 4 ++-- fs/ecryptfs/inode.c | 7 ++++--- fs/ecryptfs/mmap.c | 3 ++- fs/fuse/dir.c | 6 +++--- fs/hfs/attr.c | 6 +++--- fs/hfs/hfs_fs.h | 2 +- fs/kernfs/inode.c | 11 ++++++----- fs/kernfs/kernfs-internal.h | 3 ++- fs/libfs.c | 5 +++-- fs/overlayfs/inode.c | 5 +++-- fs/overlayfs/overlayfs.h | 5 +++-- fs/xattr.c | 8 ++++---- include/linux/fs.h | 3 ++- include/linux/xattr.h | 3 ++- security/smack/smack_lsm.c | 2 +- 20 files changed, 59 insertions(+), 44 deletions(-) commit 0121a32201dcc72933fb6019c41661e2f8a02fc5 Merge: 559b6d9 2176519 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 16:44:39 2016 -0700 Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs Pull overlayfs update from Miklos Szeredi: "The meat of this is a change to use the mounter's credentials for operations that require elevated privileges (such as whiteout creation). This fixes behavior under user namespaces as well as being a nice cleanup" * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs: ovl: Do d_type check only if work dir creation was successful ovl: update documentation ovl: override creds with the ones from the superblock mounter commit f49cf3b8b4c841457244c461c66186a719e13bcc Author: Manfred Schlaegl <manfred.schlaegl@gmx.at> Date: Fri May 27 16:36:36 2016 -0700 Input: pwm-beeper - fix - scheduling while atomic Pwm config may sleep so defer it using a worker. On a Freescale i.MX53 based board we ran into "BUG: scheduling while atomic" because input_inject_event locks interrupts, but imx_pwm_config_v2 sleeps. Tested on Freescale i.MX53 SoC with 4.6.0. Signed-off-by: Manfred Schlaegl <manfred.schlaegl@gmx.at> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/misc/pwm-beeper.c | 69 ++++++++++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 21 deletions(-) commit 559b6d90a0beb375c46dffe18133012bfa29f441 Merge: aa00edc 56244ef Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 16:37:36 2016 -0700 Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs cleanups and fixes from Chris Mason: "We have another round of fixes and a few cleanups. I have a fix for short returns from btrfs_copy_from_user, which finally nails down a very hard to find regression we added in v4.6. Dave is pushing around gfp parameters, mostly to cleanup internal apis and make it a little more consistent. The rest are smaller fixes, and one speelling fixup patch" * 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (22 commits) Btrfs: fix handling of faults from btrfs_copy_from_user btrfs: fix string and comment grammatical issues and typos btrfs: scrub: Set bbio to NULL before calling btrfs_map_block Btrfs: fix unexpected return value of fiemap Btrfs: free sys_array eb as soon as possible btrfs: sink gfp parameter to convert_extent_bit btrfs: make state preallocation more speculative in __set_extent_bit btrfs: untangle gotos a bit in convert_extent_bit btrfs: untangle gotos a bit in __clear_extent_bit btrfs: untangle gotos a bit in __set_extent_bit btrfs: sink gfp parameter to set_record_extent_bits btrfs: sink gfp parameter to set_extent_new btrfs: sink gfp parameter to set_extent_defrag btrfs: sink gfp parameter to set_extent_delalloc btrfs: sink gfp parameter to clear_extent_dirty btrfs: sink gfp parameter to clear_record_extent_bits btrfs: sink gfp parameter to clear_extent_bits btrfs: sink gfp parameter to set_extent_bits btrfs: make find_workspace warn if there are no workspaces btrfs: make find_workspace always succeed ... commit 6f49a398b266d4895bd7e041db77a2b2ee1482a6 Author: Pavel Rojtberg <rojtberg@gmail.com> Date: Fri May 27 16:24:40 2016 -0700 Input: xpad - xbox one elite controller support added the according id and incresed XPAD_PKT_LEN to 64 as the elite controller sends at least 33 byte messages [1]. Verified to be working by [2]. [1]: https://franticrain.github.io/sniffs/XboxOneSniff.html [2]: https://github.com/paroj/xpad/issues/23 Signed-off-by: Pierre-Loup A. Griffais <eduke32@plagman.net> Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/joystick/xpad.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6538c3b2d2d220a974e47928b165ea09b9cfa6b4 Author: Pavel Rojtberg <rojtberg@gmail.com> Date: Fri May 27 16:24:20 2016 -0700 Input: xpad - add more third-party controllers Signed-off-by: Pierre-Loup A. Griffais <eduke32@plagman.net> Signed-off-by: Thomas Debesse <dev@illwieckz.net> Signed-off-by: aronschatz <aronschatz@aselabs.com> Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/joystick/xpad.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 1ff5fa3c6732f08e01ae12f12286d4728c9e4d86 Author: Cameron Gutman <aicommander@gmail.com> Date: Fri May 27 16:23:50 2016 -0700 Input: xpad - prevent spurious input from wired Xbox 360 controllers After initially connecting a wired Xbox 360 controller or sending it a command to change LEDs, a status/response packet is interpreted as controller input. This causes the state of buttons represented in byte 2 of the controller data packet to be incorrect until the next valid input packet. Wireless Xbox 360 controllers are not affected. Writing a new value to the LED device while holding the Start button and running jstest is sufficient to reproduce this bug. An event will come through with the Start button released. Xboxdrv also won't attempt to read controller input from a packet where byte 0 is non-zero. It also checks that byte 1 is 0x14, but that value differs between wired and wireless controllers and this code is shared by both. I think just checking byte 0 is enough to eliminate unwanted packets. The following are some examples of 3-byte status packets I saw: 01 03 02 02 03 00 03 03 03 08 03 00 Signed-off-by: Cameron Gutman <aicommander@gmail.com> Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/joystick/xpad.c | 4 ++++ 1 file changed, 4 insertions(+) commit 4efc6939a83c54fb3417541be48991afd0290ba3 Author: Pavel Rojtberg <rojtberg@gmail.com> Date: Fri May 27 16:22:25 2016 -0700 Input: xpad - move pending clear to the correct location otherwise we lose ff commands: https://github.com/paroj/xpad/issues/27 Signed-off-by: Pavel Rojtberg <rojtberg@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/joystick/xpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa00edc1287a693eadc7bc67a3d73555d969b35d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 16:03:22 2016 -0700 make IS_ERR_VALUE() complain about non-pointer-sized arguments Now that the allmodconfig x86-64 build is clean wrt IS_ERR_VALUE() uses on integers, add a cast to a pointer and back to the argument, so that any new mis-uses of IS_ERR_VALUE() will cause warnings like warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] so that we don't re-introduce any bogus uses. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/err.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d22fc25d4fc8096d2d7df27ea1893d4e055e764 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 15:57:31 2016 -0700 mm: remove more IS_ERR_VALUE abuses The do_brk() and vm_brk() return value was "unsigned long" and returned the starting address on success, and an error value on failure. The reasons are entirely historical, and go back to it basically behaving like the mmap() interface does. However, nobody actually wanted that interface, and it causes totally pointless IS_ERR_VALUE() confusion. What every single caller actually wants is just the simpler integer return of zero for success and negative error number on failure. So just convert to that much clearer and more common calling convention, and get rid of all the IS_ERR_VALUE() uses wrt vm_brk(). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/x86/ia32/ia32_aout.c | 17 ++++++++--------- fs/binfmt_aout.c | 18 +++++++----------- fs/binfmt_elf.c | 11 +++++------ include/linux/mm.h | 2 +- mm/mmap.c | 16 ++++++++-------- mm/nommu.c | 2 +- 6 files changed, 30 insertions(+), 36 deletions(-) commit 287980e49ffc0f6d911601e7e352a812ed27768e Author: Arnd Bergmann <arnd@arndb.de> Date: Fri May 27 23:23:25 2016 +0200 remove lots of IS_ERR_VALUE abuses Most users of IS_ERR_VALUE() in the kernel are wrong, as they pass an 'int' into a function that takes an 'unsigned long' argument. This happens to work because the type is sign-extended on 64-bit architectures before it gets converted into an unsigned type. However, anything that passes an 'unsigned short' or 'unsigned int' argument into IS_ERR_VALUE() is guaranteed to be broken, as are 8-bit integers and types that are wider than 'unsigned long'. Andrzej Hajda has already fixed a lot of the worst abusers that were causing actual bugs, but it would be nice to prevent any users that are not passing 'unsigned long' arguments. This patch changes all users of IS_ERR_VALUE() that I could find on 32-bit ARM randconfig builds and x86 allmodconfig. For the moment, this doesn't change the definition of IS_ERR_VALUE() because there are probably still architecture specific users elsewhere. Almost all the warnings I got are for files that are better off using 'if (err)' or 'if (err < 0)'. The only legitimate user I could find that we get a warning for is the (32-bit only) freescale fman driver, so I did not remove the IS_ERR_VALUE() there but changed the type to 'unsigned long'. For 9pfs, I just worked around one user whose calling conventions are so obscure that I did not dare change the behavior. I was using this definition for testing: #define IS_ERR_VALUE(x) ((unsigned long*)NULL == (typeof (x)*)NULL && \ unlikely((unsigned long long)(x) >= (unsigned long long)(typeof(x))-MAX_ERRNO)) which ends up making all 16-bit or wider types work correctly with the most plausible interpretation of what IS_ERR_VALUE() was supposed to return according to its users, but also causes a compile-time warning for any users that do not pass an 'unsigned long' argument. I suggested this approach earlier this year, but back then we ended up deciding to just fix the users that are obviously broken. After the initial warning that caused me to get involved in the discussion (fs/gfs2/dir.c) showed up again in the mainline kernel, Linus asked me to send the whole thing again. [ Updated the 9p parts as per Al Viro - Linus ] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lkml.org/lkml/2016/1/7/363 Link: https://lkml.org/lkml/2016/5/27/486 Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> # For nvmem part Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/acpi/acpi_dbg.c | 22 +++++++++++----------- drivers/ata/sata_highbank.c | 2 +- drivers/clk/tegra/clk-tegra210.c | 2 +- drivers/cpufreq/omap-cpufreq.c | 2 +- drivers/crypto/caam/ctrl.c | 2 +- drivers/dma/sun4i-dma.c | 16 ++++++++-------- drivers/gpio/gpio-xlp.c | 2 +- drivers/gpu/drm/sti/sti_vtg.c | 4 ++-- drivers/gpu/drm/tilcdc/tilcdc_tfp410.c | 2 +- drivers/gpu/host1x/hw/intr_hw.c | 2 +- drivers/iommu/arm-smmu-v3.c | 18 +++++++++--------- drivers/iommu/arm-smmu.c | 8 ++++---- drivers/irqchip/irq-clps711x.c | 2 +- drivers/irqchip/irq-gic.c | 2 +- drivers/irqchip/irq-hip04.c | 2 +- drivers/irqchip/spear-shirq.c | 2 +- drivers/media/i2c/adp1653.c | 10 +++++----- drivers/media/platform/s5p-tv/mixer_drv.c | 2 +- drivers/mfd/twl4030-irq.c | 2 +- drivers/mmc/core/mmc.c | 4 ++-- drivers/mmc/host/dw_mmc.c | 6 +++--- drivers/mmc/host/sdhci-esdhc-imx.c | 2 +- drivers/mmc/host/sdhci-of-at91.c | 2 +- drivers/mmc/host/sdhci.c | 4 ++-- drivers/net/ethernet/freescale/fman/fman.c | 2 +- drivers/net/ethernet/freescale/fman/fman_muram.c | 4 ++-- drivers/net/ethernet/freescale/fman/fman_muram.h | 4 ++-- drivers/net/wireless/ti/wlcore/spi.c | 4 ++-- drivers/nvmem/core.c | 22 +++++++++++----------- drivers/tty/serial/amba-pl011.c | 2 +- drivers/tty/serial/sprd_serial.c | 2 +- drivers/video/fbdev/da8xx-fb.c | 4 ++-- fs/afs/write.c | 4 ---- fs/binfmt_flat.c | 6 +++--- fs/gfs2/dir.c | 15 +++++++++------ kernel/pid.c | 2 +- net/9p/client.c | 8 ++++---- sound/soc/qcom/lpass-platform.c | 4 ++-- 38 files changed, 102 insertions(+), 103 deletions(-) commit 7ded384a12688c2a86b618da16bc87713404dfcc Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 15:23:32 2016 -0700 mm: fix section mismatch warning The register_page_bootmem_info_node() function needs to be marked __init in order to avoid a new warning introduced by commit f65e91df25aa ("mm: use early_pfn_to_nid in register_page_bootmem_info_node"). Otherwise you'll get a warning about how a non-init function calls early_pfn_to_nid (which is __meminit) Cc: Yang Shi <yang.shi@linaro.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/memory_hotplug.h | 2 +- mm/memory_hotplug.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit af7d93729c7c2beadea8ec5a6e66c53bef0e6290 Merge: 564884f 11e6856 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 14:56:59 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge misc updates and fixes from Andrew Morton: - late-breaking ocfs2 updates - random bunch of fixes * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm: disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM mm/memcontrol.c: move comments for get_mctgt_type() to proper position mm/memcontrol.c: fix the margin computation in mem_cgroup_margin() mm/cma: silence warnings due to max() usage mm: thp: avoid false positive VM_BUG_ON_PAGE in page_move_anon_rmap() oom_reaper: close race with exiting task mm: use early_pfn_to_nid in register_page_bootmem_info_node mm: use early_pfn_to_nid in page_ext_init MAINTAINERS: Kdump maintainers update MAINTAINERS: add kexec_core.c and kexec_file.c mm: oom: do not reap task if there are live threads in threadgroup direct-io: fix direct write stale data exposure from concurrent buffered read ocfs2: bump up o2cb network protocol version ocfs2: o2hb: fix hb hung time ocfs2: o2hb: don't negotiate if last hb fail ocfs2: o2hb: add some user/debug log ocfs2: o2hb: add NEGOTIATE_APPROVE message ocfs2: o2hb: add NEGO_TIMEOUT message ocfs2: o2hb: add negotiate timer commit 11e685672a0861ce136cc4e7f6fdd11e5390b1fa Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Fri May 27 14:27:49 2016 -0700 mm: disable DEFERRED_STRUCT_PAGE_INIT on !NO_BOOTMEM When we have !NO_BOOTMEM, the deferred page struct initialization doesn't work well because the pages reserved in bootmem are released to the page allocator uncoditionally. It causes memory corruption and system crash eventually. As Mel suggested, the bootmem is retiring slowly. We fix the issue by simply hiding DEFERRED_STRUCT_PAGE_INIT when bootmem is enabled. Link: http://lkml.kernel.org/r/1460602170-5821-1-git-send-email-gwshan@linux.vnet.ibm.com Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7cf7806ce1e30f1691cf340f70b807acbdf419ef Author: Li RongQing <roy.qing.li@gmail.com> Date: Fri May 27 14:27:46 2016 -0700 mm/memcontrol.c: move comments for get_mctgt_type() to proper position Move the comments for get_mctgt_type() to be before get_mctgt_type() implementation. Link: http://lkml.kernel.org/r/1463644638-7446-1-git-send-email-roy.qing.li@gmail.com Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memcontrol.c | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) commit cbedbac3e66121ddbac363776c23119f8eaeefda Author: Li RongQing <roy.qing.li@gmail.com> Date: Fri May 27 14:27:43 2016 -0700 mm/memcontrol.c: fix the margin computation in mem_cgroup_margin() mem_cgroup_margin() might return (memory.limit - memory_count) when the memsw.limit is in excess. This doesn't happen usually because we do not allow excess on hard limits and (memory.limit <= memsw.limit), but __GFP_NOFAIL charges can force the charge and cause the excess when no memory is really swappable (swap is full or no anonymous memory is left). [mhocko@suse.com: rewrote changelog] Link: http://lkml.kernel.org/r/20160525155122.GK20132@dhcp22.suse.cz Link: http://lkml.kernel.org/r/1464068266-27736-1-git-send-email-roy.qing.li@gmail.com Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memcontrol.c | 2 ++ 1 file changed, 2 insertions(+) commit badbda53e505089062e194c614e6f23450bc98b2 Author: Stephen Rothwell <sfr@canb.auug.org.au> Date: Fri May 27 14:27:41 2016 -0700 mm/cma: silence warnings due to max() usage pageblock_order can be (at least) an unsigned int or an unsigned long depending on the kernel config and architecture, so use max_t(unsigned long, ...) when comparing it. fixes these warnings: In file included from include/asm-generic/bug.h:13:0, from arch/powerpc/include/asm/bug.h:127, from include/linux/bug.h:4, from include/linux/mmdebug.h:4, from include/linux/mm.h:8, from include/linux/memblock.h:18, from mm/cma.c:28: mm/cma.c: In function 'cma_init_reserved_mem': include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast (void) (&_max1 == &_max2); ^ mm/cma.c:186:27: note: in expansion of macro 'max' alignment = PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order); ^ mm/cma.c: In function 'cma_declare_contiguous': include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast (void) (&_max1 == &_max2); ^ include/linux/kernel.h:747:9: note: in definition of macro 'max' typeof(y) _max2 = (y); ^ mm/cma.c:270:29: note: in expansion of macro 'max' (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order)); ^ include/linux/kernel.h:748:17: warning: comparison of distinct pointer types lacks a cast (void) (&_max1 == &_max2); ^ include/linux/kernel.h:747:21: note: in definition of macro 'max' typeof(y) _max2 = (y); ^ mm/cma.c:270:29: note: in expansion of macro 'max' (phys_addr_t)PAGE_SIZE << max(MAX_ORDER - 1, pageblock_order)); ^ [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/20160526150748.5be38a4f@canb.auug.org.au Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/cma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 0798d3c022dc63eb0ec02b511e1f76ca8411ef8e Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Fri May 27 14:27:38 2016 -0700 mm: thp: avoid false positive VM_BUG_ON_PAGE in page_move_anon_rmap() If page_move_anon_rmap() is refiling a pmd-splitted THP mapped in a tail page from a pte, the "address" must be THP aligned in order for the page->index bugcheck to pass in the CONFIG_DEBUG_VM=y builds. Link: http://lkml.kernel.org/r/1464253620-106404-1-git-send-email-kirill.shutemov@linux.intel.com Fixes: 6d0a07edd17c ("mm: thp: calculate the mapcount correctly for THP pages during WP faults") Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reported-by: Mika Westerberg <mika.westerberg@linux.intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andrea Arcangeli <aarcange@redhat.com> Cc: <stable@vger.kernel.org> [4.5] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/rmap.c | 2 ++ 1 file changed, 2 insertions(+) commit e2fe14564d3316d1625ed20bf1083995f4960893 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 27 14:27:35 2016 -0700 oom_reaper: close race with exiting task Tetsuo has reported: Out of memory: Kill process 443 (oleg's-test) score 855 or sacrifice child Killed process 443 (oleg's-test) total-vm:493248kB, anon-rss:423880kB, file-rss:4kB, shmem-rss:0kB sh invoked oom-killer: gfp_mask=0x24201ca(GFP_HIGHUSER_MOVABLE|__GFP_COLD), order=0, oom_score_adj=0 sh cpuset=/ mems_allowed=0 CPU: 2 PID: 1 Comm: sh Not tainted 4.6.0-rc7+ #51 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/31/2013 Call Trace: dump_stack+0x85/0xc8 dump_header+0x5b/0x394 oom_reaper: reaped process 443 (oleg's-test), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB In other words: __oom_reap_task exit_mm atomic_inc_not_zero tsk->mm = NULL mmput atomic_dec_and_test # > 0 exit_oom_victim # New victim will be # selected <OOM killer invoked> # no TIF_MEMDIE task so we can select a new one unmap_page_range # to release the memory The race exists even without the oom_reaper because anybody who pins the address space and gets preempted might race with exit_mm but oom_reaper made this race more probable. We can address the oom_reaper part by using oom_lock for __oom_reap_task because this would guarantee that a new oom victim will not be selected if the oom reaper might race with the exit path. This doesn't solve the original issue, though, because somebody else still might be pinning mm_users and so __mmput won't be called to release the memory but that is not really realiably solvable because the task will get away from the oom sight as soon as it is unhashed from the task_list and so we cannot guarantee a new victim won't be selected. [akpm@linux-foundation.org: fix use of unused `mm', Per Stephen] [akpm@linux-foundation.org: coding-style fixes] Fixes: aac453635549 ("mm, oom: introduce oom reaper") Link: http://lkml.kernel.org/r/1464271493-20008-1-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/oom_kill.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) commit f65e91df25aa426289cbcb580ca3183e24979fb1 Author: Yang Shi <yang.shi@linaro.org> Date: Fri May 27 14:27:32 2016 -0700 mm: use early_pfn_to_nid in register_page_bootmem_info_node register_page_bootmem_info_node() is invoked in mem_init(), so it will be called before page_alloc_init_late() if DEFERRED_STRUCT_PAGE_INIT is enabled. But, pfn_to_nid() depends on memmap which won't be fully setup until page_alloc_init_late() is done, so replace pfn_to_nid() by early_pfn_to_nid(). Link: http://lkml.kernel.org/r/1464210007-30930-1-git-send-email-yang.shi@linaro.org Signed-off-by: Yang Shi <yang.shi@linaro.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe53ca54270a757f0a28ee6bf3a54d952b550ed0 Author: Yang Shi <yang.shi@linaro.org> Date: Fri May 27 14:27:30 2016 -0700 mm: use early_pfn_to_nid in page_ext_init page_ext_init() checks suitable pages with pfn_to_nid(), but pfn_to_nid() depends on memmap which will not be setup fully until page_alloc_init_late() is done. Use early_pfn_to_nid() instead of pfn_to_nid() so that page extension could be still used early even though CONFIG_ DEFERRED_STRUCT_PAGE_INIT is enabled and catch early page allocation call sites. Suggested by Joonsoo Kim [1], this fix basically undoes the change introduced by commit b8f1a75d61d840 ("mm: call page_ext_init() after all struct pages are initialized") and fixes the same problem with a better approach. [1] http://lkml.kernel.org/r/CAAmzW4OUmyPwQjvd7QUfc6W1Aic__TyAuH80MLRZNMxKy0-wPQ@mail.gmail.com Link: http://lkml.kernel.org/r/1464198689-23458-1-git-send-email-yang.shi@linaro.org Signed-off-by: Yang Shi <yang.shi@linaro.org> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> init/main.c | 3 +-- mm/page_ext.c | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) commit f871f191357ebadb6ad7e8ecf6e8f40b694eea00 Author: Vivek Goyal <vgoyal@redhat.com> Date: Fri May 27 14:27:27 2016 -0700 MAINTAINERS: Kdump maintainers update I am proposing following updates to kdump maintainership. I have got busy in other things and not getting time to spend on kdump. Remove Haren Myneni as he has not participated in kdump development for a long time now. Add the names of Dave and Baoquan as kdump maintainers as they have been contributing to kdump for a long time now and they are in a much better position to spend time on this than me. Mark myself as a reviewer. Link: http://lkml.kernel.org/r/20160525131616.GB27291@redhat.com Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Acked-by: Simon Horman <horms@verge.net.au> Cc: Haren Myneni <hbabu@us.ibm.com> Cc: Dave Young <dyoung@redhat.com> Cc: Baoquan He <bhe@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> MAINTAINERS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 10540a6998de5d283e3e471f0d0f4e55e2a6872c Author: Minfei Huang <mnghuan@gmail.com> Date: Fri May 27 14:27:24 2016 -0700 MAINTAINERS: add kexec_core.c and kexec_file.c In the below commits kexec.c was split to kexec.c, kexec_file.c and kexec_core.c. commit a43cac0d9dc2 ("kexec: split kexec_file syscall code to kexec_file.c") commit 2965faa5e03d ("kexec: split kexec_load syscall from kexec core code") Both kexec_file.c and kexec_core.c still belong to the kexec component. In order to get correct mail lists by using the script get_maintainer.pl, add these files to MAINTAINERS. Link: http://lkml.kernel.org/r/1464189735-59113-1-git-send-email-mnghuan@gmail.com Signed-off-by: Minfei Huang <mnghuan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit edd9f7230f591b7988533b1cafb07f3c03555f19 Author: Vladimir Davydov <vdavydov@virtuozzo.com> Date: Fri May 27 14:27:21 2016 -0700 mm: oom: do not reap task if there are live threads in threadgroup If the current process is exiting, we don't invoke oom killer, instead we give it access to memory reserves and try to reap its mm in case nobody is going to use it. There's a mistake in the code performing this check - we just ignore any process of the same thread group no matter if it is exiting or not - see try_oom_reaper. Fix it. Link: http://lkml.kernel.org/r/1464087628-7318-1-git-send-email-vdavydov@virtuozzo.com Fixes: 3ef22dfff239 ("oom, oom_reaper: try to reap tasks which skip regular OOM killer path")Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/oom_kill.c | 2 -- 1 file changed, 2 deletions(-) commit 9ecd10b7a0270803fd5f36ab93173e6d5b41b895 Author: Eryu Guan <guaneryu@gmail.com> Date: Fri May 27 14:27:18 2016 -0700 direct-io: fix direct write stale data exposure from concurrent buffered read Currently direct writes inside i_size on a DIO_SKIP_HOLES filesystem are not allowed to allocate blocks(get_more_blocks() sets 'create' to 0 before calling get_block() callback), if it's a sparse file, direct writes fall back to buffered writes to avoid stale data exposure from concurrent buffered read. But there're two cases that can result in stale data exposure are not correctly detected. 1. The detection for "writing inside i_size" is not sufficient, writes can be treated as "extending writes" wrongly. For example, direct write 1FSB (file system block) to a 1FSB sparse file on ext2/3/4, starting from offset 0, in this case it's writing inside i_size, but 'create' is non-zero, because 'block_in_file' and '(i_size_read(inode) >> blkbits' are both zero. 2. Direct writes starting from or beyong i_size (not inside i_size) also could trigger block allocation and expose stale data. For example, consider a sparse file with i_size of 2k, and a write to offset 2k or 3k into the file, with a filesystem block size of 4k. (Thanks to Jeff Moyer for pointing this case out in his review.) The first problem can be demostrated by running ltp-aiodio test ADSP045 many times. When testing on extN filesystems, I see test failures occasionally, buffered read could read non-zero (stale) data. ADSP045: dio_sparse -a 4k -w 4k -s 2k -n 1 dio_sparse 0 TINFO : Dirtying free blocks dio_sparse 0 TINFO : Starting I/O tests non zero buffer at buf[0] => 0xffffffaa,ffffffaa,ffffffaa,ffffffaa non-zero read at offset 0 dio_sparse 0 TINFO : Killing childrens(s) dio_sparse 1 TFAIL : dio_sparse.c:191: 1 children(s) exited abnormally The second problem can also be reproduced easily by a hacked dio_sparse program, which accepts an option to specify the write offset. What we should really do is to disable block allocation for writes that could result in filling holes inside i_size. Link: http://lkml.kernel.org/r/1463156728-13357-1-git-send-email-guaneryu@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Eryu Guan <guaneryu@gmail.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/direct-io.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 38b52efd218bf2a11a5b4a8f56052cee6684cfec Author: Junxiao Bi <junxiao.bi@oracle.com> Date: Fri May 27 14:27:16 2016 -0700 ocfs2: bump up o2cb network protocol version Two new messages are added to support negotiating hb timeout. Stop nodes frmo talking an old version to mount as they will cause the negotiation to fail. Link: http://lkml.kernel.org/r/1464231615-27939-1-git-send-email-junxiao.bi@oracle.com Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/cluster/tcp_internal.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 6633ca573165e000867e50caf94f60a75399b68b Author: Junxiao Bi <junxiao.bi@oracle.com> Date: Fri May 27 14:27:13 2016 -0700 ocfs2: o2hb: fix hb hung time hr_last_timeout_start should be set as the last time where hb is still OK. When hb write timeout, hung time will be (jiffies - hr_last_timeout_start). Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Reviewed-by: Ryan Ding <ryan.ding@oracle.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Gang He <ghe@suse.com> Cc: rwxybh <rwxybh@126.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/cluster/heartbeat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88dbe98dc72fa0c2b778210e2079cd69d2477b36 Author: Junxiao Bi <junxiao.bi@oracle.com> Date: Fri May 27 14:27:10 2016 -0700 ocfs2: o2hb: don't negotiate if last hb fail Sometimes io error is returned when storage is down for a while. Like for iscsi device, stroage is made offline when session timeout, and this will make all io return -EIO. For this case, nodes shouldn't do negotiate timeout but should fence self. So let nodes fence self when o2hb_do_disk_heartbeat return an error, this is the same behavior with o2hb without negotiate timer. Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Reviewed-by: Ryan Ding <ryan.ding@oracle.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Gang He <ghe@suse.com> Cc: rwxybh <rwxybh@126.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/cluster/heartbeat.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 1bd1290283d7939478062e80bdd9719d3a21522f Author: Junxiao Bi <junxiao.bi@oracle.com> Date: Fri May 27 14:27:07 2016 -0700 ocfs2: o2hb: add some user/debug log Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Reviewed-by: Ryan Ding <ryan.ding@oracle.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Gang He <ghe@suse.com> Cc: rwxybh <rwxybh@126.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/cluster/heartbeat.c | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) commit e76f8237a2f7b7220980c0fb3c6d0b1d48ba79ad Author: Junxiao Bi <junxiao.bi@oracle.com> Date: Fri May 27 14:27:04 2016 -0700 ocfs2: o2hb: add NEGOTIATE_APPROVE message This message is used to re-queue write timeout timer and negotiate timer when all nodes suffer a write hung to storage, this makes node not fence self if storage down. Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Reviewed-by: Ryan Ding <ryan.ding@oracle.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Gang He <ghe@suse.com> Cc: rwxybh <rwxybh@126.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/cluster/heartbeat.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 34069b886f95356d68bf8315fa648c4ab3193cdd Author: Junxiao Bi <junxiao.bi@oracle.com> Date: Fri May 27 14:27:01 2016 -0700 ocfs2: o2hb: add NEGO_TIMEOUT message This message is sent to master node when non-master nodes's negotiate timer expired. Master node records these nodes in a bitmap which is used to do write timeout timer re-queue decision. Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Reviewed-by: Ryan Ding <ryan.ding@oracle.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Gang He <ghe@suse.com> Cc: rwxybh <rwxybh@126.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/cluster/heartbeat.c | 66 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) commit e0cbb79805083b8862182341ebf72266d58f6d12 Author: Junxiao Bi <junxiao.bi@oracle.com> Date: Fri May 27 14:26:58 2016 -0700 ocfs2: o2hb: add negotiate timer This series of patches is to fix the issue that when storage down, all nodes will fence self due to write timeout. With this patch set, all nodes will keep going until storage back online, except if the following issue happens, then all nodes will do as before to fence self. 1. io error got 2. network between nodes down 3. nodes panic This patch (of 6): When storage down, all nodes will fence self due to write timeout. The negotiate timer is designed to avoid this, with it node will wait until storage up again. Negotiate timer working in the following way: 1. The timer expires before write timeout timer, its timeout is half of write timeout now. It is re-queued along with write timeout timer. If expires, it will send NEGO_TIMEOUT message to master node(node with lowest node number). This message does nothing but marks a bit in a bitmap recording which nodes are negotiating timeout on master node. 2. If storage down, nodes will send this message to master node, then when master node finds its bitmap including all online nodes, it sends NEGO_APPROVL message to all nodes one by one, this message will re-queue write timeout timer and negotiate timer. For any node doesn't receive this message or meets some issue when handling this message, it will be fenced. If storage up at any time, o2hb_thread will run and re-queue all the timer, nothing will be affected by these two steps. Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Reviewed-by: Ryan Ding <ryan.ding@oracle.com> Reviewed-by: Mark Fasheh <mfasheh@suse.de> Cc: Gang He <ghe@suse.com> Cc: rwxybh <rwxybh@126.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/cluster/heartbeat.c | 51 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 47 insertions(+), 4 deletions(-) commit 564884fbdecaea56fb65f2f32963059d3049b967 Merge: 4cae85b c7de572 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 14:28:09 2016 -0700 Merge branch 'for-linus' of git://git.kernel.dk/linux-block Pull block fixes from Jens Axboe: "A set of fixes that wasn't included in the first merge window pull request. This pull request contains: - A set of NVMe fixes from Keith, and one from Nic for the integrity side of it. - Fix from Ming, clearing ->mq_ops if we don't successfully setup a queue for multiqueue. - A set of stability fixes for bcache from Jiri, and also marking bcache as orphaned as it's no longer actively maintained (in mainline, at least)" * 'for-linus' of git://git.kernel.dk/linux-block: blk-mq: clear q->mq_ops if init fail MAINTAINERS: mark bcache as orphan bcache: bch_gc_thread() is not freezable bcache: bch_allocator_thread() is not freezable bcache: bch_writeback_thread() is not freezable nvme/host: Add missing blk_integrity tag_size + flags assignments NVMe: Add device ID's with stripe quirk NVMe: Short-cut removal on surprise hot-unplug NVMe: Allow user initiated rescan NVMe: Reduce driver log spamming NVMe: Unbind driver on failure NVMe: Delete only created queues NVMe: Allocate queues only for online cpus commit 4cae85bed43d890f840019e2d21e39f96430802a Merge: c61b49c 507e617 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 14:17:15 2016 -0700 Merge tag 'for-linus-20160527' of git://git.infradead.org/linux-mtd Pull MTD fixes from Brian Norris: "We've already noticed a few flaws in the MTD work for v4.7-rc1: - The Atmel folks got ahead of themselves on trying to support their latest hardware and were working off incorrect documentation. Fix up the NAND driver to get this correct. - Fix up device tree example documentation to use the latest recommendations for describing NAND ECC algorithms" * tag 'for-linus-20160527' of git://git.infradead.org/linux-mtd: Documentation: dt: mtd: drop "soft_bch" from example Revert "mtd: atmel_nand: Support variable RB_EDGE interrupts" commit c61b49c79e1c1d4bc0c2fdc053ef56e65759b5fd Merge: 1e8143d 7fa1d27 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 14:08:56 2016 -0700 Merge tag 'drm-fixes-v4.7-rc1' of git://people.freedesktop.org/~airlied/linux Pull drm fixes from Dave Airlie: - one IMX built-in regression fix - a set of amdgpu fixes, mostly powerplay and polaris GPU stuff - a set of i915 fixes all over, many cc'ed to stable. The i915 batch contain support for DP++ dongle detection, which is used to fix some regressions in the HDMI color depth area * tag 'drm-fixes-v4.7-rc1' of git://people.freedesktop.org/~airlied/linux: (44 commits) drm/amd: add Kconfig dependency for ACP on DRM_AMDGPU drm/amdgpu: Fix hdmi deep color support. drm/amdgpu: fix bug in fence driver fini drm/i915: Stop automatically retiring requests after a GPU hang drm/i915: Unify intel_ring_begin() drm/i915: Ignore stale wm register values on resume on ilk-bdw (v2) drm/i915/psr: Try to program link training times correctly drm/imx: Match imx-ipuv3-crtc components using device node in platform data drm/i915/bxt: Adjusting the error in horizontal timings retrieval drm/i915: Don't leave old junk in ilk active watermarks on readout drm/i915: s/DPPL/DPLL/ for SKL DPLLs drm/i915: Fix gen8 semaphores id for legacy mode drm/i915: Set crtc_state->lane_count for HDMI drm/i915/BXT: Retrieving the horizontal timing for DSI drm/i915: Protect gen7 irq_seqno_barrier with uncore lock drm/i915: Re-enable GGTT earlier during resume on pre-gen6 platforms drm/i915: Determine DP++ type 1 DVI adaptor presence based on VBT drm/i915: Enable/disable TMDS output buffers in DP++ adaptor as needed drm/i915: Respect DP++ adaptor TMDS clock limit drm: Add helper for DP++ adaptors ... commit 1e8143db755f745a9842984de5e8b423f583aea2 Merge: 2566278 b740d2e Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 13:56:02 2016 -0700 Merge tag 'platform-drivers-x86-v4.7-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86 Pull x86 platform driver updates from Darren Hart: "Mostly minor updates and cleanups. One new power management controller driver for Intel Core SoCs. platform/x86: - Add PMC Driver for Intel Core SoC dell-rbtn: - Ignore ACPI notifications if device is suspended thinkpad_acpi: - save kbdlight state on suspend and restore it on resume intel_menlow: - reduce code duplication asus-wmi: - provide access to ALS control ideapad-laptop: - add a new WMI string for ESC key surfacepro3_button: - Add a warning when switching to tablet mode sony-laptop: - Avoid oops on module unload for older laptops intel_telemetry: - Constify telemetry_core_ops structures fujitsu-laptop: - Use IS_ENABLED() instead of checking for built-in or module asus-laptop: - correct error handling in sysfs_acpi_set - remove redundant initializers - correct error handling in asus_read_brightness() fujitsu-laptop: - Support radio LED" * tag 'platform-drivers-x86-v4.7-1' of git://git.infradead.org/users/dvhart/linux-platform-drivers-x86: platform/x86: Add PMC Driver for Intel Core SoC dell-rbtn: Ignore ACPI notifications if device is suspended thinkpad_acpi: save kbdlight state on suspend and restore it on resume intel_menlow: reduce code duplication asus-wmi: provide access to ALS control ideapad-laptop: add a new WMI string for ESC key surfacepro3_button: Add a warning when switching to tablet mode sony-laptop: Avoid oops on module unload for older laptops intel_telemetry: Constify telemetry_core_ops structures fujitsu-laptop: Use IS_ENABLED() instead of checking for built-in or module asus-laptop: correct error handling in sysfs_acpi_set asus-laptop: remove redundant initializers asus-laptop: correct error handling in asus_read_brightness() fujitsu-laptop: Support radio LED commit 2566278551d3db875bc3bbfc41b42f2e80392108 Merge: e28e909 22e2f9f Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 13:49:24 2016 -0700 Merge git://git.infradead.org/intel-iommu Pull intel IOMMU updates from David Woodhouse: "This patchset improves the scalability of the Intel IOMMU code by resolving two spinlock bottlenecks and eliminating the linearity of the IOVA allocator, yielding up to ~5x performance improvement and approaching 'iommu=off' performance" * git://git.infradead.org/intel-iommu: iommu/vt-d: Use per-cpu IOVA caching iommu/iova: introduce per-cpu caching to iova allocation iommu/vt-d: change intel-iommu to use IOVA frame numbers iommu/vt-d: avoid dev iotlb logic for domains with no dev iotlbs iommu/vt-d: only unmap mapped entries iommu/vt-d: correct flush_unmaps pfn usage iommu/vt-d: per-cpu deferred invalidation queues iommu/vt-d: refactoring of deferred flush entries commit e28e909c36bb5d6319953822d84df00fce7cbd18 Merge: dc03c0f fabc712 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 27 13:41:54 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull second batch of KVM updates from Radim Krčmář: "General: - move kvm_stat tool from QEMU repo into tools/kvm/kvm_stat (kvm_stat had nothing to do with QEMU in the first place -- the tool only interprets debugfs) - expose per-vm statistics in debugfs and support them in kvm_stat (KVM always collected per-vm statistics, but they were summarised into global statistics) x86: - fix dynamic APICv (VMX was improperly configured and a guest could access host's APIC MSRs, CVE-2016-4440) - minor fixes ARM changes from Christoffer Dall: - new vgic reimplementation of our horribly broken legacy vgic implementation. The two implementations will live side-by-side (with the new being the configured default) for one kernel release and then we'll remove the legacy one. - fix for a non-critical issue with virtual abort injection to guests" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (70 commits) tools: kvm_stat: Add comments tools: kvm_stat: Introduce pid monitoring KVM: Create debugfs dir and stat files for each VM MAINTAINERS: Add kvm tools tools: kvm_stat: Powerpc related fixes tools: Add kvm_stat man page tools: Add kvm_stat vm monitor script kvm:vmx: more complete state update on APICv on/off KVM: SVM: Add more SVM_EXIT_REASONS KVM: Unify traced vector format svm: bitwise vs logical op typo KVM: arm/arm64: vgic-new: Synchronize changes to active state KVM: arm/arm64: vgic-new: enable build KVM: arm/arm64: vgic-new: implement mapped IRQ handling KVM: arm/arm64: vgic-new: Wire up irqfd injection KVM: arm/arm64: vgic-new: Add vgic_v2/v3_enable KVM: arm/arm64: vgic-new: vgic_init: implement map_resources KVM: arm/arm64: vgic-new: vgic_init: implement vgic_init KVM: arm/arm64: vgic-new: vgic_init: implement vgic_create KVM: arm/arm64: vgic-new: vgic_init: implement kvm_vgic_hyp_init ... commit 4f3532506a339d91e593da59eea4e7143e698ca3 Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Tue May 17 08:42:12 2016 +0000 ASoC: rsnd: open 31bit of SSICKR mask SSICKR (Gen2) / BRGCKR (Gen3) 31bit mask should be opened, because BRGB (= for 48kHz) might select it. Special thanks Yokoyama-san Reported-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sh/rcar/adg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5930122683dff58f0846b0f0405b4bd598a3ba6a Author: Al Viro <viro@zeniv.linux.org.uk> Date: Fri May 27 10:19:30 2016 -0400 switch xattr_handler->set() to passing dentry and inode separately preparation for similar switch in ->setxattr() (see the next commit for rationale). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/9p/acl.c | 6 +++--- fs/9p/xattr.c | 5 +++-- fs/btrfs/xattr.c | 12 +++++------- fs/ceph/xattr.c | 7 ++++--- fs/cifs/xattr.c | 9 +++++---- fs/ext2/xattr_security.c | 7 ++++--- fs/ext2/xattr_trusted.c | 7 ++++--- fs/ext2/xattr_user.c | 9 +++++---- fs/ext4/xattr_security.c | 7 ++++--- fs/ext4/xattr_trusted.c | 7 ++++--- fs/ext4/xattr_user.c | 9 +++++---- fs/f2fs/xattr.c | 12 ++++++------ fs/gfs2/xattr.c | 6 +++--- fs/hfsplus/xattr.c | 12 ++++++------ fs/hfsplus/xattr.h | 2 +- fs/hfsplus/xattr_security.c | 7 ++++--- fs/hfsplus/xattr_trusted.c | 7 ++++--- fs/hfsplus/xattr_user.c | 7 ++++--- fs/jffs2/security.c | 7 ++++--- fs/jffs2/xattr_trusted.c | 7 ++++--- fs/jffs2/xattr_user.c | 7 ++++--- fs/jfs/xattr.c | 14 ++++++-------- fs/nfs/nfs4proc.c | 19 +++++++++---------- fs/ocfs2/xattr.c | 23 +++++++++++++---------- fs/orangefs/xattr.c | 10 ++++++---- fs/posix_acl.c | 6 +++--- fs/reiserfs/xattr_security.c | 9 +++++---- fs/reiserfs/xattr_trusted.c | 9 +++++---- fs/reiserfs/xattr_user.c | 9 +++++---- fs/ubifs/xattr.c | 7 +++---- fs/xattr.c | 6 ++++-- fs/xfs/xfs_xattr.c | 9 +++++---- include/linux/xattr.h | 4 ++-- mm/shmem.c | 7 ++++--- 34 files changed, 156 insertions(+), 135 deletions(-) commit b740d2e9233cb33626d3b62210bcfc6a34baa839 Author: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Date: Thu May 26 14:41:19 2016 +0530 platform/x86: Add PMC Driver for Intel Core SoC This patch adds the Power Management Controller driver as a PCI driver for Intel Core SoC architecture. This driver can utilize debugging capabilities and supported features as exposed by the Power Management Controller. Please refer to the below specification for more details on PMC features. http://www.intel.in/content/www/in/en/chipsets/100-series-chipset-datasheet-vol-2.html The current version of this driver exposes SLP_S0_RESIDENCY counter. This counter can be used for detecting fragile SLP_S0 signal related failures and take corrective actions when PCH SLP_S0 signal is not asserted after kernel freeze as part of suspend to idle flow (echo freeze > /sys/power/state). Intel Platform Controller Hub (PCH) asserts SLP_S0 signal when it detects favorable conditions to enter its low power mode. As a pre-requisite the SoC should be in deepest possible Package C-State and devices should be in low power mode. For example, on Skylake SoC the deepest Package C-State is Package C10 or PC10. Suspend to idle flow generally leads to PC10 state but PC10 state may not be sufficient for realizing the platform wide power potential which SLP_S0 signal assertion can provide. SLP_S0 signal is often connected to the Embedded Controller (EC) and the Power Management IC (PMIC) for other platform power management related optimizations. In general, SLP_S0 assertion == PC10 + PCH low power mode + ModPhy Lanes power gated + PLL Idle. As part of this driver, a mechanism to read the SLP_S0_RESIDENCY is exposed as an API and also debugfs features are added to indicate SLP_S0 signal assertion residency in microseconds. echo freeze > /sys/power/state wake the system cat /sys/kernel/debug/pmc_core/slp_s0_residency_usec Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com> Signed-off-by: Vishwanath Somayaji <vishwanath.somayaji@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com> MAINTAINERS | 8 ++ arch/x86/include/asm/pmc_core.h | 27 +++++ drivers/platform/x86/Kconfig | 12 ++ drivers/platform/x86/Makefile | 1 + drivers/platform/x86/intel_pmc_core.c | 200 ++++++++++++++++++++++++++++++++++ drivers/platform/x86/intel_pmc_core.h | 51 +++++++++ 6 files changed, 299 insertions(+) commit ff8651237f39cea60dc89b2d9f25d9ede3fc82c0 Author: Gabriele Mazzotta <gabriele.mzt@gmail.com> Date: Tue May 24 22:53:08 2016 +0200 dell-rbtn: Ignore ACPI notifications if device is suspended Some BIOSes unconditionally send an ACPI notification to RBTN when the system is resuming from suspend. This makes dell-rbtn send an input event to userspace as if a function key was pressed. Prevent this by ignoring all the notifications received while the device is suspended. Link: https://bugzilla.kernel.org/show_bug.cgi?id=106031 Signed-off-by: Gabriele Mazzotta <gabriele.mzt@gmail.com> Tested-by: Alex Hung <alex.hung@canonical.com> Reviewed-by: Pali Rohár <pali.rohar@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Darren Hart <dvhart@linux.intel.com> drivers/platform/x86/dell-rbtn.c | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) commit afcedebc6a094224973534f43b396bbbf33fe44e Author: Marco Trevisan (Treviño) <mail@3v1n0.net> Date: Tue May 24 00:39:51 2016 +0200 thinkpad_acpi: save kbdlight state on suspend and restore it on resume Override default LED class suspend/resume handles, by keeping track of the brightness level before suspending so that it can be automatically restored on resume by calling default resume handler. Signed-off-by: Marco Trevisan (Treviño) <mail@3v1n0.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Darren Hart <dvhart@linux.intel.com> drivers/platform/x86/thinkpad_acpi.c | 43 +++++++++++++++++++++++++++++++++--- 1 file changed, 40 insertions(+), 3 deletions(-) commit a29ccf6ff3e07061253b9209a65edb8c0126f78d Author: Rasmus Villemoes <linux@rasmusvillemoes.dk> Date: Sat Mar 26 22:40:26 2016 +0100 intel_menlow: reduce code duplication aux0_show and aux1_show consists of almost identical code. Pull that into a common helper and make them thin wrappers. Similarly for _store. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: Darren Hart <dvhart@linux.intel.com> drivers/platform/x86/intel_menlow.c | 49 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 27 deletions(-) commit aca234f6378864d85514be558746c0ea6eabfa8e Author: Oleksij Rempel <linux@rempel-privat.de> Date: Fri Apr 1 13:35:21 2016 +0200 asus-wmi: provide access to ALS control Asus Zenbook ux31a is providing ACPI0008 interface for ALS (Ambient Light Sensor), which is accessible for OS => Win 7. This sensor can be used with iio/acpi-als driver. Since it is disabled by default, we should use asus-wmi interface to enable it. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Darren Hart <dvhart@linux.intel.com> drivers/platform/x86/asus-wmi.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2d98e0b942dd5ac359ced5183b4a5a769620380f Author: Arnd Bergmann <arnd@arndb.de> Date: Mon May 9 23:49:21 2016 +0200 ideapad-laptop: add a new WMI string for ESC key My patch to the ideapad-laptop driver to get the ESC key working on the Yoga 1170 (Yoga 3) failed to do the same for the following model, the Lenovo Yoga 700. Denis Gordienko managed to get it working by adding another GUID for the new WMI interface. I have adapted his patch to normal coding style and simplified it a bit for inclusion, but this patch is currently untested. Link: https://forums.lenovo.com/t5/Lenovo-Yoga-Series-Notebooks/YOGA-3-14-How-to-reclaim-my-Esc-key-and-permanently-disable/m-p/3317499 Signed-off-by: Arnd Bergmann <arnd@arndb.de> Tested-by: Denis Gordienko <denis.gordienko.mail@gmail.com> [dvhart: Whitespace cleanup, static const char *const array declaration] Signed-off-by: Darren Hart <dvhart@linux.intel.com> drivers/platform/x86/ideapad-laptop.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit e27ffe7e41b1dc747fd1d32d52f7453137f89ed9 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue May 10 14:49:55 2016 +0300 surfacepro3_button: Add a warning when switching to tablet mode Microsoft Surface Book has a tablet mode button. Print another message once on this event instead of repeating "Unknown event...". Unfortunately, proper support involves the _DSM method, which is not a discoverable interface. Just print a warning for now. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com> drivers/platform/x86/surfacepro3_button.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit de26859dcf363d520cc44e59f6dcaf20ebe0aadf Author: Larry Finger <Larry.Finger@lwfinger.net> Date: Sat May 21 11:50:35 2016 -0500 rtlwifi: Fix scheduling while atomic error from commit 49f86ec21c01 Commit 49f86ec21c01 ("rtlwifi: Change long delays to sleeps") was correct for most cases; however, driver rtl8192ce calls the affected routines while in atomic context. The kernel bug output is as follows: BUG: scheduling while atomic: wpa_supplicant/627/0x00000002 [...] [<ffffffff815c2b39>] __schedule+0x899/0xad0 [<ffffffff815c2dac>] schedule+0x3c/0x90 [<ffffffff815c5bb2>] schedule_hrtimeout_range_clock+0xa2/0x120 [<ffffffff810e8b80>] ? hrtimer_init+0x120/0x120 [<ffffffff815c5ba6>] ? schedule_hrtimeout_range_clock+0x96/0x120 [<ffffffff815c5c43>] schedule_hrtimeout_range+0x13/0x20 [<ffffffff815c568f>] usleep_range+0x4f/0x70 [<ffffffffa0667218>] rtl_rfreg_delay+0x38/0x50 [rtlwifi] [<ffffffffa06dd0e7>] rtl92c_phy_config_rf_with_headerfile+0xc7/0xe0 [rtl8192ce] To fix this bug, three of the changes from delay to sleep are reverted. Unfortunately, one of the changes involves a delay of 50 msec. The calling code will be modified so that this long delay can be avoided; however, this change is being pushed now to fix the problem in kernel 4.6.0. Fixes: 49f86ec21c01 ("rtlwifi: Change long delays to sleeps") Reported-by: James Feeney <james@nurealm.net> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: James Feeney <james@nurealm.net> Cc: Stable <stable@vger.kernel.org> [4.6+] Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/realtek/rtlwifi/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 94abd778a7bb00ed5d00f56d9fbfcbf5b7c02a5c Author: Jaap Jan Meijer <jjmeijer88@gmail.com> Date: Thu May 12 18:25:08 2016 +0200 brcmfmac: add fallback for devices that do not report per-chain values If brcmf_cfg80211_get_station fails to determine the RSSI from the per-chain values get the value individually as a fallback. Fixes: 1f0dc59a6de9 ("brcmfmac: rework .get_station() callback") Signed-off-by: Jaap Jan Meijer <jjmeijer88@gmail.com> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> .../net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 507e617440d70bc4269daac1b0ee96671bf2761a Author: Baruch Siach <baruch@tkos.co.il> Date: Wed May 25 06:45:10 2016 +0300 Documentation: dt: mtd: drop "soft_bch" from example Commit 32698aafc9f0 (Documentation: devicetree: deprecate "soft_bch" nand-ecc-mode value, 2016-04-22) deprecated "soft_bch". Update the example to match. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Rafał Miłecki <zajec5@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Documentation/devicetree/bindings/mtd/nand.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb4606e64a7d548f5d60a9583baa8104890b2c6e Merge: 86c72d1 bf65921 Author: Takashi Iwai <tiwai@suse.de> Date: Fri May 27 17:16:53 2016 +0200 Merge tag 'asoc-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.7 part 2 Really sorry about this late pull request. It looks like at the time I sent my pull request for v4.7 there was some conflict or other issue which caused my script to stop merging the ASoC branches at some point after the HDMI changes. It's all specific driver updates, including: - New drivers for MAX98371 and TAS5720. - SPI support for TLV320AIC32x4. - TDM support for STI Uniperf IPs. This code should all have been in -next prior to the merge window apart from some fixes, it dropped out on the 18th. commit 5ea5888b2fbf5b230da62b2a21c8247bebb6c9cf Author: Wang Nan <wangnan0@huawei.com> Date: Fri May 27 11:35:51 2016 +0000 perf ctf: Convert invalid chars in a string before set value We observed some crazy apps on Android set their comm to unprintable string. For example: # cat /proc/10607/task/*/comm tencent.qqmusic ... Binder_2 日志输出线 <-- Chinese word 'log output thread' WifiManager ... 'perf data convert' fails to convert perf.data with such string to CTF format. For example: # cat << EOF > ./badguy.c #include <sys/prctl.h> int main(int argc, char *argv[]) { prctl(PR_SET_NAME, "\xe6\x97\xa5\xe5\xbf\x97\xe8\xbe\x93\xe5\x87\xba\xe7\xba\xbf"); while(1) sleep(1); return 0; } EOF # gcc ./badguy.c # perf record -e sched:* ./a.out # perf data convert --to-ctf ./bad.ctf CTF stream 4 flush failed [ perf data convert: Converted 'perf.data' into CTF data './bad.ctf' ] [ perf data convert: Converted and wrote 0.008 MB (78 samples) ] # babeltrace ./bad.ctf/ [error] Packet size (18446744073709551615 bits) is larger than remaining file size (262144 bits). [error] Stream index creation error. [error] Open file stream error. [warning] [Context] Cannot open_trace of format ctf at path ./bad.ctf. [warning] [Context] cannot open trace "./bad.ctf" from ./bad.ctf/ for reading. [error] Cannot open any trace for reading. [error] opening trace "./bad.ctf/" for reading. [error] none of the specified trace paths could be opened. This patch converts unprintable characters to hexadecimal word. After applying this patch the above test works correctly: # ~/perf data convert --to-ctf ./good.ctf [ perf data convert: Converted 'perf.data' into CTF data './good.ctf' ] [ perf data convert: Converted and wrote 0.008 MB (78 samples) ] # babeltrace ./good.ctf .. [23:14:35.491665268] (+0.000001100) sched:sched_wakeup: { cpu_id = 4 }, { perf_ip = 0xFFFFFFFF810AEF33, perf_tid = 0, perf_pid = 0, perf_id = 5123, perf_period = 1, common_type = 270, common_flags = 45, common_preempt_count = 4, common_pid = 0, comm = "\xe6\x97\xa5\xe5\xbf\x97\xe8\xbe\x93\xe5\x87\xba\xe7\xba\xbf", pid = 1057, prio = 120, success = 1, target_cpu = 4 } [23:14:35.491666230] (+0.000000962) sched:sched_wakeup: { cpu_id = 4 }, { perf_ip = 0xFFFFFFFF810AEF33, perf_tid = 0, perf_pid = 0, perf_id = 5122, perf_period = 1, common_type = 270, common_flags = 45, common_preempt_count = 4, common_pid = 0, comm = "\xe6\x97\xa5\xe5\xbf\x97\xe8\xbe\x93\xe5\x87\xba\xe7\xba\xbf", pid = 1057, prio = 120, success = 1, target_cpu = 4 } .. Committer note: To build perf with libabeltrace, use: $ mkdir -p /tmp/build/perf $ make LIBBABELTRACE=1 LIBBABELTRACE_DIR=/usr/local O=/tmp/build/perf -C tools/perf install-bin Or equivalent (no O=, fixup LIBBABELTRACE_DIR, etc). Signed-off-by: Wang Nan <wangnan0@huawei.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1464348951-179595-1-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/data-convert-bt.c | 41 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) commit bf65921380cd50b87618df550398e06581f4a361 Merge: bc4efdb 937e92d Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:46:02 2016 +0100 Merge remote-tracking branch 'asoc/topic/wm8962' into asoc-next commit bc4efdb65938f5afd2bf5e63e871b76876ddf5bd Merge: 83652a3 2dfadff Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:46:01 2016 +0100 Merge remote-tracking branch 'asoc/topic/rt5677' into asoc-next commit 83652a39d724c20f050560f314b771a0289fd571 Merge: 0422e5e0 3fcdfc9 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:59 2016 +0100 Merge remote-tracking branch 'asoc/topic/wm8960' into asoc-next commit 0422e5e0be4cce09ed6a095410efa7ee0f978607 Merge: 77c92d2 cef794f Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:57 2016 +0100 Merge remote-tracking branch 'asoc/topic/qcom' into asoc-next commit 77c92d2b4c6a65ef7e9ca0e7d574d4d48fd5efae Merge: 38e3c63 ee4c879 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:55 2016 +0100 Merge remote-tracking branch 'asoc/topic/sti' into asoc-next commit 38e3c63da388f25c0b472a6624eb005076ea0dfb Merge: 5d8cf76 f5cc177 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:54 2016 +0100 Merge remote-tracking branch 'asoc/topic/tlv320aic31xx' into asoc-next commit 5d8cf7688ede7128ebdad8741ed5bdea0f2cd637 Merge: 631476d 54aba08 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:52 2016 +0100 Merge remote-tracking branch 'asoc/topic/kconfig' into asoc-next commit 631476d7fd93cc1cde1fc9ea6b3875f8eca79871 Merge: ad2ab00 9ff49ce Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:50 2016 +0100 Merge remote-tracking branch 'asoc/topic/rt298' into asoc-next commit ad2ab00c991298b55108b0c3ce21adb3a4b24ce5 Merge: e61249b 27becea Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:48 2016 +0100 Merge remote-tracking branch 'asoc/topic/mtk' into asoc-next commit e61249bb8a67a9f31a52f91259569aa44e9f6ca2 Merge: aaa36d3 989ff77 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:41 2016 +0100 Merge remote-tracking branch 'asoc/topic/omap' into asoc-next commit aaa36d3a98e20b858438eb16cd5c81f27be6dfd5 Merge: 4c1c16d bd023ad Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:37 2016 +0100 Merge remote-tracking branch 'asoc/topic/tas5270' into asoc-next commit 4c1c16d9a90a7dc3e2a950f7a8629e85a7e114e6 Merge: 463f7e5 8ea4167 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:36 2016 +0100 Merge remote-tracking branch 'asoc/topic/topology' into asoc-next commit 463f7e504a8400f0cc9b814662739050540c1a9d Merge: fbbeb39 e5b7d71 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:35 2016 +0100 Merge remote-tracking branch 'asoc/topic/pxa' into asoc-next commit fbbeb39183e08120b4116cdbadde91385f30d4f3 Merge: ae14dbf 7c37671 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:33 2016 +0100 Merge remote-tracking branch 'asoc/topic/simple' into asoc-next commit ae14dbfaa04180cc07b32ad6c3852d73917878d3 Merge: 94eaec4 1135ef1 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:30 2016 +0100 Merge remote-tracking branch 'asoc/topic/twl6040' into asoc-next commit 94eaec458c037a8ec3a7cd39118d0d4378cabf11 Merge: db1f328 af37d21 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:29 2016 +0100 Merge remote-tracking branch 'asoc/topic/max98371' into asoc-next commit db1f3283edcff33719592f3b374f40cf6e8256f4 Merge: 84bf51e de19651 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:27 2016 +0100 Merge remote-tracking branch 'asoc/topic/rcar' into asoc-next commit 84bf51ea9d3495119244b62cc3d07fe4d7bdc1e9 Merge: a5a3717 2213fc3 Author: Mark Brown <broonie@kernel.org> Date: Fri May 27 13:45:24 2016 +0100 Merge remote-tracking branch 'asoc/topic/tlv320aic32x4' into asoc-next commit 3dc6c1d54ff4cc9ce7e8513c286c970304cde20b Author: Wang Nan <wangnan0@huawei.com> Date: Tue May 24 09:21:28 2016 +0000 perf record: Fix crash when kptr is restricted Before this patch, a simple 'perf record' could fail if kptr_restrict is set to 1 (for normal user) or 2 (for root): # perf record ls WARNING: Kernel address maps (/proc/{kallsyms,modules}) are restricted, check /proc/sys/kernel/kptr_restrict. Samples in kernel functions may not be resolved if a suitable vmlinux file is not found in the buildid cache or in the vmlinux path. Samples in kernel modules won't be resolved at all. If some relocation was applied (e.g. kexec) symbols may be misresolved even with a suitable vmlinux or kallsyms file. Segmentation fault (core dumped) This patch skips perf_event__synthesize_kernel_mmap() when kptr is not available. Signed-off-by: Wang Nan <wangnan0@huawei.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Fixes: 45e90056904b ("perf machine: Do not bail out if not managing to read ref reloc symbol") Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1464081688-167940-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/event.c | 2 ++ 1 file changed, 2 insertions(+) commit 38272dc4f1b17437871b786d567e1242d0904f5a Author: Wang Nan <wangnan0@huawei.com> Date: Tue May 24 09:21:27 2016 +0000 perf symbols: Check kptr_restrict for root If kptr_restrict is set to 2, even root is not allowed to see pointers. This patch checks kptr_restrict even if euid == 0. For root, report error if kptr_restrict is 2. Signed-off-by: Wang Nan <wangnan0@huawei.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1464081688-167940-1-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/symbol.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 72a71f869c95dc11b73f09fe18c593d4a0618c3f Author: Wolfram Sang <wsa@the-dreams.de> Date: Fri May 27 13:13:01 2016 +0200 i2c: dev: don't start function name with 'return' I stumbled multiple times over 'return_i2c_dev', especially before the actual 'return res'. It makes the code hard to read, so reanme the function to 'put_i2c_dev' which also better matches 'get_free_i2c_dev'. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/i2c-dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 21765194cecf2e4514ad75244df459f188140a0f Author: Vivek Goyal <vgoyal@redhat.com> Date: Fri May 20 09:04:26 2016 -0400 ovl: Do d_type check only if work dir creation was successful d_type check requires successful creation of workdir as iterates through work dir and expects work dir to be present in it. If that's not the case, this check will always return d_type not supported even if underlying filesystem might be supporting it. So don't do this check if work dir creation failed in previous step. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> fs/overlayfs/super.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) commit 942fd803e6dfc64d32f2ae4f160b2986bc5897b8 Author: Miklos Szeredi <mszeredi@redhat.com> Date: Fri May 27 08:55:26 2016 +0200 ovl: update documentation Two "fixme" items are actually fixed now. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Documentation/filesystems/overlayfs.txt | 9 --------- 1 file changed, 9 deletions(-) commit 3fe6e52f062643676eb4518d68cee3bc1272091b Author: Antonio Murdaca <amurdaca@redhat.com> Date: Thu Apr 7 15:48:25 2016 +0200 ovl: override creds with the ones from the superblock mounter In user namespace the whiteout creation fails with -EPERM because the current process isn't capable(CAP_SYS_ADMIN) when setting xattr. A simple reproducer: $ mkdir upper lower work merged lower/dir $ sudo mount -t overlay overlay -olowerdir=lower,upperdir=upper,workdir=work merged $ unshare -m -p -f -U -r bash Now as root in the user namespace: \# touch merged/dir/{1,2,3} # this will force a copy up of lower/dir \# rm -fR merged/* This ends up failing with -EPERM after the files in dir has been correctly deleted: unlinkat(4, "2", 0) = 0 unlinkat(4, "1", 0) = 0 unlinkat(4, "3", 0) = 0 close(4) = 0 unlinkat(AT_FDCWD, "merged/dir", AT_REMOVEDIR) = -1 EPERM (Operation not permitted) Interestingly, if you don't place files in merged/dir you can remove it, meaning if upper/dir does not exist, creating the char device file works properly in that same location. This patch uses ovl_sb_creator_cred() to get the cred struct from the superblock mounter and override the old cred with these new ones so that the whiteout creation is possible because overlay is wrong in assuming that the creds it will get with prepare_creds will be in the initial user namespace. The old cap_raise game is removed in favor of just overriding the old cred struct. This patch also drops from ovl_copy_up_one() the following two lines: override_cred->fsuid = stat->uid; override_cred->fsgid = stat->gid; This is because the correct uid and gid are taken directly with the stat struct and correctly set with ovl_set_attr(). Signed-off-by: Antonio Murdaca <runcom@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> fs/overlayfs/copy_up.c | 26 +------------------ fs/overlayfs/dir.c | 67 ++++-------------------------------------------- fs/overlayfs/overlayfs.h | 1 + fs/overlayfs/readdir.c | 14 +++------- fs/overlayfs/super.c | 18 ++++++++++++- 5 files changed, 27 insertions(+), 99 deletions(-) commit 7fa1d27b638db86516d7b3d8dc1a3576c72ee423 Merge: 79b3c71 157d2c7 Author: Dave Airlie <airlied@redhat.com> Date: Fri May 27 16:08:38 2016 +1000 Merge tag 'drm-intel-next-fixes-2016-05-25' of git://anongit.freedesktop.org/drm-intel into drm-next I see the main drm pull got merged, here's the first batch of fixes for 4.7 already. Fixes all around, a large portion cc: stable stuff. [airlied: the DP++ stuff is a regression fix]. * tag 'drm-intel-next-fixes-2016-05-25' of git://anongit.freedesktop.org/drm-intel: drm/i915: Stop automatically retiring requests after a GPU hang drm/i915: Unify intel_ring_begin() drm/i915: Ignore stale wm register values on resume on ilk-bdw (v2) drm/i915/psr: Try to program link training times correctly drm/i915/bxt: Adjusting the error in horizontal timings retrieval drm/i915: Don't leave old junk in ilk active watermarks on readout drm/i915: s/DPPL/DPLL/ for SKL DPLLs drm/i915: Fix gen8 semaphores id for legacy mode drm/i915: Set crtc_state->lane_count for HDMI drm/i915/BXT: Retrieving the horizontal timing for DSI drm/i915: Protect gen7 irq_seqno_barrier with uncore lock drm/i915: Re-enable GGTT earlier during resume on pre-gen6 platforms drm/i915: Determine DP++ type 1 DVI adaptor presence based on VBT drm/i915: Enable/disable TMDS output buffers in DP++ adaptor as needed drm/i915: Respect DP++ adaptor TMDS clock limit drm: Add helper for DP++ adaptors commit 79b3c7164c18e2fe9e69b0dcc0d45bab7ae3c968 Merge: e411295 425c452 Author: Dave Airlie <airlied@redhat.com> Date: Fri May 27 16:03:48 2016 +1000 Merge branch 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-next AMD GPU bugfixes: - Various powerplay bug fixes - Add some new polaris pci ids - misc bug fixes and code cleanups * 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux: (27 commits) drm/amd: add Kconfig dependency for ACP on DRM_AMDGPU drm/amdgpu: Fix hdmi deep color support. drm/amdgpu: fix bug in fence driver fini drm/amd/powerplay/hwmgr: use kmemdup drm/amd/powerplay/hwmgr: use kmemdup drm/amd/powerplay/hwmgr: use kmemdup drm/amd/powerplay: fix bugs of checking if dpm is running on Tonga drm/amdgpu: update Polaris11 golden setting drm/amdgpu: Add more Polaris 11 PCI IDs drm/amdgpu: update Polaris10 golden setting drm/amdgpu: add more Polaris10 DID drm/amd/amdgpu : Remove unused variable drm/amd/amdgpu : Remove unused variable drm/amd/amdgpu : Remove unused variable drm/amd/amdgpu/cz_dpm: Remove unused variable drm/amd/amdgpu : Remove unused variable drm/amd/powerplay: use ARRAY_SIZE() to calculate array size. drm/amdgpu: fix array out of bounds drm/radeon: fix array out of bounds drm/amd/powerplay: fix a bug on updating sclk for Tonga ... commit dc03c0f9d12d85286d5e3623aa96d5c2a271b8e6 Merge: f429d35 2552a39 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 22:32:05 2016 -0700 Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull misc kbuild updates from Michal Marek: "This is the non-critical part of kbuild: - Coccinelle fixes, one semantic patch less in this round [Vaishali Thakkar, Wolfram Sang, Kees Cook] - rpm-pkg support for (open)SUSE's update-bootloader [Jiří Kosian] - rpm-pkg restored support for $RPMOPTS [Srinivas Pandruvada] - deb-pkg fixes for the linux-headers package [Bjørn Mork, Azriel Samson]" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: coccicheck: Fix missing 0 index in kill loop scripts/package/Makefile: rpmbuild add support of RPMOPTS builddeb: fix missing headers in linux-headers package builddeb: include objtool binary in headers package kbuild/mkspec: support 'update-bootloader'-based systems scripts: coccinelle: remove check to move constants to right Coccinelle: setup_timer: Add space in front of parentheses commit f429d35588847fa1048f9dbdcc3cc1ee1b530041 Merge: 5b26fc8 fa64e5f Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 22:27:09 2016 -0700 Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kconfig update from Michal Marek: - fix for behavior of tristate choice items and fix for documentation of existing kconfig behavior [Dirk Gouders] - more helpful "unexpected data" kconfig warning [Paul Bolle] * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: kconfig/symbol.c: handle choice_values that depend on 'm' symbols kconfig-language: elaborate on the type of a choice kconfig-language: fix comment on dependency-generated menu structures. kconfig: add unexpected data itself to warning commit 5b26fc8824da15a2fe9df89338a5a3cad41ba8ee Merge: e12fab2 c9c6837 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 22:01:22 2016 -0700 Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild Pull kbuild updates from Michal Marek: - new option CONFIG_TRIM_UNUSED_KSYMS which does a two-pass build and unexports symbols which are not used in the current config [Nicolas Pitre] - several kbuild rule cleanups [Masahiro Yamada] - warning option adjustments for gcov etc [Arnd Bergmann] - a few more small fixes * 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (31 commits) kbuild: move -Wunused-const-variable to W=1 warning level kbuild: fix if_change and friends to consider argument order kbuild: fix adjust_autoksyms.sh for modules that need only one symbol kbuild: fix ksym_dep_filter when multiple EXPORT_SYMBOL() on the same line gcov: disable -Wmaybe-uninitialized warning gcov: disable tree-loop-im to reduce stack usage gcov: disable for COMPILE_TEST Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES Kbuild: change CC_OPTIMIZE_FOR_SIZE definition kbuild: forbid kernel directory to contain spaces and colons kbuild: adjust ksym_dep_filter for some cmd_* renames kbuild: Fix dependencies for final vmlinux link kbuild: better abstract vmlinux sequential prerequisites kbuild: fix call to adjust_autoksyms.sh when output directory specified kbuild: Get rid of KBUILD_STR kbuild: rename cmd_as_s_S to cmd_cpp_s_S kbuild: rename cmd_cc_i_c to cmd_cpp_i_c kbuild: drop redundant "PHONY += FORCE" kbuild: delete unnecessary "@:" kbuild: mark help target as PHONY ... commit e12fab28df1d7ae9369839a3af260a41447a5e79 Merge: 478a146 bbccb9c Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 21:32:40 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: drivers/pinctrl/intel/pinctrl-baytrail.c: fix build with gcc-4.4 update "mm/zsmalloc: don't fail if can't create debugfs info" dma-debug: avoid spinlock recursion when disabling dma-debug mm: oom_reaper: remove some bloat memcg: fix mem_cgroup_out_of_memory() return value. ocfs2: fix improper handling of return errno mm: slub: remove unused virt_to_obj() mm: kasan: remove unused 'reserved' field from struct kasan_alloc_meta mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly seqlock: fix raw_read_seqcount_latch() commit 478a1469a7d27fe6b2f85fc801ecdeb8afc836e6 Merge: 315227f 4d9a2c8 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 20:00:28 2016 -0700 Merge tag 'dax-locking-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull DAX locking updates from Ross Zwisler: "Filesystem DAX locking for 4.7 - We use a bit in an exceptional radix tree entry as a lock bit and use it similarly to how page lock is used for normal faults. This fixes races between hole instantiation and read faults of the same index. - Filesystem DAX PMD faults are disabled, and will be re-enabled when PMD locking is implemented" * tag 'dax-locking-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: Remove i_mmap_lock protection dax: Use radix tree entry lock to protect cow faults dax: New fault locking dax: Allow DAX code to replace exceptional entries dax: Define DAX lock bit for radix tree exceptional entry dax: Make huge page handling depend of CONFIG_BROKEN dax: Fix condition for filling of PMD holes commit 315227f6da389f3a560f27f7777080857278e1b4 Merge: a10c38a 40543f6 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 19:34:26 2016 -0700 Merge tag 'dax-misc-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull misc DAX updates from Vishal Verma: "DAX error handling for 4.7 - Until now, dax has been disabled if media errors were found on any device. This enables the use of DAX in the presence of these errors by making all sector-aligned zeroing go through the driver. - The driver (already) has the ability to clear errors on writes that are sent through the block layer using 'DSMs' defined in ACPI 6.1. Other misc changes: - When mounting DAX filesystems, check to make sure the partition is page aligned. This is a requirement for DAX, and previously, we allowed such unaligned mounts to succeed, but subsequent reads/writes would fail. - Misc/cleanup fixes from Jan that remove unused code from DAX related to zeroing, writeback, and some size checks" * tag 'dax-misc-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: dax: fix a comment in dax_zero_page_range and dax_truncate_page dax: for truncate/hole-punch, do zeroing through the driver if possible dax: export a low-level __dax_zero_page_range helper dax: use sb_issue_zerout instead of calling dax_clear_sectors dax: enable dax in the presence of known media errors (badblocks) dax: fallback from pmd to pte on error block: Update blkdev_dax_capable() for consistency xfs: Add alignment check for DAX mount ext2: Add alignment check for DAX mount ext4: Add alignment check for DAX mount block: Add bdev_dax_supported() for dax mount checks block: Add vfs_msg() interface dax: Remove redundant inode size checks dax: Remove pointless writeback from dax_do_io() dax: Remove zeroing from dax_io() dax: Remove dead zeroing code from fault handlers ext2: Avoid DAX zeroing to corrupt data ext2: Fix block zeroing in ext2_get_blocks() for DAX dax: Remove complete_unwritten argument DAX: move RADIX_DAX_ definitions to dax.c commit bbccb9c7bbeb6c78eb467c191c97360160f13704 Author: Andrew Morton <akpm@linux-foundation.org> Date: Thu May 26 15:16:30 2016 -0700 drivers/pinctrl/intel/pinctrl-baytrail.c: fix build with gcc-4.4 gcc-4.4 and thereabouts has issues with initializers of anonymous unions, and it generates the following warnings: drivers/pinctrl/intel/pinctrl-baytrail.c:413: error: unknown field 'simple_funcs' specified in initializer drivers/pinctrl/intel/pinctrl-baytrail.c:413: warning: missing braces around initializer drivers/pinctrl/intel/pinctrl-baytrail.c:413: warning: (near initialization for 'byt_score_groups[0].<anonymous>') drivers/pinctrl/intel/pinctrl-baytrail.c:415: error: unknown field 'simple_funcs' specified in initializer drivers/pinctrl/intel/pinctrl-baytrail.c:417: error: unknown field 'simple_funcs' specified in initializer ... Work around this. Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/pinctrl/intel/pinctrl-baytrail.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 4abaac9b733ea44fcf0d561ec1813e0394e61c9d Author: Dan Streetman <ddstreet@ieee.org> Date: Thu May 26 15:16:27 2016 -0700 update "mm/zsmalloc: don't fail if can't create debugfs info" Some updates to commit d34f615720d1 ("mm/zsmalloc: don't fail if can't create debugfs info"): - add pr_warn to all stat failure cases - do not prevent module loading on stat failure Link: http://lkml.kernel.org/r/1463671123-5479-1-git-send-email-ddstreet@ieee.org Signed-off-by: Dan Streetman <ddstreet@ieee.org> Reviewed-by: Ganesh Mahendran <opensource.ganesh@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Dan Streetman <dan.streetman@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/zsmalloc.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) commit 3017cd63f26fc655d56875aaf497153ba60e9edf Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Thu May 26 15:16:25 2016 -0700 dma-debug: avoid spinlock recursion when disabling dma-debug With netconsole (at least) the pr_err("... disablingn") call can recurse back into the dma-debug code, where it'll try to grab free_entries_lock again. Avoid the problem by doing the printk after dropping the lock. Link: http://lkml.kernel.org/r/1463678421-18683-1-git-send-email-ville.syrjala@linux.intel.com Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/dma-debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7ef949d77f95f0d129f0d404b336459a34a00101 Author: Michal Hocko <mhocko@suse.com> Date: Thu May 26 15:16:22 2016 -0700 mm: oom_reaper: remove some bloat mmput_async is currently used only from the oom_reaper which is defined only for CONFIG_MMU. We can save work_struct in mm_struct for !CONFIG_MMU. [akpm@linux-foundation.org: fix typo, per Minchan] Link: http://lkml.kernel.org/r/20160520061658.GB19172@dhcp22.suse.cz Reported-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Minchan Kim <minchan@kernel.org> Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm_types.h | 2 ++ include/linux/sched.h | 4 +++- kernel/fork.c | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) commit 1ebab2db065e99eed9ab2304d3b7ad25c9568612 Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Date: Thu May 26 15:16:19 2016 -0700 memcg: fix mem_cgroup_out_of_memory() return value. mem_cgroup_out_of_memory() is returning "true" if it finds a TIF_MEMDIE task after an eligible task was found, "false" if it found a TIF_MEMDIE task before an eligible task is found. This difference confuses memory_max_write() which checks the return value of mem_cgroup_out_of_memory(). Since memory_max_write() wants to continue looping, mem_cgroup_out_of_memory() should return "true" in this case. This patch sets a dummy pointer in order to return "true". Link: http://lkml.kernel.org/r/1463753327-5170-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memcontrol.c | 2 ++ 1 file changed, 2 insertions(+) commit 1f3a437fa027c75b26a64e2e71d7c374ff70f866 Author: Eric Ren <zren@suse.com> Date: Thu May 26 15:16:16 2016 -0700 ocfs2: fix improper handling of return errno Previously, if a bad inode was found in ocfs2_iget(), -ESTALE was returned back to the caller anyway. Since commit d2b9d71a2da7 ("ocfs2: check/fix inode block for online file check") can handle with return value from ocfs2_read_locked_inode() now, we know the exact errno returned for us. Link: http://lkml.kernel.org/r/1463970656-18413-1-git-send-email-zren@suse.com Signed-off-by: Eric Ren <zren@suse.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/inode.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit d96c84f8d27ce57ff08f12b9654d9f505a8cce6e Author: Andrey Ryabinin <aryabinin@virtuozzo.com> Date: Thu May 26 15:16:14 2016 -0700 mm: slub: remove unused virt_to_obj() It's unused since commit 7ed2f9e66385 ("mm, kasan: SLAB support") Link: http://lkml.kernel.org/r/1464020961-2242-1-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: David Rientjes <rientjes@google.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: Christoph Lameter <cl@linux.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/slub_def.h | 16 ---------------- 1 file changed, 16 deletions(-) commit 9725759a96efb1ce56a1b93455ac0ab1901c5327 Author: Andrey Ryabinin <aryabinin@virtuozzo.com> Date: Thu May 26 15:16:11 2016 -0700 mm: kasan: remove unused 'reserved' field from struct kasan_alloc_meta Commit cd11016e5f52 ("mm, kasan: stackdepot implementation. Enable stackdepot for SLAB") added 'reserved' field, but never used it. Link: http://lkml.kernel.org/r/1464021054-2307-1-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/kasan/kasan.h | 1 - 1 file changed, 1 deletion(-) commit 957949243bac5dc25e2a651f17059f54f184913e Author: Yang Shi <yang.shi@linaro.org> Date: Thu May 26 15:16:08 2016 -0700 mm: make CONFIG_DEFERRED_STRUCT_PAGE_INIT depends on !FLATMEM explicitly Per the suggestion from Michal Hocko [1], DEFERRED_STRUCT_PAGE_INIT requires some ordering wrt other initialization operations, e.g. page_ext_init has to happen after the whole memmap is initialized properly. For SPARSEMEM this requires to wait for page_alloc_init_late. Other memory models (e.g. flatmem) might have different initialization layouts (page_ext_init_flatmem). Currently DEFERRED_STRUCT_PAGE_INIT depends on MEMORY_HOTPLUG which in turn depends on SPARSEMEM || X86_64_ACPI_NUMA depends on ARCH_ENABLE_MEMORY_HOTPLUG and X86_64_ACPI_NUMA depends on NUMA which in turn disable FLATMEM memory model: config ARCH_FLATMEM_ENABLE def_bool y depends on X86_32 && !NUMA so FLATMEM is ruled out via dependency maze. Be explicit and disable FLATMEM for DEFERRED_STRUCT_PAGE_INIT so that we do not reintroduce subtle initialization bugs [1] http://lkml.kernel.org/r/20160523073157.GD2278@dhcp22.suse.cz Link: http://lkml.kernel.org/r/1464027356-32282-1-git-send-email-yang.shi@linaro.org Signed-off-by: Yang Shi <yang.shi@linaro.org> Cc: Michal Hocko <mhocko@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 50755bc1c305340660bbfa65fdae3ed113d8fe0e Author: Alexey Dobriyan <adobriyan@gmail.com> Date: Thu May 26 15:16:06 2016 -0700 seqlock: fix raw_read_seqcount_latch() lockless_dereference() is supposed to take pointer not integer. Link: http://lkml.kernel.org/r/20160521201448.GA7429@p183.telecom.by Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/seqlock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a10c38a4f385f5d7c173a263ff6bb2d36021b3bb Merge: ea8ea73 e536030 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 14:10:32 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client Pull Ceph updates from Sage Weil: "This changeset has a few main parts: - Ilya has finished a huge refactoring effort to sync up the client-side logic in libceph with the user-space client code, which has evolved significantly over the last couple years, with lots of additional behaviors (e.g., how requests are handled when cluster is full and transitions from full to non-full). This structure of the code is more closely aligned with userspace now such that it will be much easier to maintain going forward when behavior changes take place. There are some locking improvements bundled in as well. - Zheng adds multi-filesystem support (multiple namespaces within the same Ceph cluster) - Zheng has changed the readdir offsets and directory enumeration so that dentry offsets are hash-based and therefore stable across directory fragmentation events on the MDS. - Zheng has a smorgasbord of bug fixes across fs/ceph" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (71 commits) ceph: fix wake_up_session_cb() ceph: don't use truncate_pagecache() to invalidate read cache ceph: SetPageError() for writeback pages if writepages fails ceph: handle interrupted ceph_writepage() ceph: make ceph_update_writeable_page() uninterruptible libceph: make ceph_osdc_wait_request() uninterruptible ceph: handle -EAGAIN returned by ceph_update_writeable_page() ceph: make fault/page_mkwrite return VM_FAULT_OOM for -ENOMEM ceph: block non-fatal signals for fault/page_mkwrite ceph: make logical calculation functions return bool ceph: tolerate bad i_size for symlink inode ceph: improve fragtree change detection ceph: keep leaf frag when updating fragtree ceph: fix dir_auth check in ceph_fill_dirfrag() ceph: don't assume frag tree splits in mds reply are sorted ceph: fix inode reference leak ceph: using hash value to compose dentry offset ceph: don't forbid marking directory complete after forward seek ceph: record 'offset' for each entry of readdir result ceph: define 'end/complete' in readdir reply as bit flags ... commit 56244ef151c3cd11f505020ab0b3f45454363bcc Author: Chris Mason <clm@fb.com> Date: Mon May 16 09:21:01 2016 -0700 Btrfs: fix handling of faults from btrfs_copy_from_user When btrfs_copy_from_user isn't able to copy all of the pages, we need to adjust our accounting to reflect the work that was actually done. Commit 2e78c927d79 changed around the decisions a little and we ended up skipping the accounting adjustments some of the time. This commit makes sure that when we don't copy anything at all, we still hop into the adjustments, and switches to release_bytes instead of write_bytes, since write_bytes isn't aligned. The accounting errors led to warnings during btrfs_destroy_inode: [ 70.847532] WARNING: CPU: 10 PID: 514 at fs/btrfs/inode.c:9350 btrfs_destroy_inode+0x2b3/0x2c0 [ 70.847536] Modules linked in: i2c_piix4 virtio_net i2c_core input_leds button led_class serio_raw acpi_cpufreq sch_fq_codel autofs4 virtio_blk [ 70.847538] CPU: 10 PID: 514 Comm: umount Tainted: G W 4.6.0-rc6_00062_g2997da1-dirty #23 [ 70.847539] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.9.0-1.fc24 04/01/2014 [ 70.847542] 0000000000000000 ffff880ff5cafab8 ffffffff8149d5e9 0000000000000202 [ 70.847543] 0000000000000000 0000000000000000 0000000000000000 ffff880ff5cafb08 [ 70.847547] ffffffff8107bdfd ffff880ff5cafaf8 000024868120013d ffff880ff5cafb28 [ 70.847547] Call Trace: [ 70.847550] [<ffffffff8149d5e9>] dump_stack+0x51/0x78 [ 70.847551] [<ffffffff8107bdfd>] __warn+0xfd/0x120 [ 70.847553] [<ffffffff8107be3d>] warn_slowpath_null+0x1d/0x20 [ 70.847555] [<ffffffff8139c9e3>] btrfs_destroy_inode+0x2b3/0x2c0 [ 70.847556] [<ffffffff812003a1>] ? __destroy_inode+0x71/0x140 [ 70.847558] [<ffffffff812004b3>] destroy_inode+0x43/0x70 [ 70.847559] [<ffffffff810b7b5f>] ? wake_up_bit+0x2f/0x40 [ 70.847560] [<ffffffff81200c68>] evict+0x148/0x1d0 [ 70.847562] [<ffffffff81398ade>] ? start_transaction+0x3de/0x460 [ 70.847564] [<ffffffff81200d49>] dispose_list+0x59/0x80 [ 70.847565] [<ffffffff81201ba0>] evict_inodes+0x180/0x190 [ 70.847566] [<ffffffff812191ff>] ? __sync_filesystem+0x3f/0x50 [ 70.847568] [<ffffffff811e95f8>] generic_shutdown_super+0x48/0x100 [ 70.847569] [<ffffffff810b75c0>] ? woken_wake_function+0x20/0x20 [ 70.847571] [<ffffffff811e9796>] kill_anon_super+0x16/0x30 [ 70.847573] [<ffffffff81365cde>] btrfs_kill_super+0x1e/0x130 [ 70.847574] [<ffffffff811e99be>] deactivate_locked_super+0x4e/0x90 [ 70.847576] [<ffffffff811e9e61>] deactivate_super+0x51/0x70 [ 70.847577] [<ffffffff8120536f>] cleanup_mnt+0x3f/0x80 [ 70.847579] [<ffffffff81205402>] __cleanup_mnt+0x12/0x20 [ 70.847581] [<ffffffff81098358>] task_work_run+0x68/0xa0 [ 70.847582] [<ffffffff810022b6>] exit_to_usermode_loop+0xd6/0xe0 [ 70.847583] [<ffffffff81002e1d>] do_syscall_64+0xbd/0x170 [ 70.847586] [<ffffffff817d4dbc>] entry_SYSCALL64_slow_path+0x25/0x25 This is the test program I used to force short returns from btrfs_copy_from_user void *dontneed(void *arg) { char *p = arg; int ret; while(1) { ret = madvise(p, BUFSIZE/4, MADV_DONTNEED); if (ret) { perror("madvise"); exit(1); } } } int main(int ac, char **av) { int ret; int fd; char *filename; unsigned long offset; char *buf; int i; pthread_t tid; if (ac != 2) { fprintf(stderr, "usage: dammitdave filename\n"); exit(1); } buf = mmap(NULL, BUFSIZE, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); if (buf == MAP_FAILED) { perror("mmap"); exit(1); } memset(buf, 'a', BUFSIZE); filename = av[1]; ret = pthread_create(&tid, NULL, dontneed, buf); if (ret) { fprintf(stderr, "error %d from pthread_create\n", ret); exit(1); } ret = pthread_detach(tid); if (ret) { fprintf(stderr, "pthread detach failed %d\n", ret); exit(1); } while (1) { fd = open(filename, O_RDWR | O_CREAT, 0600); if (fd < 0) { perror("open"); exit(1); } for (i = 0; i < ROUNDS; i++) { int this_write = BUFSIZE; offset = rand() % MAXSIZE; ret = pwrite(fd, buf, this_write, offset); if (ret < 0) { perror("pwrite"); exit(1); } else if (ret != this_write) { fprintf(stderr, "short write to %s offset %lu ret %d\n", filename, offset, ret); exit(1); } if (i == ROUNDS - 1) { ret = sync_file_range(fd, offset, 4096, SYNC_FILE_RANGE_WRITE); if (ret < 0) { perror("sync_file_range"); exit(1); } } } ret = ftruncate(fd, 0); if (ret < 0) { perror("ftruncate"); exit(1); } ret = close(fd); if (ret) { perror("close"); exit(1); } ret = unlink(filename); if (ret) { perror("unlink"); exit(1); } } return 0; } Signed-off-by: Chris Mason <clm@fb.com> Reported-by: Dave Jones <dsj@fb.com> Fixes: 2e78c927d79333f299a8ac81c2fd2952caeef335 cc: stable@vger.kernel.org # v4.6 Signed-off-by: Chris Mason <clm@fb.com> fs/btrfs/file.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 9257b4ca9dff074918164e4fa10e9001c62bc27a Merge: c315ef8 4c6143d Author: Chris Mason <clm@fb.com> Date: Thu May 26 12:49:21 2016 -0700 Merge branch 'for-chris-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.7 commit b7e7ad611e24b95b0db2998428ce78370415c086 Merge: 6124872 3e7cfce Author: David S. Miller <davem@davemloft.net> Date: Thu May 26 12:27:33 2016 -0700 Merge branch 'qed-fixes' Yuval Mintz says: ==================== qed*: Bug fixes This series contain several small fixes, most of which deal with either 100g support, sriov or bandwidth configurations. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 3e7cfce228c6c67dd31e09175eaca55fee0c7082 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Thu May 26 11:01:24 2016 +0300 qed: Don't config min BW on 100g on link flap Currently 100g devices don't support minimum/maximum BW configurations, yet link flaps might cause the driver to attempt to do such a configuration. Prevent this just as we do for the maximum BW. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dev.c | 7 +++++++ 1 file changed, 7 insertions(+) commit bb13ace7dca5d2385847e43511acf5777da35c0e Author: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> Date: Thu May 26 11:01:23 2016 +0300 qed: Prevent 100g from working in MSI Adapter can support 100g in both MSIx and INTa, but not in MSI. Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dev.c | 5 +++++ drivers/net/ethernet/qlogic/qed/qed_main.c | 18 ++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) commit 1af9dcf7f90e6b75b7c42eaaf19cdd5da1354784 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Thu May 26 11:01:22 2016 +0300 qed: Add missing 100g init mode Some of the HW configurations are currently missing for 100g devices. This can cause various classification issues, as well as prevent device from fully reaching line-rate. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dev.c | 7 +++++++ 1 file changed, 7 insertions(+) commit cc3d5eb09111a471f942c76e9610ee962e1d4c31 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Thu May 26 11:01:21 2016 +0300 qed: Save min/max accross dcbx-change When DCBx re-negotiation is occurring, the PF's configurations for maximum and minimum bandwidth guarantees are currently lost. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dev.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 795292916cf9d8c47c53b692bcb36b02953101cf Author: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> Date: Thu May 26 11:01:20 2016 +0300 qed: Fix allocation in interrupt context Commit 39651abd2814 ("qed: add support for dcbx") is re-configuring the QM hw-block as part of its sequence. This is done in attention handling context which is non-sleepable, yet memory is allocated in this flow using GFP_KERNEL. Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dev.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) commit 6ecb0a0c0d9539fac1497d1d218e60a393a1070c Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Thu May 26 11:01:19 2016 +0300 qede: Don't expose self-test for VFs PFs and VFs differ in their registered ethtool operations, but they're using a common function for get_sset_count(). As a result, `ethtool -i' for a VF would indicate it supports selftest, although that's not the case. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit ce2b885cc5014d1cbcbe519c45f00f6a59e5ab70 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Thu May 26 11:01:18 2016 +0300 qede: Reload on GRO changes Since driver is using a FW-based GRO implementation, this has some effects on its ability to cope with GRO enablement/disablement. As a result, driver must perform an inner-reload as a result of a state change in the offload configuration of said feature. [Failure to do so means network stack would continue to receive aggregated packets even though user requested the feature to be disabled]. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qede/qede_main.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit be7b6d64c0f2f31ea03746edaabb22f57234cb49 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Thu May 26 11:01:17 2016 +0300 qede: Fix VF minimum BW setting VF is currently ignoring the minimum provided by the API, mistakenly using the maximum for minimum as well. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6760b14d4a1243f918d983bba1e35c5a5cd5a6d Author: Erico Nunes <erico.nunes@datacom.ind.br> Date: Tue May 3 15:45:43 2016 -0300 i2c: dev: switch from register_chrdev to cdev API i2c-dev had never moved away from the older register_chrdev interface to implement its char device registration. The register_chrdev API has the limitation of enabling only up to 256 i2c-dev busses to exist. Large platforms with lots of i2c devices (i.e. pluggable transceivers) with dedicated busses may have to exceed that limit. In particular, there are also platforms making use of the i2c bus multiplexing API, which instantiates a virtual bus for each possible multiplexed selection. This patch removes the register_chrdev usage and replaces it with the less old cdev API, which takes away the 256 i2c-dev bus limitation. It should not have any other impact for i2c bus drivers or user space. This patch has been tested on qemu x86 and qemu powerpc platforms with the aid of a module which adds and removes 5000 virtual i2c busses, as well as validated on an existing powerpc hardware platform which makes use of the i2c bus multiplexing API. i2c-dev busses with device minor numbers larger than 256 have also been validated to work with the existing i2c-tools. Signed-off-by: Erico Nunes <erico.nunes@datacom.ind.br> [wsa: kept includes sorted] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/i2c-dev.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit e3879e4f3179121b1b59fd0033379d0ee700dead Author: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Date: Wed May 11 17:20:05 2016 +0200 i2c: xlr: rename ARCH_TANGOX to ARCH_TANGO The ARCH name was changed during the review process of the mach, and this driver was forgotten to be converted. Fix it now. http://article.gmane.org/gmane.linux.ports.arm.kernel/456331 Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> [wsa: updated commit message slightly] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/busses/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b00c52dae6d9ee8d0f2407118ef6544ae5524781 Author: Wenwei Tao <ww.tao0320@gmail.com> Date: Fri May 13 22:59:20 2016 +0800 cgroup: remove redundant cleanup in css_create When create css failed, before call css_free_rcu_fn, we remove the css id and exit the percpu_ref, but we will do these again in css_free_work_fn, so they are redundant. Especially the css id, that would cause problem if we remove it twice, since it may be assigned to another css after the first remove. tj: This was broken by two commits updating the free path without synchronizing the creation failure path. This can be easily triggered by trying to create more than 64k memory cgroups. Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Vladimir Davydov <vdavydov@parallels.com> Fixes: 9a1049da9bd2 ("percpu-refcount: require percpu_ref to be exited explicitly") Fixes: 01e586598b22 ("cgroup: release css->id after css_free") Cc: stable@vger.kernel.org # v3.17+ kernel/cgroup.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 67fed0da5ac23ab6187c362b7ade08339872f718 Author: Ludovic Desroches <ludovic.desroches@atmel.com> Date: Fri May 20 14:06:31 2016 +0200 i2c: at91: change log when dma configuration fails When the DMA configuration fails, there is a log reporting that we can't use DMA and indicating the error number. When booting the kernel, it is annoying to see this error number. Moreover, people can think something is going wrong. It is not the case, it means that DMA can't be used but it doesn't prevent to use i2c. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/busses/i2c-at91.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 868b2072f09c8a698df8066ca72d30411dcc57d6 Author: Moritz Fischer <moritz.fischer@ettus.com> Date: Mon May 23 11:44:39 2016 -0700 misc: at24: Fix typo in at24 header file This commit fixes a simple typo s/mvmem/nvmem in the example. Signed-off-by: Moritz Fischer <moritz.fischer@ettus.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> include/linux/platform_data/at24.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 79439d8308bb12b4bdb2ca42fba2b71f1600b88b Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Sun May 22 09:38:35 2016 +0200 i2c: rcar: should depend on HAS_DMA If NO_DMA=y: drivers/built-in.o: In function `rcar_i2c_dma_unmap': i2c-rcar.c:(.text+0x6f06c6): undefined reference to `bad_dma_ops' drivers/built-in.o: In function `rcar_i2c_dma': i2c-rcar.c:(.text+0x6f07e2): undefined reference to `bad_dma_ops' i2c-rcar.c:(.text+0x6f0838): undefined reference to `bad_dma_ops' Add a dependency on HAS_DMA to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/busses/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6aabf9d01facdcb6835272995b003956a9dabea0 Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Thu May 19 10:29:17 2016 +0200 i2c: rcar: use dma_request_chan() New drivers should not use dma_request_slave_channel_reason() but dma_request_chan(). The former is a macro to the later so this change do not effect the driver in any way. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/busses/i2c-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea8ea737c46cffa5d0ee74309f81e55a7e5e9c2a Merge: 0b9210c c7d73af Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 10:33:33 2016 -0700 Merge tag 'nfs-for-4.7-1' of git://git.linux-nfs.org/projects/anna/linux-nfs Pull NFS client updates from Anna Schumaker: "Highlights include: Features: - Add support for the NFS v4.2 COPY operation - Add support for NFS/RDMA over IPv6 Bugfixes and cleanups: - Avoid race that crashes nfs_init_commit() - Fix oops in callback path - Fix LOCK/OPEN race when unlinking an open file - Choose correct stateids when using delegations in setattr, read and write - Don't send empty SETATTR after OPEN_CREATE - xprtrdma: Prevent server from writing a reply into memory client has released - xprtrdma: Support using Read list and Reply chunk in one RPC call" * tag 'nfs-for-4.7-1' of git://git.linux-nfs.org/projects/anna/linux-nfs: (61 commits) pnfs: pnfs_update_layout needs to consider if strict iomode checking is on nfs/flexfiles: Use the layout segment for reading unless it a IOMODE_RW and reading is disabled nfs/flexfiles: Helper function to detect FF_FLAGS_NO_READ_IO nfs: avoid race that crashes nfs_init_commit NFS: checking for NULL instead of IS_ERR() in nfs_commit_file() pnfs: make pnfs_layout_process more robust pnfs: rework LAYOUTGET retry handling pnfs: lift retry logic from send_layoutget to pnfs_update_layout pnfs: fix bad error handling in send_layoutget flexfiles: add kerneldoc header to nfs4_ff_layout_prepare_ds flexfiles: remove pointless setting of NFS_LAYOUT_RETURN_REQUESTED pnfs: only tear down lsegs that precede seqid in LAYOUTRETURN args pnfs: keep track of the return sequence number in pnfs_layout_hdr pnfs: record sequence in pnfs_layout_segment when it's created pnfs: don't merge new ff lsegs with ones that have LAYOUTRETURN bit set pNFS/flexfiles: When initing reads or writes, we might have to retry connecting to DSes pNFS/flexfiles: When checking for available DSes, conditionally check for MDS io pNFS/flexfile: Fix erroneous fall back to read/write through the MDS NFS: Reclaim writes via writepage are opportunistic NFSv4: Use the right stateid for delegations in setattr, read and write ... commit 0b9210c9c86e46a7a62bbc7b69b84001315072ff Merge: c543673 555b67e Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 10:13:40 2016 -0700 Merge tag 'xfs-for-linus-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs Pull xfs updates from Dave Chinner: "A pretty average collection of fixes, cleanups and improvements in this request. Summary: - fixes for mount line parsing, sparse warnings, read-only compat feature remount behaviour - allow fast path symlink lookups for inline symlinks. - attribute listing cleanups - writeback goes direct to bios rather than indirecting through bufferheads - transaction allocation cleanup - optimised kmem_realloc - added configurable error handling for metadata write errors, changed default error handling behaviour from "retry forever" to "retry until unmount then fail" - fixed several inode cluster writeback lookup vs reclaim race conditions - fixed inode cluster writeback checking wrong inode after lookup - fixed bugs where struct xfs_inode freeing wasn't actually RCU safe - cleaned up inode reclaim tagging" * tag 'xfs-for-linus-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (39 commits) xfs: fix warning in xfs_finish_page_writeback for non-debug builds xfs: move reclaim tagging functions xfs: simplify inode reclaim tagging interfaces xfs: rename variables in xfs_iflush_cluster for clarity xfs: xfs_iflush_cluster has range issues xfs: mark reclaimed inodes invalid earlier xfs: xfs_inode_free() isn't RCU safe xfs: optimise xfs_iext_destroy xfs: skip stale inodes in xfs_iflush_cluster xfs: fix inode validity check in xfs_iflush_cluster xfs: xfs_iflush_cluster fails to abort on error xfs: remove xfs_fs_evict_inode() xfs: add "fail at unmount" error handling configuration xfs: add configuration handlers for specific errors xfs: add configuration of error failure speed xfs: introduce table-based init for error behaviors xfs: add configurable error support to metadata buffers xfs: introduce metadata IO error class xfs: configurable error behavior via sysfs xfs: buffer ->bi_end_io function requires irq-safe lock ... commit 7a226f9c32b0481b0744e2726cd7f8349b866af5 Author: Doug Ledford <dledford@redhat.com> Date: Thu May 26 12:57:44 2016 -0400 staging/rdma: Remove the entire rdma subdirectory of staging This is no longer in use. Remove it. Signed-off-by: Doug Ledford <dledford@redhat.com> MAINTAINERS | 1 - drivers/staging/Kconfig | 2 -- drivers/staging/Makefile | 1 - drivers/staging/rdma/Kconfig | 25 ------------------------- drivers/staging/rdma/Makefile | 1 - 5 files changed, 30 deletions(-) commit b40f4757daa1b28e586fddad76638c98e2edfc34 Author: Christoph Lameter <cl@linux.com> Date: Mon May 16 12:49:33 2016 -0500 IB/core: Make device counter infrastructure dynamic In practice, each RDMA device has a unique set of counters that the hardware implements. Having a central set of counters that they must all adhere to is limiting and causes many useful counters to not be available. Therefore we create a dynamic counter registration infrastructure. The driver must implement a stats structure allocation routine, in which the driver must place the directory name it wants, a list of names for all of the counters, an array of u64 counters themselves, plus a few generic configuration options. We then implement a core routine to create a sysfs file for each of the named stats elements, and a core routine to retrieve the stats when any of the sysfs attribute files are read. To avoid excessive beating on the stats generation routine in the drivers, the core code also caches the stats for a short period of time so that someone attempting to read all of the stats in a given device's directory will not result in a stats generation call per file read. Future work will attempt to standardize just the shared stats elements, and possibly add a method to get the stats via netlink in addition to sysfs. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Mark Bloch <markb@mellanox.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> [ Add caching, make structure names more informative, add i40iw support, other significant rewrites from the original patch ] Documentation/infiniband/sysfs.txt | 12 + drivers/infiniband/core/sysfs.c | 366 ++++++++++++++++++---------- drivers/infiniband/hw/cxgb3/iwch_provider.c | 147 +++++++---- drivers/infiniband/hw/cxgb4/provider.c | 58 ++++- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 145 ++++++++--- include/rdma/ib_verbs.h | 126 ++++++---- 6 files changed, 590 insertions(+), 264 deletions(-) commit 8779e7658df2496f27660586e3a20a86c75fb526 Merge: e6f6113 f158486 Author: Doug Ledford <dledford@redhat.com> Date: Thu May 26 12:50:05 2016 -0400 Merge branch 'hfi1-2' into k.o/for-4.7 commit c5436731de860b3a3cff70c62d99242418aab1d1 Merge: 0e77816 1dc2c9f Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 09:48:23 2016 -0700 Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull hwmon fixlets from Jean Delvare. * 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: Documentation/hwmon: Update links in max34440 hwmon: (emc2103) Fix typo in MODULE_PARM_DESC commit 0e77816e096c4ae27e98977fef56b6b9169f9017 Merge: bfb7644 265984b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 09:36:10 2016 -0700 Merge tag 'mmc-v4.7-rc1' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC fixes from Ulf Hansson: "Here are some mmc fixes intended for v4.7 rc1. They are based on a commit earlier in the merge window and have been tested in linux-next for a while. MMC core: - Prevent re-tuning while serving requests for RPMB partitions - Extend timeout for long read time quirk to support more eMMCs MMC host: - sdhci-acpi: Ensure connected devices are powered when probing - sdhci-pci|acpi: Remove unreliable MMC_CAP_BUS_WIDTH_TEST for Intel HWs - dw_mmc: Correct the assigning of max_blk_size - dw_mmc-rockchip: Allow RPMB partitions to be created - dw_mmc-rockchip: Set the drive phase properly" * tag 'mmc-v4.7-rc1' of git://git.linaro.org/people/ulf.hansson/mmc: mmc: sdhci-acpi: Remove MMC_CAP_BUS_WIDTH_TEST for Intel controllers mmc: sdhci-pci: Remove MMC_CAP_BUS_WIDTH_TEST for Intel controllers mmc: longer timeout for long read time quirk mmc: dw_mmc: rockchip: Set the drive phase properly mmc: dw_mmc: fix the wrong max_blk_size mmc: dw_mmc-rockchip: add MMC_CAP_CMD23 capabilities mmc: sdhci-acpi: Ensure connected devices are powered when probing ACPI / PM: Export acpi_device_fix_up_power() mmc: block: Pause re-tuning while switched to the RPMB partition mmc: block: Always switch back to main area after RPMB access mmc: core: Add a facility to "pause" re-tuning commit bfb764440d5bee109003295473a0b387bc799222 Merge: 159d08f 88ac990 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 09:23:43 2016 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management updates from Zhang Rui: - Introduce generic ADC thermal driver, based on OF thermal (Laxman Dewangan) - Introduce new thermal driver for Tango chips (Marc Gonzalez) - Rockchip driver support for RK3399, RK3366, and some fixes (Caesar Wang, Elaine Zhang and Shawn Lin) - Add CPU power cooling model to Mediatek thermal driver (Dawei Chien) - Wider usage of dev_thermal_zone_of_sensor_register (Eduardo Valentin) - TI thermal driver gained a new maintainer (Keerthy). - Enabled powerclamp driver by checking CPU feature and package cstate counter instead of CPU whitelist (Jacob Pan) - Various fixes on thermal governor, OF thermal, Tegra, and RCAR * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (50 commits) thermal: tango: initialize TEMPSI_CFG thermal: rockchip: use the usleep_range instead of udelay thermal: rockchip: add the notes for better reading thermal: rockchip: Support RK3366 SoCs in the thermal driver thermal: rockchip: handle the power sequence for tsadc controller thermal: rockchip: update the tsadc table for rk3399 thermal: rockchip: fixes the code_to_temp for tsadc driver thermal: rockchip: disable thermal->clk in err case thermal: tegra: add Tegra132 specific SOC_THERM driver thermal: fix ptr_ret.cocci warnings thermal: mediatek: Add cpu dynamic power cooling model. thermal: generic-adc: Add ADC based thermal sensor driver thermal: generic-adc: Add DT binding for ADC based thermal sensor thermal: tegra: fix static checker warning thermal: tegra: mark PM functions __maybe_unused thermal: add temperature sensor support for tango SoC thermal: hisilicon: fix IRQ imbalance enabling thermal: hisilicon: support to use any sensor thermal: rcar: Remove binding docs for r8a7794 thermal: tegra: add PM support ... commit f158486527ebfb4c1fe4dcb69b12479090d66b72 Author: Jubin John <jubin.john@intel.com> Date: Tue May 24 12:51:06 2016 -0700 IB/hfi1: Fix pio map initialization The pio map initialization function is off by 1 causing the last kernel send context that is allocated to not get mapped into the pio map which leads to the last kernel send context not being used by any of the qps. The send context reserved for VL15 is taken care of by setting the scontext variable that is used as the index into the kernel send context array to 1 and does not need to be accounted for in the kernel send context counting loop as it is currently done. Fix the kernel send context counting loop to account for all the allocated send contexts and map all of them to the different VLs. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Jianxin Xiong <jianxin.xiong@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/hfi1/pio.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f6de3d39cfc30387ce7dadb8542e4a635c706670 Author: Dean Luick <dean.luick@intel.com> Date: Tue May 24 12:51:00 2016 -0700 IB/hfi1: Correct 8051 link parameter settings Two 8051 link settings, external device config and tuning method, were written in the wrong location and the previous settings were not cleared. For both, clear the old value and write the new value. Fixes: 8ebd4cf1852a ("staging/rdma/hfi1: Add active and optical cable support") Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/hfi1/chip.h | 6 ++++++ drivers/infiniband/hw/hfi1/platform.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) commit ce8b2fd0950ccc14440b02f05d2c7023608cfa76 Author: Sebastian Sanchez <sebastian.sanchez@intel.com> Date: Tue May 24 12:50:47 2016 -0700 IB/hfi1: Update pkey table properly after link down or FM start When FM is disabled, and the HFI port on the switch is changed from MgmtAllowed=YES to MgmtAllowed=NO and the link is bounced, FULL_MGMT_P_KEY doesn't get cleared from the pkey table. This also occurs when the QSFP cable is moved from a switch port with MgmtAllowed=YES to a MgmtAllowed=NO port. Clear pkey entry properly. Also, when the driver is loaded and the switch port is set to MgmtAllowed=NO, FULL_MGMT_P_KEY shouldn't be added to pkey table after FM is started. Only set FULL_MGMT_P_KEY in the pkey table if switch port is configured to MgmtAllowed=YES. Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Sebastian Sanchez <sebastian.sanchez@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/hfi1/chip.c | 9 +++++++++ drivers/infiniband/hw/hfi1/mad.c | 6 ++++++ 2 files changed, 15 insertions(+) commit 8b103e9cdee5f381bc20a8a9f9bb5be11de8e68f Author: Mike Marciniszyn <mike.marciniszyn@intel.com> Date: Tue May 24 12:50:40 2016 -0700 IB/rdamvt: Fix rdmavt s_ack_queue sizing rdmavt allows the driver to specify the size of the ack queue, but only uses it for the modify QP limit testing for setting the atomic limit value. The driver dependent size is now used to size the s_ack_queue ring dynamicially. Since the driver knows its size, the driver will use its define for any ring size dependent code. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/sw/rdmavt/qp.c | 22 ++++++++++++++++++++-- include/rdma/rdma_vt.h | 9 +++++++++ include/rdma/rdmavt_qp.h | 5 +---- 3 files changed, 30 insertions(+), 6 deletions(-) commit 4c0b653335bbdfe62a5f4483c98cb5d581432917 Author: Mike Marciniszyn <mike.marciniszyn@intel.com> Date: Tue May 24 12:50:34 2016 -0700 IB/rdmavt: Max atomic value should be a u8 This matches the ib_qp_attr size and avoids a extremely large value when the lower level driver registers. As part of the patch, the u8 ordinals are moved to the end of the struct to reduce pahole noted excesses. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> include/rdma/rdma_vt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7049de65c9e520886f06d6f9deceaaed5d93fb7c Author: Mike Marciniszyn <mike.marciniszyn@intel.com> Date: Tue May 24 12:50:23 2016 -0700 IB/hfi1: Fix hard lockup due to not using save/restore spin lock Commit b9b06cb6feda ("IB/hfi1: Fix missing lock/unlock in verbs drain callback") added a spin lock. Unfortunately, the new lock code can be called from a base level interrupt state, and an interrupt that can get stacked will attempt to get the same lock. Fix by using the flag save/restore spin lock variation. Cc: stable@vger.kernel.org # 4.6+ Reviewed-by: Sebastian Sanchez <sebastian.sanchez@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/hfi1/qp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bdd8a98ce465df31b07ff6314db9ed31a7c6bb0d Author: Jianxin Xiong <jianxin.xiong@intel.com> Date: Tue May 24 12:50:17 2016 -0700 IB/hfi1: Add tracing support for send with invalidate opcode Enable trace generation for packets with the "Send Last with Invalidate" and "Send Only with Invalidate" opcodes. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/hfi1/trace.c | 7 +++++++ drivers/infiniband/hw/hfi1/trace.h | 2 ++ drivers/infiniband/hw/hfi1/verbs.c | 2 ++ 3 files changed, 11 insertions(+) commit 23f7d0d29e842360cc20bf03460f52f14ced915d Author: Jianxin Xiong <jianxin.xiong@intel.com> Date: Tue May 24 12:50:10 2016 -0700 IB/hfi1, qib: Add ieth to the packet header definitions A new union member "ieth" (Invalidate Extended Transport Header) is added to the packet header definition in preparation of supporting the send with invalidate opcode. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/hfi1/verbs.h | 1 + drivers/infiniband/hw/qib/qib_verbs.h | 1 + 2 files changed, 2 insertions(+) commit 159d08f4b85ce454cd05fb9e2c539276e148d366 Merge: 2f7c3a1 dca6b41 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 26 09:15:19 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull Yama locking fix from James Morris: "Fix for the Yama LSM" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: Yama: fix double-spinlock and user access in atomic context commit e6f61130ed7a124138c4f7b1bd35e24e8113cb83 Merge: 0de4cbb 492a7e6 ae43f82 Author: Doug Ledford <dledford@redhat.com> Date: Thu May 26 11:55:19 2016 -0400 Merge branches 'misc-4.7-2', 'ipoib' and 'ib-router' into k.o/for-4.7 commit f48ad614c100783be1e7e777dc36328001b83999 Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:26:51 2016 -0700 IB/hfi1: Move driver out of staging The TODO list for the hfi1 driver was completed during 4.6. In addition other objections raised (which are far beyond what was in the TODO list) have been addressed as well. It is now time to remove the driver from staging and into the drivers/infiniband sub-tree. Reviewed-by: Jubin John <jubin.john@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> MAINTAINERS | 13 +- drivers/infiniband/Kconfig | 2 + drivers/infiniband/hw/Makefile | 1 + drivers/infiniband/hw/hfi1/Kconfig | 29 + drivers/infiniband/hw/hfi1/Makefile | 21 + drivers/infiniband/hw/hfi1/affinity.c | 431 + drivers/infiniband/hw/hfi1/affinity.h | 108 + drivers/infiniband/hw/hfi1/aspm.h | 309 + drivers/infiniband/hw/hfi1/chip.c | 14703 ++++++++++++++++++++++++++ drivers/infiniband/hw/hfi1/chip.h | 1368 +++ drivers/infiniband/hw/hfi1/chip_registers.h | 1307 +++ drivers/infiniband/hw/hfi1/common.h | 411 + drivers/infiniband/hw/hfi1/debugfs.c | 1145 ++ drivers/infiniband/hw/hfi1/debugfs.h | 75 + drivers/infiniband/hw/hfi1/device.c | 183 + drivers/infiniband/hw/hfi1/device.h | 60 + drivers/infiniband/hw/hfi1/dma.c | 183 + drivers/infiniband/hw/hfi1/driver.c | 1404 +++ drivers/infiniband/hw/hfi1/efivar.c | 164 + drivers/infiniband/hw/hfi1/efivar.h | 57 + drivers/infiniband/hw/hfi1/eprom.c | 102 + drivers/infiniband/hw/hfi1/eprom.h | 52 + drivers/infiniband/hw/hfi1/file_ops.c | 1498 +++ drivers/infiniband/hw/hfi1/firmware.c | 2056 ++++ drivers/infiniband/hw/hfi1/hfi.h | 1950 ++++ drivers/infiniband/hw/hfi1/init.c | 1818 ++++ drivers/infiniband/hw/hfi1/intr.c | 200 + drivers/infiniband/hw/hfi1/iowait.h | 300 + drivers/infiniband/hw/hfi1/mad.c | 4443 ++++++++ drivers/infiniband/hw/hfi1/mad.h | 437 + drivers/infiniband/hw/hfi1/mmu_rb.c | 325 + drivers/infiniband/hw/hfi1/mmu_rb.h | 76 + drivers/infiniband/hw/hfi1/opa_compat.h | 111 + drivers/infiniband/hw/hfi1/pcie.c | 1338 +++ drivers/infiniband/hw/hfi1/pio.c | 2073 ++++ drivers/infiniband/hw/hfi1/pio.h | 328 + drivers/infiniband/hw/hfi1/pio_copy.c | 867 ++ drivers/infiniband/hw/hfi1/platform.c | 907 ++ drivers/infiniband/hw/hfi1/platform.h | 305 + drivers/infiniband/hw/hfi1/qp.c | 973 ++ drivers/infiniband/hw/hfi1/qp.h | 160 + drivers/infiniband/hw/hfi1/qsfp.c | 632 ++ drivers/infiniband/hw/hfi1/qsfp.h | 240 + drivers/infiniband/hw/hfi1/rc.c | 2580 +++++ drivers/infiniband/hw/hfi1/ruc.c | 979 ++ drivers/infiniband/hw/hfi1/sdma.c | 3054 ++++++ drivers/infiniband/hw/hfi1/sdma.h | 1082 ++ drivers/infiniband/hw/hfi1/sdma_txreq.h | 135 + drivers/infiniband/hw/hfi1/sysfs.c | 785 ++ drivers/infiniband/hw/hfi1/trace.c | 236 + drivers/infiniband/hw/hfi1/trace.h | 1370 +++ drivers/infiniband/hw/hfi1/twsi.c | 489 + drivers/infiniband/hw/hfi1/twsi.h | 65 + drivers/infiniband/hw/hfi1/uc.c | 604 ++ drivers/infiniband/hw/hfi1/ud.c | 911 ++ drivers/infiniband/hw/hfi1/user_exp_rcv.c | 1050 ++ drivers/infiniband/hw/hfi1/user_exp_rcv.h | 79 + drivers/infiniband/hw/hfi1/user_pages.c | 135 + drivers/infiniband/hw/hfi1/user_sdma.c | 1625 +++ drivers/infiniband/hw/hfi1/user_sdma.h | 84 + drivers/infiniband/hw/hfi1/verbs.c | 1762 +++ drivers/infiniband/hw/hfi1/verbs.h | 530 + drivers/infiniband/hw/hfi1/verbs_txreq.c | 149 + drivers/infiniband/hw/hfi1/verbs_txreq.h | 116 + drivers/staging/rdma/Kconfig | 2 - drivers/staging/rdma/Makefile | 1 - drivers/staging/rdma/hfi1/Kconfig | 29 - drivers/staging/rdma/hfi1/Makefile | 21 - drivers/staging/rdma/hfi1/TODO | 6 - drivers/staging/rdma/hfi1/affinity.c | 431 - drivers/staging/rdma/hfi1/affinity.h | 108 - drivers/staging/rdma/hfi1/aspm.h | 309 - drivers/staging/rdma/hfi1/chip.c | 14703 -------------------------- drivers/staging/rdma/hfi1/chip.h | 1368 --- drivers/staging/rdma/hfi1/chip_registers.h | 1307 --- drivers/staging/rdma/hfi1/common.h | 411 - drivers/staging/rdma/hfi1/debugfs.c | 1145 -- drivers/staging/rdma/hfi1/debugfs.h | 75 - drivers/staging/rdma/hfi1/device.c | 183 - drivers/staging/rdma/hfi1/device.h | 60 - drivers/staging/rdma/hfi1/dma.c | 183 - drivers/staging/rdma/hfi1/driver.c | 1404 --- drivers/staging/rdma/hfi1/efivar.c | 164 - drivers/staging/rdma/hfi1/efivar.h | 57 - drivers/staging/rdma/hfi1/eprom.c | 102 - drivers/staging/rdma/hfi1/eprom.h | 52 - drivers/staging/rdma/hfi1/file_ops.c | 1498 --- drivers/staging/rdma/hfi1/firmware.c | 2056 ---- drivers/staging/rdma/hfi1/hfi.h | 1950 ---- drivers/staging/rdma/hfi1/init.c | 1818 ---- drivers/staging/rdma/hfi1/intr.c | 200 - drivers/staging/rdma/hfi1/iowait.h | 300 - drivers/staging/rdma/hfi1/mad.c | 4443 -------- drivers/staging/rdma/hfi1/mad.h | 437 - drivers/staging/rdma/hfi1/mmu_rb.c | 325 - drivers/staging/rdma/hfi1/mmu_rb.h | 76 - drivers/staging/rdma/hfi1/opa_compat.h | 111 - drivers/staging/rdma/hfi1/pcie.c | 1338 --- drivers/staging/rdma/hfi1/pio.c | 2073 ---- drivers/staging/rdma/hfi1/pio.h | 328 - drivers/staging/rdma/hfi1/pio_copy.c | 867 -- drivers/staging/rdma/hfi1/platform.c | 907 -- drivers/staging/rdma/hfi1/platform.h | 305 - drivers/staging/rdma/hfi1/qp.c | 973 -- drivers/staging/rdma/hfi1/qp.h | 160 - drivers/staging/rdma/hfi1/qsfp.c | 632 -- drivers/staging/rdma/hfi1/qsfp.h | 240 - drivers/staging/rdma/hfi1/rc.c | 2580 ----- drivers/staging/rdma/hfi1/ruc.c | 979 -- drivers/staging/rdma/hfi1/sdma.c | 3054 ------ drivers/staging/rdma/hfi1/sdma.h | 1082 -- drivers/staging/rdma/hfi1/sdma_txreq.h | 135 - drivers/staging/rdma/hfi1/sysfs.c | 785 -- drivers/staging/rdma/hfi1/trace.c | 236 - drivers/staging/rdma/hfi1/trace.h | 1370 --- drivers/staging/rdma/hfi1/twsi.c | 489 - drivers/staging/rdma/hfi1/twsi.h | 65 - drivers/staging/rdma/hfi1/uc.c | 604 -- drivers/staging/rdma/hfi1/ud.c | 911 -- drivers/staging/rdma/hfi1/user_exp_rcv.c | 1050 -- drivers/staging/rdma/hfi1/user_exp_rcv.h | 79 - drivers/staging/rdma/hfi1/user_pages.c | 135 - drivers/staging/rdma/hfi1/user_sdma.c | 1625 --- drivers/staging/rdma/hfi1/user_sdma.h | 84 - drivers/staging/rdma/hfi1/verbs.c | 1762 --- drivers/staging/rdma/hfi1/verbs.h | 530 - drivers/staging/rdma/hfi1/verbs_txreq.c | 149 - drivers/staging/rdma/hfi1/verbs_txreq.h | 116 - 128 files changed, 60979 insertions(+), 60984 deletions(-) commit e11ffbd57520c3832e05f2f5f19e9ff6adbb7cdc Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:26:44 2016 -0700 IB/hfi1: Do not free hfi1 cdev parent structure early The deletion of a cdev is not a fence for holding off references to the structure. The driver attempts to delete the cdev and then proceeds to free the parent structure, the hfi1_devdata, or dd. This can potentially lead to a kernel panic in situations where a user has an FD for the cdev open, and the pci device gets removed. If the user then closes the FD there will be a NULL dereference when trying to do put on the cdev's kobject. Fix this by pointing the cdev's kobject.parent at a new kobject embedded in its parent structure. Also take a reference when the device is opened and put it back when it is closed. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/device.c | 4 +++- drivers/staging/rdma/hfi1/device.h | 3 ++- drivers/staging/rdma/hfi1/file_ops.c | 15 ++++++++++++--- drivers/staging/rdma/hfi1/hfi.h | 1 + drivers/staging/rdma/hfi1/init.c | 14 +++++++++++++- 5 files changed, 31 insertions(+), 6 deletions(-) commit 8a1882ebd4b593df0e36ba0b72e4e2f632573274 Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:26:37 2016 -0700 IB/hfi1: Add trace message in user IOCTL handling Add a trace message to HFI1s user IOCTL handling. This allows debugging of which IOCTLs are being handled by the driver. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/file_ops.c | 1 + drivers/staging/rdma/hfi1/trace.c | 1 + drivers/staging/rdma/hfi1/trace.h | 1 + 3 files changed, 3 insertions(+) commit 380fb942888e7afc3420ce195a5188ff73b5a782 Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:26:31 2016 -0700 IB/hfi1: Remove write(), use ioctl() for user cmds Remove the write() handler for user space commands now that ioctl handling is available. User apps will need to change to use ioctl from this point forward. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/file_ops.c | 226 ----------------------------------- include/uapi/rdma/hfi/hfi1_user.h | 8 +- 2 files changed, 1 insertion(+), 233 deletions(-) commit 8d970cf991a6c38a5566572979487b906d643740 Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:26:24 2016 -0700 IB/hfi1: Add ioctl() interface for user commands IOCTL is more suited to what user space commands need to do than the write() interface. Add IOCTL definitions for all existing write commands and the handling for those. The write() interface will be removed in a follow on patch. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/common.h | 5 +- drivers/staging/rdma/hfi1/file_ops.c | 204 +++++++++++++++++++++++++++++++++++ include/uapi/rdma/hfi/hfi1_user.h | 45 ++++++++ 3 files changed, 253 insertions(+), 1 deletion(-) commit ac56f162d4586885238da05131c4e6bbdb536d4e Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:26:17 2016 -0700 IB/hfi1: Remove unused user command The HFI1_CMD_SDMA_STATUS_UPD command was never implemented it has no reason to live in the driver. Remove it. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/file_ops.c | 3 --- include/uapi/rdma/hfi/hfi1_user.h | 1 - 2 files changed, 4 deletions(-) commit 0f7b1f917ca84493d40e4fce32db29e3f7afd5ad Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:26:10 2016 -0700 IB/hfi1: Remove snoop/diag interface The snoop/diag interface is better served by an implementation which is more general and usable by other drivers perhaps. Go ahead and remove the code now and get rid of the char dev. We can put the feature back when we have a more agreeable solution. Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/Makefile | 2 +- drivers/staging/rdma/hfi1/diag.c | 1925 ---------------------------------- drivers/staging/rdma/hfi1/file_ops.c | 9 +- 3 files changed, 2 insertions(+), 1934 deletions(-) commit d079031742023a00e1deda0fa847d403b4b91c76 Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:26:04 2016 -0700 IB/hfi1: Remove EPROM functionality from data device Remove EPROM handling from the cdev which is used for user application data traffic. Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/eprom.c | 369 ----------------------------------- drivers/staging/rdma/hfi1/file_ops.c | 23 --- include/uapi/rdma/hfi/hfi1_user.h | 7 - 3 files changed, 399 deletions(-) commit 7312f29d8ee5518c71572d7bfcbfcd5800b12d16 Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:25:57 2016 -0700 IB/hfi1: Remove UI char device Remove UI char device which exposes direct access to registers for user space. This was put in to aid in debugging the hardware. We are looking into alternatives means of providing the same functionality. This removes another char device from HFI1's footprint. Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/file_ops.c | 168 +---------------------------------- 1 file changed, 1 insertion(+), 167 deletions(-) commit 0eb626590dcf1280c6d01a784e9d53a3de6d5e8e Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:25:50 2016 -0700 IB/hfi1: Remove multiple device cdev hfi1 current exports a cdev that can be used to target all of the hfi's in the system. However there is a problem with this approach in that the devices could be on different subnets. This is a problem that user space can figure out and explicitly tell the driver on which device to create a context. Remove the multi-purpose cdev leaving a dedicated cdev for each port. Also remove the striping capability that is dependent upon the user choosing the multi-purpose cdev. It is now up to user space to determine how to stripe contexts. Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/file_ops.c | 102 +++++++---------------------------- include/uapi/rdma/hfi/hfi1_user.h | 19 +------ 2 files changed, 21 insertions(+), 100 deletions(-) commit f3225c3f1107104f5e143797550476182b844cfb Author: Dennis Dalessandro <dennis.dalessandro@intel.com> Date: Thu May 19 05:22:03 2016 -0700 IB/hfi1: Remove anti-pattern in cdev init Remove the usage of an anti-pattern goto in hfi1_cdev_init to improve code readability. Suggested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/device.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit b583faf4dc6eaa64895c37b81983e75a8c3c1e4e Author: Jianxin Xiong <jianxin.xiong@intel.com> Date: Thu May 19 05:21:57 2016 -0700 IB/hfi1: Fix bug that blocks process on exit after port bounce During the processing of a user SDMA request, if there was an error before the request counter was increased, the state of the packet queue could be updated incorrectly, causing the counter to underflow. As the result, the process could get stuck later since the counter could never get back to 0. This patch adds a condition to guard the packet queue update so that the counter is only decreased if it has been increased before the error happens. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/user_sdma.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f70f5f6af36bce29fe2c4bc733a223b5746eb65f Author: Jubin John <jubin.john@intel.com> Date: Thu May 19 05:21:50 2016 -0700 IB/qib: Remove unused qib_7322_intr_msgs[] Building the qib driver with gcc version 6.1.0 raises the following build warning: drivers/infiniband/hw/qib/qib_iba7322.c:1311:39: warning: 'qib_7322_intr_msgs' defined but not used [-Wunused-const-variable=] static const struct qib_hwerror_msgs qib_7322_intr_msgs[] = { ^~~~~~~~~~~~~~~~~~ Remove the unused qib_7322_intr_msgs[] Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/qib/qib_iba7322.c | 15 --------------- 1 file changed, 15 deletions(-) commit 46aa5baf96107bb35cc549ad1d19cf312dd5fb58 Author: Ira Weiny <ira.weiny@intel.com> Date: Thu May 19 05:21:44 2016 -0700 IB/hfi1: Remove unnecessary comment This comment was old, the MTU enums have been defined. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/qp.c | 3 --- 1 file changed, 3 deletions(-) commit eac7193632e64383e35fa387e683dd317b9df047 Author: Jubin John <jubin.john@intel.com> Date: Thu May 19 05:21:37 2016 -0700 IB/hfi1: Fix sdma_event_names[] build warning sdma_event_names[] is only used within CONFIG_SDMA_VERBOSITY ifdefs, so when CONFIG_SDMA_VERBOSITY is disabled, it results in the following 0-day build warning: >> drivers/infiniband/hw/hfi1/sdma.c:137:27: warning: 'sdma_event_names' >> defined but not used [-Wunused-const-variable=] static const char * const sdma_event_names[] = { ^~~~~~~~~~~~~~~~ This occurs on the following compiler: compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 For more information check: https://lists.01.org/pipermail/kbuild-all/2016-May/020060.html Fix this warning by defining sdma_event_name[] only within the CONFIG_SDMA_VERBOSITY ifdefs. Reported-by: kbuild test robot <fengguang.wu@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/sdma.c | 2 ++ 1 file changed, 2 insertions(+) commit 49961f8fe8264fa231fbdcc4ca52c6706fdb2577 Author: Jubin John <jubin.john@intel.com> Date: Thu May 19 05:21:31 2016 -0700 IB/rdmavt: Use kzalloc_node Use kzalloc_node instead of kzalloc for rdmavt memory region segment allocation to optimize for performance on NUMA platforms. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/sw/rdmavt/mr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 654b643670d82f14a62c888710e25248e03b0716 Author: Mike Marciniszyn <mike.marciniszyn@intel.com> Date: Thu May 19 05:21:25 2016 -0700 IB/rdmavt: Insure QP vmalloc variants zero memory The usage of the various vmalloc APIs do not consistently zero memory when allocating the swqe. Insure zeroing variants are used. Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/sw/rdmavt/qp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 9565c6a37a9d69f00e2a7dabbee2b4f6d20dc1ae Author: Mitko Haralanov <mitko.haralanov@intel.com> Date: Thu May 19 05:21:18 2016 -0700 IB/hfi1: Fix an interval RB node reference count leak Commit e88c9271d9f8 ("IB/hfi1: Fix buffer cache corner case which may cause corruption") introduced a bug which may cause a reference count of a interval RB node to be leaked in the case where an SDMA transfer from that node completes at the same time as the node is being extended. If a node is being extended, it is first removed from the RB tree in order to be processed without the risk of an invalidation event removing the node at the same time. If a SDMA completion happens during that time, the completion handler will fail to find the node in the RB tree and, therefore, fail to correctly decrement its refcount. This leaves the node in the tree and its pages pinned for the duration of the user process. To prevent this from happening the io vector adds a reference to the RB node, which is used during the SDMA completion instead of looking up the node in the RB tree. This change adds a performance improvement as a side effect by avoiding the RB tree lookup. Fixes: e88c9271d9f8 ("IB/hfi1: Fix buffer cache corner case which may cause corruption") Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Harish Chegondi <harish.chegondi@intel.com> Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/user_sdma.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) commit c7de5726307620711a4753b2a13d9e5daecc1081 Author: Ming Lin <ming.l@samsung.com> Date: Wed May 25 23:23:27 2016 -0700 blk-mq: clear q->mq_ops if init fail blk_mq_init_queue() calls blk_mq_init_allocated_queue(), but q->mq_ops was not cleared when blk_mq_init_allocated_queue() fails. Then blk_cleanup_queue() calls blk_mq_free_queue() which will crash because: - q->all_q_node is not added to all_q_list yet - q->tag_set is NULL - hctx was not setup yet or already freed Fixed it by clearing q->mq_ops on error path. Signed-off-by: Ming Lin <ming.l@samsung.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com> block/blk-mq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit c7d73af2d249f0323f5cdb171a59497ce80011fb Author: Tom Haynes <thomas.haynes@primarydata.com> Date: Wed May 25 07:31:14 2016 -0700 pnfs: pnfs_update_layout needs to consider if strict iomode checking is on As flexfiles has FF_FLAGS_NO_READ_IO, there is a need to generically support enforcing that a IOMODE_RW segment will not allow READ I/O. Signed-off-by: Tom Haynes <loghyr@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/filelayout/filelayout.c | 2 ++ fs/nfs/flexfilelayout/flexfilelayout.c | 49 +++++++++++++++++++++++++--------- fs/nfs/pnfs.c | 34 ++++++++++++++--------- fs/nfs/pnfs.h | 1 + 4 files changed, 61 insertions(+), 25 deletions(-) commit 602c4cd452d93355166daf8a662c84a5f85d2856 Author: Tom Haynes <thomas.haynes@primarydata.com> Date: Wed May 25 07:31:13 2016 -0700 nfs/flexfiles: Use the layout segment for reading unless it a IOMODE_RW and reading is disabled Signed-off-by: Tom Haynes <loghyr@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/flexfilelayout/flexfilelayout.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit bea8205feeb1d28841541814ae375defb5b1986b Merge: c4e85b7 f7aa23c Author: Mark Brown <broonie@kernel.org> Date: Thu May 26 11:13:12 2016 +0100 Merge branch 'asoc-fix-ep93xx' into spi-fix-ep93xx commit 1dc2c9f54b4b781f5630a042c14a7098beae0f3c Author: Glenn Dayton <glenn.dayton24@gmail.com> Date: Thu May 26 11:06:53 2016 +0200 Documentation/hwmon: Update links in max34440 It appears the website for maxim-ic.com changed to maximintegrated.com. Signed-off-by: Glenn Dayton <glenn.dayton24@gmail.com> Signed-off-by: Jean Delvare <jdelvare@suse.de> Documentation/hwmon/max34440 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 54f0ffc4e249b7f7e7fffb10c83e8de99aca839c Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Thu May 26 11:06:53 2016 +0200 hwmon: (emc2103) Fix typo in MODULE_PARM_DESC "apd" was intended here instead of "init". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Jean Delvare <jdelvare@suse.de> drivers/hwmon/emc2103.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 61248720c4efb54e32d90cbb2a2106dcc2128b00 Merge: bed187b f73a6f4 Author: David S. Miller <davem@davemloft.net> Date: Wed May 25 22:15:50 2016 -0700 Merge branch 'mlx4-stats-fixes' Eric Dumazet says: ==================== net/mlx4_en: fix stats mlx4 has various bugs in its ndo_get_stats() and related functions. This patch series address the obvious issues. Remaining ones will be discussed later. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit f73a6f439fca0e14f228726e5647d5afe141bc32 Author: Eric Dumazet <edumazet@google.com> Date: Wed May 25 09:50:39 2016 -0700 net/mlx4_en: get rid of private net_device_stats We simply can use the standard net_device stats. We do not need to clear fields that are already 0. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Willem de Bruijn <willemb@google.com> Cc: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 2 +- drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 3 +-- drivers/net/ethernet/mellanox/mlx4/en_port.c | 14 +++----------- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 - 4 files changed, 5 insertions(+), 15 deletions(-) commit 9ed17db17fb01a7be5b84558b768c091bdf8bb41 Author: Eric Dumazet <edumazet@google.com> Date: Wed May 25 09:50:38 2016 -0700 net/mlx4_en: get rid of ret_stats mlx4 uses a private struct net_device_stats in a vain attempt to avoid races. This is buggy because multiple cpus could call mlx4_en_get_stats() at the same time, so ret_stats can not guarantee stable results. To fix this, we need to switch to ndo_get_stats64() as this method provides per-thread storage. This allows to reduce mlx4_en_priv bloat. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Willem de Bruijn <willemb@google.com> Cc: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 11 ++++++----- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) commit 45acbac609e73991dd9c3c9b7ffd03ddb8c939ef Author: Eric Dumazet <edumazet@google.com> Date: Wed May 25 09:50:37 2016 -0700 net/mlx4_en: clear some TX ring stats in mlx4_en_clear_stats() mlx4_en_clear_stats() clears about everything but few TX ring fields are missing : - queue_stopped, wake_queue, tso_packets, xmit_more Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Willem de Bruijn <willemb@google.com> Cc: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 ++++ 1 file changed, 4 insertions(+) commit 63a664b7e92b14aaa1e1c3e9ae362aa70cf4cefb Author: Eric Dumazet <edumazet@google.com> Date: Wed May 25 09:50:36 2016 -0700 net/mlx4_en: fix tx_dropped bug 1) mlx4_en_xmit() can increment priv->stats.tx_dropped, but this variable is overwritten in mlx4_en_DUMP_ETH_STATS(). 2) This increment was not SMP safe, as a port might have many TX queues. Add a per TX ring tx_dropped to fix these issues. This is u32 as mlx4_en_DUMP_ETH_STATS() will add a 32bit field. So lets avoid bugs with SNMP agents having to cope with partial overwraps. (One of these agents being bond_fold_stats()) Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Willem de Bruijn <willemb@google.com> Cc: Eugenia Emantayev <eugenia@mellanox.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 1 + drivers/net/ethernet/mellanox/mlx4/en_port.c | 4 +++- drivers/net/ethernet/mellanox/mlx4/en_tx.c | 8 ++++---- drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 1 + 4 files changed, 9 insertions(+), 5 deletions(-) commit bed187b540167eb10320f6a2177604421650772e Author: Xin Long <lucien.xin@gmail.com> Date: Thu May 26 03:09:23 2016 +0800 sctp: fix double EPs display in sctp_diag We have this situation: that EP hash table, contains only the EPs that are listening, while the transports one, has the opposite. We have to traverse both to dump all. But when we traverse the transports one we will also get EPs that are in the EP hash if they are listening. In this case, the EP is dumped twice. We will fix it by checking if the endpoint that is in the endpoint hash table contains any ep->asoc in there, as it means we will also find it via transport hash, and thus we can/should skip it, depending on the filters used, like 'ss -l'. Still, we should NOT skip it if the user is listing only listening endpoints, because then we are not traversing the transport hash. so we have to check idiag_states there also. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/sctp/sctp_diag.c | 3 +++ 1 file changed, 3 insertions(+) commit 3424d9be8f09649e6290d066c5c3cccff1c0ce77 Author: Marek Vasut <marex@denx.de> Date: Thu May 26 00:40:05 2016 +0200 net: arc: trivial: Replace comma with a semicolon Fix a typo in the driver, replace comma with a semicolon at the end of statement. While using comma is a legal C here and probably does not even generate compiler warning, it was unlikely the intention. Signed-off-by: Marek Vasut <marex@denx.de> Cc: David S. Miller <davem@davemloft.net> Cc: Caesar Wang <wxt@rock-chips.com> Cc: Heiko Stuebner <heiko@sntech.de> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/arc/emac_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 643d60bf575daaba93c1ac0d0e1c4b1d4ded1f75 Author: Marek Vasut <marex@denx.de> Date: Thu May 26 00:40:23 2016 +0200 net: stmmac: Fix incorrect memcpy source memory The memcpy() currently copies mdio_bus_data into new_bus->irq, which makes no sense, since the mdio_bus_data structure contains more than just irqs. The code was likely supposed to copy mdio_bus_data->irqs into the new_bus->irq instead, so fix this. Fixes: e7f4dc3536a4 ("mdio: Move allocation of interrupts into core") Signed-off-by: Marek Vasut <marex@denx.de> Cc: David S. Miller <davem@davemloft.net> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com> Cc: Alexandre Torgue <alexandre.torgue@st.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 002354112f1e3cc7400ef48b853aefb90e801588 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 26 00:05:12 2016 -0400 restore killability of old mutex_lock_killable(&inode->i_mutex) users The ones that are taking it exclusive, that is... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/btrfs/ioctl.c | 18 +++++++----------- fs/overlayfs/readdir.c | 4 +--- fs/readdir.c | 12 ++++++------ 3 files changed, 14 insertions(+), 20 deletions(-) commit 887bddfa90c79957d61067cd54a10087be0c8b23 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 26 00:04:58 2016 -0400 add down_write_killable_nested() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> include/linux/rwsem.h | 2 ++ kernel/locking/rwsem.c | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) commit d42b386834ee1c22f6fac2f856bba8a6e4de38bb Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 26 00:04:18 2016 -0400 update D/f/directory-locking Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Documentation/filesystems/directory-locking | 32 ++++++++++++++++++----------- 1 file changed, 20 insertions(+), 12 deletions(-) commit 53b74ed2d0b4170764bf6d4cba6b786be1cab846 Author: Wenyou Yang <wenyou.yang@atmel.com> Date: Mon May 9 14:51:18 2016 +0800 Revert "mtd: atmel_nand: Support variable RB_EDGE interrupts" This reverts commit 5ddc7bd43ccc ("mtd: atmel_nand: Support variable RB_EDGE interrupts") Because for current SoCs, the RB_EDGE3(i.e. bit 27) of HSMC_SR register does not exist, the RB_EDGE0 (i.e. bit 24) is the ready/busy line edge status bit. It is a datasheet bug. Cc: <stable@vger.kernel.org> Fixes: commit 5ddc7bd43ccc ("mtd: atmel_nand: Support variable RB_EDGE interrupts") Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> .../devicetree/bindings/mtd/atmel-nand.txt | 2 +- drivers/mtd/nand/atmel_nand.c | 35 +++++----------------- drivers/mtd/nand/atmel_nand_nfc.h | 3 +- 3 files changed, 10 insertions(+), 30 deletions(-) commit 2f7c3a18a2dc79ddf7b83ae199b099a675e1adb2 Merge: f89eae4 dc4fac8 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 17:37:33 2016 -0700 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: "Misc fixes: EFI, entry code, pkeys and MPX fixes, TASK_SIZE cleanups and a tsc frequency table fix" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Switch from TASK_SIZE to TASK_SIZE_MAX in the page fault code x86/fsgsbase/64: Use TASK_SIZE_MAX for FSBASE/GSBASE upper limits x86/mm/mpx: Work around MPX erratum SKD046 x86/entry/64: Fix stack return address retrieval in thunk x86/efi: Fix 7-parameter efi_call()s x86/cpufeature, x86/mm/pkeys: Fix broken compile-time disabling of pkeys x86/tsc: Add missing Cherrytrail frequency to the table commit f89eae4ee7e075e576bd4b4d2db901023421a3be Merge: bdc6b75 b7e7ade Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 17:11:43 2016 -0700 Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: "Two fixes: one for a lost wakeup, the other to fix the compiler optimizing out preempt operations on ARM64 (and possibly other non-x86 architectures)" * 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/core: Fix remote wakeups sched/preempt: Fix preempt_count manipulations commit bdc6b758e443c21c39a14c075e5b7e01f095b37b Merge: c4a3460 0c9f790 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 17:05:40 2016 -0700 Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "Mostly tooling and PMU driver fixes, but also a number of late updates such as the reworking of the call-chain size limiting logic to make call-graph recording more robust, plus tooling side changes for the new 'backwards ring-buffer' extension to the perf ring-buffer" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (34 commits) perf record: Read from backward ring buffer perf record: Rename variable to make code clear perf record: Prevent reading invalid data in record__mmap_read perf evlist: Add API to pause/resume perf trace: Use the ptr->name beautifier as default for "filename" args perf trace: Use the fd->name beautifier as default for "fd" args perf report: Add srcline_from/to branch sort keys perf evsel: Record fd into perf_mmap perf evsel: Add overwrite attribute and check write_backward perf tools: Set buildid dir under symfs when --symfs is provided perf trace: Only auto set call-graph to "dwarf" when syscalls are being traced perf annotate: Sort list of recognised instructions perf annotate: Fix identification of ARM blt and bls instructions perf tools: Fix usage of max_stack sysctl perf callchain: Stop validating callchains by the max_stack sysctl perf trace: Fix exit_group() formatting perf top: Use machine->kptr_restrict_warned perf trace: Warn when trying to resolve kernel addresses with kptr_restrict=1 perf machine: Do not bail out if not managing to read ref reloc symbol perf/x86/intel/p4: Trival indentation fix, remove space ... commit dca6b4149181baaa363b9a7ce7c550840bb3bc83 Author: Jann Horn <jann@thejh.net> Date: Sun May 22 06:01:34 2016 +0200 Yama: fix double-spinlock and user access in atomic context Commit 8a56038c2aef ("Yama: consolidate error reporting") causes lockups when someone hits a Yama denial. Call chain: process_vm_readv -> process_vm_rw -> process_vm_rw_core -> mm_access -> ptrace_may_access task_lock(...) is taken __ptrace_may_access -> security_ptrace_access_check -> yama_ptrace_access_check -> report_access -> kstrdup_quotable_cmdline -> get_cmdline -> access_process_vm -> get_task_mm task_lock(...) is taken again task_lock(p) just calls spin_lock(&p->alloc_lock), so at this point, spin_lock() is called on a lock that is already held by the current process. Also: Since the alloc_lock is a spinlock, sleeping inside security_ptrace_access_check hooks is probably not allowed at all? So it's not even possible to print the cmdline from in there because that might involve paging in userspace memory. It would be tempting to rewrite ptrace_may_access() to drop the alloc_lock before calling the LSM, but even then, ptrace_may_access() itself might be called from various contexts in which you're not allowed to sleep; for example, as far as I understand, to be able to hold a reference to another task, usually an RCU read lock will be taken (see e.g. kcmp() and get_robust_list()), so that also prohibits sleeping. (And using e.g. FUSE, a user can cause pagefault handling to take arbitrary amounts of time - see https://bugs.chromium.org/p/project-zero/issues/detail?id=808.) Therefore, AFAIK, in order to print the name of a process below security_ptrace_access_check(), you'd have to either grab a reference to the mm_struct and defer the access violation reporting or just use the "comm" value that's stored in kernelspace and accessible without big complications. (Or you could try to use some kind of atomic remote VM access that fails if the memory isn't paged in, similar to copy_from_user_inatomic(), and if necessary fall back to comm, but that'd be kind of ugly because the comm/cmdline choice would look pretty random to the user.) Fix it by deferring reporting of the access violation until current exits kernelspace the next time. v2: Don't oops on PTRACE_TRACEME, call report_access under task_lock(current). Also fix nonsensical comment. And don't use GPF_ATOMIC for memory allocation with no locks held. This patch is tested both for ptrace attach and ptrace traceme. Fixes: 8a56038c2aef ("Yama: consolidate error reporting") Signed-off-by: Jann Horn <jann@thejh.net> Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: James Morris <james.l.morris@oracle.com> security/yama/yama_lsm.c | 69 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 63 insertions(+), 6 deletions(-) commit 26c5f03b2ae8018418ceb25b2e6a48560e8c2f5b Author: Feng Tang <feng.tang@intel.com> Date: Wed May 25 14:49:54 2016 +0800 net: alx: use custom skb allocator This patch follows Eric Dumazet's commit 7b70176421 for Atheros atl1c driver to fix one exactly same bug in alx driver, that the network link will be lost in 1-5 minutes after the device is up. My laptop Lenovo Y580 with Atheros AR8161 ethernet device hit the same problem with kernel 4.4, and it will be cured by Jarod Wilson's commit c406700c for alx driver which get merged in 4.5. But there are still some alx devices can't function well even with Jarod's patch, while this patch could make them work fine. More details on https://bugzilla.kernel.org/show_bug.cgi?id=70761 The debug shows the issue is very likely to be related with the RX DMA address, specifically 0x...f80, if RX buffer get 0x...f80 several times, their will be RX overflow error and device will stop working. For kernel 4.5.0 with Jarod's patch which works fine with my AR8161/Lennov Y580, if I made some change to the __netdev_alloc_skb --> __alloc_page_frag() to make the allocated buffer can get an address with 0x...f80, then the same error happens. If I make it to 0x...f40 or 0x....fc0, everything will be still fine. So I tend to believe that the 0x..f80 address cause the silicon to behave abnormally. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=70761 Cc: Eric Dumazet <edumazet@google.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Jarod Wilson <jarod@redhat.com> Signed-off-by: Feng Tang <feng.tang@intel.com> Tested-by: Ole Lukoie <olelukoie@mail.ru> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/atheros/alx/alx.h | 4 +++ drivers/net/ethernet/atheros/alx/main.c | 48 ++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) commit c4a346002bc06046bc51910a7ade3a0c650c3d34 Merge: 0985b65 2e51f26 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 16:52:19 2016 -0700 Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull objtool build fix from Ingo Molnar: "An libtool fix for older libelf versions" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Allow building with older libelf commit e536030934aebf049fe6aaebc58dd37aeee21840 Author: Yan, Zheng <zyan@redhat.com> Date: Thu May 19 19:15:19 2016 +0800 ceph: fix wake_up_session_cb() We should reset i_requested_max_size before waking the waiters. (zero i_requested_max_size make waiter re-request the max size) Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/mds_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9abd4db713704aac146395e079224ddd716e9b95 Author: Yan, Zheng <zyan@redhat.com> Date: Wed May 18 20:58:26 2016 +0800 ceph: don't use truncate_pagecache() to invalidate read cache truncate_pagecache() drops dirty pages, it's dangerous to use it to invalidate read cache. Besides, we shouldn't start invalidating read cache while there are buffer writers. Because buffer writers may add dirty pages later. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/caps.c | 8 ++++---- fs/ceph/inode.c | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) commit b109eec6f4332bd517e2f41e207037c4b9065094 Author: Yan, Zheng <zyan@redhat.com> Date: Fri May 13 17:54:17 2016 +0800 ceph: SetPageError() for writeback pages if writepages fails Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/addr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit ad15ec06e51b6eb73981428109e32c75cbad7d3d Author: Yan, Zheng <zyan@redhat.com> Date: Fri May 13 17:29:51 2016 +0800 ceph: handle interrupted ceph_writepage() writepage() can be interrupted when it's called by direct memory reclaimer (the direct memory relaimer is killed). To avoid lossing data, we redirty the page. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/addr.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit a78bbd4b29c29784f0addb5e3b35790c7ed178ae Author: Yan, Zheng <zyan@redhat.com> Date: Fri May 13 11:30:24 2016 +0800 ceph: make ceph_update_writeable_page() uninterruptible ceph_update_writeable_page() is used by ceph_write_begin(). It beaks atomicity of write operation if it's interruptible. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e76abf21e769245b6eebb27b439ad014ac49292 Author: Yan, Zheng <zyan@redhat.com> Date: Fri May 13 11:04:33 2016 +0800 libceph: make ceph_osdc_wait_request() uninterruptible Ceph_osdc_wait_request() is used when cephfs issues sync IO. In most cases, the sync IO should be uninterruptible. The fix is use killale wait function in ceph_osdc_wait_request(). Signed-off-by: Yan, Zheng <zyan@redhat.com> net/ceph/osd_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0b33df57a5f03c637f75ead7cb4d978c59cc63d Author: Yan, Zheng <zyan@redhat.com> Date: Tue May 10 19:09:06 2016 +0800 ceph: handle -EAGAIN returned by ceph_update_writeable_page() when ceph_update_writeable_page() return -EAGAIN, caller should lock the page and call ceph_update_writeable_page() again. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/addr.c | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) commit 6ce026e411c4f36c9e51189d28a5dd9d08095b9d Author: Yan, Zheng <zyan@redhat.com> Date: Tue May 10 18:59:13 2016 +0800 ceph: make fault/page_mkwrite return VM_FAULT_OOM for -ENOMEM Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/addr.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 4f7e89f6ace0f6cd2f20110efd2d405e26bcbf31 Author: Yan, Zheng <zyan@redhat.com> Date: Tue May 10 18:40:28 2016 +0800 ceph: block non-fatal signals for fault/page_mkwrite Fault and page_mkwrite are supposed to be uninterruptable. But they call ceph functions that are interruptible. So they should block signals before calling functions that are interruptible Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/addr.c | 66 ++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 39 insertions(+), 27 deletions(-) commit 3b33f692c84c28cc8178aaeeb9264d82b48787f1 Author: Zhang Zhuoyu <zhangzhuoyu@cmss.chinamobile.com> Date: Fri Mar 25 05:18:39 2016 -0400 ceph: make logical calculation functions return bool This patch makes serverl logical caculation functions return bool to improve readability due to these particular functions only using 0/1 as their return value. No functional change. Signed-off-by: Zhang Zhuoyu <zhangzhuoyu@cmss.chinamobile.com> fs/ceph/cache.c | 2 +- fs/ceph/dir.c | 2 +- include/linux/ceph/ceph_frag.h | 4 ++-- include/linux/ceph/decode.h | 2 +- include/linux/ceph/osdmap.h | 6 +++--- net/ceph/ceph_common.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) commit 224a7542b8fdde3cc7c600f8b0870c5541a9f678 Author: Yan, Zheng <zyan@redhat.com> Date: Thu May 5 16:40:17 2016 +0800 ceph: tolerate bad i_size for symlink inode A mds bug can cause symlink's size to be truncated to zero. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/inode.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 1b1bc16d66a7c7af3b4f30d1cf5a363168b217f4 Author: Yan, Zheng <zyan@redhat.com> Date: Wed May 4 11:40:30 2016 +0800 ceph: improve fragtree change detection check if number of splits in i_fragtree is equal to number of splits in mds reply Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/inode.c | 24 ++++++++++++++++++++---- fs/ceph/super.h | 1 + 2 files changed, 21 insertions(+), 4 deletions(-) commit a4b7431f39438f415cef1fa28502ec58016686f7 Author: Yan, Zheng <zyan@redhat.com> Date: Wed May 4 11:05:10 2016 +0800 ceph: keep leaf frag when updating fragtree Nodes in i_fragtree are sorted according to ceph_compare_frag(). It means frag node in i_fragtree always follow its direct parent node. To check if a leaf node is valid, we just need to check if it's child of previous split node. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/inode.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 421721195a68f46a8218c664154076b5b06f5f51 Author: Yan, Zheng <zyan@redhat.com> Date: Tue May 3 22:33:20 2016 +0800 ceph: fix dir_auth check in ceph_fill_dirfrag() -1 is CDIR_AUTH_PARENT, it means dir's auth mds is the same as inode's auth mds Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/inode.c | 3 +++ 1 file changed, 3 insertions(+) commit a407846ef7c6e7905ab0d1ebc0c86fbebb065b87 Author: Yan, Zheng <zyan@redhat.com> Date: Tue May 3 20:55:50 2016 +0800 ceph: don't assume frag tree splits in mds reply are sorted The algorithm that updates i_fragtree relies on that the frag tree splits in mds reply are of the same order of i_fragtree. This is not true because current MDS encodes frag tree splits in ascending order of (unsigned)frag_t. But nodes in i_fragtree are sorted according to ceph_frag_compare(). The fix is sort the frag tree splits first, then updates i_fragtree. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/inode.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 209ae762a64397557be2bc48490fd968912e9a71 Author: Yan, Zheng <zyan@redhat.com> Date: Fri Apr 29 23:40:23 2016 +0800 ceph: fix inode reference leak Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f3c4ebe65ea149ec892f94474233cfebe9cbe299 Author: Yan, Zheng <zyan@redhat.com> Date: Fri Apr 29 11:27:30 2016 +0800 ceph: using hash value to compose dentry offset If MDS sorts dentries in dirfrag in hash order, we use hash value to compose dentry offset. dentry offset is: (0xff << 52) | ((24 bits hash) << 28) | (the nth entry hash hash collision) This offset is stable across directory fragmentation. This alos means there is no need to reset readdir offset if directory get fragmented in the middle of readdir. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/dir.c | 140 ++++++++++++++++++++++++++++++++----------- fs/ceph/inode.c | 31 ++++++++-- fs/ceph/mds_client.c | 1 + fs/ceph/mds_client.h | 4 +- fs/ceph/super.h | 6 +- include/linux/ceph/ceph_fs.h | 1 + 6 files changed, 136 insertions(+), 47 deletions(-) commit 076c40f18d10489e29c515bf5936952830df5e16 Author: Yan, Zheng <zyan@redhat.com> Date: Thu Apr 28 22:56:44 2016 +0800 ceph: don't forbid marking directory complete after forward seek Forward seek within same frag does not update fi->last_name, it will not affect contents of later readdir reply. So there is no need to forbid marking directory complete Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/dir.c | 5 ----- 1 file changed, 5 deletions(-) commit 8974eebd38737c9534d81c4131c5fdb1fe24d3e9 Author: Yan, Zheng <zyan@redhat.com> Date: Thu Apr 28 15:17:40 2016 +0800 ceph: record 'offset' for each entry of readdir result This is preparation for using hash value as dentry 'offset' Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/dir.c | 83 ++++++++++++++++++++++++++++++++++------------------ fs/ceph/inode.c | 1 + fs/ceph/mds_client.c | 2 ++ fs/ceph/mds_client.h | 1 + fs/ceph/super.h | 1 - 5 files changed, 59 insertions(+), 29 deletions(-) commit 956d39d631dbcf7b57854873a24e309047f2a7f5 Author: Yan, Zheng <zyan@redhat.com> Date: Wed Apr 27 17:48:30 2016 +0800 ceph: define 'end/complete' in readdir reply as bit flags Set a flag in readdir request, which indicates that client interprets 'end/complete' as bit flags. So that mds can reply additional flags in readdir reply. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/dir.c | 2 ++ fs/ceph/mds_client.c | 7 +++++-- fs/ceph/mds_client.h | 2 +- include/linux/ceph/ceph_fs.h | 12 ++++++++++++ 4 files changed, 20 insertions(+), 3 deletions(-) commit 2a5beea3f1b6544d6c72ea220e860a2eda2f9104 Author: Yan, Zheng <zyan@redhat.com> Date: Thu Apr 28 09:37:39 2016 +0800 ceph: define struct for dir entry in readdir reply This avoids defining multiple arrays for entries in readdir reply Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/dir.c | 27 ++++++++++++--------------- fs/ceph/inode.c | 21 +++++++++++---------- fs/ceph/mds_client.c | 42 +++++++++++++++++++----------------------- fs/ceph/mds_client.h | 12 ++++++++---- 4 files changed, 50 insertions(+), 52 deletions(-) commit a78600e7c4fb47fb5ef34265456b731fde27a9c3 Author: Yan, Zheng <zyan@redhat.com> Date: Wed Apr 27 17:32:34 2016 +0800 ceph: simplify 'offset in frag' don't distinguish leftmost frag from other frags. always use 2 as first entry's offset. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/dir.c | 12 +++--------- fs/ceph/inode.c | 5 +---- 2 files changed, 4 insertions(+), 13 deletions(-) commit 1cd42a429174689c0df1c37b642654a1ab4d1506 Author: Yan, Zheng <zyan@redhat.com> Date: Fri Apr 29 15:58:32 2016 +0800 ceph: remove unnecessary checks in __dcache_readdir we never add snapdir and the hidden .ceph dir into readdir cache Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/dir.c | 2 -- 1 file changed, 2 deletions(-) commit c530cd24c23818af8da35fe556f9a7754211e50a Author: Yan, Zheng <zyan@redhat.com> Date: Thu Apr 28 17:43:35 2016 +0800 ceph: search cache postion for dcache readdir use binary search to find cache index that corresponds to readdir postion. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/dir.c | 129 +++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 46 deletions(-) commit 04303d8ad06985bed4ea4f46018fc8f55a0962a8 Author: Yan, Zheng <zyan@redhat.com> Date: Thu Apr 21 12:11:54 2016 +0800 ceph: use CEPH_MDS_OP_RMXATTR request to remove xattr Setxattr with NULL value and XATTR_REPLACE flag should be equivalent to removexattr. But current MDS does not support deleting vxattrs through MDS_OP_SETXATTR request. The workaround is sending MDS_OP_RMXATTR request if setxattr actually removs xattr. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/xattr.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 3f38495409b613071021fca86629df7ae81820ad Author: Yan, Zheng <zyan@redhat.com> Date: Thu Apr 21 11:09:55 2016 +0800 ceph: report mount root in session metadata Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/mds_client.c | 4 +++- fs/ceph/super.c | 33 +++++++++++++++++++-------------- fs/ceph/super.h | 1 + 3 files changed, 23 insertions(+), 15 deletions(-) commit aeda081c5eb3d7668b64e2dc9bfc0bf30ef53632 Author: Yan, Zheng <zyan@redhat.com> Date: Mon Apr 18 16:51:37 2016 +0800 ceph: don't show symlink target in debugfs/mdsc symlink target is useless for debug and can be very long. It's annoying to show it in debugfs/mdsc. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c93df5db628e710697c43bc1bd78a786549a548 Author: Yan, Zheng <zyan@redhat.com> Date: Fri Apr 15 13:56:12 2016 +0800 ceph: don't call truncate_pagecache in ceph_writepages_start truncate_pagecache() may decrease inode's reference. This can cause deadlock if inode's last reference is dropped and iput_final() wants to evict the inode. (evict() calls inode_wait_for_writeback(), which waits for ceph_writepages_start() to return). The fix is use work thead to truncate dirty pages. Also add 'forced umount' check to ceph_update_writeable_page(), which prevents new pages getting dirty. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/addr.c | 14 ++++++++++++-- fs/ceph/inode.c | 11 +++++++++++ fs/ceph/mds_client.c | 22 +++++++++++++++------- 3 files changed, 38 insertions(+), 9 deletions(-) commit 77310320c299b0dc050037ff8fc29fd1861fb005 Author: Yan, Zheng <zyan@redhat.com> Date: Fri Apr 8 15:27:16 2016 +0800 ceph: renew caps for read/write if mds session got killed. When mds session gets killed, read/write operation may hang. Client waits for Frw caps, but mds does not know what caps client wants. To recover this, client sends an open request to mds. The request will tell mds what caps client wants. Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/caps.c | 43 ++++++++++++++++++++++++++++++++---------- fs/ceph/file.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ fs/ceph/mds_client.c | 6 +++++- fs/ceph/super.h | 2 ++ 4 files changed, 93 insertions(+), 11 deletions(-) commit d463a43d69f4af85887671d76182437775fd1631 Author: Yan, Zheng <zyan@redhat.com> Date: Thu Mar 31 15:53:01 2016 +0800 ceph: CEPH_FEATURE_MDSENC support Signed-off-by: Yan, Zheng <zyan@redhat.com> fs/ceph/mdsmap.c | 43 ++++++++++++++++++++++++++++++++++--------- fs/ceph/super.c | 5 ++--- 2 files changed, 36 insertions(+), 12 deletions(-) commit 235a09821c2bc71d9d07f12217ce2ac00db99eba Author: Yan, Zheng <zyan@redhat.com> Date: Wed Mar 30 17:18:34 2016 +0800 ceph: multiple filesystem support To access non-default filesystem, we just need to subscribe to mdsmap.<MDS_NAMESPACE_ID> and add a new mount option for mds namespace id. Signed-off-by: Yan, Zheng <zyan@redhat.com> [idryomov@gmail.com: switch to a new libceph API] Signed-off-by: Ilya Dryomov <idryomov@gmail.com> fs/ceph/super.c | 9 +++++++++ fs/ceph/super.h | 1 + 2 files changed, 10 insertions(+) commit 737cc81ead34bcef0b1f6ea8322228e4378cf21a Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu May 26 00:05:01 2016 +0200 libceph: support for subscribing to "mdsmap.<id>" maps Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/ceph_fs.h | 2 ++ include/linux/ceph/mon_client.h | 1 + net/ceph/debugfs.c | 1 + net/ceph/mon_client.c | 18 +++++++++++++----- 4 files changed, 17 insertions(+), 5 deletions(-) commit 7cca78c9dcd1afa243e46edc31896730df85d2b5 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:28 2016 +0200 libceph: replace ceph_monc_request_next_osdmap() ... with a wrapper around maybe_request_map() - no need for two osdmap-specific functions. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 2 +- include/linux/ceph/mon_client.h | 1 - include/linux/ceph/osd_client.h | 1 + net/ceph/mon_client.c | 14 -------------- net/ceph/osd_client.c | 7 +++++++ 5 files changed, 9 insertions(+), 16 deletions(-) commit b4f34795697de9d1ee84a10c8439b4b9970ebd96 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:27 2016 +0200 libceph: take osdc->lock in osdmap_show() and dump flags in hex There is now about a dozen CEPH_OSDMAP_* flags. This is a debugging interface, so just dump in hex instead of spelling each flag out. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/debugfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 4609245e2670e3698b083bcd9cc69a65b2b6f9a6 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:27 2016 +0200 libceph: pool deletion detection This adds the "map check" infrastructure for sending osdmap version checks on CALC_TARGET_POOL_DNE and completing in-flight requests with -ENOENT if the target pool doesn't exist or has just been deleted. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/osd_client.h | 6 + net/ceph/osd_client.c | 248 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 248 insertions(+), 6 deletions(-) commit d0b19705e99939f5ae5aa9b57bfe41dd4777d951 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:27 2016 +0200 libceph: async MON client generic requests For map check, we are going to need to send CEPH_MSG_MON_GET_VERSION messages asynchronously and get a callback on completion. Refactor MON client to allow firing off generic requests asynchronously and add an async variant of ceph_monc_get_version(). ceph_monc_do_statfs() is switched over and remains sync. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 4 +- include/linux/ceph/mon_client.h | 19 ++- net/ceph/mon_client.c | 316 ++++++++++++++++++++++++++-------------- 3 files changed, 228 insertions(+), 111 deletions(-) commit b07d3c4bd7270c74e2b6803af8ac8a00cb3e5ed2 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:27 2016 +0200 libceph: support for checking on status of watch Implement ceph_osdc_watch_check() to be able to check on status of watch. Note that the time it takes for a watch/notify event to get delivered through the notify_wq is taken into account. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/osd_client.h | 4 ++++ net/ceph/osd_client.c | 52 ++++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) commit 1907920324f1f3ebb6618344417c03a2863bba01 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:27 2016 +0200 libceph: support for sending notifies Implement ceph_osdc_notify() for sending notifies. Due to the fact that the current messenger can't do read-in into pagelists (it can only do write-out from them), I had to go with a page vector for a NOTIFY_COMPLETE payload, for now. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/osd_client.h | 20 ++++ include/linux/ceph/rados.h | 3 + net/ceph/debugfs.c | 5 +- net/ceph/osd_client.c | 232 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 249 insertions(+), 11 deletions(-) commit 922dab6134178cae317ae00de86376cba59f3147 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu May 26 01:15:02 2016 +0200 libceph, rbd: ceph_osd_linger_request, watch/notify v2 This adds support and switches rbd to a new, more reliable version of watch/notify protocol. As with the OSD client update, this is mostly about getting the right structures linked into the right places so that reconnects are properly sent when needed. watch/notify v2 also requires sending regular pings to the OSDs - send_linger_ping(). A major change from the old watch/notify implementation is the introduction of ceph_osd_linger_request - linger requests no longer piggy back on ceph_osd_request. ceph_osd_event has been merged into ceph_osd_linger_request. All the details are now hidden within libceph, the interface consists of a simple pair of watch/unwatch functions and ceph_osdc_notify_ack(). ceph_osdc_watch() does return ceph_osd_linger_request, but only to keep the lifetime management simple. ceph_osdc_notify_ack() accepts an optional data payload, which is relayed back to the notifier. Portions of this patch are loosely based on work by Douglas Fuller <dfuller@redhat.com> and Mike Christie <michaelc@cs.wisc.edu>. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 179 ++---- include/linux/ceph/ceph_fs.h | 5 +- include/linux/ceph/osd_client.h | 97 ++-- include/linux/ceph/rados.h | 17 +- net/ceph/ceph_strings.c | 16 + net/ceph/debugfs.c | 36 ++ net/ceph/osd_client.c | 1148 ++++++++++++++++++++++++++++++--------- 7 files changed, 1067 insertions(+), 431 deletions(-) commit c525f03601f52c83ded046624138f2a45e0ba56c Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:26 2016 +0200 rbd: rbd_dev_header_unwatch_sync() variant Introduce __rbd_dev_header_unwatch_sync(), which doesn't flush notify callbacks. This is for the new rados_watcherrcb_t, which would be called from a notify callback. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) commit 42b0696527c49a109e9558162b8d109ae257d402 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:26 2016 +0200 libceph: wait_request_timeout() The unwatch timeout is currently implemented in rbd. With watch/unwatch code moving into libceph, we are going to need a ceph_osdc_wait_request() variant with a timeout. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit 3540bfdb30fcb423a92cc959708e71bc39eb18c3 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:26 2016 +0200 libceph: request_init() and request_release_checks() These are going to be used by request_reinit() code. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) commit 5aea3dcd50215fa9563270251ad7323e2f2490ee Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:26 2016 +0200 libceph: a major OSD client update This is a major sync up, up to ~Jewel. The highlights are: - per-session request trees (vs a global per-client tree) - per-session locking (vs a global per-client rwlock) - homeless OSD session - no ad-hoc global per-client lists - support for pool quotas - foundation for watch/notify v2 support - foundation for map check (pool deletion detection) support The switchover is incomplete: lingering requests can be setup and teared down but aren't ever reestablished. This functionality is restored with the introduction of the new lingering infrastructure (ceph_osd_linger_request, linger_work, etc) in a later commit. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> fs/ceph/ioctl.c | 8 +- fs/ceph/xattr.c | 8 +- include/linux/ceph/osd_client.h | 18 +- net/ceph/debugfs.c | 34 +- net/ceph/osd_client.c | 1164 +++++++++++++++++++-------------------- 5 files changed, 602 insertions(+), 630 deletions(-) commit 9dd2845ccb40452d4ac943231ea34aade4a02c68 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:26 2016 +0200 libceph: protect osdc->osd_lru list with a spinlock OSD client is getting moved from the big per-client lock to a set of per-session locks. The big rwlock would only be held for read most of the time, so a global osdc->osd_lru needs additional protection. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/osd_client.h | 1 + net/ceph/osd_client.c | 29 ++++++++++++++++++----------- 2 files changed, 19 insertions(+), 11 deletions(-) commit 7a28f59bf9fb220cdf56ac6ab539fc4a0ae59414 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:25 2016 +0200 libceph: allocate ceph_osd with GFP_NOFAIL create_osd() is called way too deep in the stack to be able to error out in a sane way; a failing create_osd() just messes everything up. The current req_notarget list solution is broken - the list is never traversed as it's not entirely clear when to do it, I guess. If we were to start traversing it at regular intervals and retrying each request, we wouldn't be far off from what __GFP_NOFAIL is doing, so allocate OSD sessions with __GFP_NOFAIL, at least until we come up with a better fix. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 0247a0cf3e777932a0cae37ab1d8055a3881458c Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:25 2016 +0200 libceph: osd_init() and osd_cleanup() These are going to be used by homeless OSD sessions code. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 46 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 9 deletions(-) commit 42c1b1240326cbea86f15f5d4ce565d8b54be31f Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:25 2016 +0200 libceph: handle_one_map() Separate osdmap handling from decoding and iterating over a bag of maps in a fresh MOSDMap message. This sets up the scene for the updated OSD client. Of particular importance here is the addition of pi->was_full, which can be used to answer "did this pool go full -> not-full in this map?". This is the key bit for supporting pool quotas. We won't be able to downgrade map_sem for much longer, so drop downgrade_write(). Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/mon_client.h | 1 + include/linux/ceph/osdmap.h | 2 + net/ceph/mon_client.c | 8 ++ net/ceph/osd_client.c | 186 ++++++++++++++++++++++++++++------------ 4 files changed, 141 insertions(+), 56 deletions(-) commit 0985b65d3ba2c09f10a594b73df45c1f7f68d317 Merge: 55c1c7b2 19f1845 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 15:59:09 2016 -0700 Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs iov_iter regression fix from Al Viro: "Fix for braino in 'fold checks into iterate_and_advance()'" * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: do "fold checks into iterate_and_advance()" right commit 55c1c7b2b66e3011f981d81aaf21fa810935908a Merge: e92677d 0040773 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 15:54:35 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs xattr regression fixes from Al Viro. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: make xattr_resolve_handlers() safe to use with NULL ->s_xattr xattr: Fail with -EINVAL for NULL attribute names commit e92677dfce88b96ade9100c77eb3f76d98d29d74 Merge: 877c057 0cc4b48 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 15:38:56 2016 -0700 Merge tag 'acpi-4.7-rc1-more' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI fix from Rafael Wysocki: "Additional ACPI update for v4.7-rc1 Just one fix for incorrect async_synchronize_cookie() usage in the ACPI battery driver (Chris Wilson)" * tag 'acpi-4.7-rc1-more' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / battery: Correctly serialise with the pending async probe commit e5253a7bde13788d9dc75f42eb47ea119af5609f Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:25 2016 +0200 libceph: allocate dummy osdmap in ceph_osdc_init() This leads to a simpler osdmap handling code, particularly when dealing with pi->was_full, which is introduced in a later commit. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/osdmap.h | 1 + net/ceph/osd_client.c | 22 +++++++++++----------- net/ceph/osdmap.c | 23 ++++++++++++++++++----- 3 files changed, 30 insertions(+), 16 deletions(-) commit fbca963532eba779bffa14c70d1dc619e6bfa16d Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:24 2016 +0200 libceph: schedule tick from ceph_osdc_init() Both homeless OSD sessions and watch/notify v2, introduced in later commits, require periodic ticks which don't depend on ->num_requests. Schedule the initial tick from ceph_osdc_init() and reschedule from handle_timeout() unconditionally. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) commit b37ee1b9b840a6da63e78865f97a9a78b7534477 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:24 2016 +0200 libceph: move schedule_delayed_work() in ceph_osdc_init() ceph_osdc_stop() isn't called if ceph_osdc_init() fails, so we end up with handle_osds_timeout() running on invalid memory if any one of the allocations fails. Call schedule_delayed_work() after everything is setup, just before returning. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit fe5da05e979830b43b115d8a18ead521d507c783 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:24 2016 +0200 libceph: redo callbacks and factor out MOSDOpReply decoding If you specify ACK | ONDISK and set ->r_unsafe_callback, both ->r_callback and ->r_unsafe_callback(true) are called on ack. This is very confusing. Redo this so that only one of them is called: ->r_unsafe_callback(true), on ack ->r_unsafe_callback(false), on commit or ->r_callback, on ack|commit Decode everything in decode_MOSDOpReply() to reduce clutter. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> fs/ceph/addr.c | 3 +- fs/ceph/file.c | 2 + include/linux/ceph/osd_client.h | 5 +- net/ceph/osd_client.c | 362 +++++++++++++++++++++++----------------- 4 files changed, 215 insertions(+), 157 deletions(-) commit 85e084feb47349d62989efe1713a8723af95f4ea Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:24 2016 +0200 libceph: drop msg argument from ceph_osdc_callback_t finish_read(), its only user, uses it to get to hdr.data_len, which is what ->r_result is set to on success. This gains us the ability to safely call callbacks from contexts other than reply, e.g. map check. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 5 ++--- fs/ceph/addr.c | 9 ++++----- fs/ceph/file.c | 7 +++---- include/linux/ceph/osd_client.h | 3 +-- net/ceph/osd_client.c | 4 ++-- 5 files changed, 12 insertions(+), 16 deletions(-) commit bb873b539154ab51893430b4ad6ba4051775276a Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu May 26 00:29:52 2016 +0200 libceph: switch to calc_target(), part 2 The crux of this is getting rid of ceph_osdc_build_request(), so that MOSDOp can be encoded not before but after calc_target() calculates the actual target. Encoding now happens within ceph_osdc_start_request(). Also nuked is the accompanying bunch of pointers into the encoded buffer that was used to update fields on each send - instead, the entire front is re-encoded. If we want to support target->name_len != base->name_len in the future, there is no other way, because oid is surrounded by other fields in the encoded buffer. Encoding OSD ops and adding data items to the request message were mixed together in osd_req_encode_op(). While we want to re-encode OSD ops, we don't want to add duplicate data items to the message when resending, so all call to ceph_osdc_msg_data_add() are factored out into a new setup_request_data(). Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 18 +- fs/ceph/addr.c | 16 +- fs/ceph/file.c | 16 +- include/linux/ceph/osd_client.h | 29 ++-- include/linux/ceph/rados.h | 7 + net/ceph/debugfs.c | 61 ++++--- net/ceph/osd_client.c | 355 ++++++++++++++++++++-------------------- 7 files changed, 247 insertions(+), 255 deletions(-) commit a66dd38309f5d9c66ec9bc7911ff8da8cc37bb9f Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:23 2016 +0200 libceph: switch to calc_target(), part 1 Replace __calc_request_pg() and most of __map_request() with calc_target() and start using req->r_t. ceph_osdc_build_request() however still encodes base_oid, because it's called before calc_target() is and target_oid is empty at that point in time; a printf in osdc_show() also shows base_oid. This is fixed in "libceph: switch to calc_target(), part 2". Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/osd_client.h | 15 ++--- net/ceph/debugfs.c | 2 +- net/ceph/osd_client.c | 119 ++++++++-------------------------------- 3 files changed, 29 insertions(+), 107 deletions(-) commit 63244fa123a755e4bbaee03022b68613c71d1332 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:23 2016 +0200 libceph: introduce ceph_osd_request_target, calc_target() Introduce ceph_osd_request_target, containing all mapping-related fields of ceph_osd_request and calc_target() for calculating mappings and populating it. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> fs/ceph/addr.c | 2 +- fs/ceph/file.c | 2 +- include/linux/ceph/osd_client.h | 23 ++++++ include/linux/ceph/osdmap.h | 34 +++++++++ include/linux/ceph/rados.h | 5 ++ net/ceph/osd_client.c | 157 +++++++++++++++++++++++++++++++++++++++- net/ceph/osdmap.c | 121 +++++++++++++++++++++++++++++++ 7 files changed, 340 insertions(+), 4 deletions(-) commit 04812acf572ef41fd51c11e0bf3385f34c0e1b5b Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:23 2016 +0200 libceph: pi->min_size, pi->last_force_request_resend Add and decode pi->min_size and pi->last_force_request_resend. These are going to be used by calc_target(). Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/osdmap.h | 9 ++++++--- net/ceph/debugfs.c | 10 ++++++---- net/ceph/osdmap.c | 48 ++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 59 insertions(+), 8 deletions(-) commit f984cb76cc5fb9fc76d6abb6c4694a5412e3f49b Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:23 2016 +0200 libceph: make pgid_cmp() global calc_target() code is going to need to know how to compare PGs. Take lhs and rhs pgid by const * while at it. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/osdmap.h | 2 ++ net/ceph/osdmap.c | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 11 deletions(-) commit f81f16339a05775df600b2ff75a79be1864975c1 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:23 2016 +0200 libceph: rename ceph_calc_pg_primary() Rename ceph_calc_pg_primary() to ceph_pg_to_acting_primary() to emphasise that it returns acting primary. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> fs/ceph/ioctl.c | 2 +- include/linux/ceph/osdmap.h | 4 ++-- net/ceph/osdmap.c | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) commit 6f3bfd45cd233eea0b07e3cabc0386b5de9321d2 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:22 2016 +0200 libceph: ceph_osds, ceph_pg_to_up_acting_osds() Knowning just acting set isn't enough, we need to be able to record up set as well to detect interval changes. This means returning (up[], up_len, up_primary, acting[], acting_len, acting_primary) and passing it around. Introduce and switch to ceph_osds to help with that. Rename ceph_calc_pg_acting() to ceph_pg_to_up_acting_osds() and return both up and acting sets from it. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/osdmap.h | 21 ++- net/ceph/osd_client.c | 36 +++--- net/ceph/osdmap.c | 304 ++++++++++++++++++++++++++------------------ 3 files changed, 215 insertions(+), 146 deletions(-) commit d9591f5e28686277d9312d3c7422faf1368b305e Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:22 2016 +0200 libceph: rename ceph_oloc_oid_to_pg() Rename ceph_oloc_oid_to_pg() to ceph_object_locator_to_pg(). Emphasise that returned is raw PG and return -ENOENT instead of -EIO if the pool doesn't exist. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> fs/ceph/ioctl.c | 2 +- include/linux/ceph/osdmap.h | 9 ++++----- net/ceph/osd_client.c | 4 ++-- net/ceph/osdmap.c | 31 ++++++++++++++++--------------- 4 files changed, 23 insertions(+), 23 deletions(-) commit 985c1673885b77b2e0167c6478a833817d1e2fe5 Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:22 2016 +0200 libceph: fix ceph_eversion encoding eversion_t is version+epoch in userspace and is encoded in that order. ceph_eversion is defined as epoch+version in rados.h, yet we memcpy it in __send_request(). Reoder ceph_eversion fields. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/rados.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fcd00b68bbe2bf5606cb45c2cd4a250a390bcc1f Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:22 2016 +0200 libceph: DEFINE_RB_FUNCS macro Given struct foo { u64 id; struct rb_node bar_node; }; generate insert_bar(), erase_bar() and lookup_bar() functions with DEFINE_RB_FUNCS(bar, struct foo, id, bar_node) The key is assumed to be an integer (u64, int, etc), compared with < and >. nodefld has to be initialized with RB_CLEAR_NODE(). Start using it for MDS, MON and OSD requests and OSD sessions. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> fs/ceph/mds_client.c | 54 ++++++------------------ include/linux/ceph/libceph.h | 57 ++++++++++++++++++++++++++ net/ceph/mon_client.c | 52 ++++-------------------- net/ceph/osd_client.c | 97 +++++--------------------------------------- 4 files changed, 88 insertions(+), 172 deletions(-) commit 42a2c09f2b0b95fa147bcdb56cdc02b980b9ac5e Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:22 2016 +0200 libceph: open-code remove_{all,old}_osds() They are called only once, from ceph_osdc_stop() and handle_osds_timeout() respectively. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 51 +++++++++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 30 deletions(-) commit 0c0a8de13f9612a663b050afa955e6668858d1eb Author: Ilya Dryomov <idryomov@gmail.com> Date: Thu Apr 28 16:07:21 2016 +0200 libceph: nuke unused fields and functions Either unused or useless: osdmap->mkfs_epoch osd->o_marked_for_keepalive monc->num_generic_requests osdc->map_waiters osdc->last_requested_map osdc->timeout_tid osd_req_op_cls_response_data() osdmap_apply_incremental() @msgr arg Signed-off-by: Ilya Dryomov <idryomov@gmail.com> include/linux/ceph/mon_client.h | 1 - include/linux/ceph/osd_client.h | 8 -------- include/linux/ceph/osdmap.h | 6 ++---- net/ceph/mon_client.c | 3 --- net/ceph/osd_client.c | 13 +------------ net/ceph/osdmap.c | 3 +-- 6 files changed, 4 insertions(+), 30 deletions(-) commit c41d13a31fefed303f734c0c5106f6dcd262168e Author: Ilya Dryomov <idryomov@gmail.com> Date: Fri Apr 29 20:01:25 2016 +0200 rbd: use header_oid instead of header_name Switch to ceph_object_id and use ceph_oid_aprintf() instead of a bare const char *. This reduces noise in rbd_dev_header_name(). Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 57 ++++++++++++++++++++++------------------------------- 1 file changed, 24 insertions(+), 33 deletions(-) commit d30291b985d1854565d7f2c82a4457869d5265e8 Author: Ilya Dryomov <idryomov@gmail.com> Date: Fri Apr 29 19:54:20 2016 +0200 libceph: variable-sized ceph_object_id Currently ceph_object_id can hold object names of up to 100 (CEPH_MAX_OID_NAME_LEN) characters. This is enough for all use cases, expect one - long rbd image names: - a format 1 header is named "<imgname>.rbd" - an object that points to a format 2 header is named "rbd_id.<imgname>" We operate on these potentially long-named objects during rbd map, and, for format 1 images, during header refresh. (A format 2 header name is a small system-generated string.) Lift this 100 character limit by making ceph_object_id be able to point to an externally-allocated string. Apart from being able to work with almost arbitrarily-long named objects, this allows us to reduce the size of ceph_object_id from >100 bytes to 64 bytes. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 8 +++- fs/ceph/addr.c | 6 +-- fs/ceph/file.c | 2 +- fs/ceph/ioctl.c | 2 +- include/linux/ceph/osdmap.h | 62 ++++++++++++++++++------------ net/ceph/debugfs.c | 2 +- net/ceph/osd_client.c | 16 +++++--- net/ceph/osdmap.c | 93 ++++++++++++++++++++++++++++++++++++++++++++- 8 files changed, 150 insertions(+), 41 deletions(-) commit 711da55d36a6f1eddcd340969be7223110d2f6b0 Author: Ilya Dryomov <idryomov@gmail.com> Date: Wed Apr 27 18:32:56 2016 +0200 libceph: change how osd_op_reply message size is calculated For a message pool message, preallocate a page, just like we do for osd_op. For a normal message, take ceph_object_id into account and don't bother subtracting CEPH_OSD_SLAB_OPS ceph_osd_ops. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit 13d1ad16d05eebb4db977eb955716b9da2c19fbd Author: Ilya Dryomov <idryomov@gmail.com> Date: Wed Apr 27 14:15:51 2016 +0200 libceph: move message allocation out of ceph_osdc_alloc_request() The size of ->r_request and ->r_reply messages depends on the size of the object name (ceph_object_id), while the size of ceph_osd_request is fixed. Move message allocation into a separate function that would have to be called after ceph_object_id and ceph_object_locator (which is also going to become variable in size with RADOS namespaces) have been filled in: req = ceph_osdc_alloc_request(...); <fill in req->r_base_oid> <fill in req->r_base_oloc> ceph_osdc_alloc_messages(req); Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 18 ++++++++- fs/ceph/addr.c | 8 ++++ fs/ceph/file.c | 7 ++++ include/linux/ceph/osd_client.h | 1 + net/ceph/osd_client.c | 88 +++++++++++++++++++++++------------------ 5 files changed, 82 insertions(+), 40 deletions(-) commit 841272825b2263174120ab02b4abac9005ee1420 Author: Ilya Dryomov <idryomov@gmail.com> Date: Tue Apr 26 15:39:47 2016 +0200 libceph: grab snapc in ceph_osdc_alloc_request() ceph_osdc_build_request() is going away. Grab snapc and initialize ->r_snapid in ceph_osdc_alloc_request(). Signed-off-by: Ilya Dryomov <idryomov@gmail.com> net/ceph/osd_client.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 3ed97d6345a36a0a61e6af62ad8a66ca40f1aa2e Author: Ilya Dryomov <idryomov@gmail.com> Date: Tue Apr 26 15:05:29 2016 +0200 libceph: make ceph_osdc_put_request() accept NULL Signed-off-by: Ilya Dryomov <idryomov@gmail.com> fs/ceph/addr.c | 9 +++------ net/ceph/osd_client.c | 8 +++++--- 2 files changed, 8 insertions(+), 9 deletions(-) commit 663ae2cc04773608e1e741f693e41200fd4faf14 Author: Ilya Dryomov <idryomov@gmail.com> Date: Mon May 16 13:18:57 2016 +0200 rbd: get/put img_request in rbd_img_request_submit() By the time we get to checking for_each_obj_request_safe(img_request) terminating condition, all obj_requests may be complete and img_request ref, that rbd_img_request_submit() takes away from its caller, may be put. Moving the next_obj_request cursor is then a use-after-free on img_request. It's totally benign, as the value that's read is never used, but I think it's still worth fixing. Cc: Alex Elder <elder@linaro.org> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> drivers/block/rbd.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit 877c057d2b3cdac9f44c0fbe48e4208375395bf0 Merge: ecc5fbd 4c2628cd Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 15:29:21 2016 -0700 Merge tag 'pm-4.7-rc1-more' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management updates from Rafael Wysocki: "These are two stable-candidate fixes (PM core, cpuidle) and a bunch of cpufreq cleanups. Specifics: - Stable-candidate cpuidle fix to make it check the right variable when deciding whether or not to enable interrupts on the local CPU so as to avoid enabling iterrupts too early in some cases if the system has both coupled and per-core idle states (Daniel Lezcano). - Stable-candidate PM core fix to make it handle failures at the "late suspend" stage of device suspend consistently for all devices regardless of whether or not async suspend/resume is enabled for them (Rafael Wysocki). - Cleanups in the cpufreq core, the schedutil governor and the intel_pstate driver (Rafael Wysocki, Pankaj Gupta, Viresh Kumar)" * tag 'pm-4.7-rc1-more' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / sleep: Handle failures in device_suspend_late() consistently cpufreq: schedutil: Improve prints messages with pr_fmt cpuidle: Fix cpuidle_state_is_coupled() argument in cpuidle_enter() cpufreq: simplified goto out in cpufreq_register_driver() cpufreq: governor: CPUFREQ_GOV_STOP never fails cpufreq: governor: CPUFREQ_GOV_POLICY_EXIT never fails intel_pstate: Simplify conditional in intel_pstate_set_policy() commit 19f18459330f4a65fb0b58e77fc58ceceecb1839 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Wed May 25 17:36:19 2016 -0400 do "fold checks into iterate_and_advance()" right the only case when we should skip the iterate_and_advance() guts is when nothing's left in the iterator, _not_ just when requested amount is 0. Said guts will do nothing in the latter case anyway; the problem we tried to deal with in the aforementioned commit is that when there's nothing left *and* the amount requested is 0, we might end up deferencing one iovec too many; the value we fetch from there is discarded in that case, but theoretically it might oops if the iovec array ends exactly at the end of page with the next page not mapped. Bailing out on zero size requested had an unexpected side effect - zero-length segment in the beginning of iovec array ended up throwing do_loop_readv_writev() into infinite spin; we do not advance past the empty segment at all. Reproducer is trivial: echo '#include <sys/uio.h>' >a.c echo 'main() {char c; struct iovec v[] = {{&c,0},{&c,1}}; readv(0,v,2);}' >>a.c cc a.c && ./a.out </proc/uptime which should end up with the process not hanging. Probably ought to go into LTP or xfstests... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> lib/iov_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0040773bff7b585fc948565a0558e5a6a4680e96 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Wed May 25 17:34:41 2016 -0400 make xattr_resolve_handlers() safe to use with NULL ->s_xattr Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/xattr.c | 1 + 1 file changed, 1 insertion(+) commit aaf431b4f92152d46ab54079692633aa422262b1 Author: Andreas Gruenbacher <agruenba@redhat.com> Date: Mon May 9 13:28:49 2016 +0200 xattr: Fail with -EINVAL for NULL attribute names Commit 98e9cb57 improved the xattr name checks in xattr_resolve_name but didn't update the NULL attribute name check appropriately, so NULL attribute names lead to NULL pointer dereferences. Turn that into -EINVAL results instead. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> fs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c6143dd497901e3537dc4324dc203dfda442009 Merge: 42f3173 ae55b9e Author: David Sterba <dsterba@suse.com> Date: Wed May 25 22:51:04 2016 +0200 Merge branch 'dev/comp-workspaces' into for-chris-4.7-20160525 commit 42f31734eb7658fd01fb186d56312be869450a42 Merge: e734408 0132761 Author: David Sterba <dsterba@suse.com> Date: Wed May 25 22:51:03 2016 +0200 Merge branch 'cleanups-4.7' into for-chris-4.7-20160525 commit e73440868fde7cce4a93583a4fa2db9a8938a7ed Merge: c315ef8 f1fee65 Author: David Sterba <dsterba@suse.com> Date: Wed May 25 22:51:02 2016 +0200 Merge branch 'misc-4.7' into for-chris-4.7-20160525 commit 0132761017e012ab4dc8584d679503f2ba26ca86 Author: Nicholas D Steeves <nsteeves@gmail.com> Date: Thu May 19 21:18:45 2016 -0400 btrfs: fix string and comment grammatical issues and typos Signed-off-by: Nicholas D Steeves <nsteeves@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/backref.c | 2 +- fs/btrfs/btrfs_inode.h | 2 +- fs/btrfs/check-integrity.c | 2 +- fs/btrfs/ctree.c | 14 +++++++------- fs/btrfs/ctree.h | 6 +++--- fs/btrfs/delayed-ref.h | 2 +- fs/btrfs/dev-replace.c | 2 +- fs/btrfs/disk-io.c | 10 +++++----- fs/btrfs/extent-tree.c | 32 ++++++++++++++++---------------- fs/btrfs/extent_io.c | 4 ++-- fs/btrfs/extent_map.c | 2 +- fs/btrfs/file.c | 4 ++-- fs/btrfs/free-space-cache.c | 2 +- fs/btrfs/free-space-cache.h | 2 +- fs/btrfs/inode.c | 22 +++++++++++----------- fs/btrfs/ioctl.c | 10 +++++----- fs/btrfs/ordered-data.h | 2 +- fs/btrfs/qgroup.c | 16 ++++++++-------- fs/btrfs/raid56.c | 6 +++--- fs/btrfs/relocation.c | 12 ++++++------ fs/btrfs/root-tree.c | 4 ++-- fs/btrfs/scrub.c | 4 ++-- fs/btrfs/send.c | 6 +++--- fs/btrfs/struct-funcs.c | 2 +- fs/btrfs/super.c | 8 ++++---- fs/btrfs/tests/extent-io-tests.c | 2 +- fs/btrfs/tests/free-space-tests.c | 7 ++++--- fs/btrfs/tests/inode-tests.c | 2 +- fs/btrfs/tests/qgroup-tests.c | 2 +- fs/btrfs/transaction.h | 2 +- fs/btrfs/tree-log.c | 8 ++++---- fs/btrfs/ulist.c | 2 +- fs/btrfs/volumes.c | 8 ++++---- 33 files changed, 106 insertions(+), 105 deletions(-) commit f1fee6534dcfbf468a159789aa202db2bce8c200 Author: Zhao Lei <zhaolei@cn.fujitsu.com> Date: Tue May 17 17:37:38 2016 +0800 btrfs: scrub: Set bbio to NULL before calling btrfs_map_block We usually call btrfs_put_bbio() when btrfs_map_block() failed, btrfs_put_bbio() works right whether bbio is a valid value, or NULL. But there is a exception, in some case, btrfs_map_block() will return fail without touching *bbio(keeping its original value), and if bbio was not initialized yet, invalid memory accessing will happened. Above case is in scrub_missing_raid56_pages(), and similar case in scrub_raid56_parity(). Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/scrub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 0cc4b48149ff6948dd82a039ad55cdbec49107f7 Merge: 46c1345 5dfa0c7 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Wed May 25 22:11:28 2016 +0200 Merge branch 'acpi-battery' * acpi-battery: ACPI / battery: Correctly serialise with the pending async probe commit f6988cb63a4e698d8a62a1d085d263d1fcc351ea Author: Ivan Vecera <ivecera@redhat.com> Date: Wed May 25 21:21:52 2016 +0200 team: don't call netdev_change_features under team->lock The team_device_event() notifier calls team_compute_features() to fix vlan_features under team->lock to protect team->port_list. The problem is that subsequent __team_compute_features() calls netdev_change_features() to propagate vlan_features to upper vlan devices while team->lock is still taken. This can lead to deadlock when NETIF_F_LRO is modified on lower devices or team device itself. Example: The team0 as active backup with eth0 and eth1 NICs. Both eth0 & eth1 are LRO capable and LRO is enabled. Thus LRO is also enabled on team0. The command 'ethtool -K team0 lro off' now hangs due to this deadlock: dev_ethtool() -> ethtool_set_features() -> __netdev_update_features(team) -> netdev_sync_lower_features() -> netdev_update_features(lower_1) -> __netdev_update_features(lower_1) -> netdev_features_change(lower_1) -> call_netdevice_notifiers(...) -> team_device_event(lower_1) -> team_compute_features(team) [TAKES team->lock] -> netdev_change_features(team) -> __netdev_update_features(team) -> netdev_sync_lower_features() -> netdev_update_features(lower_2) -> __netdev_update_features(lower_2) -> netdev_features_change(lower_2) -> call_netdevice_notifiers(...) -> team_device_event(lower_2) -> team_compute_features(team) [DEADLOCK] The bug is present in team from the beginning but it appeared after the commit fd867d5 (net/core: generic support for disabling netdev features down stack) that adds synchronization of features with lower devices. Fixes: fd867d5 (net/core: generic support for disabling netdev features down stack) Cc: Jiri Pirko <jiri@resnulli.us> Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/team/team.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 4c2628cd7580bc4f4a4994925cf366185ecc37a5 Merge: d57d394 60f05e8 e7387da 3a17fb3 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Wed May 25 21:54:45 2016 +0200 Merge branches 'pm-cpufreq', 'pm-cpuidle' and 'pm-core' * pm-cpufreq: cpufreq: schedutil: Improve prints messages with pr_fmt cpufreq: simplified goto out in cpufreq_register_driver() cpufreq: governor: CPUFREQ_GOV_STOP never fails cpufreq: governor: CPUFREQ_GOV_POLICY_EXIT never fails intel_pstate: Simplify conditional in intel_pstate_set_policy() * pm-cpuidle: cpuidle: Fix cpuidle_state_is_coupled() argument in cpuidle_enter() * pm-core: PM / sleep: Handle failures in device_suspend_late() consistently commit 9ea46abe22550e3366ff7cee2f8391b35b12f730 Author: David S. Miller <davem@davemloft.net> Date: Wed May 25 12:51:20 2016 -0700 sparc64: Take ctx_alloc_lock properly in hugetlb_setup(). On cheetahplus chips we take the ctx_alloc_lock in order to modify the TLB lookup parameters for the indexed TLBs, which are stored in the context register. This is called with interrupts disabled, however ctx_alloc_lock is an IRQ safe lock, therefore we must take acquire/release it properly with spin_{lock,unlock}_irq(). Reported-by: Meelis Roos <mroos@linux.ee> Tested-by: Meelis Roos <mroos@linux.ee> Signed-off-by: David S. Miller <davem@davemloft.net> arch/sparc/mm/init_64.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit f58fb330121d072fdfd8b36403bc421899fe8a40 Merge: c0795bf f05e2db Author: David S. Miller <davem@davemloft.net> Date: Wed May 25 12:45:41 2016 -0700 Merge branch 'dsa-doc-fixes' Florian Fainelli says: ==================== Documentation: dsa: misc fixes Here are some miscelaneous documentation fixes for DSA, I targeted "net" because these are not functional code changes, but still documentation fixes per-se. Changes in v2: - reword what the port_vlan_filtering is about based on feedback from Vivien and Ido ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit f05e2db1996d7a640c76481ba5ea3d7a295a8f48 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Tue May 24 21:26:41 2016 -0700 Documentation: networking: dsa: Describe port_vlan_filtering Described what the port_vlan_filtering function is supposed to accomplish. Fixes: fb2dabad69f0 ("net: dsa: support VLAN filtering switchdev attr") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/networking/dsa/dsa.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 7013d8e1d0a07b74dc6f81b470654290b769e9bb Author: Florian Fainelli <f.fainelli@gmail.com> Date: Tue May 24 21:26:40 2016 -0700 Documentation: networking: dsa: Remove priv_size description We no longer have a priv_size structure member since 5feebd0a8a79 ("net: dsa: Remove allocation of driver private memory") Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/networking/dsa/dsa.txt | 2 -- 1 file changed, 2 deletions(-) commit 75c0bbd0e23a295faf80aa68bf5ab2b5fac709b2 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Tue May 24 21:26:39 2016 -0700 Documentation: networking: dsa: Remove poll_link description This function has been removed in 4baee937b8d5 ("net: dsa: remove DSA link polling") in favor of using the PHYLIB polling mechanism. Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/networking/dsa/dsa.txt | 5 ----- 1 file changed, 5 deletions(-) commit c0795bf64cba4d1b796fdc5b74b33772841ed1bb Author: Edward Cree <ecree@solarflare.com> Date: Tue May 24 18:53:36 2016 +0100 sfc: on MC reset, clear PIO buffer linkage in TXQs Otherwise, if we fail to allocate new PIO buffers, our TXQs will try to use the old ones, which aren't there any more. Fixes: 183233bec810 "sfc: Allocate and link PIO buffers; map them with write-combining" Signed-off-by: Edward Cree <ecree@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/sfc/ef10.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 492a7e67ff83fc59adb768de25ccaecd33d46beb Author: Mark Bloch <markb@mellanox.com> Date: Wed May 18 16:42:43 2016 +0300 IB/IPoIB: Allow setting the device address In IB networks, and specifically in IPoIB/rdmacm traffic, the device address of an IPoIB interface is used as a means to exchange information between nodes needed for communication. Currently an IPoIB interface will always be created with a device address based on its node GUID without a way to change that. This change adds the ability to set the device address of an IPoIB interface by value. We use the set mac address ndo to do that. The flow should be broken down to two: 1) The GID value is already in the GID table, in this case the interface will be able to set carrier up. 2) The GID value is not yet in the GID table, in this case the interface won't try to join the multicast group and will wait (listen on GID_CHANGE event) until the GID is inserted. In order to track those changes, we add a new flag: * IPOIB_FLAG_DEV_ADDR_SET. When set, it means the dev_addr is a based on a value in the gid table. this bit will be cleared upon a dev_addr change triggered by the user and set after validation. Per IB spec the port GUID can't change if the module is loaded. port GUID is the basis for GID at index 0 which is the basis for the default device address of a ipoib interface. The issue is that there are devices that don't follow the spec, they change the port GUID while HCA is powered on, so in order not to break userspace applications. We need to check if the user wanted to control the device address and we assume that if he sets the device address back to be based on GID index 0, he no longer wishs to control it. In order to track this, we add an additional flag: * IPOIB_FLAG_DEV_ADDR_CTRL When setting the device address, there is no validation of the upper twelve bytes of the device address (flags, qpn, subnet prefix) as those bytes are not under the control of the user. Signed-off-by: Mark Bloch <markb@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/ipoib/ipoib.h | 2 + drivers/infiniband/ulp/ipoib/ipoib_ib.c | 109 ++++++++++++++++++++++++- drivers/infiniband/ulp/ipoib/ipoib_main.c | 67 +++++++++++++++ drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 10 ++- drivers/infiniband/ulp/ipoib/ipoib_verbs.c | 3 + drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 2 + 6 files changed, 187 insertions(+), 6 deletions(-) commit 3b56113016400a4e2b9870c368ebb8080cb5739b Author: Erez Shitrit <erezsh@mellanox.com> Date: Wed May 25 22:02:07 2016 +0300 IB/ipoib: Support SendOnlyFullMember MCG for SendOnly join Check (via an SA query) if the SM supports the new option for SendOnly multicast joins. If the SM supports that option it will use the new join state to create such multicast group. If SendOnlyFullMember is supported, we wouldn't use faked FullMember state join for SendOnly MCG, use the correct state if supported. This check is performed at every invocation of mcast_restart task, to be sure that the driver stays in sync with the current state of the SM. Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/ipoib/ipoib.h | 2 + drivers/infiniband/ulp/ipoib/ipoib_main.c | 73 ++++++++++++++++++++++++++ drivers/infiniband/ulp/ipoib/ipoib_multicast.c | 38 +++++++++----- 3 files changed, 100 insertions(+), 13 deletions(-) commit cd6e9b7ef90515cb90962059ffb03b679de27f99 Author: Erez Shitrit <erezsh@mellanox.com> Date: Wed May 25 22:02:06 2016 +0300 IB/core: Support new type of join-state for multicast There are four types for MCG, FullMember, NonMember, SendOnlyNonMember, and the new added type: SendOnlyFullMember. Add support for the new SendOnlyFullMember join state. The new type allows host to send join request as sendonly, it will cause the group to be created but without getting packets from this multicast back to the host. Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Christoph Lameter <cl@linux.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/multicast.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) commit 628e6f75156eac6979eacc2e9383e41f6432beb4 Author: Erez Shitrit <erezsh@mellanox.com> Date: Wed May 25 22:02:05 2016 +0300 IB/SA Agent: Add support for SA agent get ClassPortInfo New SA query function to return the ClassPortInfo struct from the SA. If the SM supports FullMemberSendOnly mode for MCG's, it sets a capability bit in the capability_mask2 field of the response. Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/sa_query.c | 173 +++++++++++++++++++++++++++++++++++++ include/rdma/ib_sa.h | 12 +++ 2 files changed, 185 insertions(+) commit 507f6afa3ab6c9473d81c8091be0d1b859509a6d Author: Erez Shitrit <erezsh@mellanox.com> Date: Wed May 25 22:02:04 2016 +0300 IB/core: Introduce capabilitymask2 field in ClassPortInfo mad Change struct ib_class_port_info to conform to IB Spec 1.3 That in order to get specific capability mask from ClassPortInfo mad. >From the IB Spec, ClassPortInfo section: "CapabilityMask2 Bits 0-26: Additional class-specific capabilities... RespTimeValue the rest 5 bits" The new struct now has one field for capabilitymask2 (previously was the reserved field) and the resp_time field. And it fixes up qib and srpt, use of the field repurposed to be used as capabilitymask2: IB/qib: Change pma_get_classportinfo IB/srpt: Adjust the use of ib_class_port_info Signed-off-by: Erez Shitrit <erezsh@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Hal Rosenstock <hal@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/qib/qib_mad.c | 6 ++-- drivers/infiniband/ulp/srpt/ib_srpt.c | 2 +- include/rdma/ib_mad.h | 60 +++++++++++++++++++++++++++++++++-- 3 files changed, 63 insertions(+), 5 deletions(-) commit 217f97e85608c5878ccc7850d6f4ea332622f537 Merge: 297f7d2 b388fc7 Author: David S. Miller <davem@davemloft.net> Date: Wed May 25 12:35:09 2016 -0700 Merge branch 'hwbm-locking-fixes' Gregory CLEMENT says: ==================== Fix spinlock usage in HWBM these two patches fix spinlock related issues introduced in v4.6. They have been reported by Russell King and Jean-Jacques Hiblot. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit b388fc7405e901c7d6f7817d05193c054e761815 Author: Gregory CLEMENT <gregory.clement@free-electrons.com> Date: Tue May 24 18:03:26 2016 +0200 net: hwbm: Fix unbalanced spinlock in error case When hwbm_pool_add exited in error the spinlock was not released. This patch fixes this issue. Fixes: 8cb2d8bf57e6 ("net: add a hardware buffer management helper API") Reported-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com> Cc: <stable@vger.kernel.org> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/core/hwbm.c | 3 +++ 1 file changed, 3 insertions(+) commit 91c45e38b9478ff507e05f10151d64cd0d1aad7b Author: Gregory CLEMENT <gregory.clement@free-electrons.com> Date: Tue May 24 18:03:25 2016 +0200 net: mvneta: Fix lacking spinlock initialization The spinlock used by the hwbm functions must be initialized by the network driver. This commit fixes this lack and the following erros when lockdep is enabled: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. [<c010ff80>] (unwind_backtrace) from [<c010bd08>] (show_stack+0x10/0x14) [<c010bd08>] (show_stack) from [<c032913c>] (dump_stack+0xb4/0xe0) [<c032913c>] (dump_stack) from [<c01670e4>] (__lock_acquire+0x1f58/0x2060) [<c01670e4>] (__lock_acquire) from [<c0167dec>] (lock_acquire+0xa4/0xd0) [<c0167dec>] (lock_acquire) from [<c06f6650>] (_raw_spin_lock_irqsave+0x54/0x68) [<c06f6650>] (_raw_spin_lock_irqsave) from [<c058e830>] (hwbm_pool_add+0x1c/0xdc) [<c058e830>] (hwbm_pool_add) from [<c043f4e8>] (mvneta_bm_pool_use+0x338/0x490) [<c043f4e8>] (mvneta_bm_pool_use) from [<c0443198>] (mvneta_probe+0x654/0x1284) [<c0443198>] (mvneta_probe) from [<c03b894c>] (platform_drv_probe+0x4c/0xb0) [<c03b894c>] (platform_drv_probe) from [<c03b7158>] (driver_probe_device+0x214/0x2c0) [<c03b7158>] (driver_probe_device) from [<c03b72c4>] (__driver_attach+0xc0/0xc4) [<c03b72c4>] (__driver_attach) from [<c03b5440>] (bus_for_each_dev+0x68/0x9c) [<c03b5440>] (bus_for_each_dev) from [<c03b65b8>] (bus_add_driver+0x1a0/0x218) [<c03b65b8>] (bus_add_driver) from [<c03b79cc>] (driver_register+0x78/0xf8) [<c03b79cc>] (driver_register) from [<c01018f4>] (do_one_initcall+0x90/0x1dc) [<c01018f4>] (do_one_initcall) from [<c0900de4>] (kernel_init_freeable+0x15c/0x1fc) [<c0900de4>] (kernel_init_freeable) from [<c06eed90>] (kernel_init+0x8/0x114) [<c06eed90>] (kernel_init) from [<c0107910>] (ret_from_fork+0x14/0x24) Fixes: baa11ebc0c76 ("net: mvneta: Use the new hwbm framework") Reported-by: Russell King <rmk+kernel@armlinux.org.uk> Cc: <stable@vger.kernel.org> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/marvell/mvneta_bm.c | 1 + 1 file changed, 1 insertion(+) commit 297f7d2cce6a156c174334ee452f2f7a7ba405ca Author: Baozeng Ding <sploving1@gmail.com> Date: Tue May 24 22:33:24 2016 +0800 tipc: fix potential null pointer dereferences in some compat functions Before calling the nla_parse_nested function, make sure the pointer to the attribute is not null. This patch fixes several potential null pointer dereference vulnerabilities in the tipc netlink functions. Signed-off-by: Baozeng Ding <sploving1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/tipc/netlink_compat.c | 111 ++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 93 insertions(+), 18 deletions(-) commit ec7c7f5cafdaeea509ad4e7e6f71c2312062c4c6 Author: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> Date: Tue May 24 05:25:23 2016 -0400 qed: Reset the enable flag for eth protocol. This patch fixes the coding error in determining the enable flag for the application/protocol. The enable flag should be set for all protocols but the eth. Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3851112e4737cd52aaeda0ce8d084be9ee128106 Author: Vidya Sagar Ravipati <vidya@cumulusnetworks.com> Date: Sun May 22 23:59:00 2016 -0700 ethtool: add support for 25G/50G/100G speed modes This patch enhances ethtool link mode bitmap to include 25G/50G/100G speed along with interface modes Signed-off-by: Vidya Sagar Ravipati <vidya@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/uapi/linux/ethtool.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit a5a3717a980cfa3c8bf194bf302e55b1ab8d6e50 Merge: c64f976 d3030d1 f7aa23c b01518c 45c0470 Author: Mark Brown <broonie@kernel.org> Date: Wed May 25 19:18:00 2016 +0100 Merge remote-tracking branches 'asoc/fix/ak4642', 'asoc/fix/ep93xx', 'asoc/fix/kirkwood' and 'asoc/fix/twl6040' into asoc-linus commit c64f976208f7f6d16ae0b980f8af42fb18759ace Merge: 2dcd0af 515511a Author: Mark Brown <broonie@kernel.org> Date: Wed May 25 19:18:00 2016 +0100 Merge tag 'asoc-v4.7' into asoc-linus ASoC: Updates for v4.7 The updates this time around are almost all driver code: - Further slow progress on the topology code. - Substantial updates and improvements for the da7219, es8328, fsl-ssi Intel and rcar drivers. # gpg: Signature made Mon 16 May 2016 12:08:43 BST using RSA key ID 5D5487D0 # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>" # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 3F25 68AA C269 98F9 E813 A1C5 C3F4 36CA 30F5 D8EB # Subkey fingerprint: ADE6 68AA 6757 18B5 9FE2 9FEA 24D6 8B72 5D54 87D0 commit 2d324f59f343967a03eeb2690f0ff178304d0687 Author: Liu Bo <bo.li.liu@oracle.com> Date: Tue May 17 17:21:48 2016 -0700 Btrfs: fix unexpected return value of fiemap btrfs's fiemap is supposed to return 0 on success and return < 0 on error. however, ret becomes 1 after looking up the last file extent: btrfs_lookup_file_extent -> btrfs_search_slot(..., ins_len=0, cow=0) and if the offset is beyond EOF, we'll get 'path' pointed to the place of potentail insertion, and ret == 1. This may confuse applications using ioctl(FIEL_IOC_FIEMAP). Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/extent_io.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 1c8b5b6e8b570a8038fa42cf9e7c23782bd4882c Author: Liu Bo <bo.li.liu@oracle.com> Date: Fri May 13 17:06:59 2016 -0700 Btrfs: free sys_array eb as soon as possible While reading sys_chunk_array in superblock, btrfs creates a temporary extent buffer. Since we don't use it after finishing reading sys_chunk_array, we don't need to keep it in memory. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/volumes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ecc5fbd5ef472a4c659dc56a5739b3f041c0530c Merge: 1f93d2a 18c5887 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 10:40:15 2016 -0700 Merge tag 'pwm/for-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This set of changes introduces an atomic API to the PWM subsystem. This is influenced by the DRM atomic API that was introduced a while back, though it is obviously a lot simpler. The fundamental idea remains the same, though: drivers provide a single callback to implement the atomic configuration of a PWM channel. As a side-effect the PWM subsystem gains the ability for initial state retrieval, so that the logical state mirrors that of the hardware. Many use-cases don't care about this, but for others it is essential. These new features require changes in all users, which these patches take care of. The core is transitioned to use the atomic callback if available and provides a fallback mechanism for other drivers. Changes to transition users and drivers to the atomic API are postponed to v4.8" * tag 'pwm/for-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (30 commits) pwm: Add information about polarity, duty cycle and period to debugfs pwm: Switch to the atomic API pwm: Update documentation pwm: Add core infrastructure to allow atomic updates pwm: Add hardware readout infrastructure pwm: Move the enabled/disabled info into pwm_state pwm: Introduce the pwm_state concept pwm: Keep PWM state in sync with hardware state ARM: Explicitly apply PWM config extracted from pwm_args drm: i915: Explicitly apply PWM config extracted from pwm_args input: misc: pwm-beeper: Explicitly apply PWM config extracted from pwm_args input: misc: max8997: Explicitly apply PWM config extracted from pwm_args backlight: lm3630a: explicitly apply PWM config extracted from pwm_args backlight: lp855x: Explicitly apply PWM config extracted from pwm_args backlight: lp8788: Explicitly apply PWM config extracted from pwm_args backlight: pwm_bl: Use pwm_get_args() where appropriate fbdev: ssd1307fb: Use pwm_get_args() where appropriate regulator: pwm: Use pwm_get_args() where appropriate leds: pwm: Use pwm_get_args() where appropriate input: misc: max77693: Use pwm_get_args() where appropriate ... commit fb1084e3320555eca0fb86c9eaad5429ee761282 Author: Tom Haynes <thomas.haynes@primarydata.com> Date: Wed May 25 07:31:12 2016 -0700 nfs/flexfiles: Helper function to detect FF_FLAGS_NO_READ_IO The mds can inform the client not to use the IOMODE_RW layout segment for doing READs. I.e., it is basically a IOMODE_WRITE layout segment. It would do this to not interfere with the WRITEs. Signed-off-by: Tom Haynes <loghyr@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/flexfilelayout/flexfilelayout.h | 11 ++++++++++- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6 ++++++ 2 files changed, 16 insertions(+), 1 deletion(-) commit 1f93d2abf488c6a41bdd5e6caf80b559493eea8d Merge: 48dd7ce 540be8b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 10:19:17 2016 -0700 Merge git://www.linux-watchdog.org/linux-watchdog Pull watchdog updates from Wim Van Sebroeck: - add support for Fintek F81865 Super-IO chip - add support for watchdogs (RWDT and SWDT) found on RCar Gen3 based SoCs from Renesas - octeon: Handle the FROZEN hot plug notifier actions - f71808e_wdt fixes and cleanups - some small improvements in code and documentation * git://www.linux-watchdog.org/linux-watchdog: MAINTAINERS: Add file patterns for watchdog device tree bindings Documentation: Add ebc-c384_wdt watchdog-parameters.txt entry watchdog: shwdt: Use setup_timer() watchdog: cpwd: Use setup_timer() arm64: defconfig: enable Renesas Watchdog Timer watchdog: renesas-wdt: add driver watchdog: remove error message when unable to allocate watchdog device watchdog: f71808e_wdt: Fix WDTMOUT_STS register read watchdog: f71808e_wdt: Fix typo watchdog: f71808e_wdt: Add F81865 support watchdog: sp5100_tco: properly check for new register layouts watchdog: core: Fix circular locking dependency watchdog: core: fix trivial typo in a comment watchdog: hpwdt: Adjust documentation to match latest kernel module parameters. watchdog: imx2_wdt: add external reset support via dt prop watchdog: octeon: Handle the FROZEN hot plug notifier actions. watchdog: qcom: Report reboot reason commit ade8febde0271513360bac44883dbebad44276c3 Author: Weston Andros Adamson <dros@monkey.org> Date: Wed May 25 10:07:23 2016 -0400 nfs: avoid race that crashes nfs_init_commit Since the patch "NFS: Allow multiple commit requests in flight per file" we can run multiple simultaneous commits on the same inode. This introduced a race over collecting pages to commit that made it possible to call nfs_init_commit() with an empty list - which causes crashes like the one below. The fix is to catch this race and avoid calling nfs_init_commit and initiate_commit when there is no work to do. Here is the crash: [600522.076832] BUG: unable to handle kernel NULL pointer dereference at 0000000000000040 [600522.078475] IP: [<ffffffffa0479e72>] nfs_init_commit+0x22/0x130 [nfs] [600522.078745] PGD 4272b1067 PUD 4272cb067 PMD 0 [600522.078972] Oops: 0000 [#1] SMP [600522.079204] Modules linked in: nfsv3 nfs_layout_flexfiles rpcsec_gss_krb5 nfsv4 dns_resolver nfs fscache dcdbas ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw vmw_vsock_vmci_transport vsock bonding ipmi_devintf ipmi_msghandler coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ppdev vmw_balloon parport_pc parport acpi_cpufreq vmw_vmci i2c_piix4 shpchp nfsd auth_rpcgss nfs_acl lockd grace sunrpc xfs libcrc32c vmwgfx drm_kms_helper ttm drm crc32c_intel serio_raw vmxnet3 [600522.081380] vmw_pvscsi ata_generic pata_acpi [600522.081809] CPU: 3 PID: 15667 Comm: /usr/bin/python Not tainted 4.1.9-100.pd.88.el7.x86_64 #1 [600522.082281] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 09/30/2014 [600522.082814] task: ffff8800bbbfa780 ti: ffff88042ae84000 task.ti: ffff88042ae84000 [600522.083378] RIP: 0010:[<ffffffffa0479e72>] [<ffffffffa0479e72>] nfs_init_commit+0x22/0x130 [nfs] [600522.083973] RSP: 0018:ffff88042ae87438 EFLAGS: 00010246 [600522.084571] RAX: 0000000000000000 RBX: ffff880003485e40 RCX: ffff88042ae87588 [600522.085188] RDX: 0000000000000000 RSI: ffff88042ae874b0 RDI: ffff880003485e40 [600522.085756] RBP: ffff88042ae87448 R08: ffff880003486010 R09: ffff88042ae874b0 [600522.086332] R10: 0000000000000000 R11: 0000000000000005 R12: ffff88042ae872d0 [600522.086905] R13: ffff88042ae874b0 R14: ffff880003485e40 R15: ffff88042704c840 [600522.087484] FS: 00007f4728ff2740(0000) GS:ffff88043fd80000(0000) knlGS:0000000000000000 [600522.088070] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [600522.088663] CR2: 0000000000000040 CR3: 000000042b6aa000 CR4: 00000000001406e0 [600522.089327] Stack: [600522.089926] 0000000000000001 ffff88042ae87588 ffff88042ae874f8 ffffffffa04f09fa [600522.090549] 0000000000017840 0000000000017840 ffff88042ae87588 ffff8803258d9930 [600522.091169] ffff88042ae87578 ffffffffa0563d80 0000000000000000 ffff88042704c840 [600522.091789] Call Trace: [600522.092420] [<ffffffffa04f09fa>] pnfs_generic_commit_pagelist+0x1da/0x320 [nfsv4] [600522.093052] [<ffffffffa0563d80>] ? ff_layout_commit_prepare_v3+0x30/0x30 [nfs_layout_flexfiles] [600522.093696] [<ffffffffa0562645>] ff_layout_commit_pagelist+0x15/0x20 [nfs_layout_flexfiles] [600522.094359] [<ffffffffa047bc78>] nfs_generic_commit_list+0xe8/0x120 [nfs] [600522.095032] [<ffffffffa047bd6a>] nfs_commit_inode+0xba/0x110 [nfs] [600522.095719] [<ffffffffa046ac54>] nfs_release_page+0x44/0xd0 [nfs] [600522.096410] [<ffffffff811a8122>] try_to_release_page+0x32/0x50 [600522.097109] [<ffffffff811bd4f1>] shrink_page_list+0x961/0xb30 [600522.097812] [<ffffffff811bdced>] shrink_inactive_list+0x1cd/0x550 [600522.098530] [<ffffffff811bea65>] shrink_lruvec+0x635/0x840 [600522.099250] [<ffffffff811bed60>] shrink_zone+0xf0/0x2f0 [600522.099974] [<ffffffff811bf312>] do_try_to_free_pages+0x192/0x470 [600522.100709] [<ffffffff811bf6ca>] try_to_free_pages+0xda/0x170 [600522.101464] [<ffffffff811b2198>] __alloc_pages_nodemask+0x588/0x970 [600522.102235] [<ffffffff811fbbd5>] alloc_pages_vma+0xb5/0x230 [600522.103000] [<ffffffff813a1589>] ? cpumask_any_but+0x39/0x50 [600522.103774] [<ffffffff811d6115>] wp_page_copy.isra.55+0x95/0x490 [600522.104558] [<ffffffff810e3438>] ? __wake_up+0x48/0x60 [600522.105357] [<ffffffff811d7d3b>] do_wp_page+0xab/0x4f0 [600522.106137] [<ffffffff810a1bbb>] ? release_task+0x36b/0x470 [600522.106902] [<ffffffff8126dbd7>] ? eventfd_ctx_read+0x67/0x1c0 [600522.107659] [<ffffffff811da2a8>] handle_mm_fault+0xc78/0x1900 [600522.108431] [<ffffffff81067ef1>] __do_page_fault+0x181/0x420 [600522.109173] [<ffffffff811446a6>] ? __audit_syscall_exit+0x1e6/0x280 [600522.109893] [<ffffffff810681c0>] do_page_fault+0x30/0x80 [600522.110594] [<ffffffff81024f36>] ? syscall_trace_leave+0xc6/0x120 [600522.111288] [<ffffffff81790a58>] page_fault+0x28/0x30 [600522.111947] Code: 5d c3 0f 1f 80 00 00 00 00 0f 1f 44 00 00 55 4c 8d 87 d0 01 00 00 48 89 e5 53 48 89 fb 48 83 ec 08 4c 8b 0e 49 8b 41 18 4c 39 ce <48> 8b 40 40 4c 8b 50 30 74 24 48 8b 87 d0 01 00 00 48 8b 7e 08 [600522.113343] RIP [<ffffffffa0479e72>] nfs_init_commit+0x22/0x130 [nfs] [600522.114003] RSP <ffff88042ae87438> [600522.114636] CR2: 0000000000000040 Fixes: af7cf057 (NFS: Allow multiple commit requests in flight per file) CC: stable@vger.kernel.org Signed-off-by: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/pnfs_nfs.c | 28 ++++++++++++++++++++++++++++ fs/nfs/write.c | 4 ++++ 2 files changed, 32 insertions(+) commit 48dd7cefa010b704eb2532a2883798fd6d703a0e Merge: b462b37 f705528 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 09:47:26 2016 -0700 Merge tag 'vfio-v4.7-rc1' of git://github.com/awilliam/linux-vfio Pull VFIO updates from Alex Williamson: - Hide INTx on certain known broken devices (Alex Williamson) - Additional backdoor reset detection (Alex Williamson) - Remove unused iommudata reference (Alexey Kardashevskiy) - Use cfg_size to avoid probing extended config space (Alexey Kardashevskiy) * tag 'vfio-v4.7-rc1' of git://github.com/awilliam/linux-vfio: vfio_pci: Test for extended capabilities if config space > 256 bytes vfio_iommu_spapr_tce: Remove unneeded iommu_group_get_iommudata vfio/pci: Add test for BAR restore vfio/pci: Hide broken INTx support from user commit b462b37b08be1b6a4e380d78b978ec1ff84e2783 Merge: 24c82fb 92181d4 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 09:37:50 2016 -0700 Merge tag 'drm-4.7-rc1-headers-fix' of git://people.freedesktop.org/~airlied/linux Pull header warning fix from Dave Airlie: "Here is the C++ guards warning fix from Arnd" [ Background: there are 'extern "C" { }' guards in include/uapi for the GPU headers. They should arguably be wrapped somehow, but as it is they caused checkpatch to warn because it would trigger on the 'extern' and think it's exporting a function or variable from the kernel to user space. This just fixes checkpatch. Whether we wrap the C++ guards some way in the future will be an independent issue. ] * tag 'drm-4.7-rc1-headers-fix' of git://people.freedesktop.org/~airlied/linux: headers_check: don't warn about c++ guards commit 24c82fbb86c675bc265d2bd815d17c4861c50580 Merge: 28165ec 784c221 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 25 09:27:52 2016 -0700 Merge branch 'parisc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc updates from Helge Deller: - Add native high-resolution timing code for sched_clock() and other timing functions based on the processor internal cr16 cycle counters - Add syscall tracepoint support - Add regset support - Speed up get_user() and put_user() functions - Updated futex.h to match generic implementation (John David Anglin) - A few smaller ftrace build fixes - Fixed thuge-gen kernel self test to utilize architectured MAP_HUGETLB value - Added parisc architecture to seccomp_bpf kernel self test - Various typo fixes (Andrea Gelmini) * 'parisc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Whitespace cleanups in unistd.h parisc: Use long jump to reach ftrace_return_to_handler() parisc: Fix typo in fpudispatch.c parisc: Fix typos in eisa_eeprom.h parisc: Fix typo in ldcw.h parisc: Fix typo in pdc.h parisc: Update futex.h to match generic implementation parisc: Merge ftrace C-helper and assembler functions into .text.hot section selftests/thuge-gen: Use platform specific MAP_HUGETLB value parisc: Add native high-resolution sched_clock() implementation parisc: Add ARCH_TRACEHOOK and regset support parisc: Add 64bit get_user() and put_user() for 32bit kernel parisc: Simplify and speed up get_user() and put_user() parisc: Add syscall tracepoint support commit 2997bfd0492d33d230b1475909a0211157a734bc Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Mon May 23 13:21:01 2016 +0300 NFS: checking for NULL instead of IS_ERR() in nfs_commit_file() nfs_create_request() doesn't return NULL, it returns error pointers. Fixes: 67911c8f18b5 ('NFS: Add nfs_commit_file()') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/write.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6710e594f71ccaad8101bc64321152af7cd9ea28 Author: Tejun Heo <tj@kernel.org> Date: Wed May 25 11:48:25 2016 -0400 percpu: fix synchronization between synchronous map extension and chunk destruction For non-atomic allocations, pcpu_alloc() can try to extend the area map synchronously after dropping pcpu_lock; however, the extension wasn't synchronized against chunk destruction and the chunk might get freed while extension is in progress. This patch fixes the bug by putting most of non-atomic allocations under pcpu_alloc_mutex to synchronize against pcpu_balance_work which is responsible for async chunk management including destruction. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-and-tested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Reported-by: Vlastimil Babka <vbabka@suse.cz> Reported-by: Sasha Levin <sasha.levin@oracle.com> Cc: stable@vger.kernel.org # v3.18+ Fixes: 1a4d76076cda ("percpu: implement asynchronous chunk population") mm/percpu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 4f996e234dad488e5d9ba0858bc1bae12eff82c3 Author: Tejun Heo <tj@kernel.org> Date: Wed May 25 11:48:25 2016 -0400 percpu: fix synchronization between chunk->map_extend_work and chunk destruction Atomic allocations can trigger async map extensions which is serviced by chunk->map_extend_work. pcpu_balance_work which is responsible for destroying idle chunks wasn't synchronizing properly against chunk->map_extend_work and may end up freeing the chunk while the work item is still in flight. This patch fixes the bug by rolling async map extension operations into pcpu_balance_work. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-and-tested-by: Alexei Starovoitov <alexei.starovoitov@gmail.com> Reported-by: Vlastimil Babka <vbabka@suse.cz> Reported-by: Sasha Levin <sasha.levin@oracle.com> Cc: stable@vger.kernel.org # v3.18+ Fixes: 9c824b6a172c ("percpu: make sure chunk->map array has available space") mm/percpu.c | 57 ++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 21 deletions(-) commit b9d8905e4a751e2cdc0fb474856b7183c594dcc6 Author: Mikulas Patocka <mikulas@twibright.com> Date: Tue May 24 22:51:27 2016 +0200 reiserfs: check kstrdup failure Check out-of-memory failure of the kstrdup option. Note that the argument "arg" may be NULL (in that case kstrup returns NULL), so out of memory condition happened if arg was non-NULL and kstrdup returned NULL. The patch also changes the call to replace_mount_options - if we didn't pass any filesystem-specific options, we don't call replace_mount_options (thus we don't erase existing reported options). Note that to properly report options after remount, the reiserfs filesystem should implement the show_options method. Without the show_options method, options changed with remount replace existing options. Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz> fs/reiserfs/super.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit fabc712866435660f7fa1070e1fabe29eba5bc4c Author: Janosch Frank <frankja@linux.vnet.ibm.com> Date: Wed May 18 13:26:25 2016 +0200 tools: kvm_stat: Add comments A lot of the code works with the perf events about which only sparse documentation was available until 2012. Having that information now, we can clarify what is done in the code. Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> tools/kvm/kvm_stat/kvm_stat | 161 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 159 insertions(+), 2 deletions(-) commit f0cf040f842242d55744c2606e8b7177507fbbb0 Author: Janosch Frank <frankja@linux.vnet.ibm.com> Date: Wed May 18 13:26:24 2016 +0200 tools: kvm_stat: Introduce pid monitoring Having stats for single VMs can help to determine the problem of a VM without the need of running other tools like perf. The tracepoints already allowed pid level monitoring, but kvm_stat didn't have support for it till now. Support for the newly implemented debugfs vm monitoring was also implemented. Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> tools/kvm/kvm_stat/kvm_stat | 183 +++++++++++++++++++++++++++++++++++----- tools/kvm/kvm_stat/kvm_stat.txt | 6 +- 2 files changed, 167 insertions(+), 22 deletions(-) commit 536a6f88c49dd739961ffd53774775afed852c83 Author: Janosch Frank <frankja@linux.vnet.ibm.com> Date: Wed May 18 13:26:23 2016 +0200 KVM: Create debugfs dir and stat files for each VM This patch adds a kvm debugfs subdirectory for each VM, which is named after its pid and file descriptor. The directories contain the same kind of files that are already in the kvm debugfs directory, but the data exported through them is now VM specific. This makes the debugfs kvm data a convenient alternative to the tracepoints which already have per VM data. The debugfs data is easy to read and low overhead. CC: Dan Carpenter <dan.carpenter@oracle.com> [includes fixes by Dan Carpenter] Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> include/linux/kvm_host.h | 7 ++ virt/kvm/kvm_main.c | 187 ++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 184 insertions(+), 10 deletions(-) commit 6d0a1a61e7b2eb21415aea7e3c5df7c6e456f33a Author: Janosch Frank <frankja@linux.vnet.ibm.com> Date: Wed May 18 13:26:22 2016 +0200 MAINTAINERS: Add kvm tools The new kvm subdirectory in tools contains kvm related scripts. Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit c7d4fb5a6ebea2d3e8b3a1c251cc30bc56319897 Author: Hemant Kumar <hemant@linux.vnet.ibm.com> Date: Tue Apr 19 08:54:54 2016 +0530 tools: kvm_stat: Powerpc related fixes kvm_stat script is failing to execute on powerpc : # ./kvm_stat Traceback (most recent call last): File "./kvm_stat", line 825, in <module> main() File "./kvm_stat", line 813, in main providers = get_providers(options) File "./kvm_stat", line 778, in get_providers providers.append(TracepointProvider()) File "./kvm_stat", line 416, in __init__ self.filters = get_filters() File "./kvm_stat", line 315, in get_filters if ARCH.exit_reasons: AttributeError: 'ArchPPC' object has no attribute 'exit_reasons' This is because, its trying to access a non-defined attribute. Also, the IOCTL number of RESET is incorrect for powerpc. The correct number has been added. Signed-off-by: Hemant Kumar <hemant@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> tools/kvm/kvm_stat/kvm_stat | 2 ++ 1 file changed, 2 insertions(+) commit fd41b5a96948f67785458c04e9ddb5ef619251d5 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Tue May 24 10:41:15 2016 +0200 tools: Add kvm_stat man page Converted from the Texinfo source in QEMU to asciidoc. The a2x incantation was provided by Janosch Frank. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> tools/kvm/kvm_stat/Makefile | 40 +++++++++++++++++++++++++-- tools/kvm/kvm_stat/kvm_stat.txt | 61 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 2 deletions(-) commit f9bc9e65fbec1781f64effc6bcc3b6edc57f8d19 Author: Janosch Frank <frankja@linux.vnet.ibm.com> Date: Wed May 18 13:26:21 2016 +0200 tools: Add kvm_stat vm monitor script This tool displays kvm vm exit statistics to ease vm monitoring. It takes its data from the kvm debugfs files or the vm tracepoints and outputs them as a curses ui or simple text. It was moved from qemu, as it is dependent on the kernel whereas qemu works with a large number of kernel versions, some of which may break the script. Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> tools/Makefile | 6 +- tools/kvm/kvm_stat/Makefile | 5 + tools/kvm/kvm_stat/kvm_stat | 825 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 835 insertions(+), 1 deletion(-) commit 3ce424e45411cf5a13105e0386b6ecf6eeb4f66f Author: Roman Kagan <rkagan@virtuozzo.com> Date: Wed May 18 17:48:20 2016 +0300 kvm:vmx: more complete state update on APICv on/off The function to update APICv on/off state (in particular, to deactivate it when enabling Hyper-V SynIC) is incomplete: it doesn't adjust APICv-related fields among secondary processor-based VM-execution controls. As a result, Windows 2012 guests get stuck when SynIC-based auto-EOI interrupt intersected with e.g. an IPI in the guest. In addition, the MSR intercept bitmap isn't updated every time "virtualize x2APIC mode" is toggled. This path can only be triggered by a malicious guest, because Windows didn't use x2APIC but rather their own synthetic APIC access MSRs; however a guest running in a SynIC-enabled VM could switch to x2APIC and thus obtain direct access to host APIC MSRs (CVE-2016-4440). The patch fixes those omissions. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> Reported-by: Steve Rutherford <srutherford@google.com> Reported-by: Yang Zhang <yang.zhang.wz@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/vmx.c | 48 ++++++++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 18 deletions(-) commit 425c452b547622fb728c9ed4fe99c3f2f51d816d Author: Jeff Mahoney <jeffm@suse.com> Date: Tue May 24 13:47:44 2016 -0400 drm/amd: add Kconfig dependency for ACP on DRM_AMDGPU The DRM_AMD_ACP option doesn't have any dependencies and selects MFD_CORE, which results in MFD_CORE=y. Since the code is only called from DRM_AMDGPU, it should depend on it. Adding the dependency results in MFD_CORE being selected as a module again if amdgpu is also a module. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/acp/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 9d746ab68163d642dae13756b2b3145b2e38cb65 Author: Mario Kleiner <mario.kleiner.de@gmail.com> Date: Tue May 24 18:12:43 2016 +0200 drm/amdgpu: Fix hdmi deep color support. When porting the hdmi deep color detection code from radeon-kms to amdgpu-kms apparently some kind of copy and paste error happened, attaching an else branch to the wrong if statement. The result is that hdmi deep color mode is always disabled, regardless of gpu and display capabilities and user wishes, as the code mistakenly thinks that the display doesn't provide the required max_tmds_clock limit and falls back to 8 bpc. This patch fixes deep color support, as tested on a R9 380 Tonga Pro + suitable display, and should be backported to all kernels with amdgpu-kms support. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: stable@vger.kernel.org Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 48c60c03bcac36bb443f771b5e221a47d501b2ad Author: Monk Liu <Monk.Liu@amd.com> Date: Wed May 18 16:15:47 2016 +0800 drm/amdgpu: fix bug in fence driver fini Using wrong counter for walking fences. Fixes a crash when unloading the driver. Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 784c2213e79c094ffd9c1118722ac9ee5fce5e77 Author: Helge Deller <deller@gmx.de> Date: Wed May 25 15:40:49 2016 +0200 parisc: Whitespace cleanups in unistd.h Clean up whitespaces and mark unused syscalls as such. Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/include/uapi/asm/unistd.h | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) commit ab6a11a7c8ef47f996974dd3c648c2c0b1a36ab1 Author: Tom Lendacky <thomas.lendacky@amd.com> Date: Fri May 20 17:33:03 2016 -0500 crypto: ccp - Fix AES XTS error for request sizes above 4096 The ccp-crypto module for AES XTS support has a bug that can allow requests greater than 4096 bytes in size to be passed to the CCP hardware. The CCP hardware does not support request sizes larger than 4096, resulting in incorrect output. The request should actually be handled by the fallback mechanism instantiated by the ccp-crypto module. Add a check to insure the request size is less than or equal to the maximum supported size and use the fallback mechanism if it is not. Cc: <stable@vger.kernel.org> # 3.14.x- Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/ccp/ccp-crypto-aes-xts.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit dc3ee32e96d74dd6c80eed63af5065cb75899299 Author: Eric W. Biederman <ebiederm@xmission.com> Date: Fri May 13 21:18:52 2016 -0500 netfilter: nf_queue: Make the queue_handler pernet Florian Weber reported: > Under full load (unshare() in loop -> OOM conditions) we can > get kernel panic: > > BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 > IP: [<ffffffff81476c85>] nfqnl_nf_hook_drop+0x35/0x70 > [..] > task: ffff88012dfa3840 ti: ffff88012dffc000 task.ti: ffff88012dffc000 > RIP: 0010:[<ffffffff81476c85>] [<ffffffff81476c85>] nfqnl_nf_hook_drop+0x35/0x70 > RSP: 0000:ffff88012dfffd80 EFLAGS: 00010206 > RAX: 0000000000000008 RBX: ffffffff81add0c0 RCX: ffff88013fd80000 > [..] > Call Trace: > [<ffffffff81474d98>] nf_queue_nf_hook_drop+0x18/0x20 > [<ffffffff814738eb>] nf_unregister_net_hook+0xdb/0x150 > [<ffffffff8147398f>] netfilter_net_exit+0x2f/0x60 > [<ffffffff8141b088>] ops_exit_list.isra.4+0x38/0x60 > [<ffffffff8141b652>] setup_net+0xc2/0x120 > [<ffffffff8141bd09>] copy_net_ns+0x79/0x120 > [<ffffffff8106965b>] create_new_namespaces+0x11b/0x1e0 > [<ffffffff810698a7>] unshare_nsproxy_namespaces+0x57/0xa0 > [<ffffffff8104baa2>] SyS_unshare+0x1b2/0x340 > [<ffffffff81608276>] entry_SYSCALL_64_fastpath+0x1e/0xa8 > Code: 65 00 48 89 e5 41 56 41 55 41 54 53 83 e8 01 48 8b 97 70 12 00 00 48 98 49 89 f4 4c 8b 74 c2 18 4d 8d 6e 08 49 81 c6 88 00 00 00 <49> 8b 5d 00 48 85 db 74 1a 48 89 df 4c 89 e2 48 c7 c6 90 68 47 > The simple fix for this requires a new pernet variable for struct nf_queue that indicates when it is safe to use the dynamically allocated nf_queue state. As we need a variable anyway make nf_register_queue_handler and nf_unregister_queue_handler pernet. This allows the existing logic of when it is safe to use the state from the nfnetlink_queue module to be reused with no changes except for making it per net. The syncrhonize_rcu from nf_unregister_queue_handler is moved to a new function nfnl_queue_net_exit_batch so that the worst case of having a syncrhonize_rcu in the pernet exit path is not experienced in batch mode. Reported-by: Florian Westphal <fw@strlen.de> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> include/net/netfilter/nf_queue.h | 4 ++-- include/net/netns/netfilter.h | 2 ++ net/netfilter/nf_queue.c | 17 ++++++++--------- net/netfilter/nfnetlink_queue.c | 18 ++++++++++++------ 4 files changed, 24 insertions(+), 17 deletions(-) commit 720b287d8382616a29524dd98264ac1e3a069e9f Author: Florian Westphal <fw@strlen.de> Date: Fri May 13 22:48:51 2016 +0200 netfilter: conntrack: remove leftover binary sysctl define Users got removed in f8572d8f2a2ba ("sysctl net: Remove unused binary sysctl code"). Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/netfilter/nf_conntrack_standalone.c | 2 -- 1 file changed, 2 deletions(-) commit 275ae411e56f8f900fa364da29c4706f9af4e1f3 Author: Vincent Stehlé <vincent.stehle@intel.com> Date: Tue May 24 16:53:49 2016 +0200 perf/x86/intel/rapl: Fix pmus free during cleanup On rapl cleanup path, kfree() is given by mistake the address of the pointer of the structure to free (rapl_pmus->pmus + i). Pass the pointer instead (rapl_pmus->pmus[i]). Fixes: 9de8d686955b "perf/x86/intel/rapl: Convert it to a per package facility" Signed-off-by: Vincent Stehlé <vincent.stehle@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: stable@vger.kernel.org Link: http://lkml.kernel.org/r/1464101629-14905-1-git-send-email-vincent.stehle@intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de> arch/x86/events/intel/rapl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b7e7ade34e6188bee2e3b0d42b51d25137d9e2a5 Author: Peter Zijlstra <peterz@infradead.org> Date: Mon May 23 11:19:07 2016 +0200 sched/core: Fix remote wakeups Commit: b5179ac70de8 ("sched/fair: Prepare to fix fairness problems on migration") ... introduced a bug: Mike Galbraith found that it introduced a performance regression, while Paul E. McKenney reported lost wakeups and bisected it to this commit. The reason is that I mis-read ttwu_queue() such that I assumed any wakeup that got a remote queue must have had the task migrated. Since this is not so; we need to transfer this information between queueing the wakeup and actually doing the wakeup. Use a new task_struct::sched_flag for this, we already write to sched_contributes_to_load in the wakeup path so this is a hot and modified cacheline. Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reported-by: Mike Galbraith <umgwanakikbuti@gmail.com> Tested-by: Mike Galbraith <umgwanakikbuti@gmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Hunter <ahh@google.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Ben Segall <bsegall@google.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Morten Rasmussen <morten.rasmussen@arm.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Paul Turner <pjt@google.com> Cc: Pavan Kondeti <pkondeti@codeaurora.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: byungchul.park@lge.com Fixes: b5179ac70de8 ("sched/fair: Prepare to fix fairness problems on migration") Link: http://lkml.kernel.org/r/20160523091907.GD15728@worktop.ger.corp.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org> include/linux/sched.h | 1 + kernel/sched/core.c | 18 +++++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) commit 86c72d1ce91d804e4fa8d90b316a89597dd220f1 Author: Hui Wang <hui.wang@canonical.com> Date: Wed May 25 12:12:32 2016 +0800 ALSA: hda - Fix headset mic detection problem for one Dell machine Add the pin configuration value of this machine into the pin_quirk table to make DELL1_MIC_NO_PRESENCE apply to this machine. Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/patch_realtek.c | 3 +++ 1 file changed, 3 insertions(+) commit e411295e3ec0b470795a860ec3cc51edf64407c4 Merge: 92181d4 310944d Author: Dave Airlie <airlied@redhat.com> Date: Wed May 25 12:36:20 2016 +1000 Merge tag 'imx-drm-fixes-2016-05-24' of git://git.pengutronix.de/git/pza/linux into drm-next imx-drm probing fix Commit 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading") broke probing of the imx-drm driver in the non-modular case because the unset dev->of_node during probing of imx-ipuv3-crtc would cause the component matching to fail. This patch patch instead matches against an of_node pointer stored in platform data, allowing dev->of_node to be left unset for the platform probed imx-ipuv3-crtc devices. * tag 'imx-drm-fixes-2016-05-24' of git://git.pengutronix.de/git/pza/linux: drm/imx: Match imx-ipuv3-crtc components using device node in platform data commit 3d3ed18151172c845a11b7c184f2120220ae19fc Author: Jamal Hadi Salim <jhs@mojatatu.com> Date: Mon May 23 21:07:20 2016 -0400 net sched actions: policer missing timestamp processing Policer was not dumping or updating timestamps Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com> Acked-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/uapi/linux/pkt_cls.h | 4 +++- net/sched/act_police.c | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) commit 28165ec7a99be98123aa89540bf2cfc24df19498 Merge: 08344f3 09564b7 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 15:50:58 2016 -0700 Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Arnd Bergmann: "This is a first set of bug fixes on top of what was merged for 4.7. Two patches for lpc32xx address a harmless build warning that was just introduced, one patch for the mediatek soc driver fixes a warning for arm64, and the pxa changes are minor cleanups that should have been part of the original pull requests but that I forgot to apply to the cleanup-fixes branch earlier" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: lpc32xx: fix NR_IRQS confict ARM: lpc32xx: remove legacy irq controller driver soc: mtk-pmic-wrap: avoid integer overflow warning ARM: pxa: Remove CLK_IS_ROOT ARM: pxa: activate pinctrl for device-tree machines commit 08344f3b43a6bfaf2926122cef44d9a9583c2a4e Merge: d04f90f 88f1847 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 15:46:06 2016 -0700 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: "This is a collection of a few late fixes and other misc stuff that had dependencies on things being merged from other trees. The Renesas R-Car power domain handling, and the Nvidia Tegra USB support both hand notable changes that required changing the DT binding in a way that only provides compatibility with old DT blobs on new kernels but not vice versa. As a consequence, the DT changes are based on top of the driver changes and are now in this branch. For NXP i.MX and Samsung Exynos, the changes in here depend on other changes that got merged through the clk maintainer tree" * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (35 commits) ARM: dts: exynos: Add support of Bus frequency using VDD_INT for exynos5422-odroidxu3 ARM: dts: exynos: Add bus nodes using VDD_INT for Exynos542x SoC ARM: dts: exynos: Add NoC Probe dt node for Exynos542x SoC ARM: dts: exynos: Add support of bus frequency for exynos4412-trats/odroidu3 ARM: dts: exynos: Expand the voltage range of buck1/3 regulator for exynos4412-odroidu3 ARM: dts: exynos: Add support of bus frequency using VDD_INT for exynos3250-rinato ARM: dts: exynos: Add exynos4412-ppmu-common dtsi to delete duplicate PPMU nodes ARM: dts: exynos: Add bus nodes using VDD_MIF for Exynos4210 ARM: dts: exynos: Add bus nodes using VDD_INT for Exynos4x12 ARM: dts: exynos: Add bus nodes using VDD_MIF for Exynos4x12 ARM: dts: exynos: Add bus nodes using VDD_INT for Exynos3250 ARM: dts: exynos: Add DMC bus frequency for exynos3250-rinato/monk ARM: dts: exynos: Add DMC bus node for Exynos3250 ARM: tegra: Enable XUSB on Nyan ARM: tegra: Enable XUSB on Jetson TK1 ARM: tegra: Enable XUSB on Venice2 ARM: tegra: Add Tegra124 XUSB controller ARM: tegra: Move Tegra124 to the new XUSB pad controller binding ARM: dts: r8a7794: Use SYSC "always-on" PM Domain ARM: dts: r8a7793: Use SYSC "always-on" PM Domain ... commit d04f90ffecb7f6d7358197d7544f5536b6d4d8cc Merge: 5d22c5a b0da6d4 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 15:24:37 2016 -0700 Merge tag 'asm-generic-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic Pull asm-generic cleanup from Arnd Bergmann: "I have only one patch for asm-generic in this release, this one is from James Hogan and updates the generic system call table for renameat2 so we don't need to provide both renameat and renameat2 in newly added architectures" * tag 'asm-generic-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/asm-generic: asm-generic: Drop renameat syscall from default list commit a9efad8b24bd22616f6c749a6c029957dc76542b Author: Eric Dumazet <edumazet@google.com> Date: Mon May 23 14:24:56 2016 -0700 net_sched: avoid too many hrtimer_start() calls I found a serious performance bug in packet schedulers using hrtimers. sch_htb and sch_fq are definitely impacted by this problem. We constantly rearm high resolution timers if some packets are throttled in one (or more) class, and other packets are flying through qdisc on another (non throttled) class. hrtimer_start() does not have the mod_timer() trick of doing nothing if expires value does not change : if (timer_pending(timer) && timer->expires == expires) return 1; This issue is particularly visible when multiple cpus can queue/dequeue packets on the same qdisc, as hrtimer code has to lock a remote base. I used following fix : 1) Change htb to use qdisc_watchdog_schedule_ns() instead of open-coding it. 2) Cache watchdog prior expiration. hrtimer might provide this, but I prefer to not rely on some hrtimer internal. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/pkt_sched.h | 1 + net/sched/sch_api.c | 4 ++++ net/sched/sch_htb.c | 13 +++---------- 3 files changed, 8 insertions(+), 10 deletions(-) commit 3275c0c6c522ab04afa14f80efdac6213c3883d6 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Mon May 23 11:58:28 2016 +1000 net/qlge: Avoids recursive EEH error One timer, whose handler keeps reading on MMIO register for EEH core to detect error in time, is started when the PCI device driver is loaded. MMIO register can't be accessed during PE reset in EEH recovery. Otherwise, the unexpected recursive error is triggered. The timer isn't closed that time if the interface isn't brought up. So the unexpected recursive error is seen during EEH recovery when the interface is down. This avoids the unexpected recursive EEH error by closing the timer in qlge_io_error_detected() before EEH PE reset unconditionally. The timer is started unconditionally after EEH PE reset in qlge_io_resume(). Also, the timer should be closed unconditionally when the device is removed from the system permanently in qlge_io_error_detected(). Reported-by: Shriya R. Kulkarni <shriyakul@in.ibm.com> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qlge/qlge_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 5d22c5ab85e4de3c14d9e79eefc2835f4a8f9b2a Merge: 0e01df1 c0cb8bf Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 14:39:20 2016 -0700 Merge tag 'nfsd-4.7' of git://linux-nfs.org/~bfields/linux Pull nfsd updates from Bruce Fields: "A very quiet cycle for nfsd, mainly just an RDMA update from Chuck Lever" * tag 'nfsd-4.7' of git://linux-nfs.org/~bfields/linux: sunrpc: fix stripping of padded MIC tokens svcrpc: autoload rdma module svcrdma: Generalize svc_rdma_xdr_decode_req() svcrdma: Eliminate code duplication in svc_rdma_recvfrom() svcrdma: Drain QP before freeing svcrdma_xprt svcrdma: Post Receives only for forward channel requests svcrdma: Remove superfluous line from rdma_read_chunks() svcrdma: svc_rdma_put_context() is invoked twice in Send error path svcrdma: Do not add XDR padding to xdr_buf page vector svcrdma: Support IPv6 with NFS/RDMA nfsd: handle seqid wraparound in nfsd4_preprocess_layout_stateid Remove unnecessary allocation commit 252f3f5a1189a7f6c309d8e4ff1c4c1888a27f13 Author: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Date: Sat May 21 18:17:35 2016 +0800 ip6_gre: Set flowi6_proto as IPPROTO_GRE in xmit path. In gre6 xmit path, we are sending a GRE packet, so set fl6 proto to IPPROTO_GRE properly. Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_gre.c | 1 + 1 file changed, 1 insertion(+) commit 1b227e536662eae4b7beee3037edbecdc577495f Author: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Date: Sat May 21 18:17:34 2016 +0800 ip6_gre: Fix MTU setting for ip6gretap When creat an ip6gretap interface with an unreachable route, the MTU is about 14 bytes larger than what was needed. If the remote address is reachable: ping6 2001:0:130::1 -c 2 PING 2001:0:130::1(2001:0:130::1) 56 data bytes 64 bytes from 2001:0:130::1: icmp_seq=1 ttl=64 time=1.46 ms 64 bytes from 2001:0:130::1: icmp_seq=2 ttl=64 time=81.1 ms Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_gre.c | 2 ++ 1 file changed, 2 insertions(+) commit 0e01df100b6bf22a1de61b66657502a6454153c5 Merge: a56f489 12735f8 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 12:55:26 2016 -0700 Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 updates from Ted Ts'o: "Fix a number of bugs, most notably a potential stale data exposure after a crash and a potential BUG_ON crash if a file has the data journalling flag enabled while it has dirty delayed allocation blocks that haven't been written yet. Also fix a potential crash in the new project quota code and a maliciously corrupted file system. In addition, fix some DAX-specific bugs, including when there is a transient ENOSPC situation and races between writes via direct I/O and an mmap'ed segment that could lead to lost I/O. Finally the usual set of miscellaneous cleanups" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (23 commits) ext4: pre-zero allocated blocks for DAX IO ext4: refactor direct IO code ext4: fix race in transient ENOSPC detection ext4: handle transient ENOSPC properly for DAX dax: call get_blocks() with create == 1 for write faults to unwritten extents ext4: remove unmeetable inconsisteny check from ext4_find_extent() jbd2: remove excess descriptions for handle_s ext4: remove unnecessary bio get/put ext4: silence UBSAN in ext4_mb_init() ext4: address UBSAN warning in mb_find_order_for_block() ext4: fix oops on corrupted filesystem ext4: fix check of dqget() return value in ext4_ioctl_setproject() ext4: clean up error handling when orphan list is corrupted ext4: fix hang when processing corrupted orphaned inode list ext4: remove trailing \n from ext4_warning/ext4_error calls ext4: fix races between changing inode journal mode and ext4_writepages ext4: handle unwritten or delalloc buffers before enabling data journaling ext4: fix jbd2 handle extension in ext4_ext_truncate_extend_restart() ext4: do not ask jbd2 to write data for delalloc buffers jbd2: add support for avoiding data writes during transaction commits ... commit 09564b7d84d753e4aa1198017b5a5e86c7b0539f Author: Arnd Bergmann <arnd@arndb.de> Date: Thu May 19 10:31:31 2016 +0200 ARM: lpc32xx: fix NR_IRQS confict With the change to sparse IRQs, the lpc32xx platform gets a warning about conflicting macros: In file included from arch/arm/mach-lpc32xx/irq.c:31:0: arch/arm/mach-lpc32xx/include/mach/irqs.h:115:0: warning: "NR_IRQS" redefined #define NR_IRQS 96 arch/arm/include/asm/irq.h:9:0: note: this is the location of the previous definition #define NR_IRQS NR_IRQS_LEGACY One such instance was in the old irq driver that is now removed by the previous patch, but any other file including mach/irqs.h still has the issue. Since none of them use this constant, we can just remove the old definition. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 8cb17b5ed017 ("irqchip: Add LPC32xx interrupt controller driver") arch/arm/mach-lpc32xx/include/mach/irqs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 342f3f9bf6fc2af67f00a07703053e2b1f882afd Author: Vladimir Zapolskiy <vz@mleia.com> Date: Mon Apr 25 04:00:44 2016 +0300 ARM: lpc32xx: remove legacy irq controller driver New NXP LPC32xx irq chip driver is used instead of a legacy one. [this also fixes a harmless build warning about the NR_IRQS redefinition] Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm/mach-lpc32xx/Makefile | 2 +- arch/arm/mach-lpc32xx/irq.c | 477 ----------------------------------------- 2 files changed, 1 insertion(+), 478 deletions(-) commit ae43f8286730d1f2d241c34601df59f6d2286ac4 Author: Mark Bloch <markb@mellanox.com> Date: Thu May 19 17:12:36 2016 +0300 IB/core: Add IP to GID netlink offload There is an assumption that rdmacm is used only between nodes in the same IB subnet, this why ARP resolution can be used to turn IP to GID in rdmacm. When dealing with IB communication between subnets this assumption is no longer valid. ARP resolution will get us the next hop device address and not the peer node's device address. To solve this issue, we will check user space if it can provide the GID of the peer node, and fail if not. We add a sequence number to identify each request and fill in the GID upon answer from userspace. Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/addr.c | 217 ++++++++++++++++++++++++++++++++---- drivers/infiniband/core/core_priv.h | 2 + drivers/infiniband/core/device.c | 3 + 3 files changed, 198 insertions(+), 24 deletions(-) commit 735c631ae99d4b6cffc9e2774258329c526daa65 Author: Mark Bloch <markb@mellanox.com> Date: Thu May 19 17:12:35 2016 +0300 IB/core: Register SA ibnl client during ib_core initialization Move SA ibnl client registration to ib_core module init. This will allow us to register a single client to handle all RDMA_NL_LS operations and make it SA independent. Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/core_priv.h | 5 +++++ drivers/infiniband/core/device.c | 28 ++++++++++++++++++++++++++++ drivers/infiniband/core/sa_query.c | 27 +++++---------------------- 3 files changed, 38 insertions(+), 22 deletions(-) commit c34d3761872a2784d7bae2a0bb6205e8ee07a7f7 Author: Mark Bloch <markb@mellanox.com> Date: Thu May 19 17:12:34 2016 +0300 IB/netlink: Add a new local service operation This commits adds a new RDMA local service operation: - IP to GID resolution. The client request would include the ifindex of the outgoing interface and would place in an attribute (LS_NLA_TYPE_IPV4 or LS_NLA_TYPE_IPV6) the destnation IP. The local service would answer with a message that has the attribute: - LS_NLA_TYPE_DGID - The destination GID. Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> include/uapi/rdma/rdma_netlink.h | 10 ++++++++++ 1 file changed, 10 insertions(+) commit c2e49c92326f9baaa490492c48bea5a7f49d3244 Author: Mark Bloch <markb@mellanox.com> Date: Thu May 19 17:12:33 2016 +0300 IB/SA: Integrate ib_sa module into ib_core module Consolidate ib_sa into ib_core, this commit eliminates ib_sa.ko and makes it part of ib_core.ko Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/Makefile | 9 +++------ drivers/infiniband/core/core_priv.h | 3 +++ drivers/infiniband/core/device.c | 9 +++++++++ drivers/infiniband/core/sa_query.c | 11 ++--------- 4 files changed, 17 insertions(+), 15 deletions(-) commit 4c2cb4220431cbf92233dc12733ee8962abb9081 Author: Mark Bloch <markb@mellanox.com> Date: Thu May 19 17:12:32 2016 +0300 IB/MAD: Integrate ib_mad module into ib_core module Consolidate ib_mad into ib_core, this commit eliminates ib_mad.ko and makes it part of ib_core.ko Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/Makefile | 7 +++---- drivers/infiniband/core/core_priv.h | 3 +++ drivers/infiniband/core/device.c | 9 +++++++++ drivers/infiniband/core/mad.c | 13 +++---------- 4 files changed, 18 insertions(+), 14 deletions(-) commit e3f20f02864f6da1509c523bfa1e928619e59095 Author: Leon Romanovsky <leonro@mellanox.com> Date: Thu May 19 17:12:31 2016 +0300 IB/core: Integrate IB address resolution module into core IB address resolution is declared as a module (ib_addr.ko) which loads itself before IB core module (ib_core.ko). It causes to the scenario where IB netlink which is initialized by IB core can't be used by ib_addr.ko. In order to solve it, we are converting ib_addr.ko to be part of IB core module. Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/Makefile | 6 ++---- drivers/infiniband/core/addr.c | 11 ++--------- drivers/infiniband/core/core_priv.h | 3 +++ drivers/infiniband/core/device.c | 9 +++++++++ 4 files changed, 16 insertions(+), 13 deletions(-) commit a56f489502e28caac56c8a0735549740f0ae0711 Merge: 8bc4d5f c4e85b7 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 11:12:32 2016 -0700 Merge tag 'spi-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi updates from Mark Brown: "Another quiet release for SPI, almost entirely driver specific changes with the diffstat dominated by two new drivers which are about two thirds of it in terms of lines of code: - new drivers for PIC32 standard and SQI controllers - the Cadence driver has had runtime PM support added and quite a few fixes and cleanups - flash-specific accelerated path support now has a feature query interface - the pxa2xx driver has been moved to use the core DMA mapping support" * tag 'spi-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: (48 commits) spi: pic32-sqi: Fix linker error, undefined reference to `bad_dma_ops' spi: dw-pci: Spelling s/paltforms/platforms/g spi: pic32-sqi: Remove pic32_sqi_setup and pic32_sqi_cleanup spi: Fix simple typo s/impelment/implement spi: rockchip: potential NULL dereference on error spi: zynqmp: disable clocks in error paths spi: Drop unnecessary dependencies on relaxed I/O accessors spi: qup: Add spi_master_put in remove function spi: qup: Handle clocks in pm_runtime suspend and resume spi: st-ssc4: Fix missing spi_master_put in spi_st_probe error paths spi: st-ssc4: Allow compile test build spi: omap2-mcspi: Use dma_request_chan() for requesting DMA channel spi: davinci: Use dma_request_chan() for requesting DMA channel spi: pic32: Fix checking return value of devm_ioremap_resource spi: spi-fsl-dspi: Update DT binding documentation spi: Drop duplicate code to set master->dev.parent spi: pic32: Set proper bits_per_word_mask spi: return error if kmap'd buffers passed to spi_map_buf() spi: core: add hook flash_read_supported to spi_master spi: pic32-sqi: silence array overflow warning ... commit 8bc4d5f394a3facbad6af2f18940f1db3b1a0844 Merge: 2956729 e5366a2 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 11:00:20 2016 -0700 Merge tag 'for-linus-20160523' of git://git.infradead.org/linux-mtd Pull MTD updates from Brian Norris: "First cycle with Boris as NAND maintainer! Many (most) bullets stolen from him. Generic: - Migrated NAND LED trigger to be a generic MTD trigger NAND: - Introduction of the "ECC algorithm" concept, to avoid overloading the ECC mode field too much more - Replaced the nand_ecclayout infrastructure with something a little more flexible (finally!) and future proof - Rework of the OMAP GPMC and NAND drivers; the TI folks pulled some of this into their own tree as well - Prepare the sunxi NAND driver to receive DMA support - Handle bitflips in erased pages on GPMI revisions that do not support this in hardware. SPI NOR: - Start using the spi_flash_read() API for SPI drivers that support it (i.e., SPI drivers with special memory-mapped flash modes) And other small scattered improvments" * tag 'for-linus-20160523' of git://git.infradead.org/linux-mtd: (155 commits) mtd: spi-nor: support GigaDevice gd25lq64c mtd: nand_bch: fix spelling of "probably" mtd: brcmnand: respect ECC algorithm set by NAND subsystem gpmi-nand: Handle ECC Errors in erased pages Documentation: devicetree: deprecate "soft_bch" nand-ecc-mode value mtd: nand: add support for "nand-ecc-algo" DT property mtd: mtd: drop NAND_ECC_SOFT_BCH enum value mtd: drop support for NAND_ECC_SOFT_BCH as "soft_bch" mapping mtd: nand: read ECC algorithm from the new field mtd: nand: fsmc: validate ECC setup by checking algorithm directly mtd: nand: set ECC algorithm to Hamming on fallback staging: mt29f_spinand: set ECC algorithm explicitly CRIS v32: nand: set ECC algorithm explicitly mtd: nand: atmel: set ECC algorithm explicitly mtd: nand: davinci: set ECC algorithm explicitly mtd: nand: bf5xx: set ECC algorithm explicitly mtd: nand: omap2: Fix high memory dma prefetch transfer mtd: nand: omap2: Start dma request before enabling prefetch mtd: nandsim: add __init attribute mtd: nand: move of_get_nand_xxx() helpers into nand_base.c ... commit 29567292c0b5b2fb484125c280a2175141fe2205 Merge: ecaba71 dd14be9 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 10:22:34 2016 -0700 Merge tag 'for-linus-4.7-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen bug fixes from David Vrabel. * tag 'for-linus-4.7-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: use same main loop for counting and remapping pages xen/events: Don't move disabled irqs xen/x86: actually allocate legacy interrupts on PV guests Xen: don't warn about 2-byte wchar_t in efi xen/gntdev: reduce copy batch size to 16 xen/x86: don't lose event interrupts commit ecaba7185894778c24895356d117a7f92e3c92de Merge: e989cc5 bb99128 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 09:46:45 2016 -0700 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost Pull virtio updates from Michael Tsirkin: "Looks like a quiet cycle for virtio. There's a new inorder option for the ringtest tool, and a bugfix for balloon for ppc platforms when using virtio 1 mode" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: ringtest: pass buf != NULL virtio_balloon: fix PFN format for virtio-1 virtio: add inorder option commit e989cc564691901d42e957059592fe3e7b6893fc Merge: 36b150b 9fa78f6 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 09:41:46 2016 -0700 Merge tag 'nios2-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2 Pull nios2 update from Ley Foon Tan: - add order-only DTC dependency to %.dtb target - fix libgcc location detection * tag 'nios2-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lftan/nios2: nios2: Add order-only DTC dependency to %.dtb target nios2: Fix libgcc location detection commit 36b150bbcc1125abaad89963420a37ff70686d5a Merge: 84787c5 52e9e6e Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 24 09:19:38 2016 -0700 Merge tag 'microblaze-4.7-rc1' of git://git.monstr.eu/linux-2.6-microblaze Pull Microblaze updates from Michal Simek: - Wire-up new syscalls - Fix link error * tag 'microblaze-4.7-rc1' of git://git.monstr.eu/linux-2.6-microblaze: microblaze: pci: export isa_io_base to fix link errors microblaze: Wire up userfaultfd, membarrier, mlock2 syscalls commit f7aa23cb8dba96b92f46e47101d360c5e0fa4e3b Author: Fabio Estevam <fabio.estevam@nxp.com> Date: Mon May 23 23:24:21 2016 -0300 spi: spi-ep93xx: Fix the PTR_ERR() argument PTR_ERR should access the value just tested by IS_ERR. The semantic patch that makes this change is available in scripts/coccinelle/tests/odd_ptr_err.cocci. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-ep93xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0de4cbb3dddca35ecd06b95918f38439c9c6401f Author: Honggang Li <honli@redhat.com> Date: Mon May 23 08:32:09 2016 +0800 RDMA/cxgb3: device driver frees DMA memory with different size [ 598.852037] ------------[ cut here ]------------ [ 598.856698] WARNING: at lib/dma-debug.c:887 check_unmap+0xf8/0x920() [ 598.863079] cxgb3 0000:01:00.0: DMA-API: device driver frees DMA memory with different size [device address=0x0000000003310000] [map size=17 bytes] [unmap size=16 bytes] [ 598.878265] Modules linked in: xprtrdma ib_isert iscsi_target_mod ib_iser libiscsi scsi_transport_iscsi ib_srpt target_core_mod ib_srp scsi_transport_srp scsi_tgt ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm ib_cm iw_cm ib_sa ib_mad kvm_amd kvm ipmi_devintf ipmi_ssif dcdbas pcspkr ipmi_si sg ipmi_msghandler acpi_power_meter amd64_edac_mod shpchp edac_core sp5100_tco k10temp edac_mce_amd i2c_piix4 acpi_cpufreq nfsd auth_rpcgss nfs_acl lockd grace sunrpc ip_tables xfs libcrc32c sd_mod crc_t10dif crct10dif_generic crct10dif_common ata_generic iw_cxgb3 pata_acpi ib_core ib_addr mgag200 syscopyarea sysfillrect sysimgblt i2c_algo_bit drm_kms_helper ttm pata_atiixp drm ahci libahci serio_raw i2c_core cxgb3 libata bnx2 mdio dm_mirror dm_region_hash dm_log dm_mod [ 598.946822] CPU: 3 PID: 11820 Comm: cmtime Not tainted 3.10.0-327.el7.x86_64.debug #1 [ 598.954681] Hardware name: Dell Inc. PowerEdge R415/0GXH08, BIOS 2.0.2 10/22/2012 [ 598.962193] ffff8808077479a8 000000000381a432 ffff880807747960 ffffffff81700918 [ 598.969663] ffff880807747998 ffffffff8108b6c0 ffff880807747a80 ffff8808063f55c0 [ 598.977132] ffffffff833ca850 0000000000000282 ffff88080b1bb800 ffff880807747a00 [ 598.984602] Call Trace: [ 598.987062] [<ffffffff81700918>] dump_stack+0x19/0x1b [ 598.992224] [<ffffffff8108b6c0>] warn_slowpath_common+0x70/0xb0 [ 598.998254] [<ffffffff8108b75c>] warn_slowpath_fmt+0x5c/0x80 [ 599.004033] [<ffffffff813903b8>] check_unmap+0xf8/0x920 [ 599.009369] [<ffffffff81025959>] ? sched_clock+0x9/0x10 [ 599.014702] [<ffffffff81390cee>] debug_dma_free_coherent+0x7e/0xa0 [ 599.021008] [<ffffffffa01ece2c>] cxio_destroy_cq+0xcc/0x160 [iw_cxgb3] [ 599.027654] [<ffffffffa01e8da0>] iwch_destroy_cq+0xf0/0x140 [iw_cxgb3] [ 599.034307] [<ffffffffa01c4bfe>] ib_destroy_cq+0x1e/0x30 [ib_core] [ 599.040601] [<ffffffffa04ff2d2>] ib_uverbs_close+0x302/0x4d0 [ib_uverbs] [ 599.047417] [<ffffffff812335a2>] __fput+0x102/0x310 [ 599.052401] [<ffffffff8123388e>] ____fput+0xe/0x10 [ 599.057297] [<ffffffff810bbde4>] task_work_run+0xb4/0xe0 [ 599.062719] [<ffffffff81092a84>] do_exit+0x304/0xc60 [ 599.067789] [<ffffffff81025905>] ? native_sched_clock+0x35/0x80 [ 599.073820] [<ffffffff81025959>] ? sched_clock+0x9/0x10 [ 599.079153] [<ffffffff8170a49c>] ? _raw_spin_unlock_irq+0x2c/0x50 [ 599.085358] [<ffffffff8109346c>] do_group_exit+0x4c/0xc0 [ 599.090779] [<ffffffff810a8661>] get_signal_to_deliver+0x2e1/0x960 [ 599.097071] [<ffffffff8101c497>] do_signal+0x57/0x6e0 [ 599.102229] [<ffffffff81714bd1>] ? sysret_signal+0x5/0x4e [ 599.107738] [<ffffffff8101cb7f>] do_notify_resume+0x5f/0xb0 [ 599.113418] [<ffffffff81714e7d>] int_signal+0x12/0x17 [ 599.118576] ---[ end trace 1e4653102e7e7019 ]--- [ 599.123211] Mapped at: [ 599.125577] [<ffffffff8138ed8b>] debug_dma_alloc_coherent+0x2b/0x80 [ 599.131968] [<ffffffffa01ec862>] cxio_create_cq+0xf2/0x1f0 [iw_cxgb3] [ 599.139920] [<ffffffffa01e9c05>] iwch_create_cq+0x105/0x4e0 [iw_cxgb3] [ 599.147895] [<ffffffffa0500584>] create_cq.constprop.14+0x184/0x2e0 [ib_uverbs] [ 599.156649] [<ffffffffa05027fb>] ib_uverbs_create_cq+0x10b/0x140 [ib_uverbs] Fixes: b955150ea784 ('RDMA/cxgb3: When a user QP is marked in error, also mark the CQs in error') Signed-off-by: Honggang Li <honli@redhat.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb3/cxio_hal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4d1034eb7c2f5e32d48ddc4dfce0f1a723d28667 Author: Jiri Kosina <jikos@kernel.org> Date: Tue May 24 16:38:50 2016 +0200 MAINTAINERS: mark bcache as orphan The submitted patches are not being reacted upon, and Jens is only picking up stable fixes on an rather ad-hoc basis. Link: lkml.kernel.org/r/574462C5.40307@kernel.dk Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com> MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 29e6c57cc78eb7cb8302088061a0721a41ade658 Author: Jiri Kosina <jkosina@suse.cz> Date: Tue May 24 16:38:34 2016 +0200 bcache: bch_gc_thread() is not freezable bch_gc_thread() doesn't mark itself freezable, so calling try_to_freeze() in its context is just an expensive no-op. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/md/bcache/btree.c | 2 -- 1 file changed, 2 deletions(-) commit 770b8ce400123af89ac469361d7912f458915547 Author: Jiri Kosina <jkosina@suse.cz> Date: Tue May 24 16:38:15 2016 +0200 bcache: bch_allocator_thread() is not freezable bch_allocator_thread() is calling try_to_freeze(), but that's just an expensive no-op given the fact that the thread is not marked freezable. Bucket allocator has to be up and running to the very last stages of the suspend, as the bcache I/O that's in flight (think of writing an hibernation image to a swap device served by bcache). Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/md/bcache/alloc.c | 2 -- 1 file changed, 2 deletions(-) commit 7c87df9c159aa1d228f0d77b37942216cff34922 Author: Jiri Kosina <jkosina@suse.cz> Date: Tue May 24 16:38:10 2016 +0200 bcache: bch_writeback_thread() is not freezable bch_writeback_thread() is calling try_to_freeze(), but that's just an expensive no-op given the fact that the thread is not marked freezable. I/O helper kthreads, exactly such as the bcache writeback thread, actually shouldn't be freezable, because they are potentially necessary for finalizing the image write-out. Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/md/bcache/writeback.c | 3 --- 1 file changed, 3 deletions(-) commit 7d727869c7b86da0874436ac5675dcdadaf3a0a1 Author: Kailang Yang <kailang@realtek.com> Date: Tue May 24 16:46:07 2016 +0800 ALSA: hda/realtek - Add support for ALC295/ALC3254 Add support for ALC295/ALC3254. They are simply compatible with ALC225 chip. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/patch_realtek.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 59fa5860204ffc95128d60cba9f54f9740a42c7d Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Tue May 24 11:42:30 2016 +0100 genirq: Fix missing return value in irq_destroy_ipi() Commit 7cec18a3906b changed the return type of irq_destroy_ipi to int, but missed adding a value to one return statement. Fix this to silence the resulting compiler warning: kernel/irq/ipi.c In function ‘irq_destroy_ipi’: kernel/irq/ipi.c:128:3: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type] Fixes: 7cec18a3906b "genirq: Add error code reporting to irq_{reserve,destroy}_ipi" Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: linux-mips@linux-mips.org Link: http://lkml.kernel.org/r/1464086550-24734-1-git-send-email-matt.redfearn@imgtec.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de> kernel/irq/ipi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1112018cefc586cba924770a2b28bff6d2f0aa5c Author: Andreas Gruenbacher <agruenba@redhat.com> Date: Mon May 16 21:46:30 2016 +0200 ubifs: ubifs_dump_inode: Fix dumping field bulk_read The wrong field (xattr) is dumped here due to a copy-and-paste error. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Richard Weinberger <richard@nod.at> fs/ubifs/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1900149c835ab5b48bea31a823ea5e5a401fb560 Author: Richard Weinberger <richard@nod.at> Date: Tue Apr 26 16:39:48 2016 +0200 UBI: Fix static volume checks when Fastmap is used Ezequiel reported that he's facing UBI going into read-only mode after power cut. It turned out that this behavior happens only when updating a static volume is interrupted and Fastmap is used. A possible trace can look like: ubi0 warning: ubi_io_read_vid_hdr [ubi]: no VID header found at PEB 2323, only 0xFF bytes ubi0 warning: ubi_eba_read_leb [ubi]: switch to read-only mode CPU: 0 PID: 833 Comm: ubiupdatevol Not tainted 4.6.0-rc2-ARCH #4 Hardware name: SAMSUNG ELECTRONICS CO., LTD. 300E4C/300E5C/300E7C/NP300E5C-AD8AR, BIOS P04RAP 10/15/2012 0000000000000286 00000000eba949bd ffff8800c45a7b38 ffffffff8140d841 ffff8801964be000 ffff88018eaa4800 ffff8800c45a7bb8 ffffffffa003abf6 ffffffff850e2ac0 8000000000000163 ffff8801850e2ac0 ffff8801850e2ac0 Call Trace: [<ffffffff8140d841>] dump_stack+0x63/0x82 [<ffffffffa003abf6>] ubi_eba_read_leb+0x486/0x4a0 [ubi] [<ffffffffa00453b3>] ubi_check_volume+0x83/0xf0 [ubi] [<ffffffffa0039d97>] ubi_open_volume+0x177/0x350 [ubi] [<ffffffffa00375d8>] vol_cdev_open+0x58/0xb0 [ubi] [<ffffffff8124b08e>] chrdev_open+0xae/0x1d0 [<ffffffff81243bcf>] do_dentry_open+0x1ff/0x300 [<ffffffff8124afe0>] ? cdev_put+0x30/0x30 [<ffffffff81244d36>] vfs_open+0x56/0x60 [<ffffffff812545f4>] path_openat+0x4f4/0x1190 [<ffffffff81256621>] do_filp_open+0x91/0x100 [<ffffffff81263547>] ? __alloc_fd+0xc7/0x190 [<ffffffff812450df>] do_sys_open+0x13f/0x210 [<ffffffff812451ce>] SyS_open+0x1e/0x20 [<ffffffff81a99e32>] entry_SYSCALL_64_fastpath+0x1a/0xa4 UBI checks static volumes for data consistency and reads the whole volume upon first open. If the volume is found erroneous users of UBI cannot read from it, but another volume update is possible to fix it. The check is performed by running ubi_eba_read_leb() on every allocated LEB of the volume. For static volumes ubi_eba_read_leb() computes the checksum of all data stored in a LEB. To verify the computed checksum it has to read the LEB's volume header which stores the original checksum. If the volume header is not found UBI treats this as fatal internal error and switches to RO mode. If the UBI device was attached via a full scan the assumption is correct, the volume header has to be present as it had to be there while scanning to get known as mapped. If the attach operation happened via Fastmap the assumption is no longer correct. When attaching via Fastmap UBI learns the mapping table from Fastmap's snapshot of the system state and not via a full scan. It can happen that a LEB got unmapped after a Fastmap was written to the flash. Then UBI can learn the LEB still as mapped and accessing it returns only 0xFF bytes. As UBI is not a FTL it is allowed to have mappings to empty PEBs, it assumes that the layer above takes care of LEB accounting and referencing. UBIFS does so using the LEB property tree (LPT). For static volumes UBI blindly assumes that all LEBs are present and therefore special actions have to be taken. The described situation can happen when updating a static volume is interrupted, either by a user or a power cut. The volume update code first unmaps all LEBs of a volume and then writes LEB by LEB. If the sequence of operations is interrupted UBI detects this either by the absence of LEBs, no volume header present at scan time, or corrupted payload, detected via checksum. In the Fastmap case the former method won't trigger as no scan happened and UBI automatically thinks all LEBs are present. Only by reading data from a LEB it detects that the volume header is missing and incorrectly treats this as fatal error. To deal with the situation ubi_eba_read_leb() from now on checks whether we attached via Fastmap and handles the absence of a volume header like a data corruption error. This way interrupted static volume updates will correctly get detected also when Fastmap is used. Cc: <stable@vger.kernel.org> Reported-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Richard Weinberger <richard@nod.at> drivers/mtd/ubi/eba.c | 21 +++++++++++++++++++-- drivers/mtd/ubi/fastmap.c | 1 + drivers/mtd/ubi/ubi.h | 2 ++ 3 files changed, 22 insertions(+), 2 deletions(-) commit 73b0cd57fcd07201b138214f9a2353f76dd9ae2c Author: Heiko Schocher <hs@denx.de> Date: Fri Apr 22 12:06:38 2016 +0200 UBI: Set free_count to zero before walking through erase list Set free_count to zero before walking through ai->erase list in wl_init(). Found in U-Boot as U-Boot has no workqueue/threads, it immediately calls erase_worker(), which increase for each erased block free_count. Without this patch, free_count gets after this initialized to zero in wl_init(), so the free_count variable always has the maybe wrong value 0 in U-Boot. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Richard Weinberger <richard@nod.at> drivers/mtd/ubi/wl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24663e7281b8fbfaae22467ec2625e2bffe07815 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Wed Apr 13 09:41:55 2016 +0300 UBI: Silence an unintialized variable warning My static checker complains that "val" is uninitialized when kstrtoint() fails. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at> drivers/mtd/ubi/debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fadb3665bad96be8f696e4899ee0f618536d54c7 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Wed Apr 13 09:41:26 2016 +0300 UBI: Clean up return in ubi_remove_volume() My static checker says that "err" can be uninitialized if "vol->reserved_pebs" is <= 0. I don't think that can happen but returning a literal is cleaner anyway. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Richard Weinberger <richard@nod.at> drivers/mtd/ubi/vmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 960b35d06b6d6b377fd47a8a44e41a96f35ce485 Author: z00189512 <abc.zhangliang@huawei.com> Date: Wed Mar 30 02:41:19 2016 +0800 UBI: Modify wrong comment in ubi_leb_map function. Signed-off-by: z00189512 <abc.zhangliang@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at> drivers/mtd/ubi/kapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e0a74f10d76021988ecd9e34e6c0c65d1c5403e Author: Richard Weinberger <richard@nod.at> Date: Sat May 7 18:09:18 2016 +0200 UBI: Don't read back all data in ubi_eba_copy_leb() Drop this paranoia check from the old days. If our MTD driver or the flash is so bad that we even cannot trust it to write data we have bigger problems. If one really does not trust the flash and wants write-verify she can enable UBI io checks using debugfs. Signed-off-by: Richard Weinberger <richard@nod.at> drivers/mtd/ubi/eba.c | 26 -------------------------- 1 file changed, 26 deletions(-) commit 525bab71feb152bccb65054cc2bca1537e3bd2b5 Author: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Date: Thu Apr 28 18:13:58 2016 -0300 UBI: Add ro-mode sysfs attribute On serious situations, UBI may detect serious device corruption, and switch to read-only mode to protect the data and allow debugging. This commit exposes this ro-mode on sysfs, so it can be obtained by userspace tools. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Richard Weinberger <richard@nod.at> Documentation/ABI/stable/sysfs-class-ubi | 9 +++++++++ drivers/mtd/ubi/build.c | 5 +++++ 2 files changed, 14 insertions(+) commit dd14be92fbf5bc1ef7343f34968440e44e21b46a Author: Juergen Gross <jgross@suse.com> Date: Wed May 18 16:44:54 2016 +0200 xen: use same main loop for counting and remapping pages Instead of having two functions for cycling through the E820 map in order to count to be remapped pages and remap them later, just use one function with a caller supplied sub-function called for each region to be processed. This eliminates the possibility of a mismatch between both loops which showed up in certain configurations. Suggested-by: Ed Swierk <eswierk@skyportsystems.com> Signed-off-by: Juergen Gross <jgross@suse.com> Cc: <stable@vger.kernel.org> Signed-off-by: David Vrabel <david.vrabel@citrix.com> arch/x86/xen/setup.c | 65 +++++++++++++++++++++------------------------------- 1 file changed, 26 insertions(+), 39 deletions(-) commit f0f393877c71ad227d36705d61d1e4062bc29cf5 Author: Ross Lagerwall <ross.lagerwall@citrix.com> Date: Tue May 10 16:11:00 2016 +0100 xen/events: Don't move disabled irqs Commit ff1e22e7a638 ("xen/events: Mask a moving irq") open-coded irq_move_irq() but left out checking if the IRQ is disabled. This broke resuming from suspend since it tries to move a (disabled) irq without holding the IRQ's desc->lock. Fix it by adding in a check for disabled IRQs. The resulting stacktrace was: kernel BUG at /build/linux-UbQGH5/linux-4.4.0/kernel/irq/migration.c:31! invalid opcode: 0000 [#1] SMP Modules linked in: xenfs xen_privcmd ... CPU: 0 PID: 9 Comm: migration/0 Not tainted 4.4.0-22-generic #39-Ubuntu Hardware name: Xen HVM domU, BIOS 4.6.1-xs125180 05/04/2016 task: ffff88003d75ee00 ti: ffff88003d7bc000 task.ti: ffff88003d7bc000 RIP: 0010:[<ffffffff810e26e2>] [<ffffffff810e26e2>] irq_move_masked_irq+0xd2/0xe0 RSP: 0018:ffff88003d7bfc50 EFLAGS: 00010046 RAX: 0000000000000000 RBX: ffff88003d40ba00 RCX: 0000000000000001 RDX: 0000000000000001 RSI: 0000000000000100 RDI: ffff88003d40bad8 RBP: ffff88003d7bfc68 R08: 0000000000000000 R09: ffff88003d000000 R10: 0000000000000000 R11: 000000000000023c R12: ffff88003d40bad0 R13: ffffffff81f3a4a0 R14: 0000000000000010 R15: 00000000ffffffff FS: 0000000000000000(0000) GS:ffff88003da00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fd4264de624 CR3: 0000000037922000 CR4: 00000000003406f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffff88003d40ba38 0000000000000024 0000000000000000 ffff88003d7bfca0 ffffffff814c8d92 00000010813ef89d 00000000805ea732 0000000000000009 0000000000000024 ffff88003cc39b80 ffff88003d7bfce0 ffffffff814c8f66 Call Trace: [<ffffffff814c8d92>] eoi_pirq+0xb2/0xf0 [<ffffffff814c8f66>] __startup_pirq+0xe6/0x150 [<ffffffff814ca659>] xen_irq_resume+0x319/0x360 [<ffffffff814c7e75>] xen_suspend+0xb5/0x180 [<ffffffff81120155>] multi_cpu_stop+0xb5/0xe0 [<ffffffff811200a0>] ? cpu_stop_queue_work+0x80/0x80 [<ffffffff811203d0>] cpu_stopper_thread+0xb0/0x140 [<ffffffff810a94e6>] ? finish_task_switch+0x76/0x220 [<ffffffff810ca731>] ? __raw_callee_save___pv_queued_spin_unlock+0x11/0x20 [<ffffffff810a3935>] smpboot_thread_fn+0x105/0x160 [<ffffffff810a3830>] ? sort_range+0x30/0x30 [<ffffffff810a0588>] kthread+0xd8/0xf0 [<ffffffff810a04b0>] ? kthread_create_on_node+0x1e0/0x1e0 [<ffffffff8182568f>] ret_from_fork+0x3f/0x70 [<ffffffff810a04b0>] ? kthread_create_on_node+0x1e0/0x1e0 Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: <stable@vger.kernel.org> Signed-off-by: David Vrabel <david.vrabel@citrix.com> drivers/xen/events/events_base.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 702f926067d2a4b28c10a3c41a1172dd62d9e735 Author: Stefano Stabellini <sstabellini@kernel.org> Date: Wed Apr 20 14:15:01 2016 +0100 xen/x86: actually allocate legacy interrupts on PV guests b4ff8389ed14 is incomplete: relies on nr_legacy_irqs() to get the number of legacy interrupts when actually nr_legacy_irqs() returns 0 after probe_8259A(). Use NR_IRQS_LEGACY instead. Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> CC: stable@vger.kernel.org arch/x86/pci/xen.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 971a69db7dc02faaeed325c195f5db5da597cb58 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 11 14:47:59 2016 +0200 Xen: don't warn about 2-byte wchar_t in efi The XEN UEFI code has become available on the ARM architecture recently, but now causes a link-time warning: ld: warning: drivers/xen/efi.o uses 2-byte wchar_t yet the output is to use 4-byte wchar_t; use of wchar_t values across objects may fail This seems harmless, because the efi code only uses 2-byte characters when interacting with EFI, so we don't pass on those strings to elsewhere in the system, and we just need to silence the warning. It is not clear to me whether we actually need to build the file with the -fshort-wchar flag, but if we do, then we should also pass --no-wchar-size-warning to the linker, to avoid the warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Fixes: 37060935dc04 ("ARM64: XEN: Add a function to initialize Xen specific UEFI runtime services") drivers/xen/Makefile | 1 + 1 file changed, 1 insertion(+) commit 36ae220aa62d382a8bacbf7ec080d9d36a2b4d49 Author: David Vrabel <david.vrabel@citrix.com> Date: Mon May 9 10:59:48 2016 +0100 xen/gntdev: reduce copy batch size to 16 IOCTL_GNTDEV_GRANT_COPY batches copy operations to reduce the number of hypercalls. The stack is used to avoid a memory allocation in a hot path. However, a batch size of 24 requires more than 1024 bytes of stack which in some configurations causes a compiler warning. xen/gntdev.c: In function ‘gntdev_ioctl_grant_copy’: xen/gntdev.c:949:1: warning: the frame size of 1248 bytes is larger than 1024 bytes [-Wframe-larger-than=] This is a harmless warning as there is still plenty of stack spare, but people keep trying to "fix" it. Reduce the batch size to 16 to reduce stack usage to less than 1024 bytes. This should have minimal impact on performance. Signed-off-by: David Vrabel <david.vrabel@citrix.com> drivers/xen/gntdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c06b6d70feb32d28f04ba37aa3df17973fd37b6b Author: Stefano Stabellini <sstabellini@kernel.org> Date: Fri Apr 15 18:23:00 2016 -0700 xen/x86: don't lose event interrupts On slow platforms with unreliable TSC, such as QEMU emulated machines, it is possible for the kernel to request the next event in the past. In that case, in the current implementation of xen_vcpuop_clockevent, we simply return -ETIME. To be precise the Xen returns -ETIME and we pass it on. However the result of this is a missed event, which simply causes the kernel to hang. Instead it is better to always ask the hypervisor for a timer event, even if the timeout is in the past. That way there are no lost interrupts and the kernel survives. To do that, remove the VCPU_SSHOTTMR_future flag. Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Acked-by: Juergen Gross <jgross@suse.com> arch/x86/xen/time.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 079d08555cd116e3e04cb588aad1fd6f08b2a31b Author: Jan Kiszka <jan.kiszka@siemens.com> Date: Mon May 23 08:43:31 2016 +0200 KVM: SVM: Add more SVM_EXIT_REASONS Useful when tracing nested setups where the guest may trigger more than the host usually does. But even some typical host exits were missing. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/uapi/asm/svm.h | 44 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) commit cfc5abbcd043752c426740e61700010abfcc71e1 Author: Jan Kiszka <jan.kiszka@siemens.com> Date: Mon May 23 08:43:33 2016 +0200 KVM: Unify traced vector format Specifically the change from hex to decimal helps correlating events. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> include/trace/events/kvm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 5446a979e0805cedd3b7b4909d7f68f69b201fe3 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Mon May 23 13:20:10 2016 +0300 svm: bitwise vs logical op typo These were supposed to be a bitwise operation but there is a typo. The result is mostly harmless, but sparse correctly complains. Fixes: 44a95dae1d22 ('KVM: x86: Detect and Initialize AVIC support') Fixes: 18f40c53e10f ('svm: Add VMEXIT handlers for AVIC') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/svm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 44bcc922381e24c4f38dc5dfd8d34d60b2ede898 Merge: 9842df6 35a2d58 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Tue May 24 12:10:51 2016 +0200 Merge tag 'kvm-arm-for-4-7-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into kvm-next KVM/ARM Changes for v4.7 take 2 "The GIC is dead; Long live the GIC" This set of changes include the new vgic, which is a reimplementation of our horribly broken legacy vgic implementation. The two implementations will live side-by-side (with the new being the configured default) for one kernel release and then we'll remove it. Also fixes a non-critical issue with virtual abort injection to guests. commit 0c9f790fcbdaf8cfb6dd7fb4e88fadf55082e37e Merge: 408cf67 3a62a7b Author: Ingo Molnar <mingo@kernel.org> Date: Tue May 24 07:40:52 2016 +0200 Merge tag 'perf-core-for-mingo-20160523' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent Pull perf/core improvements from Arnaldo Carvalho de Melo: User visible changes: - Add "srcline_from" and "srcline_to" branch sort keys to 'perf top' and 'perf report' (Andi Kleen) Infrastructure changes: - Make 'perf trace' auto-attach fd->name and ptr->name beautifiers based on the name of syscall arguments, this way new syscalls that have 'const char * (path,pathname,filename)' will use the fd->name beautifier (vfs_getname perf probe, if in place) and the 'fd->name' (vfs_getname or via /proc/PID/fd/) (Arnaldo Carvalho de Melo) - Infrastructure to read from a ring buffer in backward write mode (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 92181d47ee74749bdf902f080dab9fa9ef44b37f Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 18 18:07:29 2016 +0200 headers_check: don't warn about c++ guards A recent addition to the DRM tree for 4.7 added 'extern "C"' guards for c++ to all the DRM headers, and that now causes warnings in 'make headers_check': usr/include/drm/amdgpu_drm.h:38: userspace cannot reference function or variable defined in the kernel usr/include/drm/drm.h:63: userspace cannot reference function or variable defined in the kernel usr/include/drm/drm.h:699: userspace cannot reference function or variable defined in the kernel usr/include/drm/drm_fourcc.h:30: userspace cannot reference function or variable defined in the kernel usr/include/drm/drm_mode.h:33: userspace cannot reference function or variable defined in the kernel usr/include/drm/drm_sarea.h:38: userspace cannot reference function or variable defined in the kernel usr/include/drm/exynos_drm.h:21: userspace cannot reference function or variable defined in the kernel usr/include/drm/i810_drm.h:7: userspace cannot reference function or variable defined in the kernel This changes the headers_check.pl script to not warn about this. I'm listing the merge commit as introducing the problem, because there are several patches in this branch that each do this for one file. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 7c10ddf87472 ("Merge branch 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux into drm-next") Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com> scripts/headers_check.pl | 4 ++++ 1 file changed, 4 insertions(+) commit 84787c572d402644dca4874aba73324d9f8e3948 Merge: d62a023 c5d2cac Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 23 19:42:28 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge yet more updates from Andrew Morton: - Oleg's "wait/ptrace: assume __WALL if the child is traced". It's a kernel-based workaround for existing userspace issues. - A few hotfixes - befs cleanups - nilfs2 updates - sys_wait() changes - kexec updates - kdump - scripts/gdb updates - the last of the MM queue - a few other misc things * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (84 commits) kgdb: depends on VT drm/amdgpu: make amdgpu_mn_get wait for mmap_sem killable drm/radeon: make radeon_mn_get wait for mmap_sem killable drm/i915: make i915_gem_mmap_ioctl wait for mmap_sem killable uprobes: wait for mmap_sem for write killable prctl: make PR_SET_THP_DISABLE wait for mmap_sem killable exec: make exec path waiting for mmap_sem killable aio: make aio_setup_ring killable coredump: make coredump_wait wait for mmap_sem for write killable vdso: make arch_setup_additional_pages wait for mmap_sem for write killable ipc, shm: make shmem attach/detach wait for mmap_sem killable mm, fork: make dup_mmap wait for mmap_sem for write killable mm, proc: make clear_refs killable mm: make vm_brk killable mm, elf: handle vm_brk error mm, aout: handle vm_brk failures mm: make vm_munmap killable mm: make vm_mmap killable mm: make mmap_sem for write waits killable for mm syscalls MAINTAINERS: add co-maintainer for scripts/gdb ... commit d62a0234c87f1457a3d2ba519ef90cf164a5eb23 Merge: 4496a1d 6eab37d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 23 19:37:41 2016 -0700 Merge tag 'linux-kselftest-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest Pull kselftest updates from Shuah Khan: "This update for Kselftest adds: - a new ftrace testcase - fixes for ftrace and intel_pstate tests" * tag 'linux-kselftest-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: tools: testing: define the _GNU_SOURCE macro kselftests/ftrace: Add a test case for event pid filtering kselftests/ftrace: Detect tracefs mount point commit 4496a1d9638644484d0d99e9de63742248f3c119 Merge: d6542d7 97f8827 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 23 19:30:30 2016 -0700 Merge tag 'trace-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing fix from Steven Rostedt: "Reviewing the selftest I recently submitted, I realize that the second part of it uses my old hack to get the PID of the spawned background tasks, which doesn't work for all shells, instead of the common use of $!" * tag 'trace-v4.7-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftracetest: Use proper logic to find process PID commit d6542d76ec88dde3305b06c03952d87b15bbc292 Merge: 3ec438a bdf03e5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 23 19:05:11 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile Pull arch/tile updates from Chris Metcalf: "This is an even quieter cycle than usual" * git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile: Fix typo Fix typo Fix typo tile: sort the "select" lines in the TILE/TILEGX configs tile: clarify barrier semantics of atomic_add_return tile/defconfigs: Remove CONFIG_IPV6_PRIVACY commit 3ec438afed6f166f1774b3e95b9a65e3b6da5f2c Merge: e4f7bdc 7598469a Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 23 18:19:21 2016 -0700 Merge branch 'for-4.7-dw' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata sata_dwc_460ex updates from Tejun Heo: "Patches to bring sata_dwc_460ex up to snuff. It was a separate pull request because it depends on dmaengine dw platform changes which are now in mainline" * 'for-4.7-dw' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (24 commits) ata: dwc: add DMADEVICES dependency powerpc/4xx: Device tree update for the 460ex DWC SATA ata: sata_dwc_460ex: make debug messages neat ata: sata_dwc_460ex: supply physical address of FIFO to DMA ata: sata_dwc_460ex: use devm_ioremap ata: sata_dwc_460ex: tidy up sata_dwc_clear_dmacr() ata: sata_dwc_460ex: use readl/writel_relaxed() ata: sata_dwc_460ex: switch to new dmaengine_terminate_* API ata: sata_dwc_460ex: add __iomem to register base pointer ata: sata_dwc_460ex: get rid of incorrect cast ata: sata_dwc_460ex: get rid of some pointless casts ata: sata_dwc_460ex: remove empty libata callback ata: sata_dwc_460ex: correct HOSTDEV{P}_FROM_*() macros ata: sata_dwc_460ex: get rid of global data ata: sata_dwc_460ex: add phy support ata: sata_dwc_460ex: use "dmas" DT property to find dma channel ata: sata_dwc_460ex: don't call ata_sff_qc_issue() on DMA commands ata: sata_dwc_460ex: skip dma setup for non-dma commands ata: sata_dwc_460ex: select only core part of DMA driver ata: sata_dwc_460ex: DMA is always a flow controller ... commit e4f7bdc2ec0d0dcc27f7d70db27a620dfdc1f697 Merge: 3159ee5 6d1003a Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 23 17:53:39 2016 -0700 Merge branch 'for-4.7-zac' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata ZAC support from Tejun Heo: "This contains Zone ATA Command support for Shingled Magnetic Recording devices. In addition to sending the new commands down to the device, as ZAC commands depend on getting a lot of responses from the device, piping up responses is beefed up too. However, it doesn't involve changes to libata core mechanism or its interaction with upper layers, so I'm not expecting too many fallouts. Kudos to Hannes for driving SMR support" * 'for-4.7-zac' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: (28 commits) libata: support host-aware and host-managed ZAC devices libata: support device-managed ZAC devices libata: NCQ encapsulation for ZAC MANAGEMENT OUT libata: Implement ZBC OUT translation libata: implement ZBC IN translation libata: fixup ZAC device disabling libata-scsi: Generate sense code for disabled devices libata-trace: decode subcommands libata: Check log page directory before accessing pages libata: Add command definitions for NCQ Encapsulation for READ LOG DMA EXT libata: Separate out ata_dev_config_ncq_send_recv() libata/libsas: Define ATA_CMD_NCQ_NON_DATA libsas: enable FPDMA SEND/RECEIVE libata: do not attempt to retrieve sense code twice libata-scsi: Set information sense field for invalid parameter libata-scsi: set bit pointer for sense code information libata-scsi: Set field pointer in sense code scsi: add scsi_set_sense_field_pointer() libata: Implement control mode page to select sense format libata-scsi: generate correct ATA pass-through sense ... commit 3159ee58d2133fbf9a710c21201ce717a8cf61a0 Merge: 1d6da87 653bd45 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 23 17:26:27 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull more security subsystem updates from James Morris: "Minor updates for the keys code" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: MAINTAINERS: Update keyrings record and add asymmetric keys record lib: asn1_decoder - add MODULE_LICENSE("GPL") KEYS: The PKCS#7 test key type should use the secondary keyring commit c5d2cac0f1caaf7dd21350146fb29c55b3e74249 Author: Jiri Slaby <jslaby@suse.cz> Date: Mon May 23 16:26:20 2016 -0700 kgdb: depends on VT With VT=n, the kernel build fails with: drivers/built-in.o: In function `kgdboc_pre_exp_handler': kgdboc.c:(.text+0x7b5aa): undefined reference to `fg_console' kgdboc.c:(.text+0x7b5ce): undefined reference to `vc_cons' kgdboc.c:(.text+0x7b5d5): undefined reference to `vc_cons' kgdboc.o is built when KGDB_SERIAL_CONSOLE is set. So make KGDB_SERIAL_CONSOLE depend on HW_CONSOLE which includes those symbols. Link: http://lkml.kernel.org/r/1459412955-4696-1-git-send-email-jslaby@suse.cz Signed-off-by: Jiri Slaby <jslaby@suse.cz> Reported-by: "Jim Davis" <jim.epost@gmail.com> Acked-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/Kconfig.kgdb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b5637051f1ed48f68370234e879d40d8dd4ab087 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:26:17 2016 -0700 drm/amdgpu: make amdgpu_mn_get wait for mmap_sem killable amdgpu_mn_get which is called during ioct path relies on mmap_sem for write. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. [arnd@arndb.de: use ERR_PTR() to return from amdgpu_mn_get] Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2267c2999b49682ae4801dab3b1ac96584f57da0 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:26:14 2016 -0700 drm/radeon: make radeon_mn_get wait for mmap_sem killable radeon_mn_get which is called during ioct path relies on mmap_sem for write. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Reviewed-by: Christian König <christian.koenig@amd.com> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/gpu/drm/radeon/radeon_mn.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 80a89a5e8513c6a1158fb07946cfe63c8430ba7a Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:26:11 2016 -0700 drm/i915: make i915_gem_mmap_ioctl wait for mmap_sem killable i915_gem_mmap_ioctl relies on mmap_sem for write. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/gpu/drm/i915/i915_gem.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 598fdc1d66674264e122ca9d007ad822e98d8b8d Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:26:08 2016 -0700 uprobes: wait for mmap_sem for write killable xol_add_vma needs mmap_sem for write. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. Do not warn in dup_xol_work if __create_xol_area failed due to fatal signal pending because this is usually considered a kernel issue. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/events/uprobes.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 17b0573d77fbd547cbf1d711b90d269bdcc1efd3 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:26:05 2016 -0700 prctl: make PR_SET_THP_DISABLE wait for mmap_sem killable PR_SET_THP_DISABLE requires mmap_sem for write. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Alex Thorlton <athorlton@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/sys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f268dfe905d4682150d4acbb25f59adc04cd9398 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:26:02 2016 -0700 exec: make exec path waiting for mmap_sem killable setup_arg_pages requires mmap_sem for write. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. All the callers are already handling error path and the fatal signal doesn't need any additional treatment. The same applies to __bprm_mm_init. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/exec.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit 013373e8b86735086ac86aff782637f7e58ff84d Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:59 2016 -0700 aio: make aio_setup_ring killable aio_setup_ring waits for mmap_sem in writable mode. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. This will also expedite the return to the userspace and do_exit. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Jeff Moyer <jmoyer@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Benamin LaHaise <bcrl@kvack.org> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/aio.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 4136c26b65d12d0c5ef58b7d30dc0aa2a11ed491 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:57 2016 -0700 coredump: make coredump_wait wait for mmap_sem for write killable coredump_wait waits for mmap_sem for write currently which can prevent oom_reaper to reclaim the oom victims address space asynchronously because that requires mmap_sem for read. This might happen if the oom victim is multi threaded and some thread(s) is holding mmap_sem for read (e.g. page fault) and it is stuck in the page allocator while other thread(s) reached coredump_wait already. This patch simply uses down_write_killable and bails out with EINTR if the lock got interrupted by the fatal signal. do_coredump will return right away and do_group_exit will take care to zap the whole thread group. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/coredump.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 69048176078adda4087a648c9b1812ddd800fad1 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:54 2016 -0700 vdso: make arch_setup_additional_pages wait for mmap_sem for write killable most architectures are relying on mmap_sem for write in their arch_setup_additional_pages. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Andy Lutomirski <luto@amacapital.net> [x86 vdso] Acked-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/arm/kernel/process.c | 3 ++- arch/arm64/kernel/vdso.c | 6 ++++-- arch/hexagon/kernel/vdso.c | 3 ++- arch/mips/kernel/vdso.c | 3 ++- arch/powerpc/kernel/vdso.c | 3 ++- arch/s390/kernel/vdso.c | 3 ++- arch/sh/kernel/vsyscall/vsyscall.c | 4 +++- arch/x86/entry/vdso/vma.c | 3 ++- arch/x86/um/vdso/vma.c | 3 ++- 9 files changed, 21 insertions(+), 10 deletions(-) commit 91f4f94ea3f2eabb4cee68149a31e30f84a993dd Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:51 2016 -0700 ipc, shm: make shmem attach/detach wait for mmap_sem killable shmat and shmdt rely on mmap_sem for write. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Davidlohr Bueso <dave@stgolabs.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> ipc/shm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 7c051267931a9be9c6620cc17b362bc6ee6dedc8 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:48 2016 -0700 mm, fork: make dup_mmap wait for mmap_sem for write killable dup_mmap needs to lock current's mm mmap_sem for write. If the waiting task gets killed by the oom killer it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Ingo Molnar <mingo@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/fork.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 4e80153a6044bcd9a7d65c1ec4b1d1c44ba0ed6c Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:45 2016 -0700 mm, proc: make clear_refs killable CLEAR_REFS_MM_HIWATER_RSS and CLEAR_REFS_SOFT_DIRTY are relying on mmap_sem for write. If the waiting task gets killed by the oom killer and it would operate on the current's mm it would block oom_reaper from asynchronous address space reclaim and reduce the chances of timely OOM resolving. Wait for the lock in the killable mode and return with EINTR if the task got killed while waiting. This will also expedite the return to the userspace and do_exit even if the mm is remote. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Petr Cermak <petrcermak@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/proc/task_mmu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit 2d6c928241add2848e4eebfce407e95164229976 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:42 2016 -0700 mm: make vm_brk killable Now that all the callers handle vm_brk failure we can change it wait for mmap_sem killable to help oom_reaper to not get blocked just because vm_brk gets blocked behind mmap_sem readers. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm.h | 2 +- mm/mmap.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) commit ecc2bc8ac03884266cf73f8a2a42b911465b2fbc Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:39 2016 -0700 mm, elf: handle vm_brk error load_elf_library doesn't handle vm_brk failure although nothing really indicates it cannot do that because the function is allowed to fail due to vm_mmap failures already. This might be not a problem now but later patch will make vm_brk killable (resp. mmap_sem for write waiting will become killable) and so the failure will be more probable. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/binfmt_elf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 864778b154233d3a673c520aa9606777589ecee7 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:36 2016 -0700 mm, aout: handle vm_brk failures vm_brk is allowed to fail but load_aout_binary simply ignores the error and happily continues. I haven't noticed any problem from that in real life but later patches will make the failure more likely because vm_brk will become killable (resp. mmap_sem for write waiting will become killable) so we should be more careful now. The error handling should be quite straightforward because there are calls to vm_mmap which check the error properly already. The only notable exception is set_brk which is called after beyond_if label. But nothing indicates that we cannot move it above set_binfmt as the two do not depend on each other and fail before we do set_binfmt and alter reference counting. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@kernel.org> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/x86/ia32/ia32_aout.c | 22 +++++++++++++++------- fs/binfmt_aout.c | 11 ++++++++--- 2 files changed, 23 insertions(+), 10 deletions(-) commit ae7987835643e470cb220e6685bd36d92179ef9c Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:33 2016 -0700 mm: make vm_munmap killable Almost all current users of vm_munmap are ignoring the return value and so they do not handle potential error. This means that some VMAs might stay behind. This patch doesn't try to solve those potential problems. Quite contrary it adds a new failure mode by using down_write_killable in vm_munmap. This should be safer than other failure modes, though, because the process is guaranteed to die as soon as it leaves the kernel and exit_mmap will clean the whole address space. This will help in the OOM conditions when the oom victim might be stuck waiting for the mmap_sem for write which in turn can block oom_reaper which relies on the mmap_sem for read to make a forward progress and reclaim the address space of the victim. Signed-off-by: Michal Hocko <mhocko@suse.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/mmap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 9fbeb5ab59a2b2a09cca2eb68283e7a090d4b98d Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:30 2016 -0700 mm: make vm_mmap killable All the callers of vm_mmap seem to check for the failure already and bail out in one way or another on the error which means that we can change it to use killable version of vm_mmap_pgoff and return -EINTR if the current task gets killed while waiting for mmap_sem. This also means that vm_mmap_pgoff can be killable by default and drop the additional parameter. This will help in the OOM conditions when the oom victim might be stuck waiting for the mmap_sem for write which in turn can block oom_reaper which relies on the mmap_sem for read to make a forward progress and reclaim the address space of the victim. Please note that load_elf_binary is ignoring vm_mmap error for current->personality & MMAP_PAGE_ZERO case but that shouldn't be a problem because the address is not used anywhere and we never return to the userspace if we got killed. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm.h | 2 +- mm/internal.h | 3 +-- mm/mmap.c | 2 +- mm/nommu.c | 2 +- mm/util.c | 13 ++++--------- 5 files changed, 8 insertions(+), 14 deletions(-) commit dc0ef0df7b6a90892ec41933212ac701152a254c Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 16:25:27 2016 -0700 mm: make mmap_sem for write waits killable for mm syscalls This is a follow up work for oom_reaper [1]. As the async OOM killing depends on oom_sem for read we would really appreciate if a holder for write didn't stood in the way. This patchset is changing many of down_write calls to be killable to help those cases when the writer is blocked and waiting for readers to release the lock and so help __oom_reap_task to process the oom victim. Most of the patches are really trivial because the lock is help from a shallow syscall paths where we can return EINTR trivially and allow the current task to die (note that EINTR will never get to the userspace as the task has fatal signal pending). Others seem to be easy as well as the callers are already handling fatal errors and bail and return to userspace which should be sufficient to handle the failure gracefully. I am not familiar with all those code paths so a deeper review is really appreciated. As this work is touching more areas which are not directly connected I have tried to keep the CC list as small as possible and people who I believed would be familiar are CCed only to the specific patches (all should have received the cover though). This patchset is based on linux-next and it depends on down_write_killable for rw_semaphores which got merged into tip locking/rwsem branch and it is merged into this next tree. I guess it would be easiest to route these patches via mmotm because of the dependency on the tip tree but if respective maintainers prefer other way I have no objections. I haven't covered all the mmap_write(mm->mmap_sem) instances here $ git grep "down_write(.*\<mmap_sem\>)" next/master | wc -l 98 $ git grep "down_write(.*\<mmap_sem\>)" | wc -l 62 I have tried to cover those which should be relatively easy to review in this series because this alone should be a nice improvement. Other places can be changed on top. [0] http://lkml.kernel.org/r/1456752417-9626-1-git-send-email-mhocko@kernel.org [1] http://lkml.kernel.org/r/1452094975-551-1-git-send-email-mhocko@kernel.org [2] http://lkml.kernel.org/r/1456750705-7141-1-git-send-email-mhocko@kernel.org This patch (of 18): This is the first step in making mmap_sem write waiters killable. It focuses on the trivial ones which are taking the lock early after entering the syscall and they are not changing state before. Therefore it is very easy to change them to use down_write_killable and immediately return with -EINTR. This will allow the waiter to pass away without blocking the mmap_sem which might be required to make a forward progress. E.g. the oom reaper will need the lock for reading to dismantle the OOM victim address space. The only tricky function in this patch is vm_mmap_pgoff which has many call sites via vm_mmap. To reduce the risk keep vm_mmap with the original non-killable semantic for now. vm_munmap callers do not bother checking the return value so open code it into the munmap syscall path for now for simplicity. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Mel Gorman <mgorman@suse.de> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Hugh Dickins <hughd@google.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/internal.h | 5 +++-- mm/madvise.c | 8 +++++--- mm/mlock.c | 16 ++++++++++------ mm/mmap.c | 27 +++++++++++++++++++++++---- mm/mprotect.c | 3 ++- mm/mremap.c | 3 ++- mm/nommu.c | 2 +- mm/util.c | 12 +++++++++--- 8 files changed, 55 insertions(+), 21 deletions(-) commit e10af1328b13554dee3de91b713496704cb5822e Author: Kieran Bingham <kieran@bingham.xyz> Date: Mon May 23 16:25:24 2016 -0700 MAINTAINERS: add co-maintainer for scripts/gdb Add myself as a co-maintainer for scripts/gdb supporting Jan Kizka Link: http://lkml.kernel.org/r/fb5d34ce563f33d2f324f26f592b24ded30032ee.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran@bingham.xyz> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit b3b08429857b209d8bb9785a15b8247421bf4973 Author: Kieran Bingham <kieran@bingham.xyz> Date: Mon May 23 16:25:21 2016 -0700 scripts/gdb: decode bytestream on dmesg for Python3 The recent fixes to lx-dmesg, now allow the command to print successfully on Python3, however the python interpreter wraps the bytes for each line with a b'<text>' marker. To remove this, we need to decode the line, where .decode() will default to 'UTF-8' Link: http://lkml.kernel.org/r/d67ccf93f2479c94cb3399262b9b796e0dbefcf2.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran@bingham.xyz> Acked-by: Dom Cote <buzdelabuz2@gmail.com> Tested-by: Dom Cote <buzdelabuz2@gmail.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/dmesg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d21d5b9eb0e1e492232a3b56d0cc03bcdaa7ee17 Author: Dom Cote <buzdelabuz2+git@gmail.com> Date: Mon May 23 16:25:19 2016 -0700 scripts/gdb: fix issue with dmesg.py and python 3.X When built against Python 3, GDB differs in the return type for its read_memory function, causing the lx-dmesg command to fail. Now that we have an improved read_16() we can use the new read_memoryview() abstraction to make lx-dmesg return valid data on both current Python APIs Tested with python 3.4 and 2.7 Tested with gdb 7.7 Link: http://lkml.kernel.org/r/28477b727ff7fe3101fd4e426060e8a68317a639.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Dom Cote <buzdelabuz2+git@gmail.com> [kieran@bingham.xyz: Adjusted commit log to better reflect code changes] Tested-by: Kieran Bingham <kieran@bingham.xyz> (Py2.7,Py3.4,GDB10) Signed-off-by: Kieran Bingham <kieran@bingham.xyz> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/dmesg.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 321958d9710c33e74ec98c0f3c96aa2a5dbe3008 Author: Dom Cote <buzdelabuz2+git@gmail.com> Date: Mon May 23 16:25:16 2016 -0700 scripts/gdb: improve types abstraction for gdb python scripts Change the read_u16 function so it accepts both 'str' and 'byte' as type for the arguments. When calling read_memory() from gdb API, depending on if it was built with 2.7 or 3.X, the format used to return the data will differ ( 'str' for 2.7, and 'byte' for 3.X ). Add a function read_memoryview() to be able to get a 'memoryview' object back from read_memory() both with python 2.7 and 3.X . Tested with python 3.4 and 2.7 Tested with gdb 7.7 Link: http://lkml.kernel.org/r/73621f564503137a002a639d174e4fb35f73f462.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Dom Cote <buzdelabuz2+git@gmail.com> Tested-by: Kieran Bingham <kieran@bingham.xyz> (Py2.7,Py3.4,GDB10) Signed-off-by: Kieran Bingham <kieran@bingham.xyz> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/utils.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) commit 9f66dee720984edcbc6ea07ad70fe5b8f0421c04 Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:25:13 2016 -0700 scripts/gdb: add lx_thread_info_by_pid helper The tasks module already provides helpers to find the task struct by pid, and the thread_info by task struct; however this is cumbersome to utilise on the gdb commandline. Wrap these two functionalities together in an extra single helper to allow exploring the thread info, from a PID value Link: http://lkml.kernel.org/r/dadc5667f053ec811eb3e3033d99d937fedbc93b.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/tasks.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 9b5580359a844cc88bdfdbbb3a740817ba01526e Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:25:10 2016 -0700 scripts/gdb: add documentation example for radix tree Provide a worked example for utilising the lx_radix_tree_lookup function Link: http://lkml.kernel.org/r/e786008ac5aec4b84198812805b326d718bdeb4b.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/gdb-kernel-debugging.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit e127a73d41ac471d7e3ba950cf128f42d6ee3448 Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:25:07 2016 -0700 scripts/gdb: add a Radix Tree Parser Linux makes use of the Radix Tree data structure to store pointers indexed by integer values. This structure is utilised across many structures in the kernel including the IRQ descriptor tables, and several filesystems. This module provides a method to lookup values from a structure given its head node. Usage: The function lx_radix_tree_lookup, must be given a symbol of type struct radix_tree_root, and an index into that tree. The object returned is a generic integer value, and must be cast correctly to the type based on the storage in the data structure. For example, to print the irq descriptor in the sparse irq_desc_tree at index 18, try the following: (gdb) print (struct irq_desc)$lx_radix_tree_lookup(irq_desc_tree, 18) Link: http://lkml.kernel.org/r/d2028c55e50cf95a9b7f8ca0d11885174b0cc709.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/constants.py.in | 7 +++ scripts/gdb/linux/radixtree.py | 97 +++++++++++++++++++++++++++++++++++++++ scripts/gdb/vmlinux-gdb.py | 1 + 3 files changed, 105 insertions(+) commit 4bc393dbcf1915224e8947211a0ca906f9de7c56 Author: Jan Kiszka <jan.kiszka@siemens.com> Date: Mon May 23 16:25:05 2016 -0700 scripts/gdb: cast CPU numbers to integer We won't see more than 2 billion CPUs any time soon, and having cpu_list return long makes the output of lx-cpus a bit ugly. Link: http://lkml.kernel.org/r/dcb45c3b0a59e0fd321fa56ff7aa398458c689b3.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/cpus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1503934a5e51e74b2f4c72ad77b33231e7b6953 Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:25:02 2016 -0700 scripts/gdb: add cpu iterators The linux kernel provides macro's for iterating against values from the cpu_list masks. By providing some commonly used masks, we can mirror the kernels helper macros with easy to use generators. Link: http://lkml.kernel.org/r/d045c6599771ada1999d49612ee30fd2f9acf17f.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/cpus.py | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit c1a153992ea86307d2b8c3c0be2e060102b02aff Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:24:59 2016 -0700 scripts/gdb: add mount point list command lx-mounts will identify current mount points based on the 'init_task' namespace by default, as we do not yet have a kernel thread list implementation to select the current running thread. Optionally, a user can specify a PID to list from that process' namespace Link: http://lkml.kernel.org/r/e614c7bc32d2350b4ff1627ec761a7148e65bfe6.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/constants.py.in | 20 ++++++++ scripts/gdb/linux/proc.py | 99 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) commit e7165a2d7d87cd397d166ebf4d49763d28f5fc3d Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:24:56 2016 -0700 scripts/gdb: add io resource readers Provide iomem_resource and ioports_resource printers and command hooks It can be quite interesting to halt the kernel as it's booting and check to see this list as it is being populated. It should be useful in the event that a kernel is not booting, you can identify what memory resources have been registered Link: http://lkml.kernel.org/r/f0a6b9fa9c92af4d7ed2e7343ccc84150e9c6fc5.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/proc.py | 57 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 74627cf2df50bfc29f51341578038e284796a101 Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:24:53 2016 -0700 scripts/gdb: provide a dentry_name VFS path helper Walk the VFS entries, pre-pending the iname strings to generate a full VFS path name from a dentry. Link: http://lkml.kernel.org/r/4328fdb2d15ba7f1b21ad21c2eecc38d9cfc4d13.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/utils.py | 8 ++++++++ 1 file changed, 8 insertions(+) commit 958ef8a09a158d16cf398675c7bdfa3938472974 Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:24:51 2016 -0700 scripts/gdb: support !CONFIG_MODULES gracefully If CONFIG_MODULES is not enabled, lx-lsmod tries to find a non-existent symbol and generates an unfriendly traceback: (gdb) lx-lsmod Address Module Size Used by Traceback (most recent call last): File "scripts/gdb/linux/modules.py", line 75, in invoke for module in module_list(): File "scripts/gdb/linux/modules.py", line 24, in module_list module_ptr_type = module_type.get_type().pointer() File "scripts/gdb/linux/utils.py", line 28, in get_type self._type = gdb.lookup_type(self._name) gdb.error: No struct type named module. Error occurred in Python command: No struct type named module. Catch the error and return an empty module_list() for a clean command output as follows: (gdb) lx-lsmod Address Module Size Used by (gdb) Link: http://lkml.kernel.org/r/94d533819437408b85ae5864f939dd7ca6fbfcd6.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/modules.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit e78f3d70b3f5b045173961cb9cda16d005ecafa7 Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:24:48 2016 -0700 scripts/gdb: provide exception catching parser If we attempt to read a value that is not available to GDB, an exception is raised. Most of the time, this is a good thing; however on occasion we will want to be able to determine if a symbol is available. By catching the exception to simply return None, we can determine if we tried to read an invalid value, without the exception taking our execution context away from us Link: http://lkml.kernel.org/r/c72b25c06fc66e1d68371154097e2cbb112555d8.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) commit 619ccaf3e94958485fd237000c24e06bce686bd2 Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:24:45 2016 -0700 scripts/gdb: convert modules usage to lists functions Simplify the module list functions with the new list_for_each_entry abstractions Link: http://lkml.kernel.org/r/ad0101c9391088608166fcec26af179868973d86.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/modules.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit a84be61d0e38034634e7cbe076179cc6f1c16d22 Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:24:42 2016 -0700 scripts/gdb: provide kernel list item generators Facilitate linked-list items by providing a generator to return the dereferenced, and type-cast objects from a kernel linked list Link: http://lkml.kernel.org/r/2b0998564e6e5abe53585d466f87e491331fd2a4.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/lists.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) commit f197d75fcad125f41cc6e2fdf1b3ea733db995f1 Author: Kieran Bingham <kieran.bingham@linaro.org> Date: Mon May 23 16:24:40 2016 -0700 scripts/gdb: provide linux constants Some macro's and defines are needed when parsing memory, and without compiling the kernel as -g3 they are not available in the debug-symbols. We use the pre-processor here to extract constants to a dedicated module for the linux debugger extensions Top level Kbuild is used to call in and generate the constants file, while maintaining dependencies on autogenerated files in include/generated Link: http://lkml.kernel.org/r/bc3df9c25f57ea72177c066a51a446fc19e2c27f.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Kbuild | 10 ++++++++++ scripts/gdb/linux/Makefile | 12 +++++++++++- scripts/gdb/linux/constants.py.in | 32 ++++++++++++++++++++++++++++++++ scripts/gdb/vmlinux-gdb.py | 1 + 4 files changed, 54 insertions(+), 1 deletion(-) commit 0c22fde8b0e674a201f277688f1b3a38f6e09ada Author: Jan Kiszka <jan.kiszka@siemens.com> Date: Mon May 23 16:24:37 2016 -0700 scripts/gdb: Adjust module reference counter reported by lx-lsmod This takes the MODULE_REF_BASE into account. Link: http://lkml.kernel.org/r/d926d2d54caa034adb964b52215090cbdb875249.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/gdb/linux/modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7efb2a7b85f2d2a53ae50e35cf5df260dd5278b7 Author: Konstantin Khlebnikov <koct9i@gmail.com> Date: Mon May 23 16:24:34 2016 -0700 arch/defconfig: remove CONFIG_RESOURCE_COUNTERS This option was replaced by PAGE_COUNTER which is selected by MEMCG. Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/arm/configs/bcm_defconfig | 1 - arch/arm/configs/zx_defconfig | 1 - arch/mips/configs/db1xxx_defconfig | 1 - arch/mips/configs/loongson3_defconfig | 1 - arch/mn10300/configs/asb2364_defconfig | 1 - arch/sh/configs/apsh4ad0a_defconfig | 1 - arch/sh/configs/sdk7786_defconfig | 1 - arch/sh/configs/se7206_defconfig | 1 - arch/sh/configs/shx3_defconfig | 1 - arch/sh/configs/urquell_defconfig | 1 - arch/tile/configs/tilegx_defconfig | 1 - arch/tile/configs/tilepro_defconfig | 1 - arch/um/configs/i386_defconfig | 1 - arch/um/configs/x86_64_defconfig | 1 - arch/x86/configs/i386_defconfig | 1 - arch/x86/configs/x86_64_defconfig | 1 - arch/xtensa/configs/generic_kc705_defconfig | 1 - arch/xtensa/configs/smp_lx200_defconfig | 1 - 18 files changed, 18 deletions(-) commit de6cdcb5ce504c9d346858569e4ad2ca3ac2fe45 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Mon May 23 16:24:31 2016 -0700 drivers/memstick/core/mspro_block: use kmemdup Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. [akpm@linux-foundation.org: remove unneeded cast to void*] Link: http://lkml.kernel.org/r/1463665743-16269-1-git-send-email-falakreyaz@gmail.com Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/memstick/core/mspro_block.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a831979f855f1a19db1b3b194c5fab5e04ad26ff Author: Oleksandr Natalenko <oleksandr@natalenko.name> Date: Mon May 23 16:24:28 2016 -0700 rtsx_usb_ms: use schedule_timeout_idle() in polling loop First version of this patch has already been posted to LKML by Ben Hutchings ~6 months ago, but no further action were performed. Ben's original message: : rtsx_usb_ms creates a task that mostly sleeps, but tasks in : uninterruptible sleep still contribute to the load average (for : bug-compatibility with Unix). A load average of ~1 on a system that : should be idle is somewhat alarming. : : Change the sleep to be interruptible, but still ignore signals. References: https://bugs.debian.org/765717 Link: http://lkml.kernel.org/r/b49f95ae83057efa5d96f532803cba47@natalenko.name Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Ben Hutchings <ben@decadent.org.uk> Cc: Lee Jones <lee.jones@linaro.org> Cc: Wolfram Sang <wsa@the-dreams.de> Cc: Roger Tseng <rogerable@realtek.com> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/memstick/host/rtsx_usb_ms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a0c20deae992527ba90df9a6f87d396b7cee3922 Author: Corey Minyard <cminyard@mvista.com> Date: Mon May 23 16:24:25 2016 -0700 kdump: fix gdb macros work work with newer and 64-bit kernels Lots of little changes needed to be made to clean these up, remove the four byte pointer assumption and traverse the pid queue properly. Also consolidate the traceback code into a single function instead of having three copies of it. Link: http://lkml.kernel.org/r/1462926655-9390-1-git-send-email-minyard@acm.org Signed-off-by: Corey Minyard <cminyard@mvista.com> Acked-by: Baoquan He <bhe@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Haren Myneni <hbabu@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/kdump/gdbmacros.txt | 96 ++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 52 deletions(-) commit 7a0058ec78602da02b34fa2ae3afc523e90d1ab2 Author: Xunlei Pang <xlpang@redhat.com> Date: Mon May 23 16:24:22 2016 -0700 s390/kexec: consolidate crash_map/unmap_reserved_pages() and arch_kexec_protect(unprotect)_crashkres() Commit 3f625002581b ("kexec: introduce a protection mechanism for the crashkernel reserved memory") is a similar mechanism for protecting the crash kernel reserved memory to previous crash_map/unmap_reserved_pages() implementation, the new one is more generic in name and cleaner in code (besides, some arch may not be allowed to unmap the pgtable). Therefore, this patch consolidates them, and uses the new arch_kexec_protect(unprotect)_crashkres() to replace former crash_map/unmap_reserved_pages() which by now has been only used by S390. The consolidation work needs the crash memory to be mapped initially, this is done in machine_kdump_pm_init() which is after reserve_crashkernel(). Once kdump kernel is loaded, the new arch_kexec_protect_crashkres() implemented for S390 will actually unmap the pgtable like before. Signed-off-by: Xunlei Pang <xlpang@redhat.com> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Acked-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Minfei Huang <mhuang@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Dave Young <dyoung@redhat.com> Cc: Baoquan He <bhe@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/s390/kernel/machine_kexec.c | 28 ++++++++++++++++++---------- include/linux/kexec.h | 2 -- kernel/kexec.c | 12 ------------ kernel/kexec_core.c | 11 ++--------- 4 files changed, 20 insertions(+), 33 deletions(-) commit 0eea08678ebe9f7d8ef98fed974a5bf1a0dd2dd2 Author: Minfei Huang <mnfhuang@gmail.com> Date: Mon May 23 16:24:19 2016 -0700 kexec: do a cleanup for function kexec_load There are a lof of work to be done in function kexec_load, not only for allocating structs and loading initram, but also for some misc. To make it more clear, wrap a new function do_kexec_load which is used to allocate structs and load initram. And the pre-work will be done in kexec_load. Signed-off-by: Minfei Huang <mnfhuang@gmail.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Xunlei Pang <xlpang@redhat.com> Cc: Baoquan He <bhe@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/kexec.c | 125 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 69 insertions(+), 56 deletions(-) commit 917a35605f09c0d16aeb2e92c7fbff562e19a116 Author: Minfei Huang <mnfhuang@gmail.com> Date: Mon May 23 16:24:16 2016 -0700 kexec: make a pair of map/unmap reserved pages in error path For some arch, kexec shall map the reserved pages, then use them, when we try to start the kdump service. kexec may return directly, without unmaping the reserved pages, if it fails during starting service. To fix it, we make a pair of map/unmap reserved pages both in generic path and error path. This patch only affects s390. Other architecturess don't implement the interface of crash_unmap_reserved_pages and crash_map_reserved_pages. It isn't a urgent patch. Kernel can work well without any risk, although the reserved pages are not unmapped before returning in error path. Signed-off-by: Minfei Huang <mnfhuang@gmail.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Xunlei Pang <xlpang@redhat.com> Cc: Baoquan He <bhe@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/kexec.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1e5768ae7500e7ce6eb73e1b263574d5c19606cf Author: Xunlei Pang <xlpang@redhat.com> Date: Mon May 23 16:24:13 2016 -0700 kexec: provide arch_kexec_protect(unprotect)_crashkres() Implement the protection method for the crash kernel memory reservation for the 64-bit x86 kdump. Signed-off-by: Xunlei Pang <xlpang@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Dave Young <dyoung@redhat.com> Cc: Minfei Huang <mhuang@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Baoquan He <bhe@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/x86/kernel/machine_kexec_64.c | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) commit 9b492cf58077a0254eb4b9574029ac6e79add9f9 Author: Xunlei Pang <xlpang@redhat.com> Date: Mon May 23 16:24:10 2016 -0700 kexec: introduce a protection mechanism for the crashkernel reserved memory For the cases that some kernel (module) path stamps the crash reserved memory(already mapped by the kernel) where has been loaded the second kernel data, the kdump kernel will probably fail to boot when panic happens (or even not happens) leaving the culprit at large, this is unacceptable. The patch introduces a mechanism for detecting such cases: 1) After each crash kexec loading, it simply marks the reserved memory regions readonly since we no longer access it after that. When someone stamps the region, the first kernel will panic and trigger the kdump. The weak arch_kexec_protect_crashkres() is introduced to do the actual protection. 2) To allow multiple loading, once 1) was done we also need to remark the reserved memory to readwrite each time a system call related to kdump is made. The weak arch_kexec_unprotect_crashkres() is introduced to do the actual protection. The architecture can make its specific implementation by overriding arch_kexec_protect_crashkres() and arch_kexec_unprotect_crashkres(). Signed-off-by: Xunlei Pang <xlpang@redhat.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Dave Young <dyoung@redhat.com> Cc: Minfei Huang <mhuang@redhat.com> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Baoquan He <bhe@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/kexec.h | 2 ++ kernel/kexec.c | 9 ++++++++- kernel/kexec_core.c | 6 ++++++ kernel/kexec_file.c | 8 +++++++- 4 files changed, 23 insertions(+), 2 deletions(-) commit 9eb8a659dea694b0dcbd6287f6b1fbdc523b80bc Author: Oleg Nesterov <oleg@redhat.com> Date: Mon May 23 16:24:08 2016 -0700 exec: remove the no longer needed remove_arg_zero()->free_arg_page() remove_arg_zero() does free_arg_page() for no reason. This was needed before and only if CONFIG_MMU=y: see commit 4fc75ff4816c ("exec: fix remove_arg_zero"), install_arg_page() was called for every page != NULL in bprm->page[] array. Today install_arg_page() has already gone and free_arg_page() is nop after another commit b6a2fea39318 ("mm: variable length argument support"). CONFIG_MMU=n does free_arg_pages() in free_bprm() and thus it doesn't need remove_arg_zero()->free_arg_page() too; apart from get_arg_page() it never checks if the page in bprm->page[] was allocated or not, so the "extra" non-freed page is fine. OTOH, this free_arg_page() can add the minor pessimization, the caller is going to do copy_strings_kernel() right after remove_arg_zero() which will likely need to re-allocate the same page again. And as Hujunjie pointed out, the "offset == PAGE_SIZE" check is wrong because we are going to increment bprm->p once again before return, so CONFIG_MMU=n "leaks" the page anyway if '0' is the final byte in this page. NOTE: remove_arg_zero() assumes that argv[0] is null-terminated but this is not necessarily true. copy_strings() does "len = strnlen_user(...)", then copy_from_user(len) but another thread or debuger can overwrite the trailing '0' in between. Afaics nothing really bad can happen because we must always have the null-terminated bprm->filename copied by the 1st copy_strings_kernel(), but perhaps we should change this code to check "bprm->p < bprm->exec" anyway, and/or change copy_strings() to ensure that the last byte in string is always zero. Link: http://lkml.kernel.org/r/20160517155335.GA31435@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reported by: hujunjie <jj.net@163.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/exec.c | 7 ------- 1 file changed, 7 deletions(-) commit 725fc629ff2545b061407305ae51016c9f928fce Author: Andi Kleen <ak@linux.intel.com> Date: Mon May 23 16:24:05 2016 -0700 kernek/fork.c: allocate idle task for a CPU always on its local node Linux preallocates the task structs of the idle tasks for all possible CPUs. This currently means they all end up on node 0. This also implies that the cache line of MWAIT, which is around the flags field in the task struct, are all located in node 0. We see a noticeable performance improvement on Knights Landing CPUs when the cache lines used for MWAIT are located in the local nodes of the CPUs using them. I would expect this to give a (likely slight) improvement on other systems too. The patch implements placing the idle task in the node of its CPUs, by passing the right target node to copy_process() [akpm@linux-foundation.org: use NUMA_NO_NODE, not a bare -1] Link: http://lkml.kernel.org/r/1463492694-15833-1-git-send-email-andi@firstfloor.org Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/fork.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 5c8ccefdf46c5f87d87b694c7fbc04941c2c99a5 Author: Oleg Nesterov <oleg@redhat.com> Date: Mon May 23 16:24:02 2016 -0700 signal: move the "sig < SIGRTMIN" check into siginmask(sig) All the users of siginmask() must ensure that sig < SIGRTMIN. sig_fatal() doesn't and this is wrong: UBSAN: Undefined behaviour in kernel/signal.c:911:6 shift exponent 32 is too large for 32-bit type 'long unsigned int' the patch doesn't add the neccesary check to sig_fatal(), it moves the check into siginmask() and updates other callers. Link: http://lkml.kernel.org/r/20160517195052.GA15187@redhat.com Reported-by: Meelis Roos <mroos@linux.ee> Signed-off-by: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/signal.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) commit 747800efbe8b98459f48d1d9d742298f8283f8fa Author: Wang Xiaoqiang <wangxq10@lzu.edu.cn> Date: Mon May 23 16:23:59 2016 -0700 kernel/signal.c: convert printk(KERN_<LEVEL> ...) to pr_<level>(...) Use pr_<level> instead of printk(KERN_<LEVEL> ). Signed-off-by: Wang Xiaoqiang <wangxq10@lzu.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/signal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit c96fc2d85f4a827e3bb2abe7de2394a1fb8a0fe7 Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Date: Mon May 23 16:23:57 2016 -0700 signal: make oom_flags a bool Currently the size of "struct signal_struct"->oom_flags member is sizeof(unsigned) bytes, but only one flag OOM_FLAG_ORIGIN which is updated by current thread is defined. We can convert OOM_FLAG_ORIGIN into a bool, and reuse the saved bytes for updating from the OOM killer and/or the OOM reaper thread. By the way, do we care about a race window between run_store() and swapoff() because it would be theoretically possible that two threads sharing the "struct signal_struct" concurrently call respective functions? If we care, we can make oom_flags an atomic_t. Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/oom.h | 9 +++------ include/linux/sched.h | 6 +++++- include/linux/types.h | 1 - 3 files changed, 8 insertions(+), 8 deletions(-) commit 91c4e8ea8f05916df0c8a6f383508ac7c9e10dba Author: Oleg Nesterov <oleg@redhat.com> Date: Mon May 23 16:23:53 2016 -0700 wait: allow sys_waitid() to accept __WNOTHREAD/__WCLONE/__WALL I see no reason why waitid() can't support other linux-specific flags allowed in sys_wait4(). In particular this change can help if we reconsider the previous change ("wait/ptrace: assume __WALL if the child is traced") which adds the "automagical" __WALL for debugger. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Jan Kratochvil <jan.kratochvil@redhat.com> Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> Cc: Pedro Alves <palves@redhat.com> Cc: Roland McGrath <roland@hack.frob.com> Cc: <syzkaller@googlegroups.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/exit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bf959931ddb88c4e4366e96dd22e68fa0db9527c Author: Oleg Nesterov <oleg@redhat.com> Date: Mon May 23 16:23:50 2016 -0700 wait/ptrace: assume __WALL if the child is traced The following program (simplified version of generated by syzkaller) #include <pthread.h> #include <unistd.h> #include <sys/ptrace.h> #include <stdio.h> #include <signal.h> void *thread_func(void *arg) { ptrace(PTRACE_TRACEME, 0,0,0); return 0; } int main(void) { pthread_t thread; if (fork()) return 0; while (getppid() != 1) ; pthread_create(&thread, NULL, thread_func, NULL); pthread_join(thread, NULL); return 0; } creates an unreapable zombie if /sbin/init doesn't use __WALL. This is not a kernel bug, at least in a sense that everything works as expected: debugger should reap a traced sub-thread before it can reap the leader, but without __WALL/__WCLONE do_wait() ignores sub-threads. Unfortunately, it seems that /sbin/init in most (all?) distributions doesn't use it and we have to change the kernel to avoid the problem. Note also that most init's use sys_waitid() which doesn't allow __WALL, so the necessary user-space fix is not that trivial. This patch just adds the "ptrace" check into eligible_child(). To some degree this matches the "tsk->ptrace" in exit_notify(), ->exit_signal is mostly ignored when the tracee reports to debugger. Or WSTOPPED, the tracer doesn't need to set this flag to wait for the stopped tracee. This obviously means the user-visible change: __WCLONE and __WALL no longer have any meaning for debugger. And I can only hope that this won't break something, but at least strace/gdb won't suffer. We could make a more conservative change. Say, we can take __WCLONE into account, or !thread_group_leader(). But it would be nice to not complicate these historical/confusing checks. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reported-by: Dmitry Vyukov <dvyukov@google.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Jan Kratochvil <jan.kratochvil@redhat.com> Cc: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> Cc: Pedro Alves <palves@redhat.com> Cc: Roland McGrath <roland@hack.frob.com> Cc: <syzkaller@googlegroups.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/exit.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit 076a378ba6e6b6ddd5f2336aa0876349b7d36409 Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:48 2016 -0700 nilfs2: fix block comments This fixes block comments with proper formatting to eliminate the following checkpatch.pl warnings: "WARNING: Block comments use * on subsequent lines" "WARNING: Block comments use a trailing */ on a separate line" Link: http://lkml.kernel.org/r/1462886671-3521-8-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/alloc.c | 12 +++++--- fs/nilfs2/bmap.h | 12 +++++--- fs/nilfs2/cpfile.c | 6 ++-- fs/nilfs2/ifile.c | 6 ++-- fs/nilfs2/inode.c | 73 ++++++++++++++++++++++++++++++----------------- fs/nilfs2/nilfs.h | 24 ++++++++++------ fs/nilfs2/recovery.c | 14 +++++---- fs/nilfs2/segment.c | 56 ++++++++++++++++++++++++------------ fs/nilfs2/segment.h | 34 ++++++++++++++-------- fs/nilfs2/the_nilfs.c | 6 ++-- include/linux/nilfs2_fs.h | 66 +++++++++++++++++++++++++++--------------- 11 files changed, 202 insertions(+), 107 deletions(-) commit 80d6505232ec2476eef8d988ea98ac81eb2e0975 Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:45 2016 -0700 nilfs2: remove loops of single statement macros This fixes checkpatch.pl warning "WARNING: Single statement macros should not use a do {} while (0) loop". Link: http://lkml.kernel.org/r/1462886671-3521-7-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/the_nilfs.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 7f00184e9cb534aca1f10f3027cb6137b03f101e Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:42 2016 -0700 nilfs2: remove unnecessary else after return or break This fixes the checkpatch.pl warning that suggests else is not generally useful after a break or return. Link: http://lkml.kernel.org/r/1462886671-3521-6-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/btree.c | 12 ++++++------ fs/nilfs2/direct.c | 6 +++--- fs/nilfs2/segment.c | 26 ++++++++++++-------------- 3 files changed, 21 insertions(+), 23 deletions(-) commit 0c6c44cb9f93f7c0ad803b41ae7c0b08cf6942e2 Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:39 2016 -0700 nilfs2: avoid bare use of 'unsigned' This fixes checkpatch.pl warning "WARNING: Prefer 'unsigned int' to bare use of 'unsigned'". Link: http://lkml.kernel.org/r/1462886671-3521-5-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/alloc.c | 8 ++++---- fs/nilfs2/alloc.h | 2 +- fs/nilfs2/bmap.c | 2 +- fs/nilfs2/bmap.h | 4 ++-- fs/nilfs2/btree.c | 3 ++- fs/nilfs2/cpfile.c | 8 +++++--- fs/nilfs2/cpfile.h | 4 ++-- fs/nilfs2/dat.c | 2 +- fs/nilfs2/dat.h | 2 +- fs/nilfs2/dir.c | 47 ++++++++++++++++++++++++----------------------- fs/nilfs2/direct.c | 5 +++-- fs/nilfs2/inode.c | 14 +++++++------- fs/nilfs2/mdt.c | 4 ++-- fs/nilfs2/mdt.h | 6 +++--- fs/nilfs2/namei.c | 2 +- fs/nilfs2/nilfs.h | 2 +- fs/nilfs2/page.c | 8 ++++---- fs/nilfs2/page.h | 3 ++- fs/nilfs2/recovery.c | 4 ++-- fs/nilfs2/segbuf.c | 4 ++-- fs/nilfs2/segbuf.h | 5 +++-- fs/nilfs2/segment.c | 18 +++++++++--------- fs/nilfs2/segment.h | 4 ++-- fs/nilfs2/sysfs.c | 6 +++--- fs/nilfs2/the_nilfs.c | 4 ++-- fs/nilfs2/the_nilfs.h | 10 +++++----- include/linux/nilfs2_fs.h | 6 +++--- 27 files changed, 97 insertions(+), 90 deletions(-) commit 7592ecde65f908f082cfd3440888fd6ae99f4cbb Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:36 2016 -0700 nilfs2: fix code indent coding style issue This fixes checkpatch.pl warning "WARNING: suspect code indent for conditional statements". Link: http://lkml.kernel.org/r/1462886671-3521-4-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c9cb9b5c85265acf3e40118727630fd3d57a0bdb Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:34 2016 -0700 nilfs2: remove space before semicolon This fixes the checkpatch.pl warning "WARNING: space prohibited before semicolon" at nilfs_store_magic_and_option(). Link: http://lkml.kernel.org/r/1462886671-3521-3-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 06f4abf6ca9364cdbbfac5b6e0fb1a5bf3468195 Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:31 2016 -0700 nilfs2: do not emit extra newline on nilfs_warning() and nilfs_error() This updates call sites of nilfs_warning() and nilfs_error() so that they don't add a duplicate newline. These output functions are already designed to add a trailing newline to the message. Link: http://lkml.kernel.org/r/1462886671-3521-2-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/alloc.c | 10 +++++----- fs/nilfs2/bmap.c | 2 +- fs/nilfs2/dir.c | 4 ++-- fs/nilfs2/inode.c | 6 +++--- fs/nilfs2/namei.c | 2 +- fs/nilfs2/segment.c | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-) commit facb9ec5e6e376c25a00bb7a64332287c7a1403c Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:28 2016 -0700 nilfs2: clean trailing semicolons in macros Remove trailing semicolons from macros, as suggested by checkpatch.pl. Link: http://lkml.kernel.org/r/1461935747-10380-12-git-send-email-konishi.ryusuke@lab.ntt.co.jp [konishi.ryusuke@lab.ntt.co.jp: fix style issues] Link: http://lkml.kernel.org/r/20160509.231703.1481729973362188932.konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/sysfs.c | 4 ++-- fs/nilfs2/sysfs.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) commit 4ad364ca1ce3f4f96e04aaeb7974de4380eb6004 Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:25 2016 -0700 nilfs2: add missing line spacing Clean up checkpatch.pl warnings "WARNING: Missing a blank line after declarations" from nilfs2. Link: http://lkml.kernel.org/r/1461935747-10380-11-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/cpfile.c | 2 ++ fs/nilfs2/dir.c | 2 ++ fs/nilfs2/ifile.h | 1 + fs/nilfs2/inode.c | 1 + fs/nilfs2/namei.c | 1 + fs/nilfs2/recovery.c | 1 + fs/nilfs2/segment.c | 1 + fs/nilfs2/sufile.c | 2 ++ fs/nilfs2/super.c | 1 + fs/nilfs2/the_nilfs.h | 2 ++ 10 files changed, 14 insertions(+) commit e7a142aaa09fa5db015fd176d6943f888665829f Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:23 2016 -0700 nilfs2: replace __attribute__((packed)) with __packed This fixes the following checkpatch.pl warning: WARNING: __packed is preferred over __attribute__((packed)) #23: FILE: export.h:23: +} __attribute__ ((packed)); Link: http://lkml.kernel.org/r/1461935747-10380-10-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/export.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d19961d83524c69e44f179b43aee2daf0906eda Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:20 2016 -0700 nilfs2: move cleanup code of metadata file from inode routines Refactor nilfs_clear_inode() and nilfs_i_callback() so that cleanup code or resource deallocation related to metadata file will be moved out to mdt.c. Link: http://lkml.kernel.org/r/1461935747-10380-9-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/inode.c | 5 ++--- fs/nilfs2/mdt.c | 25 +++++++++++++++++++++++++ fs/nilfs2/mdt.h | 8 ++++++++ fs/nilfs2/super.c | 8 +++----- 4 files changed, 38 insertions(+), 8 deletions(-) commit 24e20ead2fb2e1b67a76a04550d29c9027f707eb Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:17 2016 -0700 nilfs2: get rid of nilfs_mdt_mark_block_dirty() nilfs_mdt_mark_block_dirty() can be replaced with primary functions like nilfs_mdt_get_block() and mark_buffer_dirty(), and it's used only by nilfs_ioctl_mark_blocks_dirty(). This gets rid of the function to simplify the interface of metadata file. Link: http://lkml.kernel.org/r/1461935747-10380-8-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/ioctl.c | 11 ++++++++--- fs/nilfs2/mdt.c | 28 ---------------------------- fs/nilfs2/mdt.h | 1 - 3 files changed, 8 insertions(+), 32 deletions(-) commit 756cbdb353c597dd265f070527b5ee9901f35261 Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:14 2016 -0700 nilfs2: clarify permission to replicate the design To respond to a certain developer's request, this explicitly state that developers can reimplement the nilfs2 design for other operating systems to share data stored in that format. Link: http://lkml.kernel.org/r/1461935747-10380-7-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/filesystems/nilfs2.txt | 5 +++++ 1 file changed, 5 insertions(+) commit 9e92e516ed4321b7c96206d92a21d6a36249f680 Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:11 2016 -0700 MAINTAINERS: add web link for nilfs project Add nilfs.osdn.jp as the second web site of nilfs project. Link: http://lkml.kernel.org/r/1461935747-10380-6-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 4b420ab4eedc7a816ad0f2278871019de1a8ccef Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:09 2016 -0700 nilfs2: clean up old e-mail addresses E-mail addresses of osrg.net domain are no longer available. This removes them from authorship notices and prevents reporters from being confused. Link: http://lkml.kernel.org/r/1461935747-10380-5-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/alloc.c | 5 ++--- fs/nilfs2/alloc.h | 5 ++--- fs/nilfs2/bmap.c | 2 +- fs/nilfs2/bmap.h | 2 +- fs/nilfs2/btnode.c | 5 ++--- fs/nilfs2/btnode.h | 4 ++-- fs/nilfs2/btree.c | 2 +- fs/nilfs2/btree.h | 2 +- fs/nilfs2/cpfile.c | 2 +- fs/nilfs2/cpfile.h | 2 +- fs/nilfs2/dat.c | 2 +- fs/nilfs2/dat.h | 2 +- fs/nilfs2/dir.c | 2 +- fs/nilfs2/direct.c | 2 +- fs/nilfs2/direct.h | 2 +- fs/nilfs2/file.c | 3 +-- fs/nilfs2/gcinode.c | 5 ++--- fs/nilfs2/ifile.c | 4 ++-- fs/nilfs2/ifile.h | 4 ++-- fs/nilfs2/inode.c | 2 +- fs/nilfs2/ioctl.c | 2 +- fs/nilfs2/mdt.c | 2 +- fs/nilfs2/mdt.h | 2 +- fs/nilfs2/namei.c | 3 +-- fs/nilfs2/nilfs.h | 3 +-- fs/nilfs2/page.c | 3 +-- fs/nilfs2/page.h | 3 +-- fs/nilfs2/recovery.c | 2 +- fs/nilfs2/segbuf.c | 2 +- fs/nilfs2/segbuf.h | 2 +- fs/nilfs2/segment.c | 2 +- fs/nilfs2/segment.h | 2 +- fs/nilfs2/sufile.c | 4 ++-- fs/nilfs2/sufile.h | 2 +- fs/nilfs2/super.c | 2 +- fs/nilfs2/the_nilfs.c | 2 +- fs/nilfs2/the_nilfs.h | 2 +- include/linux/nilfs2_fs.h | 3 +-- 38 files changed, 46 insertions(+), 56 deletions(-) commit 5726d0b454614a47e641a04c8106392d67a8e1ad Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:06 2016 -0700 nilfs2: remove FSF mailing address from GPL notices This removes the extra paragraph which mentions FSF address in GPL notices from source code of nilfs2 and avoids the checkpatch.pl error related to it. Link: http://lkml.kernel.org/r/1461935747-10380-4-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/alloc.c | 4 ---- fs/nilfs2/alloc.h | 4 ---- fs/nilfs2/bmap.c | 4 ---- fs/nilfs2/bmap.h | 4 ---- fs/nilfs2/btnode.c | 4 ---- fs/nilfs2/btnode.h | 4 ---- fs/nilfs2/btree.c | 4 ---- fs/nilfs2/btree.h | 4 ---- fs/nilfs2/cpfile.c | 4 ---- fs/nilfs2/cpfile.h | 4 ---- fs/nilfs2/dat.c | 4 ---- fs/nilfs2/dat.h | 4 ---- fs/nilfs2/dir.c | 4 ---- fs/nilfs2/direct.c | 4 ---- fs/nilfs2/direct.h | 4 ---- fs/nilfs2/file.c | 4 ---- fs/nilfs2/gcinode.c | 4 ---- fs/nilfs2/ifile.c | 4 ---- fs/nilfs2/ifile.h | 4 ---- fs/nilfs2/inode.c | 4 ---- fs/nilfs2/ioctl.c | 4 ---- fs/nilfs2/mdt.c | 4 ---- fs/nilfs2/mdt.h | 4 ---- fs/nilfs2/namei.c | 4 ---- fs/nilfs2/nilfs.h | 4 ---- fs/nilfs2/page.c | 4 ---- fs/nilfs2/page.h | 4 ---- fs/nilfs2/recovery.c | 4 ---- fs/nilfs2/segbuf.c | 4 ---- fs/nilfs2/segbuf.h | 4 ---- fs/nilfs2/segment.c | 4 ---- fs/nilfs2/segment.h | 4 ---- fs/nilfs2/sufile.c | 4 ---- fs/nilfs2/sufile.h | 4 ---- fs/nilfs2/super.c | 4 ---- fs/nilfs2/the_nilfs.c | 4 ---- fs/nilfs2/the_nilfs.h | 4 ---- include/linux/nilfs2_fs.h | 4 ---- 38 files changed, 152 deletions(-) commit f19e78dee9d5adc90af086175f8e3640da3f613c Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:03 2016 -0700 nilfs2: remove space before comma Fix checkpatch.pl error "ERROR: space prohibited before that ',' (ctx:WxW)" at nilfs_sufile_set_suinfo(). This also fixes checkpatch.pl warning "WARNING: Prefer 'unsigned int' to bare use of 'unsigned'" at nilfs_sufile_set_suinfo() and nilfs_sufile_get_suinfo(). Link: http://lkml.kernel.org/r/1461935747-10380-3-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/sufile.c | 4 ++-- fs/nilfs2/sufile.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 8fa7c32094d806c23b35f9f51bcefb3148d3eb54 Author: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Date: Mon May 23 16:23:00 2016 -0700 nilfs2: fix white space issue in nilfs_mount() Fix the following checkpatch.pl error and warnings: ERROR: code indent should use tabs where possible #1317: FILE: super.c:1317: + ^I^Is_new = true;$ WARNING: please, no space before tabs #1317: FILE: super.c:1317: + ^I^Is_new = true;$ WARNING: please, no spaces at the start of a line #1317: FILE: super.c:1317: + ^I^Is_new = true;$ Link: http://lkml.kernel.org/r/1461935747-10380-2-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c613cb9868359031eb1344a33ac661908804bab Author: Julia Lawall <Julia.Lawall@lip6.fr> Date: Mon May 23 16:22:57 2016 -0700 nilfs2: constify nilfs_sc_operations structures The nilfs_sc_operations structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/nilfs2/segment.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a46d8c3fc7f520632e773ff51209e98770a56846 Author: Salah Triki <salah.triki@acm.org> Date: Mon May 23 16:22:55 2016 -0700 fs/befs/io.c:befs_bread(): remove unneeded initialization to NULL bh is reinitialized by sb_bread() so no need to init it with NULL in the beginning of befs_bread() Link: http://lkml.kernel.org/r/88481760b43226fac16adb1f1e68897e47d8235c.1462841692.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/befs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 77169af8b90c96ac40e49ba45da6520dcccf5d8e Author: Salah Triki <salah.triki@acm.org> Date: Mon May 23 16:22:52 2016 -0700 fs/befs/io.c:befs_bread_iaddr(): remove unneeded initialization to NULL bh is reinitialized by sb_bread() so no need to init it with NULL in the beginning of befs_bread_iaddr() Link: http://lkml.kernel.org/r/586d2639d729345b9c07aac10ba713d8ceb8745a.1462841692.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/befs/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6e0203369ec2f9425e6d6e7ced7b365f5b97bf3 Author: Salah Triki <salah.triki@acm.org> Date: Mon May 23 16:22:49 2016 -0700 fs/befs/linuxvfs.c:befs_iget(): remove unneeded befs_nio initialization to NULL befs_ino is reinitialized by BEFS_I() so no need to init it with NULL in the beginning of befs_iget() Link: http://lkml.kernel.org/r/a5c02445e436629c4d4ba1b65d91501878942f58.1462842887.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44ad809865299c7c961161c45094e1bb3a12eaa0 Author: Salah Triki <salah.triki@acm.org> Date: Mon May 23 16:22:46 2016 -0700 fs/befs/linuxvfs.c:befs_iget(): remove unneeded raw_inode initialization to NULL raw_inode is reinitialized to bh->b_data so no need to init it with NULL in the beginning of befs_iget() Link: http://lkml.kernel.org/r/0a66baaaacb6b7e5fcea5b31b57b649261152281.1462842887.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e4c7f5b10931595097815c9d36e041efb49a42c7 Author: Salah Triki <salah.triki@acm.org> Date: Mon May 23 16:22:43 2016 -0700 fs/befs/linuxvfs.c:befs_iget(): remove unneeded initialization to NULL bh is reinitialized by befs_bread() so no need to init it with NULL in the beginning of befs_iget() Link: http://lkml.kernel.org/r/38d62b1469bc3b316ba6b81fd8e26fc66fdd713b.1462842886.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c940876368982afa9c5413f23bf70766dbfa8ac0 Author: Salah Triki <salah.triki@acm.org> Date: Mon May 23 16:22:40 2016 -0700 fs/befs/linuxvfs.c:befs_get_block(): remove unneeded initialization to NULL inode is reinitialized by befs_iget() so no need to init it with NULL in the beginning of befs_lookup() Link: http://lkml.kernel.org/r/03d7e46890aef94078130bed97c4f8f8ae9ea2b2.1462842886.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6c8da24b903851656dc565e8d2336b72a35efe14 Author: Salah Triki <salah.triki@acm.org> Date: Mon May 23 16:22:38 2016 -0700 fs/befs/datastream.c:befs_find_brun_dblindirect(): remove unneeded initializations to NULL iaddr_array is unconditionally initialized to NULL in befs_find_brun_dblindirect(). Link: http://lkml.kernel.org/r/940def273e30ef37957fba9da6981a10fb3c9741.1462649034.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/befs/datastream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3080ea9e5bb4cb337b7f061a085645b9dabf365f Author: Salah Triki <salah.triki@acm.org> Date: Mon May 23 16:22:35 2016 -0700 fs/befs/datastream.c:befs_read_lsymlink(): remove unneeded initialization to NULL bh is reinitialized by befs_read_datastream() so no need to init it with NULL in the beginning of befs_read_lsymlink(). Link: http://lkml.kernel.org/r/e22f279bceb8d026af048952e02ba98925b21c92.1462649034.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/befs/datastream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ff2fe0aa2e17ff78c676d9c450b819c8b87af801 Author: Salah Triki <salah.triki@acm.org> Date: Mon May 23 16:22:32 2016 -0700 fs/befs/datastream.c:befs_read_datastream(): remove unneeded initialization to NULL bh is reinitialized by befs_bread_iaddr() so no need to init it with NULL in the beginning of befs_read_datastream(). Link: http://lkml.kernel.org/r/81e1f70187db34d195c8e42b1ff78be6a71c0060.1462649034.git.salah.triki@acm.org Signed-off-by: Salah Triki <salah.triki@acm.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/befs/datastream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1383399d7be029281997889df23150fa6c16be6e Author: Vladimir Davydov <vdavydov@virtuozzo.com> Date: Mon May 23 16:22:29 2016 -0700 mm: memcontrol: fix possible css ref leak on oom mem_cgroup_oom may be invoked multiple times while a process is handling a page fault, in which case current->memcg_in_oom will be overwritten leaking the previously taken css reference. Link: http://lkml.kernel.org/r/1464019330-7579-1-git-send-email-vdavydov@virtuozzo.com Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memcontrol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f43edca7ed08fc02279f2a62015da5cb6aa0ad61 Author: Ralf Baechle <ralf@linux-mips.org> Date: Mon May 23 16:22:26 2016 -0700 ELF/MIPS build fix CONFIG_MIPS32_N32=y but CONFIG_BINFMT_ELF disabled results in the following linker errors: arch/mips/built-in.o: In function `elf_core_dump': binfmt_elfn32.c:(.text+0x23dbc): undefined reference to `elf_core_extra_phdrs' binfmt_elfn32.c:(.text+0x246e4): undefined reference to `elf_core_extra_data_size' binfmt_elfn32.c:(.text+0x248d0): undefined reference to `elf_core_write_extra_phdrs' binfmt_elfn32.c:(.text+0x24ac4): undefined reference to `elf_core_write_extra_data' CONFIG_MIPS32_O32=y but CONFIG_BINFMT_ELF disabled results in the following linker errors: arch/mips/built-in.o: In function `elf_core_dump': binfmt_elfo32.c:(.text+0x28a04): undefined reference to `elf_core_extra_phdrs' binfmt_elfo32.c:(.text+0x29330): undefined reference to `elf_core_extra_data_size' binfmt_elfo32.c:(.text+0x2951c): undefined reference to `elf_core_write_extra_phdrs' binfmt_elfo32.c:(.text+0x29710): undefined reference to `elf_core_write_extra_data' This is because binfmt_elfn32 and binfmt_elfo32 are using symbols from elfcore but for these configurations elfcore will not be built. Fixed by making elfcore selectable by a separate config symbol which unlike the current mechanism can also be used from other directories than kernel/, then having each flavor of ELF that relies on elfcore.o, select it in Kconfig, including CONFIG_MIPS32_N32 and CONFIG_MIPS32_O32 which fixes this issue. Link: http://lkml.kernel.org/r/20160520141705.GA1913@linux-mips.org Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: "Maciej W. Rozycki" <macro@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/mips/Kconfig | 1 + fs/Kconfig.binfmt | 8 ++++++++ kernel/Makefile | 4 +--- 3 files changed, 10 insertions(+), 3 deletions(-) commit ededb49a9aa54960fce35c705d505d409f5b5483 Author: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Date: Mon May 23 16:22:23 2016 -0700 m32r: fix build failure m32r allmodconfig build was failing with the error: ERROR: "smp_flush_cache_all" [drivers/misc/lkdtm.ko] undefined! lkdtm driver at drivers/misc is using flush_icache_range() which for m32r is defined as smp_flush_cache_all() if CONFIG_SMP is defined. But as smp_flush_cache_all() was not exported so the build was failing with the error of undefined symbol. Link: http://lkml.kernel.org/r/1464001182-8329-1-git-send-email-sudipm.mukherjee@gmail.com Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/m32r/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) commit 54b9430f04b0be3beb7f2711152c61e7d39c58e5 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Mon May 23 13:19:35 2016 +0300 qed: signedness bug in qed_dcbx_process_tlv() "priority" needs to be signed for the error handling to work. Fixes: 39651abd2814 ('qed: add support for dcbx.') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 612bacad78ba6d0a91166fc4487af114bac172a8 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Sun May 22 23:16:18 2016 +0200 bpf, inode: disallow userns mounts Follow-up to commit e27f4a942a0e ("bpf: Use mount_nodev not mount_ns to mount the bpf filesystem"), which removes the FS_USERNS_MOUNT flag. The original idea was to have a per mountns instance instead of a single global fs instance, but that didn't work out and we had to switch to mount_nodev() model. The intent of that middle ground was that we avoid users who don't play nice to create endless instances of bpf fs which are difficult to control and discover from an admin point of view, but at the same time it would have allowed us to be more flexible with regard to namespaces. Therefore, since we now did the switch to mount_nodev() as a fix where individual instances are created, we also need to remove userns mount flag along with it to avoid running into mentioned situation. I don't expect any breakage at this early point in time with removing the flag and we can revisit this later should the requirement for this come up with future users. This and commit e27f4a942a0e have been split to facilitate tracking should any of them run into the unlikely case of causing a regression. Fixes: b2197755b263 ("bpf: add support for persistent maps/progs") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> kernel/bpf/inode.c | 1 - 1 file changed, 1 deletion(-) commit 156f4fbcc2bd1ce38da483f932d3963ba9a79ad0 Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Sun May 22 11:06:09 2016 +0200 MAINTAINERS: Add file patterns for net device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Cc: David S. Miller <davem@davemloft.net> Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 5fece5ad24ab5b57f51f3f18bc9332545ea8705a Author: Helge Deller <deller@gmx.de> Date: Mon May 23 23:23:26 2016 +0200 parisc: Use long jump to reach ftrace_return_to_handler() Depending on config options we will need to use a long jump to reach ftrace_return_to_handler(). Additionally only compile the parisc_return_to_handler code when CONFIG_FUNCTION_GRAPH_TRACER is set. Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/kernel/entry.S | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 049bbf589ec651685205bd8ce73221fdd62345cf Author: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Date: Fri May 20 13:21:10 2016 -0300 ipv4: Fix non-initialized TTL when CONFIG_SYSCTL=n Commit fa50d974d104 ("ipv4: Namespaceify ip_default_ttl sysctl knob") moves the default TTL assignment, and as side-effect IPv4 TTL now has a default value only if sysctl support is enabled (CONFIG_SYSCTL=y). The sysctl_ip_default_ttl is fundamental for IP to work properly, as it provides the TTL to be used as default. The defautl TTL may be used in ip_selected_ttl, through the following flow: ip_select_ttl ip4_dst_hoplimit net->ipv4.sysctl_ip_default_ttl This commit fixes the issue by assigning net->ipv4.sysctl_ip_default_ttl in net_init_net, called during ipv4's initialization. Without this commit, a kernel built without sysctl support will send all IP packets with zero TTL (unless a TTL is explicitly set, e.g. with setsockopt). Given a similar issue might appear on the other knobs that were namespaceify, this commit also moves them. Fixes: fa50d974d104 ("ipv4: Namespaceify ip_default_ttl sysctl knob") Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv4/af_inet.c | 8 ++++++++ net/ipv4/sysctl_net_ipv4.c | 4 ---- 2 files changed, 8 insertions(+), 4 deletions(-) commit 3a62a7b8200a177ad96161e4f2678514e6ee301e Author: Wang Nan <wangnan0@huawei.com> Date: Mon May 23 07:13:41 2016 +0000 perf record: Read from backward ring buffer Introduce rb_find_range() to find start and end position from a backward ring buffer. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1463987628-163563-5-git-send-email-wangnan0@huawei.com Signed-off-by: He Kuang <hekuang@huawei.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-record.c | 52 +++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/evlist.c | 1 + tools/perf/util/evlist.h | 1 + 3 files changed, 54 insertions(+) commit 09fa4f401296f555afb6f2f4282717644d94722e Author: Wang Nan <wangnan0@huawei.com> Date: Mon May 23 07:13:40 2016 +0000 perf record: Rename variable to make code clear record__mmap_read() writes data from ring buffer into perf.data. 'head' is maintained by the kernel, points to the last written record. 'old' is maintained by perf, points to the record read in previous round. record__mmap_read() saves data from 'old' to 'head' to perf.data. The names of these variables are not very intutive. In addition, when dealing with backward writing ring buffer, the md->prev pointer should point to 'head' instead of the last byte it got. Add 'start' and 'end' pointer to make code clear and set md->prev to 'head' instead of the moved 'old' pointer. This patch doesn't change behavior since: buf = &data[old & md->mask]; size = head - old; old += size; <--- Here, old == head Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1463987628-163563-4-git-send-email-wangnan0@huawei.com Signed-off-by: He Kuang <hekuang@huawei.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-record.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) commit 2d11c65071d489e20b3a811167507939dd8c2eac Author: Wang Nan <wangnan0@huawei.com> Date: Mon May 23 07:13:39 2016 +0000 perf record: Prevent reading invalid data in record__mmap_read When record__mmap_read() requires data more than the size of ring buffer, drop those data to avoid accessing invalid memory. This can happen when reading from overwritable ring buffer, which should be avoided. However, check this for robustness. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1463987628-163563-3-git-send-email-wangnan0@huawei.com Signed-off-by: He Kuang <hekuang@huawei.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-record.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 65aea2338765da1a58cc26eeb84d72308492ecb5 Author: Wang Nan <wangnan0@huawei.com> Date: Mon May 23 07:13:38 2016 +0000 perf evlist: Add API to pause/resume perf_evlist__toggle_{pause,resume}() are introduced to pause/resume events in an evlist. Utilize PERF_EVENT_IOC_PAUSE_OUTPUT ioctl. Following commits use them to ensure overwrite ring buffer is paused before reading. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1463987628-163563-2-git-send-email-wangnan0@huawei.com Signed-off-by: He Kuang <hekuang@huawei.com> [ Return -1, like all other ioctl() usage in evlist.c, rename 'pause' arg to avoid breaking the build on ubuntu 12.04 and other old systems ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/evlist.c | 27 +++++++++++++++++++++++++++ tools/perf/util/evlist.h | 2 ++ 2 files changed, 29 insertions(+) commit 2ece068e1b1d6e76ecd07e04b027013e931287ff Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Fri May 20 17:51:02 2016 +0530 ptp: use memdup_user(). Use memdup_user to duplicate a memory region from user-space to kernel-space, instead of open coding using kmalloc & copy_from_user. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Acked-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/ptp/ptp_chardev.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit 8da07a393f48864a87c61bb1dfbee640d9b97fd6 Author: xypron.glpk@gmx.de <xypron.glpk@gmx.de> Date: Thu May 19 21:20:55 2016 +0200 net: hns: avoid null pointer dereference In the statement assert(priv || priv->ae_handle); the right side of || is only evaluated if priv is null. v2: As suggested by David Leight and David Miller the assert statements are removed. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 11 ----------- 1 file changed, 11 deletions(-) commit c685293aa379b9d17e44fcc2f96a402b7648e838 Author: Stefan Hajnoczi <stefanha@redhat.com> Date: Wed May 18 17:42:13 2016 -0700 net/atm: sk_err_soft must be positive The sk_err and sk_err_soft fields are positive errno values and userspace applications rely on this when using getsockopt(SO_ERROR). ATM code places an -errno into sk_err_soft in sigd_send() and returns it from svc_addparty()/svc_dropparty(). Although I am not familiar with ATM code I came to this conclusion because: 1. sigd_send() msg->type cases as_okay and as_error both have: sk->sk_err = -msg->reply; while the as_addparty and as_dropparty cases have: sk->sk_err_soft = msg->reply; This is the source of the inconsistency. 2. svc_addparty() returns an -errno and assumes sk_err_soft is also an -errno: if (flags & O_NONBLOCK) { error = -EINPROGRESS; goto out; } ... error = xchg(&sk->sk_err_soft, 0); out: release_sock(sk); return error; This shows that sk_err_soft is indeed being treated as an -errno. This patch ensures that sk_err_soft is always a positive errno. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/atm/signaling.c | 2 +- net/atm/svc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit bbf178e0a0a323d896611905718db112b1ab1807 Author: xypron.glpk@gmx.de <xypron.glpk@gmx.de> Date: Wed May 18 20:40:51 2016 +0200 net: pegasus: simplify logical constraint If !count is true, count < 4 is also true. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/usb/pegasus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 12f3ca4fc8e27aa602c9c3c717d755b1e8f7fd47 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Mon May 23 16:37:55 2016 -0300 perf trace: Use the ptr->name beautifier as default for "filename" args Auto-attach the ptr->name beautifier to syscall args "filename", "path" and "pathname" if they are of type "const char *". Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-jxii4qmcgoppftv0zdvml9d7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-trace.c | 120 ++++++++++++++++----------------------------- 1 file changed, 43 insertions(+), 77 deletions(-) commit b6565c908ad7eb28dfdda9578ec5a074e080cedc Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Mon May 23 12:59:53 2016 -0300 perf trace: Use the fd->name beautifier as default for "fd" args Noticed when the 'setsockopt' 'fd' arg wasn't being formatted via the SCA_FD beautifier, so just remove the setting of "fd" args to SCA_FD and do it when reading the syscall info, like we do for args of type "pid_t", i.e. "fd" as the name should be enough as the decision to use the SFA_FD beautifier. For odd cases we can just do it explicitely. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-0qissgetiuqmqyj4b6ancmpn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-trace.c | 132 +++++++++++++++++++-------------------------- 1 file changed, 54 insertions(+), 78 deletions(-) commit 1d6da87a3241deb13d073c4125d19ed0e5a0c62c Merge: 1f40c49 a39ed68 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 23 11:48:48 2016 -0700 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "Here's the main drm pull request for 4.7, it's been a busy one, and I've been a bit more distracted in real life this merge window. Lots more ARM drivers, not sure if it'll ever end. I think I've at least one more coming the next merge window. But changes are all over the place, support for AMD Polaris GPUs is in here, some missing GM108 support for nouveau (found in some Lenovos), a bunch of MST and skylake fixes. I've also noticed a few fixes from Arnd in my inbox, that I'll try and get in asap, but I didn't think they should hold this up. New drivers: - Hisilicon kirin display driver - Mediatek MT8173 display driver - ARC PGU - bitstreamer on Synopsys ARC SDP boards - Allwinner A13 initial RGB output driver - Analogix driver for DisplayPort IP found in exynos and rockchip DRM Core: - UAPI headers fixes and C++ safety - DRM connector reference counting - DisplayID mode parsing for Dell 5K monitors - Removal of struct_mutex from drivers - Connector registration cleanups - MST robustness fixes - MAINTAINERS updates - Lockless GEM object freeing - Generic fbdev deferred IO support panel: - Support for a bunch of new panels i915: - VBT refactoring - PLL computation cleanups - DSI support for BXT - Color manager support - More atomic patches - GEM improvements - GuC fw loading fixes - DP detection fixes - SKL GPU hang fixes - Lots of BXT fixes radeon/amdgpu: - Initial Polaris support - GPUVM/Scheduler/Clock/Power improvements - ASYNC pageflip support - New mesa feature support nouveau: - GM108 support - Power sensor support improvements - GR init + ucode fixes. - Use GPU provided topology information vmwgfx: - Add host messaging support gma500: - Some cleanups and fixes atmel: - Bridge support - Async atomic commit support fsl-dcu: - Timing controller for LCD support - Pixel clock polarity support rcar-du: - Misc fixes exynos: - Pipeline clock support - Exynoss4533 SoC support - HW trigger mode support - export HDMI_PHY clock - DECON5433 fixes - Use generic prime functions - use DMA mapping APIs rockchip: - Lots of little fixes vc4: - Render node support - Gamma ramp support - DPI output support msm: - Mostly cleanups and fixes - Conversion to generic struct fence etnaviv: - Fix for prime buffer handling - Allow hangcheck to be coalesced with other wakeups tegra: - Gamme table size fix" * 'drm-next' of git://people.freedesktop.org/~airlied/linux: (1050 commits) drm/edid: add displayid detailed 1 timings to the modelist. (v1.1) drm/edid: move displayid validation to it's own function. drm/displayid: Iterate over all DisplayID blocks drm/edid: move displayid tiled block parsing into separate function. drm: Nuke ->vblank_disable_allowed drm/vmwgfx: Report vmwgfx version to vmware.log drm/vmwgfx: Add VMWare host messaging capability drm/vmwgfx: Kill some lockdep warnings drm/nouveau/gr/gf100-: fix race condition in fecs/gpccs ucode drm/nouveau/core: recognise GM108 chipsets drm/nouveau/gr/gm107-: fix touching non-existent ppcs in attrib cb setup drm/nouveau/gr/gk104-: share implementation of ppc exception init drm/nouveau/gr/gk104-: move rop_active_fbps init to nonctx drm/nouveau/bios/pll: check BIT table version before trying to parse it drm/nouveau/bios/pll: prevent oops when limits table can't be parsed drm/nouveau/volt/gk104: round up in gk104_volt_set drm/nouveau/fb/gm200: setup mmu debug buffer registers at init() drm/nouveau/fb/gk20a,gm20b: setup mmu debug buffer registers at init() drm/nouveau/fb/gf100-: allocate mmu debug buffers drm/nouveau/fb: allow chipset-specific actions for oneinit() ... commit 1f40c49570eb01436786a9b5845c4469a9a1f362 Merge: 7639dad 36092ee Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 23 11:18:01 2016 -0700 Merge tag 'libnvdimm-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm updates from Dan Williams: "The bulk of this update was stabilized before the merge window and appeared in -next. The "device dax" implementation was revised this week in response to review feedback, and to address failures detected by the recently expanded ndctl unit test suite. Not included in this pull request are two dax topic branches (dax error handling, and dax radix-tree locking). These topics were deferred to get a few more days of -next integration testing, and to coordinate a branch baseline with Ted and the ext4 tree. Vishal and Ross will send the error handling and locking topics respectively in the next few days. This branch has received a positive build result from the kbuild robot across 226 configs. Summary: - Device DAX for persistent memory: Device DAX is the device-centric analogue of Filesystem DAX (CONFIG_FS_DAX). It allows memory ranges to be allocated and mapped without need of an intervening file system. Device DAX is strict, precise and predictable. Specifically this interface: a) Guarantees fault granularity with respect to a given page size (pte, pmd, or pud) set at configuration time. b) Enforces deterministic behavior by being strict about what fault scenarios are supported. Persistent memory is the first target, but the mechanism is also targeted for exclusive allocations of performance/feature differentiated memory ranges. - Support for the HPE DSM (device specific method) command formats. This enables management of these first generation devices until a unified DSM specification materializes. - Further ACPI 6.1 compliance with support for the common dimm identifier format. - Various fixes and cleanups across the subsystem" * tag 'libnvdimm-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (40 commits) libnvdimm, dax: fix deletion libnvdimm, dax: fix alignment validation libnvdimm, dax: autodetect support libnvdimm: release ida resources Revert "block: enable dax for raw block devices" /dev/dax, core: file operations and dax-mmap /dev/dax, pmem: direct access to persistent memory libnvdimm: stop requiring a driver ->remove() method libnvdimm, dax: record the specified alignment of a dax-device instance libnvdimm, dax: reserve space to store labels for device-dax libnvdimm, dax: introduce device-dax infrastructure nfit: add sysfs dimm 'family' and 'dsm_mask' attributes tools/testing/nvdimm: ND_CMD_CALL support nfit: disable vendor specific commands nfit: export subsystem ids as attributes nfit: fix format interface code byte order per ACPI6.1 nfit, libnvdimm: limited/whitelisted dimm command marshaling mechanism nfit, libnvdimm: clarify "commands" vs "_DSMs" libnvdimm: increase max envelope size for ioctl acpi/nfit: Add sysfs "id" for NVDIMM ID ... commit b01518ca88410195ace38ce755c1206588e5c167 Author: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Date: Mon May 23 16:00:54 2016 +0530 ASoC: kirkwood: fix build failure While building m32r allmodconfig the build failed with: ERROR: "bad_dma_ops" [sound/soc/kirkwood/snd-soc-kirkwood.ko] undefined! To satisfy the dependency CONFIG_SND_KIRKWOOD_SOC should depend on HAS_DMA. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/kirkwood/Kconfig | 1 + 1 file changed, 1 insertion(+) commit bdf03e59f8c136f709dd44987ad21f6ce19dc98c Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:10:59 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com> arch/tile/kernel/unaligned.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 94ceaf381d09e9f1f5ba4b621ea0f0c11c77a6fc Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:10:49 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com> arch/tile/kernel/pci_gx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a87e2cdc21332592fc1c62041cfcb85111f6df5e Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:10:39 2016 +0200 Fix typo Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com> arch/tile/gxio/mpipe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0cb8bf3a8e4bd82e640862cdd8891400405cb89 Author: Tomáš Trnka <ttrnka@mail.muni.cz> Date: Fri May 20 16:41:10 2016 +0200 sunrpc: fix stripping of padded MIC tokens The length of the GSS MIC token need not be a multiple of four bytes. It is then padded by XDR to a multiple of 4 B, but unwrap_integ_data() would previously only trim mic.len + 4 B. The remaining up to three bytes would then trigger a check in nfs4svc_decode_compoundargs(), leading to a "garbage args" error and mount failure: nfs4svc_decode_compoundargs: compound not properly padded! nfsd: failed to decode arguments! This would prevent older clients using the pre-RFC 4121 MIC format (37-byte MIC including a 9-byte OID) from mounting exports from v3.9+ servers using krb5i. The trimming was introduced by commit 4c190e2f913f ("sunrpc: trim off trailing checksum before returning decrypted or integrity authenticated buffer"). Fixes: 4c190e2f913f "unrpc: trim off trailing checksum..." Signed-off-by: Tomáš Trnka <ttrnka@mail.muni.cz> Cc: stable@vger.kernel.org Acked-by: Jeff Layton <jlayton@poochiereds.net> Signed-off-by: J. Bruce Fields <bfields@redhat.com> net/sunrpc/auth_gss/svcauth_gss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d96b9c9398fcddca7f2386cff44a6788edfe7db1 Author: J. Bruce Fields <bfields@redhat.com> Date: Wed May 18 14:50:14 2016 -0400 svcrpc: autoload rdma module This should fix failures like: # rpc.nfsd --rdma rpc.nfsd: Unable to request RDMA services: Protocol not supported Reported-by: Steve Dickson <steved@redhat.com> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> net/sunrpc/svc_xprt.c | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) commit cf0d44d513f275be9ce42158079d4257e8973889 Author: Michal Hocko <mhocko@suse.com> Date: Mon May 23 15:35:51 2016 +0200 s390: fix info leak in do_sigsegv Aleksa has reported incorrect si_errno value when stracing task which received SIGSEGV: [pid 20799] --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_errno=2510266, si_addr=0x100000000000000} The reason seems to be that do_sigsegv is not initializing siginfo structure defined on the stack completely so it will leak 4B of the previous stack content. Fix it simply by initializing si_errno to 0 (same as do_sigbus does already). Cc: stable # introduced pre-git times Reported-by: Aleksa Sarai <asarai@suse.de> Signed-off-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/mm/fault.c | 1 + 1 file changed, 1 insertion(+) commit 508be0dfe6287d4e6452f5a1dc08856df74cb217 Author: Andi Kleen <ak@linux.intel.com> Date: Fri May 20 13:15:08 2016 -0700 perf report: Add srcline_from/to branch sort keys Add "srcline_from" and "srcline_to" branch sort keys that allow to show the source lines of a branch. That makes it much easier to track down where particular branches happen in the program, for example to examine branch mispredictions, or to associate it with cycle counts: % perf record -b -e cycles:p ./tcall % perf report --sort srcline_from,srcline_to,mispredict ... 15.10% tcall.c:18 tcall.c:10 N 14.83% tcall.c:11 tcall.c:5 N 14.12% tcall.c:7 tcall.c:12 N 14.04% tcall.c:12 tcall.c:5 N 12.42% tcall.c:17 tcall.c:18 N 12.39% tcall.c:7 tcall.c:13 N 12.27% tcall.c:13 tcall.c:17 N ... % perf report --sort srcline_from,srcline_to,cycles ... 17.12% tcall.c:18 tcall.c:11 1 17.01% tcall.c:12 tcall.c:6 1 16.98% tcall.c:11 tcall.c:6 1 15.91% tcall.c:17 tcall.c:18 1 6.38% tcall.c:7 tcall.c:17 7 4.80% tcall.c:7 tcall.c:12 8 4.21% tcall.c:7 tcall.c:17 8 2.67% tcall.c:7 tcall.c:12 7 2.62% tcall.c:7 tcall.c:12 10 2.10% tcall.c:7 tcall.c:17 9 1.58% tcall.c:7 tcall.c:12 6 1.44% tcall.c:7 tcall.c:12 5 1.38% tcall.c:7 tcall.c:12 9 1.06% tcall.c:7 tcall.c:17 13 1.05% tcall.c:7 tcall.c:12 4 1.01% tcall.c:7 tcall.c:17 6 Open issues: - Some kernel symbols get misresolved. Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Link: http://lkml.kernel.org/r/1463775308-32748-1-git-send-email-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-report.txt | 3 +- tools/perf/util/hist.c | 9 ++++ tools/perf/util/hist.h | 2 + tools/perf/util/sort.c | 84 ++++++++++++++++++++++++++++++++ tools/perf/util/sort.h | 2 + tools/perf/util/symbol.h | 2 + 6 files changed, 101 insertions(+), 1 deletion(-) commit 97f8827a8c7963756ae7d3ee898675b4667eca73 Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org> Date: Mon May 23 10:04:46 2016 -0400 ftracetest: Use proper logic to find process PID Half of the test in instance-event.tc was updated to use $! to find the PID of the previous background process that was launched, but the second part of the test still used the parsing of "jobs", which does not work on all shells like $! does. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> .../selftests/ftrace/test.d/instances/instance-event.tc | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 157d2c7fad0863222f6f3b11c4690f2a6e74d809 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri May 13 11:57:22 2016 +0100 drm/i915: Stop automatically retiring requests after a GPU hang Following a GPU hang, we break out of the request loop in order to unlock the struct_mutex for use by the GPU reset. However, if we retire all the requests at that moment, we cannot identify the guilty request after performing the reset. v2: Not automatically retiring requests forces us to recheck for available ringspace. Fixes: f4457ae71fd6 ("drm/i915: Prevent leaking of -EIO from i915_wait_request()") Testcase: igt/gem_reset_stats/ban-* Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Tested-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1463137042-9669-4-git-send-email-chris@chris-wilson.co.uk (cherry picked from commit e075a32f515becef66dc849f5eca47409ccf5473) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/i915_gem.c | 8 ++++++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) commit 92dcc67c11d51671cca8df543e25c601e52336ad Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu Apr 28 09:56:46 2016 +0100 drm/i915: Unify intel_ring_begin() Combine the near identical implementations of intel_logical_ring_begin() and intel_ring_begin() - the only difference is that the logical wait has to check for a matching ring (which is assumed by legacy). In the process some debug messages are culled as there were following a WARN if we hit an actual error. v2: Updated commentary Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1461833819-3991-12-git-send-email-chris@chris-wilson.co.uk (cherry picked from commit 987046ad65361a8b038fbf8d76d152237fb7acf1) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_lrc.c | 146 ++----------------------- drivers/gpu/drm/i915/intel_lrc.h | 1 - drivers/gpu/drm/i915/intel_mocs.c | 12 +- drivers/gpu/drm/i915/intel_ringbuffer.c | 188 +++++++++++++------------------- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 - 5 files changed, 89 insertions(+), 261 deletions(-) commit 9bd18728a3f2edee33d4d241d20f394c798fb414 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Fri May 13 10:10:42 2016 -0700 drm/i915: Ignore stale wm register values on resume on ilk-bdw (v2) When we resume the watermark register may contain some BIOS leftovers, or just the hardware reset values. We should ignore those as the pipes will be off anyway, and so frobbing around with intermediate watermarks doesn't make much sense. In fact I think we should just throw the skip_intermediate_wm flag out, and instead properly sanitize the "active" watermarks to match the current plane and pipe states. The actual wm state readout might also need a bit of work. But for now, let's continue with the skip_intermediate_wm to keep the fix more minimal. Fixes this sort of errors on resume [drm:ilk_validate_pipe_wm] LP0 watermark invalid [drm:intel_crtc_atomic_check] No valid intermediate pipe watermarks are possible [drm:intel_display_resume [i915]] *ERROR* Restoring old state failed with -22 and a boatload of subsequent modeset BAT fails on my ILK. v2: - Rebase; the SKL atomic WM patches that just landed changed the WM structure fields in intel_crtc_state slightly. (Matt) Cc: Matt Roper <matthew.d.roper@intel.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Fixes: ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1463159442-20478-1-git-send-email-matthew.d.roper@intel.com (cherry picked from commit e3d5457c7caabb77b3f1d0b09c4a63362e9b04d2) [Jani: rebase on drm-next while cherry-picking] Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_display.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 03b7b5f983091bca17e9c163832fcde56971d7d1 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed May 18 18:47:11 2016 +0200 drm/i915/psr: Try to program link training times correctly The default of 0 is 500us of link training, but that's not enough for some platforms. Decoding this correctly means we're using 2.5ms of link training on these platforms, which fixes flickering issues associated with enabling PSR. v2: Unbotch the math a bit. v3: Drop debug hunk. v4: Improve commit message. Tested-by: Lyude <cpaul@redhat.com> Cc: Lyude <cpaul@redhat.com> Cc: stable@vger.kernel.org Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95176 Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Sonika Jindal <sonika.jindal@intel.com> Cc: Durgadoss R <durgadoss.r@intel.com> Cc: "Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com> Tested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Tested-by: fritsch@kodi.tv Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1463590036-17824-2-git-send-email-daniel.vetter@ffwll.ch (cherry picked from commit 50db139018f9c94376d5f4db94a3bae65fdfac14) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_psr.c | 55 ++++++++++++++++++++++++++++++++++------ 1 file changed, 47 insertions(+), 8 deletions(-) commit 653bd4568ba083dfd5a06a83de3f0dc1e53dd42b Merge: 7639dad 75aeddd Author: James Morris <james.l.morris@oracle.com> Date: Mon May 23 21:23:47 2016 +1000 Merge tag 'keys-next-20160511' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into for-linus commit c4e85b7e6ff71a130710692fcb8daae5a638941f Merge: c8d6a77 ba412e3 Author: Mark Brown <broonie@kernel.org> Date: Mon May 23 12:16:58 2016 +0100 Merge remote-tracking branch 'spi/topic/zynqmp' into spi-next commit c8d6a77b5850dbf910e68ffe2054a6503ee2af47 Merge: b340941 280af2b d244228 5de7ed0 1051550 bf23d19 Author: Mark Brown <broonie@kernel.org> Date: Mon May 23 12:16:55 2016 +0100 Merge remote-tracking branches 'spi/topic/pxa2xx', 'spi/topic/qup', 'spi/topic/rockchip', 'spi/topic/st-ssc4' and 'spi/topic/xlp' into spi-next commit b340941af9d85ca74d3efacb7210e95296c484aa Merge: c36581c 3ae36c8 b085c61 710a1d5 866e48b 21825ff Author: Mark Brown <broonie@kernel.org> Date: Mon May 23 12:16:51 2016 +0100 Merge remote-tracking branches 'spi/topic/octeon', 'spi/topic/omap2-mcspi', 'spi/topic/orion', 'spi/topic/pic32' and 'spi/topic/pic32-qspi' into spi-next commit c36581c9a536405a4bb56f88d8d7c55f93d73cd1 Merge: 4b744af 3208a1c 7ba2f27 c145344 6319a68 46cb415 Author: Mark Brown <broonie@kernel.org> Date: Mon May 23 12:16:48 2016 +0100 Merge remote-tracking branches 'spi/topic/dw', 'spi/topic/flash-read', 'spi/topic/fsl-dspi', 'spi/topic/fsl-espi' and 'spi/topic/kconfig' into spi-next commit 4b744afa7d91be50171f5483f44b4e0abc37048b Merge: 38accef a7b221d 148b1eb fe5fd25 71c5e53 Author: Mark Brown <broonie@kernel.org> Date: Mon May 23 12:16:45 2016 +0100 Merge remote-tracking branches 'spi/topic/bcm53xx', 'spi/topic/cadence', 'spi/topic/davinci' and 'spi/topic/dln2' into spi-next commit 38acceff8f02caa8d6b7b4068bb849b619a438d6 Merge: 2dcd0af 8ba811a Author: Mark Brown <broonie@kernel.org> Date: Mon May 23 12:16:45 2016 +0100 Merge remote-tracking branch 'spi/topic/core' into spi-next commit 310944d148e3600dcff8b346bee7fa01d34903b1 Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Thu May 12 15:00:44 2016 +0200 drm/imx: Match imx-ipuv3-crtc components using device node in platform data The component master driver imx-drm-core matches component devices using their of_node. Since commit 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading"), the imx-ipuv3-crtc dev->of_node is not set during probing. Before that, of_node was set and caused an of: modalias to be used instead of the platform: modalias, which broke module autoloading. On the other hand, if dev->of_node is not set yet when the imx-ipuv3-crtc probe function calls component_add, component matching in imx-drm-core fails. While dev->of_node will be set once the next component tries to bring up the component master, imx-drm-core component binding will never succeed if one of the crtc devices is probed last. Add of_node to the component platform data and match against the pdata->of_node instead of dev->of_node in imx-drm-core to work around this problem. Cc: <stable@vger.kernel.org> # 4.4.x Fixes: 950b410dd1ab ("gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading") Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Tested-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Lothar Waßmann <LW@KARO-electronics.de> Tested-by: Heiko Schocher <hs@denx.de> Tested-by: Chris Ruehl <chris.ruehl@gtsys.com.hk> drivers/gpu/drm/imx/imx-drm-core.c | 8 ++++++++ drivers/gpu/drm/imx/ipuv3-crtc.c | 2 +- drivers/gpu/ipu-v3/ipu-common.c | 5 +++-- include/video/imx-ipu-v3.h | 2 ++ 4 files changed, 14 insertions(+), 3 deletions(-) commit 265984b36ce82fec67957d452dd2b22e010611e4 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Fri May 20 10:33:48 2016 +0300 mmc: sdhci-acpi: Remove MMC_CAP_BUS_WIDTH_TEST for Intel controllers The CMD19/CMD14 bus width test has been found to be unreliable in some cases. It is not essential, so simply remove it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/sdhci-acpi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 822969369482166050c5b2f7013501505e025c39 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Fri May 20 10:33:47 2016 +0300 mmc: sdhci-pci: Remove MMC_CAP_BUS_WIDTH_TEST for Intel controllers The CMD19/CMD14 bus width test has been found to be unreliable in some cases. It is not essential, so simply remove it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/sdhci-pci-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 32ecd320db39bcb007679ed42f283740641b81ea Author: Matt Gumbel <matthew.k.gumbel@intel.com> Date: Fri May 20 10:33:46 2016 +0300 mmc: longer timeout for long read time quirk 008GE0 Toshiba mmc in some Intel Baytrail tablets responds to MMC_SEND_EXT_CSD in 450-600ms. This patch will... () Increase the long read time quirk timeout from 300ms to 600ms. Original author of that quirk says 300ms was only a guess and that the number may need to be raised in the future. () Add this specific MMC to the quirk Signed-off-by: Matt Gumbel <matthew.k.gumbel@intel.com> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/card/block.c | 5 +++-- drivers/mmc/core/core.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) commit d4aa908c7978f60557a799ca53b5ae4166fd8355 Author: Douglas Anderson <dianders@chromium.org> Date: Thu May 12 11:31:50 2016 -0700 mmc: dw_mmc: rockchip: Set the drive phase properly Historically for Rockchip devices we've relied on the power-on default (or perhaps the firmware setting) to get the correct drive phase for dw_mmc devices. This worked OK for the most part, but: * Relying on the setting just "being right" is a bit fragile. * As soon as there is an instance where the power on default is wrong or where the firmware didn't configure this properly then we'll get a mysterious failure. In commit 7a03fe6f48f3 ("clk: rockchip: reset init state before mmc card initialization") we actually started setting this explicitly in the kernel, but that commit wasn't quite right and also wasn't quite enough. See <https://patchwork.kernel.org/patch/9085311/> for some details. Let's explicitly set this phase in dw_mmc. The comments inside this patch try to explain the situation quite throughly, but the high level overview of this is: Before this patch on rk3288 devices tested (after revert of the clock patch described above): * eMMC: 180 degrees * SDMMC/SDIO0/SDIO1: 90 degrees After this patch: * Use 90 degree phase offset usually. * Use 180 degree phase offset for MMC_DDR52, SDR104, HS200. That means we are _changing_ behavior for those devices in this way: * If we have HS200 eMMC or DDR52 eMMC, we'll run ID mode at 90 degrees (vs 180) but otherwise have no change. * For any non-HS200 / non-DDR52 eMMC devices we'll now _always_ run at 90 degrees (vs 180). It seems fairly unlikely that building modern hardware is using an eMMC that isn't using DDR52 or HS200, of course. * For SDR104 cards we'll now run with 180 degree phase offset (vs 90). It's expected that 90 degree phase offset would have worked OK, but this gives us extra margin. I have tested this by inserting my collection of uSD cards (mostly UHS, though a few not) into a veyron_minnie and confirmed that they still seem to enumerate properly. For a subset of them I tried putting a filesystem on them and also tried running mmc_test. Fixes: 7a03fe6f48f3 ("clk: rockchip: reset init state before mmc card initialization") Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Tested-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/dw_mmc-rockchip.c | 64 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) commit 225faf871ec24f3fa6daa4d2324b5de56690e1c5 Author: Jaehoon Chung <jh80.chung@samsung.com> Date: Wed May 4 11:24:14 2016 +0900 mmc: dw_mmc: fix the wrong max_blk_size According to DesignWare TRM, BLKSIZ is 16bits. Then it's correct that max_blk_size should be 0xFFFF, not 0x10000. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/dw_mmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d57fe83e0744cdc88236226980c613435ad5c10c Author: Shawn Lin <shawn.lin@rock-chips.com> Date: Tue Apr 26 14:53:59 2016 +0800 mmc: dw_mmc-rockchip: add MMC_CAP_CMD23 capabilities Add MMC_CAP_CMD23 for dw_mmc-rockchip, otherwise failing to create rpmb partition. With it, we can get rpmb successfully: mmc1: new HS200 MMC card at address 0001 mmcblk0: mmc1:0001 DS2016 14.7 GiB mmcblk0boot0: mmc1:0001 DS2016 partition 1 4.00 MiB mmcblk0boot1: mmc1:0001 DS2016 partition 2 4.00 MiB mmcblk0rpmb: mmc1:0001 DS2016 partition 3 4.00 MiB Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/dw_mmc-rockchip.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4832aa16c4cdfc750e47c5752a32776f93b6448d Author: Ramalingam C <ramalingam.c@intel.com> Date: Tue Apr 19 13:48:14 2016 +0530 drm/i915/bxt: Adjusting the error in horizontal timings retrieval In BXT DSI there is no regs programmed with few horizontal timings in Pixels but txbyteclkhs.. So retrieval process adds some ROUND_UP ERRORS in the process of PIXELS<==>txbyteclkhs. Actually here for the given adjusted_mode, we are calculating the value programmed to the port and then back to the horizontal timing param in pixels. This is the expected value at the end of get_config, including roundup errors. And if that is same as retrieved value from port, then retrieved (HW state) adjusted_mode's horizontal timings are corrected to match with SW state to nullify the errors. Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1461053894-5058-2-git-send-email-ramalingam.c@intel.com (cherry picked from commit 042ab0c3c40be1efcaad6b526173b5536fc6c3bf) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_dsi.c | 97 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 88 insertions(+), 9 deletions(-) commit 7045c3689f148a0c95f42bae8ef3eb2829ac7de9 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Fri May 13 17:55:17 2016 +0300 drm/i915: Don't leave old junk in ilk active watermarks on readout When we read out the watermark state from the hardware we're supposed to transfer that into the active watermarks, but currently we fail to any part of the active watermarks that isn't explicitly written. Let's clear it all upfront. Looks like this has been like this since the beginning, when I added the readout. No idea why I didn't clear it up. Cc: Matt Roper <matthew.d.roper@intel.com> Fixes: 243e6a44b9ca ("drm/i915: Init HSW watermark tracking in intel_modeset_setup_hw_state()") Cc: stable@vger.kernel.org Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1463151318-14719-2-git-send-email-ville.syrjala@linux.intel.com (cherry picked from commit 15606534bf0a65d8a74a90fd57b8712d147dbca6) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_pm.c | 2 ++ 1 file changed, 2 insertions(+) commit 9f7e6f33d4ffe6ab0855e851d964b6aa68451161 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed May 11 22:04:33 2016 +0300 drm/i915: s/DPPL/DPLL/ for SKL DPLLs SKL DPLLs shouldn't be called DPPLs. Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Fixes: 2edd6443e3d0 ("drm/i915: Use a table to initilize shared dplls") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1462993473-8254-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com> (cherry picked from commit d5aab9d40135725cbe81ed5e3af5209382063193) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_dpll_mgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 83e538020018e3235f5ec40a1f2dfc673bb5ae3c Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri Apr 29 13:18:23 2016 +0100 drm/i915: Fix gen8 semaphores id for legacy mode With the introduction of a distinct engine->id vs the hardware id, we need to fix up the value we use for selecting the target engine when signaling a semaphore. Note that these values can be merged with engine->guc_id. Fixes: de1add360522c876c25ef2bbbbab1c94bdb509ab Cc: stable@vger.kernel.org # v4.6 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1461932305-14637-3-git-send-email-chris@chris-wilson.co.uk (cherry picked from commit 215a7e3210eb208abe634480741e418b5a8bf60c) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_ringbuffer.c | 9 +++++++-- drivers/gpu/drm/i915/intel_ringbuffer.h | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) commit 2bae0304684cab917f348ec411cae600130fa6a9 Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Date: Wed Apr 27 15:44:16 2016 +0300 drm/i915: Set crtc_state->lane_count for HDMI Set the lane count for HDMI to 4. This will make it easier to unduplicate CHV phy code. This also fixes the the soft reset programming for HDMI with CHV. After commit a8f327fb8464 ("drm/i915: Clean up CHV lane soft reset programming"), it wouldn't set the right bits for PCS23 since it relied on a lane count that was never set. v2: Set lane_count in *_get_config() to please state checker. (0day) v3: Set lane_count for DDI in DVI mode too. (CI) v4: Add note about CHV soft lane reset. (Ander) Fixes: a8f327fb8464 ("drm/i915: Clean up CHV lane soft reset programming") Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Reviewed-by: Jim Bride <jim.bride@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1461761065-21195-2-git-send-email-ander.conselvan.de.oliveira@intel.com (cherry picked from commit d4d6279abe9a4a2d52115bad122118db4995df17) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_ddi.c | 4 +++- drivers/gpu/drm/i915/intel_hdmi.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) commit 130b62f74af3600897714045fcab553f01f46df4 Author: Ramalingam C <ramalingam.c@intel.com> Date: Tue Apr 19 13:48:13 2016 +0530 drm/i915/BXT: Retrieving the horizontal timing for DSI Retriving the horizontal timings from the port registers as part of get_config(). This fixes a division by zero: [ 56.916557] divide error: 0000 [#1] PREEMPT SMP [ 56.921741] Modules linked in: i915(+) drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_gtt agpgart cf g80211 rfkill binfmt_misc ax88179_178a kvm_intel kvm irqbypass crc32c_intel efivars tpm_tis tpm fuse [ 56.944106] CPU: 3 PID: 1097 Comm: modprobe Not tainted 4.6.0-rc4+ #433 [ 56.951501] Hardware name: Intel Corp. Broxton M/RVP, BIOS BXT1RVPA.X64.0131.B30.1604142217 04/14/2016 [ 56.961908] task: ffff88007a854d00 ti: ffff88007aea0000 task.ti: ffff88007aea0000 [ 56.970273] RIP: 0010:[<ffffffffa01235b2>] [<ffffffffa01235b2>] drm_mode_hsync+0x22/0x40 [drm] [ 56.980043] RSP: 0018:ffff88007aea3788 EFLAGS: 00010206 [ 56.985982] RAX: 000000000788b600 RBX: ffff880073c22108 RCX: 0000000000000000 [ 56.993957] RDX: 0000000000000000 RSI: ffff88007ab06800 RDI: ffff880073c22108 [ 57.001935] RBP: ffff88007aea3788 R08: 0000000000000001 R09: ffff880073c221e8 [ 57.009903] R10: ffff880073c22108 R11: 0000000000000001 R12: ffff88007a300000 [ 57.017872] R13: ffff880073c22000 R14: ffff880175f78000 R15: ffff880175f78798 [ 57.025849] FS: 00007f105d3e6700(0000) GS:ffff88017fd80000(0000) knlGS:0000000000000000 [ 57.034894] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 57.041317] CR2: 00007f4d485101d0 CR3: 000000007a820000 CR4: 00000000003406e0 [ 57.049292] Stack: [ 57.051539] ffff88007aea37a0 ffffffffa043b632 ffff880175f787c8 ffff88007aea3810 [ 57.059825] ffffffffa043d59e ffff880175f787b0 ffff88007ab68c00 ffff88007aea37f0 [ 57.068128] ffff880073c221e8 ffff880073c22108 ffff880175f78780 ffff880100000000 [ 57.076430] Call Trace: [ 57.079254] [<ffffffffa043b632>] intel_mode_from_pipe_config+0x82/0xb0 [i915] [ 57.087405] [<ffffffffa043d59e>] intel_modeset_setup_hw_state+0x55e/0xd60 [i915] [ 57.095847] [<ffffffffa043ff94>] intel_modeset_init+0x8e4/0x1630 [i915] [ 57.103415] [<ffffffffa047bcf0>] i915_driver_load+0xbe0/0x1980 [i915] [ 57.110745] [<ffffffffa0116c19>] drm_dev_register+0xa9/0xc0 [drm] [ 57.117681] [<ffffffffa011921d>] drm_get_pci_dev+0x8d/0x1e0 [drm] [ 57.124600] [<ffffffff8195f942>] ? _raw_spin_unlock_irqrestore+0x42/0x70 [ 57.132253] [<ffffffffa03b0384>] i915_pci_probe+0x34/0x50 [i915] [ 57.139070] [<ffffffff8149c375>] local_pci_probe+0x45/0xa0 [ 57.145303] [<ffffffff8149d300>] ? pci_match_device+0xe0/0x110 [ 57.151924] [<ffffffff8149d6cb>] pci_device_probe+0xdb/0x130 [ 57.158355] [<ffffffff81579b93>] driver_probe_device+0x223/0x440 [ 57.165169] [<ffffffff81579e85>] __driver_attach+0xd5/0x100 [ 57.171500] [<ffffffff81579db0>] ? driver_probe_device+0x440/0x440 [ 57.178510] [<ffffffff81577736>] bus_for_each_dev+0x66/0xa0 [ 57.184841] [<ffffffff815793de>] driver_attach+0x1e/0x20 [ 57.190881] [<ffffffff81578d6e>] bus_add_driver+0x1ee/0x280 [ 57.197212] [<ffffffff8157abc0>] driver_register+0x60/0xe0 [ 57.203447] [<ffffffff8149bc50>] __pci_register_driver+0x60/0x70 [ 57.210285] [<ffffffffa0119450>] drm_pci_init+0xe0/0x110 [drm] [ 57.216911] [<ffffffff810dcd8d>] ? trace_hardirqs_on+0xd/0x10 [ 57.223434] [<ffffffffa023a000>] ? 0xffffffffa023a000 [ 57.229237] [<ffffffffa023a092>] i915_init+0x92/0x99 [i915] [ 57.235570] [<ffffffff810003db>] do_one_initcall+0xab/0x1d0 [ 57.241900] [<ffffffff810f9eef>] ? rcu_read_lock_sched_held+0x7f/0x90 [ 57.249205] [<ffffffff81204f18>] ? kmem_cache_alloc_trace+0x248/0x2b0 [ 57.256509] [<ffffffff811a5eee>] ? do_init_module+0x27/0x1d9 [ 57.262934] [<ffffffff811a5f26>] do_init_module+0x5f/0x1d9 [ 57.269167] [<ffffffff8112392f>] load_module+0x20ef/0x27b0 [ 57.275401] [<ffffffff8111f8e0>] ? store_uevent+0x40/0x40 [ 57.281541] [<ffffffff81124243>] SYSC_finit_module+0xc3/0xf0 [ 57.287969] [<ffffffff8112428e>] SyS_finit_module+0xe/0x10 [ 57.294203] [<ffffffff81960069>] entry_SYSCALL_64_fastpath+0x1c/0xac [ 57.301406] Code: ff 5d c3 66 0f 1f 44 00 00 0f 1f 44 00 00 8b 87 d8 00 00 00 55 48 89 e5 85 c0 75 22 8b 4f 68 85 c9 78 1b 69 47 58 e8 03 00 00 99 <f7> f9 b9 d3 4d 62 10 05 f4 01 00 00 f7 e1 89 d0 c1 e8 06 5d c3 [ 57.322964] RIP [<ffffffffa01235b2>] drm_mode_hsync+0x22/0x40 [drm] [ 57.330103] RSP <ffff88007aea3788> [ 57.334276] ---[ end trace d414224cb2e2a4cf ]--- [ 57.339861] modprobe (1097) used greatest stack depth: 12048 bytes left Fixes: 6f0e7535e7e1 ("drm/i915/BXT: Get pipe conf from the port registers") Signed-off-by: Ramalingam C <ramalingam.c@intel.com> Acked-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1461053894-5058-1-git-send-email-ramalingam.c@intel.com (cherry picked from commit cefc4e18785123326c5d4d985085e32160fef7f5) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_dsi.c | 44 +++++++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 7 deletions(-) commit e32da7adaf3c511e7e6ffa0d5b680e07201630b8 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Wed Apr 27 09:02:01 2016 +0100 drm/i915: Protect gen7 irq_seqno_barrier with uncore lock Faced with sporadic machine hangs on gen7, that mimic the issue of concurrent writes to the same cacheline and seem to start with commit 9b9ed3093613 (drm/i915: Remove forcewake dance from seqno/irq barrier on legacy gen6+), let us restore the spinlock around the mmio read. Fixes: 9b9ed3093613 (drm/i915: Remove forcewake dance from seqno/irq...) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Mika Kuoppala <mika.kuoppala@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1461744121-27051-1-git-send-email-chris@chris-wilson.co.uk Tested-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com> (cherry picked from commit bcbdb6d01150dcc1769ddc9baaaf7f102f27f919) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_ringbuffer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 5fbd0418eef283269f2cc1b90b63d88f20c887bf Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Fri May 6 21:35:55 2016 +0300 drm/i915: Re-enable GGTT earlier during resume on pre-gen6 platforms Move the intel_enable_gtt() call to happen before we touch the GTT during resume. Right now it's done way too late. Before commit ebb7c78d358b ("agp/intel-gtt: Only register fake agp driver for gen1") it was actually done earlier on account of also getting called from the resume hook of the fake agp driver. With the fake agp driver no longer getting registered we must move the call up. The symptoms I've seen on my 830 machine include lowmem corruption, other kinds of memory corruption, and straight up hung machine during or just after resume. Not really sure what causes the memory corruption, but so far I've not seen any with this fix. I think we shouldn't really need to call this during init, but we have been doing that so I've decided to keep the call. However moving that call earlier could be prudent as well. Doing it right after the intel-gtt probe seems appropriate. Also tested this on 946gz,elk,ilk and all seemed quite happy with this change. v2: Reorder init_hw vs. enable_hw functions (Chris) Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: drm-intel-fixes@lists.freedesktop.org Fixes: ebb7c78d358b ("agp/intel-gtt: Only register fake agp driver for gen1") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1462559755-353-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (cherry picked from commit ac840ae53573d9f435c88c131f6707a79aecb466) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/i915_dma.c | 6 ++++++ drivers/gpu/drm/i915/i915_drv.c | 5 +++++ drivers/gpu/drm/i915/i915_gem.c | 3 --- drivers/gpu/drm/i915/i915_gem_gtt.c | 8 ++++++++ drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + 5 files changed, 20 insertions(+), 3 deletions(-) commit 55d7f30ee1096474cb5bdbca46b60f23ce8b1f83 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Wed May 4 14:45:22 2016 +0300 drm/i915: Determine DP++ type 1 DVI adaptor presence based on VBT DP dual mode type 1 DVI adaptors aren't required to implement any registers, so it's a bit hard to detect them. The best way would be to check the state of the CONFIG1 pin, but we have no way to do that. So as a last resort, check the VBT to see if the HDMI port is in fact a dual mode capable DP port. v2: Deal with VBT code reorganization Deal with DRM_DP_DUAL_MODE_UNKNOWN Reduce DEVICE_TYPE_DP_DUAL_MODE_BITS a bit Accept both DP and HDMI dvo_port in VBT as my BSW at least declare its DP port as HDMI :( v3: Ignore DEVICE_TYPE_NOT_HDMI_OUTPUT (Shashank) Cc: stable@vger.kernel.org Cc: Tore Anderson <tore@fud.no> Reported-by: Tore Anderson <tore@fud.no> Fixes: 7a0baa623446 ("Revert "drm/i915: Disable 12bpc hdmi for now"") Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Shashank Sharma <shashank.sharma@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1462362322-31278-1-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> (cherry picked from commit d61992565bd3cc5b66d74ed2e96df043c2a207e2) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_bios.c | 36 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/i915/intel_hdmi.c | 30 +++++++++++++++++++++++++---- drivers/gpu/drm/i915/intel_vbt_defs.h | 12 ++++++++++++ 4 files changed, 75 insertions(+), 4 deletions(-) commit 0c2fb7c6c8fef2092051192095a7788231ba9a42 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Mon May 2 22:08:24 2016 +0300 drm/i915: Enable/disable TMDS output buffers in DP++ adaptor as needed To save a bit of power, let's try to turn off the TMDS output buffers in DP++ adaptors when we're not driving the port. v2: Let's not forget DDI, toss in a debug message while at it v3: Just do the TMDS output control based on adaptor type. With the helper getting passed the type, we wouldn't actually have to check at all in the driver, but the check eliminates the debug output more honest Cc: stable@vger.kernel.org Cc: Tore Anderson <tore@fud.no> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Shashank Sharma <shashank.sharma@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1462216105-20881-4-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> (cherry picked from commit b2ccb822d376d1bbbe5d1f9118d1488b25e6bc6d) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_ddi.c | 12 ++++++++++++ drivers/gpu/drm/i915/intel_drv.h | 1 + drivers/gpu/drm/i915/intel_hdmi.c | 20 ++++++++++++++++++++ 3 files changed, 33 insertions(+) commit c578d15226c99f0566d5d022f81af6b7d69928db Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Mon May 2 22:08:23 2016 +0300 drm/i915: Respect DP++ adaptor TMDS clock limit Try to detect the max TMDS clock limit for the DP++ adaptor (if any) and take it into account when checking the port clock. Note that as with the sink (HDMI vs. DVI) TMDS clock limit we'll ignore the adaptor TMDS clock limit in the modeset path, in case users are already "overclocking" their TMDS links. One subtle change here is that we'll have to respect the adaptor TMDS clock limit when we decide whether to do 12bpc or 8bpc, otherwise we might end up picking 12bpc and accidentally driving the TMDS link out of spec even when the user chose a mode that fits wihting the limits at 8bpc. This means you can't "overclock" your DP++ dongle at 12bpc anymore, but you can continue to do so at 8bpc. Note that for simplicity we'll use the I2C access method for all dual mode adaptors including type 2. Otherwise we'd have to start mixing DP AUX and HDMI together. In the future we may need to do that if we come across any board designs that don't hook up the DDC pins to the DP++ connectors. Such boards would obviously only work with type 2 dual mode adaptors, and not type 1. v2: Store adaptor type under indel_hdmi->dp_dual_mode Deal with DRM_DP_DUAL_MODE_UNKNOWN Pass adaptor type to drm_dp_dual_mode_max_tmds_clock(), and use it for type1 adaptors as well Cc: stable@vger.kernel.org Reported-by: Tore Anderson <tore@fud.no> Fixes: 7a0baa623446 ("Revert "drm/i915: Disable 12bpc hdmi for now"") Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Shashank Sharma <shashank.sharma@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1462216105-20881-3-git-send-email-ville.syrjala@linux.intel.com Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> (cherry picked from commit b1ba124d8e95cca48d33502a4a76b1ed09d213ce) Signed-off-by: Jani Nikula <jani.nikula@intel.com> drivers/gpu/drm/i915/intel_drv.h | 5 ++++ drivers/gpu/drm/i915/intel_hdmi.c | 58 +++++++++++++++++++++++++++++++++------ 2 files changed, 55 insertions(+), 8 deletions(-) commit b3daa5ef52c26acd7432c787989bd92d48070c76 Author: Ville Syrjälä <ville.syrjala@linux.intel.com> Date: Fri May 6 16:46:52 2016 +0300 drm: Add helper for DP++ adaptors Add a helper which aids in the identification of DP dual mode (aka. DP++) adaptors. There are several types of adaptors specified: type 1 DVI, type 1 HDMI, type 2 DVI, type 2 HDMI Type 1 adaptors have a max TMDS clock limit of 165MHz, type 2 adaptors may go as high as 300MHz and they provide a register informing the source device what the actual limit is. Supposedly also type 1 adaptors may optionally implement this register. This TMDS clock limit is the main reason why we need to identify these adaptors. Type 1 adaptors provide access to their internal registers and the sink DDC bus through I2C. Type 2 adaptors provide this access both via I2C and I2C-over-AUX. A type 2 source device may choose to implement either of these methods. If a source device implements the I2C-over-AUX method, then the driver will obviously need specific support for such adaptors since the port is driven like an HDMI port, but DDC communication happes over the AUX channel. This helper should be enough to identify the adaptor type (some type 1 DVI adaptors may be a slight exception) and the maximum TMDS clock limit. Another feature that may be available is control over the TMDS output buffers on the adaptor, possibly allowing for some power saving when the TMDS link is down. Other user controllable features that may be available in the adaptors are downstream i2c bus speed control when using i2c-over-aux, and some control over the CEC pin. I chose not to provide any helper functions for those since I have no use for them in i915 at this time. The rest of the registers in the adaptor are mostly just information, eg. IEEE OUI, hardware and firmware revision, etc. v2: Pass adaptor type to helper functions to ease driver implementation Fix a bunch of typoes (Paulo) Add DRM_DP_DUAL_MODE_UNKNOWN for the case where we don't (yet) know the type (Paulo) Reject 0x00 and 0xff DP_DUAL_MODE_MAX_TMDS_CLOCK values (Paulo) Adjust drm_dp_dual_mode_detect() type2 vs. type1 detection to ease future LSPCON enabling Remove the unused DP_DUAL_MODE_LAST_RESERVED define v3: Fix kernel doc function argument descriptions (Jani) s/NONE/UNKNOWN/ in drm_dp_dual_mode_detect() docs Add kernel doc for enum drm_dp_dual_mode_type Actually build the docs Fix more typoes v4: Adjust code indentation of type2 adaptor detection (Shashank) Add debug messages for failurs cases (Shashank) v5: EXPORT_SYMBOL(drm_dp_dual_mode_read) (Paulo) Cc: stable@vger.kernel.org Cc: Tore Anderson <tore@fud.no> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Shashank Sharma <shashank.sharma@intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Shashank Sharma <shashank.sharma@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Shashank Sharma <shashank.sharma@intel.com> (v4) Link: http://patchwork.freedesktop.org/patch/msgid/1462542412-25533-1-git-send-email-ville.syrjala@linux.intel.com (cherry picked from commit ede53344dbfd1dd43bfd73eb6af743d37c56a7c3) Signed-off-by: Jani Nikula <jani.nikula@intel.com> Documentation/DocBook/gpu.tmpl | 6 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_dp_dual_mode_helper.c | 366 ++++++++++++++++++++++++++++++ include/drm/drm_dp_dual_mode_helper.h | 92 ++++++++ 4 files changed, 465 insertions(+), 1 deletion(-) commit e9bc15f28e5f0db44aba609780d6850eabefbf11 Author: Heiko Carstens <heiko.carstens@de.ibm.com> Date: Wed Jan 13 10:45:44 2016 +0100 s390/config: update default configuration Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/configs/default_defconfig | 44 ++++++++++++++++++++++----------- arch/s390/configs/gcov_defconfig | 34 ++++++++++++++----------- arch/s390/configs/performance_defconfig | 36 ++++++++++++++++----------- arch/s390/configs/zfcpdump_defconfig | 4 +-- arch/s390/defconfig | 44 +++++++++++++++++++-------------- 5 files changed, 98 insertions(+), 64 deletions(-) commit 540be8b2add1a18a4289b11c1a9b6956eb846630 Author: Geert Uytterhoeven <geert@linux-m68k.org> Date: Sun May 22 11:06:29 2016 +0200 MAINTAINERS: Add file patterns for watchdog device tree bindings Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Cc: linux-watchdog@vger.kernel.org MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 7639dad93a5564579987abded4ec05e3db13659d Merge: 77ed402 8329e81 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun May 22 19:40:39 2016 -0700 Merge tag 'trace-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull motr tracing updates from Steven Rostedt: "Three more changes. - I forgot that I had another selftest to stress test the ftrace instance creation. It was actually suppose to go into the 4.6 merge window, but I never committed it. I almost forgot about it again, but noticed it was missing from your tree. - Soumya PN sent me a clean up patch to not disable interrupts when taking the tasklist_lock for read, as it's unnecessary because that lock is never taken for write in irq context. - Newer gcc's can cause the jump in the function_graph code to the global ftrace_stub label to be a short jump instead of a long one. As that jump is dynamically converted to jump to the trace code to do function graph tracing, and that conversion expects a long jump it can corrupt the ftrace_stub itself (it's directly after that call). One way to prevent gcc from using a short jump is to declare the ftrace_stub as a weak function, which we do here to keep gcc from optimizing too much" * tag 'trace-v4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ftrace/x86: Set ftrace_stub to weak to prevent gcc from using short jumps to it ftrace: Don't disable irqs when taking the tasklist_lock read_lock ftracetest: Add instance created, delete, read and enable event test commit 77ed402b7f53cbe50ae8384a172a5b9713020400 Merge: 21f9deb 44156af Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun May 22 19:35:27 2016 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu Pull m68knommu update from Greg Ungerer: "Only a single change to update my email address in the MAINTAINERS file" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: change m68knommu maintainer email address commit 21f9debf74c3ae8fdd26fd2bc3c0169a08eba6b4 Merge: bd28b14 24e49ee Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun May 22 19:24:13 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc Pull sparc updates from David Miller: "Some 32-bit kgdb cleanups from Sam Ravnborg, and a hugepage TLB flush overhead fix on 64-bit from Nitin Gupta" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc: sparc64: Reduce TLB flushes during hugepte changes aeroflex/greth: fix warning about unused variable openprom: fix warning sparc32: drop superfluous cast in calls to __nocache_pa() sparc32: fix build with STRICT_MM_TYPECHECKS sparc32: use proper prototype for trapbase sparc32: drop local prototype in kgdb_32 sparc32: drop hardcoding trap_level in kgdb_trap commit a39ed680bddb1ead592e22ed812c7e47286bfc03 Author: Dave Airlie <airlied@redhat.com> Date: Mon May 2 08:35:05 2016 +1000 drm/edid: add displayid detailed 1 timings to the modelist. (v1.1) The tiled 5K Dell monitor appears to be hiding it's tiled mode inside the displayid timings block, this patch parses this blocks and adds the modes to the modelist. v1.1: add missing __packed. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95207 Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/drm_edid.c | 108 ++++++++++++++++++++++++++++++++++++++++++++ include/drm/drm_displayid.h | 17 +++++++ 2 files changed, 125 insertions(+) commit c97291774c1b867b56c3d439ddaec9a965cf559e Author: Dave Airlie <airlied@redhat.com> Date: Tue May 3 15:38:37 2016 +1000 drm/edid: move displayid validation to it's own function. We need to use this for validating modeline additions. Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/drm_edid.c | 44 ++++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 18 deletions(-) commit 3a4a2ea39f86c581054794c0a727597745f1084b Author: Tomas Bzatek <tomas@bzatek.net> Date: Sun May 1 15:02:45 2016 +0200 drm/displayid: Iterate over all DisplayID blocks This will iterate over all DisplayID blocks found in the buffer. Previously only the first block was parsed. https://bugs.freedesktop.org/show_bug.cgi?id=95207 Signed-off-by: Tomas Bzatek <tomas@bzatek.net> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/drm_edid.c | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) commit 5e546cd5b3bc76824069ffa98c52a5f48cf91aba Author: Dave Airlie <airlied@redhat.com> Date: Tue May 3 15:31:12 2016 +1000 drm/edid: move displayid tiled block parsing into separate function. This just makes the code easier to follow. Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/drm_edid.c | 110 ++++++++++++++++++++++++--------------------- 1 file changed, 59 insertions(+), 51 deletions(-) commit bd28b14591b98f696bc9f94c5ba2e598ca487dfd Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun May 22 17:21:27 2016 -0700 x86: remove more uaccess_32.h complexity I'm looking at trying to possibly merge the 32-bit and 64-bit versions of the x86 uaccess.h implementation, but first this needs to be cleaned up. For example, the 32-bit version of "__copy_from_user_inatomic()" is mostly the special cases for the constant size, and it's actually almost never relevant. Most users aren't actually using a constant size anyway, and the few cases that do small constant copies are better off just using __get_user() instead. So get rid of the unnecessary complexity. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/x86/include/asm/uaccess_32.h | 26 -------------------------- kernel/events/uprobes.c | 3 +-- kernel/futex.c | 2 +- mm/maccess.c | 3 +-- 4 files changed, 3 insertions(+), 31 deletions(-) commit 5b09c3edecd37ec1a52fbd5ae97a19734edc7a77 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sun May 22 14:19:37 2016 -0700 x86: remove pointless uaccess_32.h complexity I'm looking at trying to possibly merge the 32-bit and 64-bit versions of the x86 uaccess.h implementation, but first this needs to be cleaned up. For example, the 32-bit version of "__copy_to_user_inatomic()" is mostly the special cases for the constant size, and it's actually never relevant. Every user except for one aren't actually using a constant size anyway, and the one user that uses it is better off just using __put_user() instead. So get rid of the unnecessary complexity. [ The same cleanup should likely happen to __copy_from_user_inatomic() as well, but that one has a lot more users that I need to take a look at first ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/x86/include/asm/uaccess_32.h | 36 ------------------------------ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 4 +--- 2 files changed, 1 insertion(+), 39 deletions(-) commit 90afe0a98e81f8d2cb1146368d86f67769956e58 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:03:32 2016 +0200 parisc: Fix typo in fpudispatch.c Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/math-emu/fpudispatch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a2a0f78170425eef16a8af96ec1323e2df88f52 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:02:59 2016 +0200 parisc: Fix typos in eisa_eeprom.h Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/include/asm/eisa_eeprom.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d14b3dfc251d8524a3d24bfaf4c983a5b950a7d9 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:03:06 2016 +0200 parisc: Fix typo in ldcw.h Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/include/asm/ldcw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 13ff6313f9938fc304abaa6ecca416a705d1b642 Author: Andrea Gelmini <andrea.gelmini@gelma.net> Date: Sat May 21 14:03:14 2016 +0200 parisc: Fix typo in pdc.h Signed-off-by: Andrea Gelmini <andrea.gelmini@gelma.net> Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/include/uapi/asm/pdc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 37b1ba2c68cfbe37f5f45bb91bcfaf2b016ae6a1 Author: Matt Ranostay <mranostay@gmail.com> Date: Sat May 21 20:01:03 2016 -0700 iio: proximity: as3935: fix buffer stack trashing Buffer wasn't of a valid size to allow the timestamp, and correct padding. This patchset also moves the buffer off the stack, and onto the heap. Cc: george.mccollister@gmail.com Signed-off-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/proximity/as3935.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 7d0643634ea567969bf3f3ed6193a9d6fc75653b Author: Matt Ranostay <mranostay@gmail.com> Date: Sat May 21 20:01:02 2016 -0700 iio: proximity: as3935: remove triggered buffer processing Triggered buffers shouldn't return processed data, and the respective conversion was overflowing the defined .realbits for the channel. Cc: george.mccollister@gmail.com Signed-off-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/proximity/as3935.c | 1 - 1 file changed, 1 deletion(-) commit 5138806f16c74c7cb8ac3e408a859c79eb7c9567 Author: Matt Ranostay <mranostay@gmail.com> Date: Sat May 21 20:01:01 2016 -0700 iio: proximity: as3935: correct IIO_CHAN_INFO_RAW output IIO_CHAN_INFO_RAW was returning processed data which was incorrect. This also adds the IIO_CHAN_INFO_SCALE value to convert to a processed value. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Documentation/ABI/testing/sysfs-bus-iio-proximity-as3935 | 2 +- drivers/iio/proximity/as3935.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 99aed91a8dc6e398003333decacc101e5e504988 Author: John David Anglin <dave.anglin@bell.net> Date: Sat May 21 15:03:54 2016 -0400 parisc: Update futex.h to match generic implementation The attached patch updates the parisc version of futex.h to match the current generic implementation except for the spinlock code. Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/include/asm/futex.h | 70 +++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 41 deletions(-) commit 4df3c9ec12077384e0add54f28a9b079a87b59ef Author: Helge Deller <deller@gmx.de> Date: Fri Apr 29 22:07:31 2016 +0200 parisc: Merge ftrace C-helper and assembler functions into .text.hot section When enabling all-branch ftrace support (CONFIG_PROFILE_ALL_BRANCHES) the kernel gets really huge and some ftrace assembler functions like mcount can't reach the ftrace helper functions which are written in C. Avoid this problem of too distant branches by moving the ftrace C-helper functions into the .text.hot section which is put in front of the standard .text section by the linker. Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/kernel/entry.S | 2 +- arch/parisc/kernel/ftrace.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) commit a4351cb5511b917556c796d97068318a53a00849 Author: Helge Deller <deller@gmx.de> Date: Thu Mar 31 13:11:05 2016 +0200 selftests/thuge-gen: Use platform specific MAP_HUGETLB value Do not hardcode MAP_HUGETLB to 0x40000, since quite some architectures use a different value. Tested with a parisc architecture 64bit kernel. Signed-off-by: Helge Deller <deller@gmx.de> tools/testing/selftests/vm/thuge-gen.c | 2 ++ 1 file changed, 2 insertions(+) commit 54b668009076caddbede8fde513ca2c982590bfe Author: Helge Deller <deller@gmx.de> Date: Wed Apr 20 21:34:15 2016 +0200 parisc: Add native high-resolution sched_clock() implementation Add a native implementation for the sched_clock() function which utilizes the processor-internal cycle counter (Control Register 16) as high-resolution time source. With this patch we now get much more fine-grained resolutions in various in-kernel time measurements (e.g. when viewing the function tracing logs), and probably a more accurate scheduling on SMP systems. There are a few specific implementation details in this patch: 1. On a 32bit kernel we emulate the higher 32bits of the required 64-bit resolution of sched_clock() by increasing a per-cpu counter at every wrap-around of the 32bit cycle counter. 2. In a SMP system, the cycle counters of the various CPUs are not syncronized (similiar to the TSC in a x86_64 system). To cope with this we define HAVE_UNSTABLE_SCHED_CLOCK and let the upper layers do the adjustment work. 3. Since we need HAVE_UNSTABLE_SCHED_CLOCK, we need to provide a cmpxchg64() function even on a 32-bit kernel. 4. A 64-bit SMP kernel which is started on a UP system will mark the sched_clock() implementation as "stable", which means that we don't expect any jumps in the returned counter. This is true because we then run only on one CPU. Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/Kconfig | 1 + arch/parisc/include/asm/cmpxchg.h | 9 +++--- arch/parisc/kernel/time.c | 63 ++++++++++++++++++++++++++++++++++++++- arch/parisc/lib/bitops.c | 6 ++-- 4 files changed, 70 insertions(+), 9 deletions(-) commit 64e2a42bca12e408f0258c56adcf3595bcd116e7 Author: Helge Deller <deller@gmx.de> Date: Fri Apr 1 22:40:53 2016 +0200 parisc: Add ARCH_TRACEHOOK and regset support By adding TRACEHOOK support we now get a clean user interface to access registers via PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS and PTRACE_SETFPREGS. The user-visible regset struct user_regs_struct and user_fp_struct are modelled similiar to x86 and can be accessed via PTRACE_GETREGSET. Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/Kconfig | 1 + arch/parisc/include/uapi/asm/ptrace.h | 48 ++++ arch/parisc/kernel/ptrace.c | 356 +++++++++++++++++++++++++- tools/testing/selftests/seccomp/seccomp_bpf.c | 8 +- 4 files changed, 410 insertions(+), 3 deletions(-) commit d2ad824f4bb8d146ea6e5f440dddb30b9ccfd98c Author: Helge Deller <deller@gmx.de> Date: Sat Apr 9 08:27:08 2016 +0200 parisc: Add 64bit get_user() and put_user() for 32bit kernel Allow accessing 64-bit values in userspace from a 32-bit kernel. The access is not atomic. Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/include/asm/uaccess.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) commit 06bff6b9d7d50566a9320f64b0624957798cb08b Author: Helge Deller <deller@gmx.de> Date: Sat Apr 9 08:26:14 2016 +0200 parisc: Simplify and speed up get_user() and put_user() This patch simplifies the code for get_user() and put_user() a lot. Instead of accessing kernel memory (%sr0) and userspace memory (%sr3) hard-coded in the assembler instruction, we now preload %sr2 with either %sr0 (for accessing KERNEL_DS) or with sr3 (to access USER_DS) and use %sr2 in the load directly. The generated code avoids a branch and speeds up execution by generating less assembler instructions. Signed-off-by: Helge Deller <deller@gmx.de> Tested-by: Rolf Eike Beer <eike-kernel@sf-tec.de> arch/parisc/include/asm/uaccess.h | 79 +++++++++++---------------------------- 1 file changed, 21 insertions(+), 58 deletions(-) commit fc79168a7c75423047d60a033dc4844955ccae0b Author: Helge Deller <deller@gmx.de> Date: Wed Apr 13 22:44:54 2016 +0200 parisc: Add syscall tracepoint support This patch adds support for the TIF_SYSCALL_TRACEPOINT on the parisc architecture. Basically, it calls the appropriate tracepoints on syscall entry and exit. Signed-off-by: Helge Deller <deller@gmx.de> arch/parisc/Kconfig | 1 + arch/parisc/include/asm/ftrace.h | 2 ++ arch/parisc/include/asm/syscall.h | 9 +++++++++ arch/parisc/include/asm/thread_info.h | 4 +++- arch/parisc/kernel/ptrace.c | 12 ++++++++++++ arch/parisc/kernel/syscall.S | 1 + 6 files changed, 28 insertions(+), 1 deletion(-) commit 787ab6e97024926f38773287d9f98a9b330bce23 Author: Hannes Reinecke <hare@suse.de> Date: Wed May 18 10:16:51 2016 +0200 aacraid: do not activate events on non-SRC adapters Only SRC-based adapters support the AifReqEvent function, so there is no point in trying to activate it on older, non-SRC based adapters. Doing so lead to crashes on older adapters. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.com> Reviewed-by: Raghava Aditya Renukunta <RaghavaAaditya.Renukunta@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/aacraid/aacraid.h | 5 +++++ drivers/scsi/aacraid/linit.c | 11 ++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) commit 7ebd67e0dece0ec53e5541fc600eda4e050fab72 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Thu May 12 23:37:38 2016 +0300 mpt3sas: add missing curly braces There are some missing curly braces on this if statement, so we end up printing when we shouldn't. Fixes: a470a51cd648 ('mpt3sas: Handle active cable exception event') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chaitra P B <chaitra.basappa@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eb72d0bb84eee5d0dc3044fd17b75e7101dabb57 Author: Hannes Reinecke <hare@suse.de> Date: Tue Apr 26 08:06:58 2016 +0200 sd: get disk reference in sd_check_events() sd_check_events() is called asynchronously, and might race with device removal. So always take a disk reference when processing the event to avoid the device being removed while the event is processed. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/sd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit a621bac3044ed6f7ec5fa0326491b2d4838bfa93 Author: James Bottomley <James.Bottomley@HansenPartnership.com> Date: Fri May 13 12:04:06 2016 -0700 scsi_lib: correctly retry failed zero length REQ_TYPE_FS commands When SCSI was written, all commands coming from the filesystem (REQ_TYPE_FS commands) had data. This meant that our signal for needing to complete the command was the number of bytes completed being equal to the number of bytes in the request. Unfortunately, with the advent of flush barriers, we can now get zero length REQ_TYPE_FS commands, which confuse this logic because they satisfy the condition every time. This means they never get retried even for retryable conditions, like UNIT ATTENTION because we complete them early assuming they're done. Fix this by special casing the early completion condition to recognise zero length commands with errors and let them drop through to the retry code. Cc: stable@vger.kernel.org Reported-by: Sebastian Parschauer <s.parschauer@gmx.de> Signed-off-by: James E.J. Bottomley <jejb@linux.vnet.ibm.com> Tested-by: Jack Wang <jinpu.wang@profitbricks.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_lib.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit bb991288728e6a47a6f0fac6a4e9dfaeecc27956 Author: Michael S. Tsirkin <mst@redhat.com> Date: Sun May 22 15:10:49 2016 +0300 ringtest: pass buf != NULL just a stub pointer for now. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> tools/virtio/ringtest/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 87c9403b0d1de4676b0bd273eea68fcf6de68e68 Author: Michael S. Tsirkin <mst@redhat.com> Date: Tue May 17 13:31:18 2016 +0300 virtio_balloon: fix PFN format for virtio-1 Everything should be LE when using virtio-1, but the linux balloon driver does not seem to care about that. Reported-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Tested-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> drivers/virtio/virtio_balloon.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit ce10c1b95095c652461616a3f887f6412ab6e1cc Author: Michael S. Tsirkin <mst@redhat.com> Date: Sun May 8 18:43:54 2016 +0300 virtio: add inorder option skips ring accesses but drops out of order support Signed-off-by: Michael S. Tsirkin <mst@redhat.com> tools/virtio/ringtest/Makefile | 5 ++- tools/virtio/ringtest/virtio_ring_0_9.c | 49 ++++++++++++++++++++++++++++- tools/virtio/ringtest/virtio_ring_inorder.c | 2 ++ 3 files changed, 54 insertions(+), 2 deletions(-) commit f6c658df63856db3bf8f467024b1dbee37b5399c Merge: 07be133 0f3311a Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 21 18:25:28 2016 -0700 Merge tag 'for-f2fs-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs Pull f2fs updates from Jaegeuk Kim: "In this round, as Ted pointed out, fscrypto allows one more key prefix given by filesystem to resolve backward compatibility issues. Other than that, we've fixed several error handling cases by introducing a fault injection facility. We've also achieved performance improvement in some workloads as well as a bunch of bug fixes. Summary: Enhancements: - fs-specific prefix for fscrypto - fault injection facility - expose validity bitmaps for user to be aware of fragmentation - fallocate/rm/preallocation speed up - use percpu counters Bug fixes: - some inline_dentry/inline_data bugs - error handling for atomic/volatile/orphan inodes - recover broken superblock" * tag 'for-f2fs-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs: (73 commits) f2fs: fix to update dirty page count correctly f2fs: flush pending bios right away when error occurs f2fs: avoid ENOSPC fault in the recovery process f2fs: make exit_f2fs_fs more clear f2fs: use percpu_counter for total_valid_inode_count f2fs: use percpu_counter for alloc_valid_block_count f2fs: use percpu_counter for # of dirty pages in inode f2fs: use percpu_counter for page counters f2fs: use bio count instead of F2FS_WRITEBACK page count f2fs: manipulate dirty file inodes when DATA_FLUSH is set f2fs: add fault injection to sysfs f2fs: no need inc dirty pages under inode lock f2fs: fix incorrect error path handling in f2fs_move_rehashed_dirents f2fs: fix i_current_depth during inline dentry conversion f2fs: correct return value type of f2fs_fill_super f2fs: fix deadlock when flush inline data f2fs: avoid f2fs_bug_on during recovery f2fs: show # of orphan inodes f2fs: support in batch fzero in dnode page f2fs: support in batch multi blocks preallocation ... commit a78ff1112263fdd871d3506dbcff44f6f12e8423 Author: Eli Cooper <elicooper@gmx.com> Date: Sun Mar 20 00:58:41 2016 +0800 um: add extended processor state save/restore support This patch extends save_fp_registers() and restore_fp_registers() to use PTRACE_GETREGSET and PTRACE_SETREGSET with the XSTATE note type, adding support for new processor state extensions between context switches. When the new ptrace requests are unavailable, it falls back to the old PTRACE_GETFPREGS and PTRACE_SETFPREGS methods, which have been renamed to save_i387_registers() and restore_i387_registers(). Now these functions expect *fp_regs to have the space of an _xstate struct. Thus, this also makes ptrace in UML responde to PTRACE_GETFPREGS/_SETFPREG requests with a user_i387_struct (thus independent from HOST_FP_SIZE), and by calling save_i387_registers() and restore_i387_registers() instead of the extended save_fp_registers() and restore_fp_registers() functions. Signed-off-by: Eli Cooper <elicooper@gmx.com> arch/um/include/shared/registers.h | 2 ++ arch/um/kernel/process.c | 2 +- arch/x86/um/os-Linux/registers.c | 49 +++++++++++++++++++++++++++++++++-- arch/x86/um/ptrace_32.c | 5 ++-- arch/x86/um/ptrace_64.c | 16 ++++++------ arch/x86/um/shared/sysdep/ptrace_64.h | 4 +-- 6 files changed, 62 insertions(+), 16 deletions(-) commit b6024b21fec8367ef961a771cc9dde31f1831965 Author: Eli Cooper <elicooper@gmx.com> Date: Sun Mar 20 00:58:40 2016 +0800 um: extend fpstate to _xstate to support YMM registers Extends fpstate to _xstate, in order to hold AVX/YMM registers. To avoid oversized stack frame, the following functions have been refactored by using malloc. - sig_handler_common - timer_real_alarm_handler Signed-off-by: Eli Cooper <elicooper@gmx.com> arch/um/os-Linux/signal.c | 28 ++++++++++++++++++++-------- arch/x86/um/signal.c | 23 +++++++++++------------ arch/x86/um/user-offsets.c | 2 +- 3 files changed, 32 insertions(+), 21 deletions(-) commit 6de5a8a5001687df720b36729c799991cc0faff5 Author: Eli Cooper <elicooper@gmx.com> Date: Sun Mar 20 00:58:39 2016 +0800 um: fix FPU state preservation around signal handlers This patch makes UML saves/restores FPU state from/to the fpstate in pt_regs when setting up or returning from a signal stack, rather than calling ptrace directly. This ensures that FPU state is correctly preserved around signal handlers in a multi-threaded scenario. Signed-off-by: Eli Cooper <elicooper@gmx.com> arch/x86/um/signal.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 36092ee8ba695fce023b2118ececa6c2a56b1331 Merge: 1b982ba 03dca34 Author: Dan Williams <dan.j.williams@intel.com> Date: Sat May 21 12:33:04 2016 -0700 Merge branch 'for-4.7/dax' into libnvdimm-for-next commit 03dca343afe080968d90c4d9196404b5bbbc8461 Author: Dan Williams <dan.j.williams@intel.com> Date: Sat May 21 12:22:41 2016 -0700 libnvdimm, dax: fix deletion The ndctl unit tests discovered that the dax enabling omitted updates to nd_detach_and_reset(). This routine clears device the configuration when the namespace is detached. Without this clearing userspace may assume that the device is in the process of being configured by another agent in the system. Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/nvdimm/claim.c | 23 +++++++++++++++++++++-- drivers/nvdimm/nd-core.h | 1 + drivers/nvdimm/pfn_devs.c | 19 ------------------- 3 files changed, 22 insertions(+), 21 deletions(-) commit 14f2461b822dffb116256ee9155f7eca96064f7a Author: Crestez Dan Leonard <leonard.crestez@intel.com> Date: Fri May 20 17:44:36 2016 +0300 max44000: Remove scale from proximity This is not implemented and doesn't really make sense because IIO proximity is unit-less. Remove IIO_CHAN_INFO_SCALE from info_mask because so that the _scale sysfs entry won't appear. This fixes userspace tools like generic_buffer which abort when reads returns an error. Signed-off-by: Crestez Dan Leonard <leonard.crestez@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/light/max44000.c | 1 - 1 file changed, 1 deletion(-) commit 5e24c9fd36285535c704e84748d6c890be870fb6 Author: Dan Williams <dan.j.williams@intel.com> Date: Sat May 21 11:01:41 2016 -0700 libnvdimm, dax: fix alignment validation Testing the dax-device autodetect support revealed a probe failure with the following result: dax0.1: bad offset: 0x8200000 dax disabled The original pfn-device implementation inferred the alignment from ilog2(offset), now that the alignment is explicit the is_power_of_2() needs replacing with a real sanity check against the recorded alignment. Otherwise the alignment check is useless in the implicit case and only the minimum size of the offset matters. This self-consistency check is further validated by the probe path that will re-check that the offset is large enough to contain all the metadata required to enable the device. Cc: <stable@vger.kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/nvdimm/pfn_devs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 07be1337b9e8bfcd855c6e9175b5066a30ac609b Merge: 63d222b c315ef8 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 21 10:49:22 2016 -0700 Merge branch 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs Pull btrfs updates from Chris Mason: "This has our merge window series of cleanups and fixes. These target a wide range of issues, but do include some important fixes for qgroups, O_DIRECT, and fsync handling. Jeff Mahoney moved around a few definitions to make them easier for userland to consume. Also whiteout support is included now that issues with overlayfs have been cleared up. I have one more fix pending for page faults during btrfs_copy_from_user, but I wanted to get this bulk out the door first" * 'for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (90 commits) btrfs: fix memory leak during RAID 5/6 device replacement Btrfs: add semaphore to synchronize direct IO writes with fsync Btrfs: fix race between block group relocation and nocow writes Btrfs: fix race between fsync and direct IO writes for prealloc extents Btrfs: fix number of transaction units for renames with whiteout Btrfs: pin logs earlier when doing a rename exchange operation Btrfs: unpin logs if rename exchange operation fails Btrfs: fix inode leak on failure to setup whiteout inode in rename btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT Btrfs: pin log earlier when renaming Btrfs: unpin log if rename operation fails Btrfs: don't do unnecessary delalloc flushes when relocating Btrfs: don't wait for unrelated IO to finish before relocation Btrfs: fix empty symlink after creating symlink and fsync parent dir Btrfs: fix for incorrect directory entries after fsync log replay btrfs: build fixup for qgroup_account_snapshot btrfs: qgroup: Fix qgroup accounting when creating snapshot Btrfs: fix fspath error deallocation btrfs: make find_workspace warn if there are no workspaces btrfs: make find_workspace always succeed ... commit 63d222b9d277c4d7bf08afd1631a7f8e327a825c Merge: 10cd715 b9ba1eb Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 21 10:42:11 2016 -0700 Merge tag 'rtc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux Pull RTC updates from Alexandre Belloni: "Subsystem wide cleanups: - Use IS_ENABLED() instead of checking for built-in or module - remove useless DRV_VERSION - remove CLK_IS_ROOT - remove UIE signaling Drivers: - ds1302: rewritten to be a proper SPI device driver - m41t80: huge cleanup, alarm, wakelarm ans oscialltor failure detection support - rv3029: switch to regmap to handle rv3049, alarm support, fixes - zynqmp: enable switching to battery power, fixes - small fixes for at91sam9, da9053, ds1307, ds1685, ds3232, r2025, sa1100, snvs, stmp3xxx, tps6586x" * tag 'rtc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux: (40 commits) rtc: tps6586x: rename so module can be autoloaded rtc: rv3029: hide unused i2c device table rtc: rs5c372: r2025: fix check for 'oscillator halted' condition rtc: rv3029: add alarm IRQ rtc: rv3029: fix set_time function rtc: rv3029: fix alarm support rtc: rv3029: Remove some checks and warnings rtc: rv3029: Add support of RV3049 rtc: rv3029: convert to use regmap rtc: rv3029: remove 'i2c' in functions names rtc: stmp3xxx: print message on error rtc: Use IS_ENABLED() instead of checking for built-in or module rtc: ds3232: fix call trace when rtc->ops_lock is used as NULL rtc: snvs: return error in case enable_irq_wake fails rtc: zynqmp: Update seconds time programming logic rtc: sa1100: DT spelling s/interrupt-name/interrupt-names/ rtc: mc13xxx: remove UIE signaling rtc: mxc: remove UIE signaling rtc: ds1307: Remove CLK_IS_ROOT rtc: hym8563: Remove CLK_IS_ROOT ... commit 10cd7158042bf9c949c19dbf0c7ee600d198ed39 Merge: 51e68d0 c430cf3 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 21 10:32:48 2016 -0700 Merge branch 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration Pull mailbox updates from Jassi Brar: "OMAP: - Remove non-DT support from mailbox driver - Move PM from client calls to native driver suspend/resume - Trivial cleanups to make checkpatch happy STI: - Check return from devm_ioremap_resource as ERR_PTR, not NULL" * 'mailbox-for-next' of git://git.linaro.org/landing-teams/working/fujitsu/integration: mailbox: Fix devm_ioremap_resource error detection code mailbox/omap: kill omap_mbox_{save/restore}_ctx() functions mailbox/omap: check for any unread messages during suspend mailbox/omap: add support for suspend/resume mailbox/omap: store mailbox interrupt type in omap_mbox_device mailbox/omap: add blank lines after declarations mailbox/omap: remove FSF mailing address paragraph mailbox/omap: use variable name for sizeof() operator mailbox/omap: drop legacy platform device support commit 51e68d055cbabfd36cba3903fd2a223bc98514b1 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Sat May 21 10:25:19 2016 -0700 x86 isa: add back X86_32 dependency on CONFIG_ISA Commit b3c1be1b789c ("base: isa: Remove X86_32 dependency") made ISA support available on x86-64 too. That's not right - while there are some LPC-style devices that might be useful still and be based on ISA-like IP blocks, that is *not* an excuse to try to enable any random legacy drivers. Such drivers should be individually enabled and made to perhaps depend on ISA_DMA_API instead (which we have continued to support on x86-64). Or we could add another "ISA_XYZ_API" that we support that doesn't enable random old drivers that aren't even 64-bit clean nor do we have any test coverage for. Turning off ISA will now also turn off some drivers that have been marked as depending on it as part of this series, and that used to work on modern platforms. See for example commits ad7afc38eab3..cc736607c86d, which may also need to be reverted. This commit means that the warnings that came in due to enabling ISA widely are now gone again. Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/x86/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 1cb0d06a00f2ec0ed8f926ec62f53bc9e12ea55e Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Tue May 17 11:02:56 2016 +0300 iio: humidity: am2315: Remove a stray unlock We haven't taken the lock yet so we don't need to unlock here. Fixes: 0d96d5ead3f7 ('iio: humidity: Add triggered buffer support for AM2315') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Tiberiu Breana <tiberiu.a.breana@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/humidity/am2315.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 0e35cf5ce00d873d6e529d2b2cd7598d52438051 Author: Alison Schofield <amsfield22@gmail.com> Date: Fri May 20 10:06:41 2016 -0700 iio: humidity: hdc100x: correct humidity integration time mask Apply the correct mask to enable all available humidity integration times. Currently, the driver defaults to 6500 and all is okay with that. However, if 3850 is selected we get a stuck bit and can't change back to 6500 or select 2500. (Verified with HDC1008) Signed-off-by: Alison Schofield <amsfield22@gmail.com> Cc: Daniel Baluta <daniel.baluta@gmail.com> Reviewed-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/humidity/hdc100x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9ba1eb0336877b9b83556fd30d2becda110fd8c Author: Nicolas Chauvet <kwizart@gmail.com> Date: Tue May 10 12:26:42 2016 +0200 rtc: tps6586x: rename so module can be autoloaded This module is loaded by the related mfd driver which has the needed MODULE_DEVICE_TABLE(i2c,...). This patch fix the modalias when the rtc driver is built as a module, so the right name is used. Everything operates correctly when this module is builtin. Fixes: esdc59ed3865 ("rtc: add RTC driver for TPS6586x") Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-tps6586x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 814db2bc4c4e19530eae818354dceb861ceb9fb1 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 4 11:50:02 2016 +0200 rtc: rv3029: hide unused i2c device table The added support for SPI mode made it possible to configure the driver when I2C is disabled, leaving an unused device table: drivers/rtc/rtc-rv3029c2.c:794:29: error: 'rv3029_id' defined but not used [-Werror=unused-variable] This moves the table inside of the #ifdef section that has the only user, to avoid the harmless warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: d08f50dd0afc ("rtc: rv3029: Add support of RV3049") Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-rv3029c2.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit a9dbe558920e12ea286cd4479039df26991a95de Author: Thomas Koeller <thomas.koeller@baslerweb.com> Date: Wed Jun 2 15:53:05 2010 +0200 rtc: rs5c372: r2025: fix check for 'oscillator halted' condition The R2025SD chip, according to its data sheet, sets the /XST bit to zero if the oscillator stops. Hence the check for this condition was wrong. Signed-off-by: Thomas Koeller <thomas.koeller@baslerweb.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-rs5c372.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ddc5b89cd12938e251c691563f45409b4d15d98 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue May 3 11:54:38 2016 +0200 rtc: rv3029: add alarm IRQ Add the alarm IRQ functionality. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-rv3029c2.c | 114 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 93 insertions(+), 21 deletions(-) commit 38201ca3c58d27ac95ee08995558c7176b4feb13 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue May 3 11:54:37 2016 +0200 rtc: rv3029: fix set_time function The bin2bcd function in set_time is uncorrect on weekdays as the bit mask should be done at the end of arithmetic operations. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-rv3029c2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc492e866a997b3df2a551fa772d6887a19e53b8 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue May 3 11:54:36 2016 +0200 rtc: rv3029: fix alarm support The RTC RV3029 handles different types of alarms : seconds, minutes, ... These alarms can be enabled or disabled individually using an AE_x bit which is the last bit (BIT(7)) on each alarm registers. To prepare the alarm IRQ support, the current code enables all the alarm types by setting each AE_x to 1. It also fixes others alarms issues : - month and weekday errors : it was performing -1 instead of +1. - wrong use of bit mask with bin2bcd Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-rv3029c2.c | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) commit abe2f551efc65760d61668ad6fb511bf834082dc Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue May 3 11:54:35 2016 +0200 rtc: rv3029: Remove some checks and warnings Remove some checks from checkpatch such as spaces around arithmetic operations or prefer "unsigned int". Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-rv3029c2.c | 68 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 34 deletions(-) commit c2a1c145401df063d1197ace5d3b5bd323e26f86 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue May 3 11:54:34 2016 +0200 rtc: rv3029: Add support of RV3049 Add support of Microcrystal RV3049 RTC (SPI) using regmap on the RV3029 (I2C) driver. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/Kconfig | 37 ++++++++-------- drivers/rtc/rtc-rv3029c2.c | 108 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 124 insertions(+), 21 deletions(-) commit e6e380821236b628a1379db97d777da3e36b8240 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue May 3 11:54:33 2016 +0200 rtc: rv3029: convert to use regmap To add support of rv3049, the current driver is converted to use regmap. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-rv3029c2.c | 275 +++++++++++++++++++++++---------------------- 1 file changed, 142 insertions(+), 133 deletions(-) commit 4e7f1a6051d7d5a62021fde0c9ed7005a1a82307 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue May 3 11:54:32 2016 +0200 rtc: rv3029: remove 'i2c' in functions names To prepare the use of regmap to add the support of RV-3049, all the 'i2c' in functions's names are removed. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-rv3029c2.c | 132 ++++++++++++++++++++------------------------- 1 file changed, 57 insertions(+), 75 deletions(-) commit 5469dc270cd44c451590d40c031e6a71c1f637e8 Merge: 2f37dd1 ea9b501 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 22:31:33 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge more updates from Andrew Morton: - the rest of MM - KASAN updates - procfs updates - exit, fork updates - printk updates - lib/ updates - radix-tree testsuite updates - checkpatch updates - kprobes updates - a few other misc bits * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (162 commits) samples/kprobes: print out the symbol name for the hooks samples/kprobes: add a new module parameter kprobes: add the "tls" argument for j_do_fork init/main.c: simplify initcall_blacklisted() fs/efs/super.c: fix return value checkpatch: improve --git <commit-count> shortcut checkpatch: reduce number of `git log` calls with --git checkpatch: add support to check already applied git commits checkpatch: add --list-types to show message types to show or ignore checkpatch: advertise the --fix and --fix-inplace options more checkpatch: whine about ACCESS_ONCE checkpatch: add test for keywords not starting on tabstops checkpatch: improve CONSTANT_COMPARISON test for structure members checkpatch: add PREFER_IS_ENABLED test lib/GCD.c: use binary GCD algorithm instead of Euclidean radix-tree: free up the bottom bit of exceptional entries for reuse dax: move RADIX_DAX_ definitions to dax.c radix-tree: make radix_tree_descend() more useful radix-tree: introduce radix_tree_replace_clear_tags() radix-tree: tidy up __radix_tree_create() ... commit 2f37dd131c5d3a2eac21cd5baf80658b1b02a8ac Merge: 3aa2fc1 ffc83a7 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 22:20:48 2016 -0700 Merge tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging Pull staging and IIO driver updates from Greg KH: "Here's the big staging and iio driver update for 4.7-rc1. I think we almost broke even with this release, only adding a few more lines than we removed, which isn't bad overall given that there's a bunch of new iio drivers added. The Lustre developers seem to have woken up from their sleep and have been doing a great job in cleaning up the code and pruning unused or old cruft, the filesystem is almost readable :) Other than that, just a lot of basic coding style cleanups in the churn. All have been in linux-next for a while with no reported issues" * tag 'staging-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (938 commits) Staging: emxx_udc: emxx_udc: fixed coding style issue staging/gdm724x: fix "alignment should match open parenthesis" issues staging/gdm724x: Fix avoid CamelCase staging: unisys: rename misleading var ii with frag staging: unisys: visorhba: switch success handling to error handling staging: unisys: visorhba: main path needs to flow down the left margin staging: unisys: visorinput: handle_locking_key() simplifications staging: unisys: visorhba: fail gracefully for thread creation failures staging: unisys: visornic: comment restructuring and removing bad diction staging: unisys: fix format string %Lx to %llx for u64 staging: unisys: remove unused struct members staging: unisys: visorchannel: correct variable misspelling staging: unisys: visorhba: replace functionlike macro with function staging: dgnc: Need to check for NULL of ch staging: dgnc: remove redundant condition check staging: dgnc: fix 'line over 80 characters' staging: dgnc: clean up the dgnc_get_modem_info() staging: lustre: lnet: enable configuration per NI interface staging: lustre: o2iblnd: properly set ibr_why staging: lustre: o2iblnd: remove last of kiblnd_tunables_fini ... commit c5ed9268643c7c4c9f2aaa0fd4c936095e6480ef Author: Dan Williams <dan.j.williams@intel.com> Date: Wed May 18 14:50:12 2016 -0700 libnvdimm, dax: autodetect support For autodetecting a previously established dax configuration we need the info block to indicate block-device vs device-dax mode, and we need to have the default namespace probe hand-off the configuration to the dax_pmem driver. Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/nvdimm/dax_devs.c | 35 +++++++++++++++++++++++++++++++++++ drivers/nvdimm/nd.h | 11 +++++++++-- drivers/nvdimm/pfn.h | 1 + drivers/nvdimm/pfn_devs.c | 15 ++++++++++----- drivers/nvdimm/pmem.c | 3 ++- 5 files changed, 57 insertions(+), 8 deletions(-) commit b354aba0165519a74f540f2ba89d7ec78efca21d Author: Dan Williams <dan.j.williams@intel.com> Date: Tue May 17 20:24:16 2016 -0700 libnvdimm: release ida resources ida instances allocate some internal memory for ->free_bitmap in addition to the base 'struct ida'. Use ida_destroy() to release that memory at module_exit(). Reported-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/nvdimm/core.c | 3 +++ drivers/nvdimm/dimm_devs.c | 5 +++++ drivers/nvdimm/nd-core.h | 2 ++ drivers/nvdimm/region_devs.c | 5 +++++ 4 files changed, 15 insertions(+) commit acc93d30d7d43f428272c20a047389c4cbca82ba Author: Dan Williams <dan.j.williams@intel.com> Date: Sat May 7 11:40:28 2016 -0700 Revert "block: enable dax for raw block devices" This reverts commit 5a023cdba50c5f5f2bc351783b3131699deb3937. The functionality is superseded by the new "Device DAX" facility. Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Dave Chinner <david@fromorbit.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Jan Kara <jack@suse.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> block/ioctl.c | 32 ----------------- fs/block_dev.c | 96 +++++++++++++++---------------------------------- include/linux/fs.h | 8 ----- include/uapi/linux/fs.h | 1 - 4 files changed, 29 insertions(+), 108 deletions(-) commit dee410792419aaa8bc3e3b35d2ccb6515835916d Author: Dan Williams <dan.j.williams@intel.com> Date: Sat May 14 12:20:44 2016 -0700 /dev/dax, core: file operations and dax-mmap The "Device DAX" core enables dax mappings of performance / feature differentiated memory. An open mapping or file handle keeps the backing struct device live, but new mappings are only possible while the device is enabled. Faults are handled under rcu_read_lock to synchronize with the enabled state of the device. Similar to the filesystem-dax case the backing memory may optionally have struct page entries. However, unlike fs-dax there is no support for private mappings, or mappings that are not backed by media (see use of zero-page in fs-dax). Mappings are always guaranteed to match the alignment of the dax_region. If the dax_region is configured to have a 2MB alignment, all mappings are guaranteed to be backed by a pmd entry. Contrast this determinism with the fs-dax case where pmd mappings are opportunistic. If userspace attempts to force a misaligned mapping, the driver will fail the mmap attempt. See dax_dev_check_vma() for other scenarios that are rejected, like MAP_PRIVATE mappings. Cc: Hannes Reinecke <hare@suse.de> Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/dax/Kconfig | 1 + drivers/dax/dax.c | 322 ++++++++++++++++++++++++++++++++++++++++++++++++++++ mm/huge_memory.c | 1 + mm/hugetlb.c | 1 + 4 files changed, 325 insertions(+) commit ab68f26221366f92611650e8470e6a926801c7d4 Author: Dan Williams <dan.j.williams@intel.com> Date: Wed May 18 09:15:08 2016 -0700 /dev/dax, pmem: direct access to persistent memory Device DAX is the device-centric analogue of Filesystem DAX (CONFIG_FS_DAX). It allows memory ranges to be allocated and mapped without need of an intervening file system. Device DAX is strict, precise and predictable. Specifically this interface: 1/ Guarantees fault granularity with respect to a given page size (pte, pmd, or pud) set at configuration time. 2/ Enforces deterministic behavior by being strict about what fault scenarios are supported. For example, by forcing MADV_DONTFORK semantics and omitting MAP_PRIVATE support device-dax guarantees that a mapping always behaves/performs the same once established. It is the "what you see is what you get" access mechanism to differentiated memory vs filesystem DAX which has filesystem specific implementation semantics. Persistent memory is the first target, but the mechanism is also targeted for exclusive allocations of performance differentiated memory ranges. This commit is limited to the base device driver infrastructure to associate a dax device with pmem range. Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/dax/Kconfig | 25 ++++ drivers/dax/Makefile | 4 + drivers/dax/dax.c | 253 ++++++++++++++++++++++++++++++++++++ drivers/dax/dax.h | 24 ++++ drivers/dax/pmem.c | 158 ++++++++++++++++++++++ tools/testing/nvdimm/Kbuild | 9 ++ tools/testing/nvdimm/config_check.c | 2 + 9 files changed, 478 insertions(+) commit 3aa2fc1667acdd9cca816a2bc9529f494bd61b05 Merge: 5af2344 c6e360a Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 21:26:15 2016 -0700 Merge tag 'driver-core-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core Pull driver core updates from Greg KH: "Here's the "big" driver core update for 4.7-rc1. Mostly just debugfs changes, the long-known and messy races with removing debugfs files should be fixed thanks to the great work of Nicolai Stange. We also have some isa updates in here (the x86 maintainers told me to take it through this tree), a new warning when we run out of dynamic char major numbers, and a few other assorted changes, details in the shortlog. All have been in linux-next for some time with no reported issues" * tag 'driver-core-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (32 commits) Revert "base: dd: don't remove driver_data in -EPROBE_DEFER case" gpio: ws16c48: Utilize the ISA bus driver gpio: 104-idio-16: Utilize the ISA bus driver gpio: 104-idi-48: Utilize the ISA bus driver gpio: 104-dio-48e: Utilize the ISA bus driver watchdog: ebc-c384_wdt: Utilize the ISA bus driver iio: stx104: Utilize the module_isa_driver and max_num_isa_dev macros iio: stx104: Add X86 dependency to STX104 Kconfig option Documentation: Add ISA bus driver documentation isa: Implement the max_num_isa_dev macro isa: Implement the module_isa_driver macro pnp: pnpbios: Add explicit X86_32 dependency to PNPBIOS isa: Decouple X86_32 dependency from the ISA Kconfig option driver-core: use 'dev' argument in dev_dbg_ratelimited stub base: dd: don't remove driver_data in -EPROBE_DEFER case kernfs: Move faulting copy_user operations outside of the mutex devcoredump: add scatterlist support debugfs: unproxify files created through debugfs_create_u32_array() debugfs: unproxify files created through debugfs_create_blob() debugfs: unproxify files created through debugfs_create_bool() ... commit 5af2344013454640e0133bb62e8cf2e30190a472 Merge: 19e36ad 725d012 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 21:20:31 2016 -0700 Merge tag 'char-misc-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char / misc driver updates from Greg KH: "Here's the big char and misc driver update for 4.7-rc1. Lots of different tiny driver subsystems have updates here with new drivers and functionality. Details in the shortlog. All have been in linux-next with no reported issues for a while" * tag 'char-misc-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (125 commits) mcb: Delete num_cells variable which is not required mcb: Fixed bar number assignment for the gdd mcb: Replace ioremap and request_region with the devm version mcb: Implement bus->dev.release callback mcb: export bus information via sysfs mcb: Correctly initialize the bus's device mei: bus: call mei_cl_read_start under device lock coresight: etb10: adjust read pointer only when needed coresight: configuring ETF in FIFO mode when acting as link coresight: tmc: implementing TMC-ETF AUX space API coresight: moving struct cs_buffers to header file coresight: tmc: keep track of memory width coresight: tmc: make sysFS and Perf mode mutually exclusive coresight: tmc: dump system memory content only when needed coresight: tmc: adding mode of operation for link/sinks coresight: tmc: getting rid of multiple read access coresight: tmc: allocating memory when needed coresight: tmc: making prepare/unprepare functions generic coresight: tmc: splitting driver in ETB/ETF and ETR components coresight: tmc: cleaning up header file ... commit 19e36ad292ab24980db64a5ff17973d3118a8fb9 Merge: e10abc6 60d5794 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 21:12:25 2016 -0700 Merge tag 'usb-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB updates from Greg KH: "Here's the big pull request for USB and PHY drivers for 4.7-rc1 Full details in the shortlog, but it's the normal major gadget driver updates, phy updates, new usbip code, as well as a bit of lots of other stuff. All have been in linux-next with no reported issues" * tag 'usb-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (164 commits) USB: serial: ti_usb_3410_5052: add MOXA UPORT 11x0 support USB: serial: fix minor-number allocation USB: serial: quatech2: fix use-after-free in probe error path USB: serial: mxuport: fix use-after-free in probe error path USB: serial: keyspan: fix debug and error messages USB: serial: keyspan: fix URB unlink USB: serial: keyspan: fix use-after-free in probe error path USB: serial: io_edgeport: fix memory leaks in probe error path USB: serial: io_edgeport: fix memory leaks in attach error path usb: Remove unnecessary space before operator ','. usb: Remove unnecessary space before open square bracket. USB: FHCI: avoid redundant condition usb: host: xhci-rcar: Avoid long wait in xhci_reset() usb/host/fotg210: remove dead code in create_sysfs_files usb: wusbcore: Do not initialise statics to 0. usb: wusbcore: Remove space before ',' and '(' . USB: serial: cp210x: clean up CRTSCTS flag code USB: serial: cp210x: get rid of magic numbers in CRTSCTS flag code USB: serial: cp210x: fix hardware flow-control disable USB: serial: option: add even more ZTE device ids ... commit e10abc629f38efd9b6936cf3612583cc846104d9 Merge: 0eff458 d20bb59 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 20:57:27 2016 -0700 Merge tag 'tty-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty Pull tty and serial driver updates from Greg KH: "Here's the large TTY and Serial driver update for 4.7-rc1. A few new serial drivers are added here, and Peter has fixed a bunch of long-standing bugs in the tty layer and serial drivers as normal. Full details in the shortlog. All of these have been in linux-next for a while with no reported issues" * tag 'tty-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (88 commits) MAINTAINERS: 8250: remove website reference serial: core: Fix port mutex assert if lockdep disabled serial: 8250_dw: fix wrong logic in dw8250_check_lcr() tty: vt, finish looping on duplicate tty: vt, return error when con_startup fails QE-UART: add "fsl,t1040-ucc-uart" to of_device_id serial: mctrl_gpio: Drop support for out1-gpios and out2-gpios serial: 8250dw: Add device HID for future AMD UART controller Fix OpenSSH pty regression on close serial: mctrl_gpio: add IRQ locking serial: 8250: Integrate Fintek into 8250_base serial: mps2-uart: add support for early console serial: mps2-uart: add MPS2 UART driver dt-bindings: document the MPS2 UART bindings serial: sirf: Use generic uart-has-rtscts DT property serial: sirf: Introduce helper variable struct device_node *np serial: mxs-auart: Use generic uart-has-rtscts DT property serial: imx: Use generic uart-has-rtscts DT property doc: DT: Add Generic Serial Device Tree Bindings serial: 8250: of: Make tegra_serial_handle_break() static ... commit 0eff4589c36edd03d50b835d0768b2c2ef3f20bd Merge: 087afe8 ef56b79 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 20:18:12 2016 -0700 Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "It's the usual big pile of driver updates and additions, but we do have a couple core changes in here as well. Core: - CLK_IS_CRITICAL support has been added. This should allow drivers to properly express that a certain clk should stay on even if their prepare/enable count drops to 0 (and in turn the parents of these clks should stay enabled). - A clk registration API has been added, clk_hw_register(), and an OF clk provider API has been added, of_clk_add_hw_provider(). These APIs have been put in place to further split clk providers from clk consumers, with the goal being to have clk providers never deal with struct clk pointers at all. Conversion of provider drivers is on going. clkdev has also gained support for registering clk_hw pointers directly so we can convert drivers that don't use devicetree. New Drivers: - Marvell ap806 and cp110 system controllers (with clks inside!) - Hisilicon Hi3519 clock and reset controller - Axis ARTPEC-6 clock controllers - Oxford Semiconductor OXNAS clock controllers - AXS10X I2S PLL - Rockchip RK3399 clock and reset controller Updates: - MMC2 and UART2 clks on Samsung Exynos 3250, ACLK on Samsung Exynos 542x SoCs, and some more clk ID exporting for bus frequency scaling - Proper BCM2835 PCM clk support and various other clks - i.MX clk updates for i.MX6SX, i.MX7, and VF610 - Renesas updates for R-Car H3 - Tegra210 got updates for DisplayPort and HDMI 2.0 - Rockchip driver refactorings and fixes due to adding RK3399 support" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (139 commits) clk: fix critical clock locking clk: qcom: mmcc-8996: Remove clocks that should be controlled by RPM clk: ingenic: Allow divider value to be divided clk: sunxi: Add display and TCON0 clocks driver clk: rockchip: drop old_rate calculation on pll rate changes clk: rockchip: simplify GRF handling in pll clocks clk: rockchip: lookup General Register Files in rockchip_clk_init clk: rockchip: fix the rk3399 sdmmc sample / drv name clk: mvebu: new driver for Armada CP110 system controller dt-bindings: arm: add DT binding for Marvell CP110 system controller clk: mvebu: new driver for Armada AP806 system controller clk: hisilicon: add CRG driver for hi3519 soc clk: hisilicon: export some hisilicon APIs to modules reset: hisilicon: add reset controller driver for hisilicon SOCs clk: bcm/kona: Do not use sizeof on pointer type clk: qcom: msm8916: Fix crypto clock flags clk: nxp: lpc18xx: Initialize clk_init_data::flags to 0 clk/axs10x: Add I2S PLL clock driver clk: imx7d: fix ahb clock mux 1 clk: fix comment of devm_clk_hw_register() ... commit 087afe8aaf562dc7a53f2577049830d6a3245742 Merge: 54cf809 95829b3 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 20:01:26 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Pull networking fixes and more updates from David Miller: 1) Tunneling fixes from Tom Herbert and Alexander Duyck. 2) AF_UNIX updates some struct sock bit fields with the socket lock, whereas setsockopt() sets overlapping ones with locking. Seperate out the synchronized vs. the AF_UNIX unsynchronized ones to avoid corruption. From Andrey Ryabinin. 3) Mount BPF filesystem with mount_nodev rather than mount_ns, from Eric Biederman. 4) A couple kmemdup conversions, from Muhammad Falak R Wani. 5) BPF verifier fixes from Alexei Starovoitov. 6) Don't let tunneled UDP packets get stuck in socket queues, if something goes wrong during the encapsulation just drop the packet rather than signalling an error up the call stack. From Hannes Frederic Sowa. 7) SKB ref after free in batman-adv, from Florian Westphal. 8) TCP iSCSI, ocfs2, rds, and tipc have to disable BH in it's TCP callbacks since the TCP stack runs pre-emptibly now. From Eric Dumazet. 9) Fix crash in fixed_phy_add, from Rabin Vincent. 10) Fix length checks in xen-netback, from Paul Durrant. 11) Fix mixup in KEY vs KEYID macsec attributes, from Sabrina Dubroca. 12) RDS connection spamming bug fixes from Sowmini Varadhan * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (152 commits) net: suppress warnings on dev_alloc_skb uapi glibc compat: fix compilation when !__USE_MISC in glibc udp: prevent skbs lingering in tunnel socket queues bpf: teach verifier to recognize imm += ptr pattern bpf: support decreasing order in direct packet access net: usb: ch9200: use kmemdup ps3_gelic: use kmemdup net:liquidio: use kmemdup bpf: Use mount_nodev not mount_ns to mount the bpf filesystem net: cdc_ncm: update datagram size after changing mtu tuntap: correctly wake up process during uninit intel: Add support for IPv6 IP-in-IP offload ip6_gre: Do not allow segmentation offloads GRE_CSUM is enabled with FOU/GUE RDS: TCP: Avoid rds connection churn from rogue SYNs RDS: TCP: rds_tcp_accept_worker() must exit gracefully when terminating rds-tcp net: sock: move ->sk_shutdown out of bitfields. ipv6: Don't reset inner headers in ip6_tnl_xmit ip4ip6: Support for GSO/GRO ip6ip6: Support for GSO/GRO ipv6: Set features for IPv6 tunnels ... commit 54cf809b9512be95f53ed4a5e3b631d1ac42f0fa Author: Peter Zijlstra <peterz@infradead.org> Date: Fri May 20 18:04:36 2016 +0200 locking,qspinlock: Fix spin_is_locked() and spin_unlock_wait() Similar to commits: 51d7d5205d33 ("powerpc: Add smp_mb() to arch_spin_is_locked()") d86b8da04dfa ("arm64: spinlock: serialise spin_unlock_wait against concurrent lockers") qspinlock suffers from the fact that the _Q_LOCKED_VAL store is unordered inside the ACQUIRE of the lock. And while this is not a problem for the regular mutual exclusive critical section usage of spinlocks, it breaks creative locking like: spin_lock(A) spin_lock(B) spin_unlock_wait(B) if (!spin_is_locked(A)) do_something() do_something() In that both CPUs can end up running do_something at the same time, because our _Q_LOCKED_VAL store can drop past the spin_unlock_wait() spin_is_locked() loads (even on x86!!). To avoid making the normal case slower, add smp_mb()s to the less used spin_unlock_wait() / spin_is_locked() side of things to avoid this problem. Reported-and-tested-by: Davidlohr Bueso <dave@stgolabs.net> Reported-by: Giovanni Gherdovich <ggherdovich@suse.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: stable@vger.kernel.org # v4.2 and later Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/asm-generic/qspinlock.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) commit b99a9e8776ca837344c6b64d518483fc5d5eefb4 Merge: be1332c 48a77aa Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 19:16:12 2016 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs fixes from Steve French: "Two small cifs fixes, including one spnego upcall cifs security fix for stable" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: CIFS: Remove some obsolete comments cifs: Create dedicated keyring for spnego operations commit 24e49ee3d76b70853a96520e46b8837e5eae65b2 Author: Nitin Gupta <nitin.m.gupta@oracle.com> Date: Wed Mar 30 11:17:13 2016 -0700 sparc64: Reduce TLB flushes during hugepte changes During hugepage map/unmap, TSB and TLB flushes are currently issued at every PAGE_SIZE'd boundary which is unnecessary. We now issue the flush at REAL_HPAGE_SIZE boundaries only. Without this patch workloads which unmap a large hugepage backed VMA region get CPU lockups due to excessive TLB flush calls. Orabug: 22365539, 22643230, 22995196 Signed-off-by: Nitin Gupta <nitin.m.gupta@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> arch/sparc/include/asm/pgtable_64.h | 43 +++++++++++++++++++++++++++--------- arch/sparc/include/asm/tlbflush_64.h | 3 ++- arch/sparc/mm/hugetlbpage.c | 33 ++++++++++++++++++++++----- arch/sparc/mm/init_64.c | 12 ---------- arch/sparc/mm/tlb.c | 25 +++++++++++++++------ arch/sparc/mm/tsb.c | 32 ++++++++++++++------------- 6 files changed, 97 insertions(+), 51 deletions(-) commit b1ac6b7b4061f6c92bacf6938f94fb61b2fbf7f3 Author: Sam Ravnborg <sam@ravnborg.org> Date: Sun Apr 24 18:39:52 2016 +0200 aeroflex/greth: fix warning about unused variable Fix following warning: aeroflex/greth.c:1326:11: warning: unused variable 'phy' [-Wunused-variable] The variable was unused - remove it. It looks like this warning has been there forever - was found by an allyesconfig build of sparc32. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Kristoffer Glembo <kristoffer@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/aeroflex/greth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 21916a4a2973ab1684e921689ef8a48a6626ac4c Author: Sam Ravnborg <sam@ravnborg.org> Date: Sun Apr 24 15:24:33 2016 +0200 openprom: fix warning Fix following warnings: openprom.c:510:2: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized] openprom.c:503:3: warning: 'str' may be used uninitialized in this function [-Wmaybe-uninitialized] openprom.c:459:8: warning: 'str' may be used uninitialized in this function [-Wmaybe-uninitialized] openprom.c:422:7: warning: 'str' may be used uninitialized in this function [-Wmaybe-uninitialized] Fixed by introducing PTR_ERR etc. This simplified the code as a nice side effect. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/sbus/char/openprom.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) commit ea9b50133ffebbd580cb5cd0aa222784d7a2fcb1 Author: Huang Shijie <shijie.huang@arm.com> Date: Fri May 20 17:04:36 2016 -0700 samples/kprobes: print out the symbol name for the hooks Print out the symbol name for the hooks, it makes the logs more readable. Link: http://lkml.kernel.org/r/1463535417-29637-2-git-send-email-shijie.huang@arm.com Signed-off-by: Huang Shijie <shijie.huang@arm.com> Cc: Petr Mladek <pmladek@suse.com> Cc: Steve Capper <steve.capper@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> samples/kprobes/kprobe_example.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit d04659ac94528e9224dbf1aed37dd11dd952cacc Author: Huang Shijie <shijie.huang@arm.com> Date: Fri May 20 17:04:33 2016 -0700 samples/kprobes: add a new module parameter Add a new module parameter which can be used as the symbol name. Without this patch, we can only test the "_do_fork" function with this kernel module. With this patch, the module becomes more flexible; we can test any functions with this module with # insmod kprobe_example.ko symbol="xxx" Link: http://lkml.kernel.org/r/1463535417-29637-1-git-send-email-shijie.huang@arm.com Signed-off-by: Huang Shijie <shijie.huang@arm.com> Cc: Petr Mladek <pmladek@suse.com> Cc: Steve Capper <steve.capper@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> samples/kprobes/kprobe_example.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 603ac5df86df5bfd26ed4d9c310dd196b07590ae Author: Huang Shijie <shijie.huang@arm.com> Date: Fri May 20 17:04:30 2016 -0700 kprobes: add the "tls" argument for j_do_fork Commit 3033f14ab78c ("clone: support passing tls argument via C rather than pt_regs magic") added the tls argument for _do_fork(). This patch adds the "tls" argument for j_do_fork to make it match _do_fork(). Signed-off-by: Huang Shijie <shijie.huang@arm.com> Acked-by: Steve Capper <steve.capper@arm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Thiago Macieira <thiago.macieira@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> samples/kprobes/jprobe_example.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c8cdd2be213f0f5372287a764225665f1ac64e56 Author: Rasmus Villemoes <linux@rasmusvillemoes.dk> Date: Fri May 20 17:04:27 2016 -0700 init/main.c: simplify initcall_blacklisted() Using kasprintf to get the function name makes us look up the name twice, along with all the vsnprintf overhead of parsing the format string etc. It also means there is an allocation failure case to deal with. Since symbol_string in vsprintf.c would anyway allocate an array of size KSYM_SYMBOL_LEN on the stack, that might as well be done up here. Moreover, since this is a debug feature and the blacklisted_initcalls list is usually empty, we might as well test that and thus avoid looking up the symbol name even once in the common case. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Prarit Bhargava <prarit@redhat.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> init/main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 4108124f5c46efc951c4c6be947598a21d6b7fde Author: Heloise <os@iscas.ac.cn> Date: Fri May 20 17:04:25 2016 -0700 fs/efs/super.c: fix return value When sb_bread() fails, the return value should be -EIO, fix it. Link: http://lkml.kernel.org/r/1463464943-4142-1-git-send-email-os@iscas.ac.cn Signed-off-by: Heloise <os@iscas.ac.cn> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Firo Yang <firogm@gmail.com> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/efs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 28898fd1a85fa37a59c090271e8be37afe710276 Author: Joe Perches <joe@perches.com> Date: Fri May 20 17:04:22 2016 -0700 checkpatch: improve --git <commit-count> shortcut The --git <commit-count> shortcut can be confused by a tag with a dash like v4.4-rc1. Improve the test to verify the <commit-count> expression ends with a dash followed by a numeric value. Improve the git log result to verify the "<sha1> <subject>" output as well. Link: http://lkml.kernel.org/r/c4a3f759291d967641860c3a54bb81177f34325f.1462711962.git.joe@perches.com Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 0dea9f1eef86bedacad91b6f652ca1ab0d08854c Author: Joe Perches <joe@perches.com> Date: Fri May 20 17:04:19 2016 -0700 checkpatch: reduce number of `git log` calls with --git checkpatch currently calls git log multiple times to first get the <revision range> sha1 values and again to get the subject for each individual sha1 commit. Always get the sha1 and subject at the same time instead. Store the subject in a sha1 hash to avoid the second git log exec. Link: http://lkml.kernel.org/r/274efab2332ad2308ab5de85a95d255f6e2de5f3.1462711962.git.joe@perches.com Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) commit 4a593c3448312906358b00898c29a95278d82cc9 Author: Du, Changbin <changbin.du@intel.com> Date: Fri May 20 17:04:16 2016 -0700 checkpatch: add support to check already applied git commits It's sometimes useful to scan already committed patches. Add --git <revision range> to scan specific or multiple commits. Single commits are scanned with --git <rev> Multiple commits are scanned with --git <range> --git <commit>-<count> [joe@perches.com: o Don't exec git for each <commit>-<count>, use a single "git log -<count> <commit>" o Consolidate the git exec for the <range> and <commit>-<count> variants o Output 12 character commit hash ids o Don't scan git commit merges o Use -M to reduce the size of rename commits] Signed-off-by: "Du, Changbin" <changbin.du@intel.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) commit 3beb42eced39c00011ba4d608d52718af765e5d4 Author: Joe Perches <joe@perches.com> Date: Fri May 20 17:04:14 2016 -0700 checkpatch: add --list-types to show message types to show or ignore The message types are not currently knowable without reading the code. Add a mechanism to see what they are. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) commit ef212196369cbc2e694eab39261f9785ec252028 Author: Joe Perches <joe@perches.com> Date: Fri May 20 17:04:11 2016 -0700 checkpatch: advertise the --fix and --fix-inplace options more The --fix option is relatively unknown and underutilized. Add some text to show that it's available when style defects are found. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 8 ++++++++ 1 file changed, 8 insertions(+) commit 481aea5c59a57123b66d5850be1be79f9f230c0e Author: Joe Perches <joe@perches.com> Date: Fri May 20 17:04:08 2016 -0700 checkpatch: whine about ACCESS_ONCE Add a test for use of ACCESS_ONCE that could be written using READ_ONCE or WRITE_ONCE. --fix it too if desired. The WRITE_ONCE fixes are less correct than the coccinelle script below as checkpatch cannot have a completely correct "expression" mechanism because checkpatch works on patches and not complete files. $ cat access_once.cocci @@ expression e1; expression e2; @@ - ACCESS_ONCE(e1) = e2 + WRITE_ONCE(e1, e2) @@ expression e1; @@ - ACCESS_ONCE(e1) + READ_ONCE(e1) Signed-off-by: Joe Perches <joe@perches.com> Cc: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit a91e8994f242a500bf05b9ee96fcd7ab0228f05f Author: Joe Perches <joe@perches.com> Date: Fri May 20 17:04:05 2016 -0700 checkpatch: add test for keywords not starting on tabstops It's somewhat common and in general a defect for c90 keywords to not start on a tabstop. Add a test for this condition and warn when it occurs. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit f39e1769bbfc4936ff8364fb2529dc8bf6bc6888 Author: Joe Perches <joe@perches.com> Date: Fri May 20 17:04:02 2016 -0700 checkpatch: improve CONSTANT_COMPARISON test for structure members A "." dereference to an all uppercase structure member can be incorrectly reported as a CONSTANT_COMPARISON. ie: "if (table[i].PANELID == tempdx)" Fix it by checking for "." before the constant test. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2d6327459ec5e63a89b12945f483f6d7378a8839 Author: Joe Perches <joe@perches.com> Date: Fri May 20 17:04:00 2016 -0700 checkpatch: add PREFER_IS_ENABLED test Using #if defined CONFIG_<FOO> || defined CONFIG_<FOO>_MODULE is more verbose than necessary and IS_ENABLED(CONFIG_<FOO>) is preferred. So add a test and a message for it. --fix it to if desired. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/checkpatch.pl | 10 ++++++++++ 1 file changed, 10 insertions(+) commit fff7fb0b2d908dec779783d8eaf3d7725230f75e Author: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com> Date: Fri May 20 17:03:57 2016 -0700 lib/GCD.c: use binary GCD algorithm instead of Euclidean The binary GCD algorithm is based on the following facts: 1. If a and b are all evens, then gcd(a,b) = 2 * gcd(a/2, b/2) 2. If a is even and b is odd, then gcd(a,b) = gcd(a/2, b) 3. If a and b are all odds, then gcd(a,b) = gcd((a-b)/2, b) = gcd((a+b)/2, b) Even on x86 machines with reasonable division hardware, the binary algorithm runs about 25% faster (80% the execution time) than the division-based Euclidian algorithm. On platforms like Alpha and ARMv6 where division is a function call to emulation code, it's even more significant. There are two variants of the code here, depending on whether a fast __ffs (find least significant set bit) instruction is available. This allows the unpredictable branches in the bit-at-a-time shifting loop to be eliminated. If fast __ffs is not available, the "even/odd" GCD variant is used. I use the following code to benchmark: #include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <time.h> #include <unistd.h> #define swap(a, b) \ do { \ a ^= b; \ b ^= a; \ a ^= b; \ } while (0) unsigned long gcd0(unsigned long a, unsigned long b) { unsigned long r; if (a < b) { swap(a, b); } if (b == 0) return a; while ((r = a % b) != 0) { a = b; b = r; } return b; } unsigned long gcd1(unsigned long a, unsigned long b) { unsigned long r = a | b; if (!a || !b) return r; b >>= __builtin_ctzl(b); for (;;) { a >>= __builtin_ctzl(a); if (a == b) return a << __builtin_ctzl(r); if (a < b) swap(a, b); a -= b; } } unsigned long gcd2(unsigned long a, unsigned long b) { unsigned long r = a | b; if (!a || !b) return r; r &= -r; while (!(b & r)) b >>= 1; for (;;) { while (!(a & r)) a >>= 1; if (a == b) return a; if (a < b) swap(a, b); a -= b; a >>= 1; if (a & r) a += b; a >>= 1; } } unsigned long gcd3(unsigned long a, unsigned long b) { unsigned long r = a | b; if (!a || !b) return r; b >>= __builtin_ctzl(b); if (b == 1) return r & -r; for (;;) { a >>= __builtin_ctzl(a); if (a == 1) return r & -r; if (a == b) return a << __builtin_ctzl(r); if (a < b) swap(a, b); a -= b; } } unsigned long gcd4(unsigned long a, unsigned long b) { unsigned long r = a | b; if (!a || !b) return r; r &= -r; while (!(b & r)) b >>= 1; if (b == r) return r; for (;;) { while (!(a & r)) a >>= 1; if (a == r) return r; if (a == b) return a; if (a < b) swap(a, b); a -= b; a >>= 1; if (a & r) a += b; a >>= 1; } } static unsigned long (*gcd_func[])(unsigned long a, unsigned long b) = { gcd0, gcd1, gcd2, gcd3, gcd4, }; #define TEST_ENTRIES (sizeof(gcd_func) / sizeof(gcd_func[0])) #if defined(__x86_64__) #define rdtscll(val) do { \ unsigned long __a,__d; \ __asm__ __volatile__("rdtsc" : "=a" (__a), "=d" (__d)); \ (val) = ((unsigned long long)__a) | (((unsigned long long)__d)<<32); \ } while(0) static unsigned long long benchmark_gcd_func(unsigned long (*gcd)(unsigned long, unsigned long), unsigned long a, unsigned long b, unsigned long *res) { unsigned long long start, end; unsigned long long ret; unsigned long gcd_res; rdtscll(start); gcd_res = gcd(a, b); rdtscll(end); if (end >= start) ret = end - start; else ret = ~0ULL - start + 1 + end; *res = gcd_res; return ret; } #else static inline struct timespec read_time(void) { struct timespec time; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &time); return time; } static inline unsigned long long diff_time(struct timespec start, struct timespec end) { struct timespec temp; if ((end.tv_nsec - start.tv_nsec) < 0) { temp.tv_sec = end.tv_sec - start.tv_sec - 1; temp.tv_nsec = 1000000000ULL + end.tv_nsec - start.tv_nsec; } else { temp.tv_sec = end.tv_sec - start.tv_sec; temp.tv_nsec = end.tv_nsec - start.tv_nsec; } return temp.tv_sec * 1000000000ULL + temp.tv_nsec; } static unsigned long long benchmark_gcd_func(unsigned long (*gcd)(unsigned long, unsigned long), unsigned long a, unsigned long b, unsigned long *res) { struct timespec start, end; unsigned long gcd_res; start = read_time(); gcd_res = gcd(a, b); end = read_time(); *res = gcd_res; return diff_time(start, end); } #endif static inline unsigned long get_rand() { if (sizeof(long) == 8) return (unsigned long)rand() << 32 | rand(); else return rand(); } int main(int argc, char **argv) { unsigned int seed = time(0); int loops = 100; int repeats = 1000; unsigned long (*res)[TEST_ENTRIES]; unsigned long long elapsed[TEST_ENTRIES]; int i, j, k; for (;;) { int opt = getopt(argc, argv, "n:r:s:"); /* End condition always first */ if (opt == -1) break; switch (opt) { case 'n': loops = atoi(optarg); break; case 'r': repeats = atoi(optarg); break; case 's': seed = strtoul(optarg, NULL, 10); break; default: /* You won't actually get here. */ break; } } res = malloc(sizeof(unsigned long) * TEST_ENTRIES * loops); memset(elapsed, 0, sizeof(elapsed)); srand(seed); for (j = 0; j < loops; j++) { unsigned long a = get_rand(); /* Do we have args? */ unsigned long b = argc > optind ? strtoul(argv[optind], NULL, 10) : get_rand(); unsigned long long min_elapsed[TEST_ENTRIES]; for (k = 0; k < repeats; k++) { for (i = 0; i < TEST_ENTRIES; i++) { unsigned long long tmp = benchmark_gcd_func(gcd_func[i], a, b, &res[j][i]); if (k == 0 || min_elapsed[i] > tmp) min_elapsed[i] = tmp; } } for (i = 0; i < TEST_ENTRIES; i++) elapsed[i] += min_elapsed[i]; } for (i = 0; i < TEST_ENTRIES; i++) printf("gcd%d: elapsed %llu\n", i, elapsed[i]); k = 0; srand(seed); for (j = 0; j < loops; j++) { unsigned long a = get_rand(); unsigned long b = argc > optind ? strtoul(argv[optind], NULL, 10) : get_rand(); for (i = 1; i < TEST_ENTRIES; i++) { if (res[j][i] != res[j][0]) break; } if (i < TEST_ENTRIES) { if (k == 0) { k = 1; fprintf(stderr, "Error:\n"); } fprintf(stderr, "gcd(%lu, %lu): ", a, b); for (i = 0; i < TEST_ENTRIES; i++) fprintf(stderr, "%ld%s", res[j][i], i < TEST_ENTRIES - 1 ? ", " : "\n"); } } if (k == 0) fprintf(stderr, "PASS\n"); free(res); return 0; } Compiled with "-O2", on "VirtualBox 4.4.0-22-generic #38-Ubuntu x86_64" got: zhaoxiuzeng@zhaoxiuzeng-VirtualBox:~/develop$ ./gcd -r 500000 -n 10 gcd0: elapsed 10174 gcd1: elapsed 2120 gcd2: elapsed 2902 gcd3: elapsed 2039 gcd4: elapsed 2812 PASS zhaoxiuzeng@zhaoxiuzeng-VirtualBox:~/develop$ ./gcd -r 500000 -n 10 gcd0: elapsed 9309 gcd1: elapsed 2280 gcd2: elapsed 2822 gcd3: elapsed 2217 gcd4: elapsed 2710 PASS zhaoxiuzeng@zhaoxiuzeng-VirtualBox:~/develop$ ./gcd -r 500000 -n 10 gcd0: elapsed 9589 gcd1: elapsed 2098 gcd2: elapsed 2815 gcd3: elapsed 2030 gcd4: elapsed 2718 PASS zhaoxiuzeng@zhaoxiuzeng-VirtualBox:~/develop$ ./gcd -r 500000 -n 10 gcd0: elapsed 9914 gcd1: elapsed 2309 gcd2: elapsed 2779 gcd3: elapsed 2228 gcd4: elapsed 2709 PASS [akpm@linux-foundation.org: avoid #defining a CONFIG_ variable] Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com> Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/Kconfig | 3 ++ arch/alpha/Kconfig | 1 + arch/arc/Kconfig | 1 + arch/arm/mm/Kconfig | 3 ++ arch/h8300/Kconfig | 1 + arch/m32r/Kconfig | 1 + arch/m68k/Kconfig.cpu | 11 ++++++ arch/metag/Kconfig | 1 + arch/microblaze/Kconfig | 1 + arch/mips/include/asm/cpu-features.h | 10 +++++ arch/nios2/Kconfig | 1 + arch/openrisc/Kconfig | 1 + arch/parisc/Kconfig | 1 + arch/s390/Kconfig | 1 + arch/score/Kconfig | 1 + arch/sh/Kconfig | 1 + arch/sparc/Kconfig | 1 + lib/gcd.c | 77 +++++++++++++++++++++++++++++++----- 18 files changed, 107 insertions(+), 10 deletions(-) commit 3bcadd6fa6c4fd07ace3626357c824eb532488a6 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:54 2016 -0700 radix-tree: free up the bottom bit of exceptional entries for reuse We are guaranteed that pointers to radix_tree_nodes always have the bottom two bits clear (because they come from a slab cache, and slab caches have a minimum alignment of sizeof(void *)), so we can redefine 'radix_tree_is_internal_node' to only return true if the bottom two bits have value '01'. This frees up one quarter of the potential values for use by the user. Idea from Neil Brown. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Suggested-by: Neil Brown <neilb@suse.de> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) commit 78a9be0a0a3367b94af242632c525d22b26f1a87 Author: NeilBrown <neilb@suse.com> Date: Fri May 20 17:03:51 2016 -0700 dax: move RADIX_DAX_ definitions to dax.c These don't belong in radix-tree.h any more than PAGECACHE_TAG_* do. Let's try to maintain the idea that radix-tree simply implements an abstract data type. Signed-off-by: NeilBrown <neilb@suse.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/dax.c | 9 +++++++++ include/linux/radix-tree.h | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) commit 9e85d811196583126785a0405d0c879ae7a9eb2f Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:48 2016 -0700 radix-tree: make radix_tree_descend() more useful Now that the shift amount is stored in the node, radix_tree_descend() can calculate offset itself from index, which removes several lines of code from each of the tree walkers. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 78 +++++++++++++++++++------------------------------------- 1 file changed, 26 insertions(+), 52 deletions(-) commit d604c324524bf61c68182bb27db64656a78fe911 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:45 2016 -0700 radix-tree: introduce radix_tree_replace_clear_tags() In addition to replacing the entry, we also clear all associated tags. This is really a one-off special for page_cache_tree_delete() which had far too much detailed knowledge about how the radix tree works. For efficiency, factor node_tag_clear() out of radix_tree_tag_clear() It can be used by radix_tree_delete_item() as well as radix_tree_replace_clear_tags(). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 9 ++++-- lib/radix-tree.c | 76 ++++++++++++++++++++++++++++------------------ mm/filemap.c | 23 ++------------ 3 files changed, 56 insertions(+), 52 deletions(-) commit 89148aa40201def3fa552f9d07dd99740d880ab2 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:42 2016 -0700 radix-tree: tidy up __radix_tree_create() 1. Rename the existing variable 'slot' to 'child'. 2. Introduce a new variable called 'slot' which is the address of the slot we're dealing with. This lets us simplify the tree insertion, and removes the recalculation of 'slot' at the end of the function. 3. Using 'slot' in the sibling pointer insertion part makes the code more readable. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 48 +++++++++++++++++++++++------------------------- 1 file changed, 23 insertions(+), 25 deletions(-) commit a8e4da25d3c573a0c3cf2fb33e91ec5cad8d7f16 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:39 2016 -0700 radix-tree: tidy up range_tag_if_tagged Convert radix_tree_range_tag_if_tagged to name the nodes parent, node and child instead of node & slot. Use parent->offset instead of playing games with 'upindex'. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit 8c1244de00ef98f73e21eecc42d84b2742fbb4f9 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:36 2016 -0700 radix-tree: tidy up next_chunk Convert radix_tree_next_chunk to use 'child' instead of 'slot' as the name of the child node. Also use node_maxindex() where it makes sense. The 'rnode' variable was unnecessary; it doesn't overlap in usage with 'node', so we can just use 'node' the whole way through the function. Improve the testcase to start the walk from every index in the carefully constructed tree, and to accept any index within the range covered by the entry. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 53 +++++++------------ tools/testing/radix-tree/multiorder.c | 99 +++++++++++++++++++---------------- 2 files changed, 74 insertions(+), 78 deletions(-) commit af49a63e101eb62376cc1d6bd25b97eb8c691d54 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:33 2016 -0700 radix-tree: change naming conventions in radix_tree_shrink Use the more standard 'node' and 'child' instead of 'to_free' and 'slot'. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit b194d16c27af905d6e3552f4851bc7d9fee4e90f Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:30 2016 -0700 radix-tree: rename radix_tree_is_indirect_ptr() As with indirect_to_ptr(), ptr_to_indirect() and RADIX_TREE_INDIRECT_PTR, change radix_tree_is_indirect_ptr() to radix_tree_is_internal_node(). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 10 ++++----- lib/radix-tree.c | 48 ++++++++++++++++++++--------------------- tools/testing/radix-tree/test.c | 4 ++-- 3 files changed, 31 insertions(+), 31 deletions(-) commit 4dd6c0987ca43d6544f4f0a3f86f6ea3bfc60fc1 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:27 2016 -0700 radix-tree: rename indirect_to_ptr() to entry_to_node() Mirrors the earlier commit introducing node_to_entry(). Also change the type returned to be a struct radix_tree_node pointer. That lets us simplify a couple of places in the radix tree shrink & extend paths where we could convert an entry into a pointer, modify the node, then convert the pointer back into an entry. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 12 +++++------ lib/radix-tree.c | 48 ++++++++++++++++++----------------------- tools/testing/radix-tree/test.c | 4 ++-- tools/testing/radix-tree/test.h | 1 - 4 files changed, 28 insertions(+), 37 deletions(-) commit a4db4dcea1b3990e8c5dc8a03d11f36a3c0c6d8b Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:24 2016 -0700 radix-tree: rename ptr_to_indirect() to node_to_entry() ptr_to_indirect() was a bad name. What it really means is "Convert this pointer to a node into an entry suitable for storing in the radix tree". So node_to_entry() seemed like a better name. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit 30ff46ccb303fb6f6c28b9aa9f2cdc4ba900ed3f Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:22 2016 -0700 radix-tree: rename INDIRECT_PTR to INTERNAL_NODE The name RADIX_TREE_INDIRECT_PTR doesn't really match the meaning. RADIX_TREE_INTERNAL_NODE is a better name. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 30 +++++++++++++----------------- lib/radix-tree.c | 2 +- 2 files changed, 14 insertions(+), 18 deletions(-) commit d0891265bbc988dc91ed8580b38eb3dac128581b Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:19 2016 -0700 radix-tree: remove root->height The only remaining references to root->height were in extend and shrink, where it was updated. Now we can remove it entirely. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 3 -- lib/radix-tree.c | 106 +++++++++++++-------------------------------- 2 files changed, 31 insertions(+), 78 deletions(-) commit 0694f0c9e20c47063e4237e5f6649ae5ce5a369a Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:16 2016 -0700 radix tree test suite: remove dependencies on height verify_node() can use node->shift instead of the height. tree_verify_min_height() can be converted over to using node_maxindex() and shift_maxindex() instead of radix_tree_maxindex(). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> tools/testing/radix-tree/test.c | 34 +++++++++++++++++++++++----------- tools/testing/radix-tree/test.h | 3 ++- 2 files changed, 25 insertions(+), 12 deletions(-) commit fb209019c92a9141fd73f3c4928edc1b299b3490 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:13 2016 -0700 radix-tree: remove a use of root->height from delete_node If radix_tree_shrink returns whether it managed to shrink, then __radix_tree_delete_node doesn't ned to query the tree to find out whether it did any work or not. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) commit c12e51b07b3ac4c188fd91a82f96840fdb9cca6f Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:10 2016 -0700 radix-tree: replace node->height with node->shift node->shift represents the shift necessary for looking in the slots array at this level. It is equal to the old (node->height - 1) * RADIX_TREE_MAP_SHIFT. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 2 +- lib/radix-tree.c | 30 ++++++++++++++++-------------- 2 files changed, 17 insertions(+), 15 deletions(-) commit 0c7fa0a8418cbe0e8963fe36db9575d03b8589f7 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:07 2016 -0700 radix-tree: split node->path into offset and height Neither piece of information we're storing in node->path can be larger than 64, so store each in its own unsigned char instead of shifting and masking to store them both in an unsigned int. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 7 ++----- lib/radix-tree.c | 38 +++++++++++++++++--------------------- 2 files changed, 19 insertions(+), 26 deletions(-) commit 2fcd9005cc03ab09ea2a940515ed728d43df66c4 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:04 2016 -0700 radix-tree: miscellaneous fixes Typos, whitespace, grammar, line length, using the correct types, etc. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 70 +++++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 34 deletions(-) commit b76ba4af4ddd6a06f7f65769e7be1bc56556cdf5 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:03:01 2016 -0700 drivers/hwspinlock: use correct radix tree API radix_tree_is_indirect_ptr() is an internal API. The correct call to use is radix_tree_deref_retry() which has the appropriate unlikely() annotation. Fixes: c6400ba7e13a ("drivers/hwspinlock: fix race between radix tree insertion and lookup") Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/hwspinlock/hwspinlock_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6b053b8e5f5e12089fbbc127167199746bb5b4c1 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:58 2016 -0700 radix-tree: add copyright statements The multiorder support is a sufficiently large feature to be worth adding copyrigt lines for. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 2 ++ 1 file changed, 2 insertions(+) commit 0796c58325533f87c00949a545eb607baa8441cb Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:02:55 2016 -0700 radix-tree: fix radix_tree_dump() for multi-order entries - Print which indices are covered by every leaf entry - Print sibling entries - Print the node pointer instead of the slot entry - Build by default in userspace, and make it accessible to the test-suite Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 48 +++++++++++++++++++++++++---------------- tools/testing/radix-tree/test.h | 1 + 2 files changed, 30 insertions(+), 19 deletions(-) commit 070c5ac2740b5db89d381a09fb03b2480b2f7a74 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:52 2016 -0700 radix-tree: fix radix_tree_range_tag_if_tagged() for multiorder entries I had previously decided that tagging a single multiorder entry would count as tagging 2^order entries for the purposes of 'nr_to_tag'. I now believe that decision to be a mistake, and it should count as a single entry. That's more likely to be what callers expect. When walking back up the tree from a newly-tagged entry, the current code assumed we were starting from the lowest level of the tree; if we have a multiorder entry with an order at least RADIX_TREE_MAP_SHIFT in size then we need to shift the index by 'shift' before we start walking back up the tree, or we will end up not setting tags on higher entries, and then mistakenly thinking that entries below a certain point in the tree are not tagged. If the first index we examine is a sibling entry of a tagged multiorder entry, we were not tagging it. We need to examine the canonical entry, and the easiest way to do that is to use radix_tree_descend(). We then have to skip over sibling slots when looking for the next entry in the tree or we will end up walking back to the canonical entry. Add several tests for radix_tree_range_tag_if_tagged(). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 76 +++++++++++++++-------------------- tools/testing/radix-tree/multiorder.c | 25 +++++++++++- tools/testing/radix-tree/tag_check.c | 10 +++++ 3 files changed, 67 insertions(+), 44 deletions(-) commit eb73f7f3300c144c4b886dd56ea4c3d2b2d58249 Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:02:49 2016 -0700 radix-tree: add test for radix_tree_locate_item() Add a unit test that provides coverage for the bug fixed in the commit entitled "radix-tree: rewrite radix_tree_locate_item fix" from Hugh Dickins. I've verified that this test fails before his patch due to miscalculated 'index' values in __locate() in lib/radix-tree.c, and passes with his fix. Link: http://lkml.kernel.org/r/1462307263-20623-1-git-send-email-ross.zwisler@linux.intel.com Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> tools/testing/radix-tree/linux/init.h | 1 + tools/testing/radix-tree/main.c | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) commit 0a2efc6c809b01872321d9c7e7d82d59ac6fde10 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:46 2016 -0700 radix-tree: rewrite radix_tree_locate_item Use the new multi-order support functions to rewrite radix_tree_locate_item(). Modify the locate tests to test multiorder entries too. [hughd@google.com: radix_tree_locate_item() is often returning the wrong index] Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1605012108490.1166@eggly.anvils Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 87 ++++++++++++++++++++--------------------- tools/testing/radix-tree/main.c | 30 ++++++++------ 2 files changed, 61 insertions(+), 56 deletions(-) commit 8a14f4d8328cc8615f8a5487c4173f36a8314796 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:44 2016 -0700 radix-tree: fix radix_tree_create for sibling entries If the radix tree user attempted to insert a colliding entry with an existing multiorder entry, then radix_tree_create() could encounter a sibling entry when walking down the tree to look for a slot. Use radix_tree_descend() to fix the problem, and add a test-case to make sure the problem doesn't come back in future. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 4 ++-- tools/testing/radix-tree/multiorder.c | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit 0fc9b8ca2b1df4948e9516697b1cf12f030968bd Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:02:41 2016 -0700 radix-tree test suite: add multi-order tag test Add a generic test for multi-order tag verification, and call it using several different configurations. This test creates a multi-order radix tree using the given index and order, and then sets, checks and clears tags using the indices covered by the single multi-order radix tree entry. With the various calls done by this test we verify root multi-order entries without siblings, multi-order entries without siblings in a radix tree node, as well as multi-order entries with siblings of various sizes. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> tools/testing/radix-tree/multiorder.c | 97 +++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) commit 4589ba6d0f439e4673830fdc65099179832ddde5 Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:02:38 2016 -0700 radix-tree: rewrite radix_tree_tag_get Use the new multi-order support functions to rewrite radix_tree_tag_get() Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) commit 00f47b581105b91f8f18edd3074322ae609a8bc5 Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:02:35 2016 -0700 radix-tree: rewrite radix_tree_tag_clear Use the new multi-order support functions to rewrite radix_tree_tag_clear() Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 44 ++++++++++++++++++++------------------------ 1 file changed, 20 insertions(+), 24 deletions(-) commit fb969909dd18930ad68d8f8b8e7895816cf74b0a Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:02:32 2016 -0700 radix-tree: rewrite radix_tree_tag_set Use the new multi-order support functions to rewrite radix_tree_tag_set() Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) commit 643b57d0a9bd4c93625a2f5da4cebc3ceb402b9b Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:02:29 2016 -0700 radix tree test suite: multi-order iteration test Add a unit test to verify that we can iterate over multi-order entries properly via a radix_tree_for_each_slot() loop. This was done with a single, somewhat complicated configuration that was meant to test many of the various corner cases having to do with multi-order entries: - An iteration could begin at a sibling entry, and we need to return the canonical entry. - We could have entries of various orders in the same slots[] array. - We could have multi-order entries at a nonzero height, followed by indirect pointers to more radix tree nodes later in that same slots[] array. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> tools/testing/radix-tree/multiorder.c | 92 +++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) commit 21ef533931f73a8e963a6107aa5ec51b192f28be Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:02:26 2016 -0700 radix-tree: add support for multi-order iterating This enables the macros radix_tree_for_each_slot() and friends to be used with multi-order entries. The way that this works is that we treat all entries in a given slots[] array as a single chunk. If the index given to radix_tree_next_chunk() happens to point us to a sibling entry, we will back up iter->index so that it points to the canonical entry, and that will be the place where we start our iteration. As we're processing a chunk in radix_tree_next_slot(), we process canonical entries, skip over sibling entries, and restart the chunk lookup if we find a non-sibling indirect pointer. This drops back to the radix_tree_next_chunk() code, which will re-walk the tree and look for another chunk. This allows us to properly handle multi-order entries mixed with other entries that are at various heights in the radix tree. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 69 +++++++++++++++++++++++---- lib/radix-tree.c | 66 ++++++++++++++----------- tools/testing/radix-tree/generated/autoconf.h | 3 ++ tools/testing/radix-tree/linux/kernel.h | 5 +- 4 files changed, 102 insertions(+), 41 deletions(-) commit 7b60e9ad59a31dd98c2f7ef841e2882c2b0e0f3b Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:23 2016 -0700 radix-tree: fix multiorder BUG_ON in radix_tree_insert These BUG_ON tests are to ensure that all the tags are clear when inserting a new entry. If we insert a multiorder entry, we'll end up looking at the tags for a different node, and so the BUG_ON can end up triggering spuriously. Also, we now have three tags, not two, so check all three are clear, and check all the root tags with a single call to BUG_ON since the bits are stored contiguously. Include a test-case to ensure this problem does not reoccur. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 14 ++++++++++---- tools/testing/radix-tree/multiorder.c | 12 ++++++++++++ 2 files changed, 22 insertions(+), 4 deletions(-) commit 858299544efcf2577511bb018b9e73637ac71a2f Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:20 2016 -0700 radix-tree: rewrite __radix_tree_lookup Use the new multi-order support functions to rewrite __radix_tree_lookup() Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 48 ++++++++++++++++-------------------------------- 1 file changed, 16 insertions(+), 32 deletions(-) commit afe0e395b6d1817fa5393f1ad6fcbf71406b016d Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:17 2016 -0700 radix-tree: fix several shrinking bugs with multiorder entries Setting the indirect bit on the user data entry used to be unambiguous because the tree walking code knew not to expect internal nodes in the last level of the tree. Multiorder entries can appear at any level of the tree, and a leaf with the indirect bit set is indistinguishable from a pointer to a node. Introduce a special entry (RADIX_TREE_RETRY) which is neither a valid user entry, nor a valid pointer to a node. The radix_tree_deref_retry() function continues to work the same way, but tree walking code can distinguish it from a pointer to a node. Also fix the condition for setting slot->parent to NULL; it does not matter what height the tree is, it only matters whether slot is an indirect pointer. Move this code above the comment which is referring to the assignment to root->rnode. Also fix the condition for preventing the tree from shrinking to a single entry if it's a multiorder entry. Add a test-case to the test suite that checks that the tree goes back down to its original height after an item is inserted & deleted from a higher index in the tree. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 23 +++++++++++---------- tools/testing/radix-tree/multiorder.c | 39 +++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 11 deletions(-) commit 4f3755d1ae3cd856a5c7da3dea12cced8dc51fbf Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:14 2016 -0700 radix tree test suite: start adding multiorder tests Test suite infrastructure for working with multiorder entries. The test itself is pretty basic: Add an entry, check that all expected indices return that entry and that indices around that entry don't return an entry. Then delete the entry and check no index returns that entry. Tests a few edge conditions including the multiorder entry at index 0 and at a higher index. Also tests deleting through an alias as well as through the canonical index. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> tools/testing/radix-tree/Makefile | 2 +- tools/testing/radix-tree/main.c | 2 ++ tools/testing/radix-tree/multiorder.c | 58 +++++++++++++++++++++++++++++++++++ tools/testing/radix-tree/test.c | 13 ++++++-- tools/testing/radix-tree/test.h | 6 +++- 5 files changed, 76 insertions(+), 5 deletions(-) commit 49ea6ebcd3080ebf2c589b5f1437dd8bb2f90395 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:11 2016 -0700 radix-tree: fix extending the tree for multi-order entries at offset 0 The current code will insert entries at each level, as if we're going to add a new entry at the bottom level, so we then get an -EEXIST when we try to insert the entry into the tree. The best way to fix this is to not check 'order' when inserting into an empty tree. We still need to 'extend' the tree to the height necessary for the maximum index corresponding to this entry, so pass that value to radix_tree_extend() rather than the index we're asked to create, or we won't create a tree that's deep enough. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) commit 1456a439fc2dcc0c3d1a2d7af1fd83962813aaee Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:08 2016 -0700 radix-tree: introduce radix_tree_load_root() All the tree walking functions start with some variant of this code; centralise it in one place so we're not chasing subtly different bugs everywhere. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit aa5475760235672f316fbf29cdfb82a75016dbdf Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:05 2016 -0700 radix-tree: remove restriction on multi-order entries Now that sibling pointers are handled explicitly, there is no purpose served by restricting the order to be >= RADIX_TREE_MAP_SHIFT. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 2 -- 1 file changed, 2 deletions(-) commit 29e0967c2f66771f654cef7168c90a53737abcdf Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:02:02 2016 -0700 radix-tree: fix deleting a multi-order entry through an alias If we deleted an entry through an index which looked up a sibling pointer, we'd end up zeroing out the wrong slots in the node. Use get_slot_offset() to find the right slot. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b8c00f68405e9c037a6d8ae0d5d9da7f8a34e6a Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:01:59 2016 -0700 radix-tree: fix sibling entry insertion The subtraction was the wrong way round, leading to undefined behaviour (shift by an amount larger than the size of the type). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit db050f2924fcf39428bdadf28970a32cfaf256ef Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:01:57 2016 -0700 radix-tree: add missing sibling entry functionality The code I previously added to enable multiorder radix tree entries was untested and therefore buggy. This commit adds the support functions that Ross and I decided were necessary over a four-week period of iterating various designs. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/radix-tree.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit 57578c2ea2cb2e0d362a9212ac83cf90221d4883 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:01:54 2016 -0700 raxix-tree: introduce CONFIG_RADIX_TREE_MULTIORDER I've been receiving increasingly concerned notes from 0day about how much my recent changes have been bloating the radix tree. Make it happier by only including multiorder support if CONFIG_TRANSPARENT_HUGEPAGES is set. This is an independent Kconfig option, so other radix tree users can also set it if they have a need. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/Kconfig | 3 +++ lib/radix-tree.c | 26 ++++++++++++++++++-------- mm/Kconfig | 1 + tools/testing/radix-tree/linux/kernel.h | 1 + 4 files changed, 23 insertions(+), 8 deletions(-) commit 6c4bd68a2962c03423a226d949caf64216d013cc Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:01:51 2016 -0700 radix-tree: remove unused looping macros radix_tree_for_each_chunk() and radix_tree_for_each_chunk_slot() have never been used in the kernel since their introduction in 2012, so remove them. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 28 ---------------------------- 1 file changed, 28 deletions(-) commit 7f308671c79899c1b4e275867d3647f64e896e78 Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:01:48 2016 -0700 radix tree test suite: rebuild when headers change When we make changes to radix-tree.h in the regular kernel source (include/linux/radix-tree.h), we really want our test code to be rebuilt. We also include a few other headers from tools/include and probably want to rebuild if these have been changed. Update the makefile so that all of our objects will be rebuilt when any of the headers we depend on are changed. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> tools/testing/radix-tree/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aa1d62d8530d5adf158dd633d360108466f93fcd Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:01:45 2016 -0700 radix tree test suite: keep regression test runs short Currently the full suite of regression tests take upwards of 30 minutes to run on my development machine. The vast majority of this time is taken by the big_gang_check() and copy_tag_check() tests, which each run their tests through thousands of iterations...does this have value? Without big_gang_check() and copy_tag_check(), the test suite runs in around 15 seconds on my box. Honestly the first time I ever ran through the entire test suite was to gather the timings for this email - it simply takes too long to be useful on a normal basis. Instead, hide the excessive iterations through big_gang_check() and copy_tag_check() tests behind an '-l' flag (for "long run") in case they are still useful, but allow the regression test suite to complete in a reasonable amount of time. We still run each of these tests a few times (3 at present) to try and keep the test coverage. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> tools/testing/radix-tree/main.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) commit 97d778b2de9213c7a7483dad0f533c1af9f0810f Author: Ross Zwisler <ross.zwisler@linux.intel.com> Date: Fri May 20 17:01:42 2016 -0700 radix tree test suite: allow testing other fan-out values The defines in regression2.c are already in radix-tree.h and duplicating them in the test case makes experimenting with other values for the fan-out harder than necessary. Allow the user of the radix tree to decide what the fan-out should be rather than fixing it to 8 for non-kernel uses. Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 4 +--- tools/testing/radix-tree/linux/kernel.h | 2 ++ tools/testing/radix-tree/regression2.c | 7 ------- 3 files changed, 3 insertions(+), 10 deletions(-) commit d42cb1a9fffa9dc760c13302f00cdec25106e2f1 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:01:39 2016 -0700 radix tree test suite: add tests for radix_tree_locate_item() Fairly simple tests; add various items to the tree, then make sure we can find them again. Also check that a pointer that we know isn't in the tree is not found. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> tools/testing/radix-tree/linux/kernel.h | 3 +++ tools/testing/radix-tree/main.c | 41 +++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit f518b1607e128a8dcfa75f539864c1321c5a18ea Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:01:36 2016 -0700 radix tree test suite: fix build Add an empty linux/init.h, and definitions for a few parts of the kernel API either in use now, or to be used in the near future. Start using the common definitions in tools/include/linux, although more work needs to be done here. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Jan Kara <jack@suse.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> tools/testing/radix-tree/linux/kernel.h | 12 ++++++++++-- tools/testing/radix-tree/linux/slab.h | 1 - tools/testing/radix-tree/linux/types.h | 7 ++----- 3 files changed, 12 insertions(+), 8 deletions(-) commit e9256efcc8e390fa4fcf796a0c0b47d642d77d32 Author: Matthew Wilcox <willy@linux.intel.com> Date: Fri May 20 17:01:33 2016 -0700 radix-tree: introduce radix_tree_empty Commit e61452365372 ("radix_tree: add support for multi-order entries") left the impression that the support for multiorder radix tree entries was functional. As soon as Ross tried to use it, it became apparent that my testing was completely inadequate, and it didn't even work a little bit for orders that were not a multiple of shift. This series of patches is the result of about 6 weeks of redesign, reimplementation, testing, arguing and hair-pulling. The great news is that the test-suite is now far better than it was. That's reflected in the diffstat for the test-suite alone: 12 files changed, 436 insertions(+), 28 deletions(-) The highlight for users of the tree is that the restriction on the order of inserted entries being >= RADIX_TREE_MAP_SHIFT is now gone; the radix tree now supports any order between 0 and 64. For those who are interested in how the tree works, patch 9 is probably the most interesting one as it introduces the new machinery for handling sibling entries. I've tried to be fair in attributing authorship to the person who contributed the majority of the code in each patch; Ross has been an invaluable partner in the development of this support and it's fair to say that each of us has code in every commit. I should also express my appreciation of the 0day testing. It prompted me that I was bloating the tinyconfig in an unacceptable way, and it bisected to a commit which contained a rather nasty memory-corruption bug. This patch (of 29): The irqdomain code was checking for 0 or 1 entries, not 0 entries like the comment said they were. Introduce a new helper that will actually check for an empty tree. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/radix-tree.h | 5 +++++ kernel/irq/irqdomain.c | 7 +------ 2 files changed, 6 insertions(+), 6 deletions(-) commit 538d7eb86d58b3d7d73f3bb3ff960c4bdf411c1a Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:01:30 2016 -0700 drivers/platform/x86/wmi.c: use generic UUID library Instead of opencoding let's use generic UUID library functions here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/platform/x86/wmi.c | 104 ++++++--------------------------------------- 1 file changed, 13 insertions(+), 91 deletions(-) commit 7244ad69cc1382fd4dfb18a4fea5613acd67a2e9 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:01:27 2016 -0700 block/partitions/ldm.c: use generic UUID library Instead of opencoding let's use generic UUID library functions here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: "Richard Russon (FlatCap)" <ldm@flatcap.org> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> block/partitions/ldm.c | 60 ++++---------------------------------------------- 1 file changed, 4 insertions(+), 56 deletions(-) commit 63579785752ba7d0e842078ec6b2875367046f06 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:01:24 2016 -0700 include/linux/genhd.h: move to use generic UUID library UUID library provides uuid_be type and uuid_be_to_bin() function. This substitutes open coded variant by generic library calls. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/genhd.h | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) commit 8236431d8d09eee70e6cbc506426a7c97778a2e6 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:01:21 2016 -0700 fs/efivarfs/inode.c: use generic UUID library Instead of opencoding let's use generic UUID library functions here. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/efivarfs/inode.c | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) commit ba7e34b1bbd2722685bbc75d168672d5154d8614 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:01:18 2016 -0700 include/linux/efi.h: redefine type, constant, macro from generic code Generic UUID library defines structure type, macro to define UUID, and the length of the UUID string. This patch removes duplicate data structure definition, UUID string length constant as well as macro for UUID handling. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/efi.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) commit ede9c27749b9b35efdffa4f63a39f819d7913752 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:01:10 2016 -0700 kernel/sysctl_binary.c: use generic UUID library UUID library provides uuid_be type and uuid_be_to_bin() function. This substitutes open coded variant by generic library calls. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/sysctl_binary.c | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) commit e3a93bce69ad3e2c38927abe311b8cb4f17abbaf Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:01:07 2016 -0700 lib/uuid.c: remove FSF address There is no point in keeping an address in the file since it's subject to change. While here, update Intel Copyright years. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/uuid.h | 6 +----- include/uapi/linux/uuid.h | 4 ---- lib/uuid.c | 6 +----- 3 files changed, 2 insertions(+), 14 deletions(-) commit 2b1b0d66704a8cafe83be7114ec4c15ab3a314ad Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:01:04 2016 -0700 lib/uuid.c: introduce a few more generic helpers There are new helpers in this patch: uuid_is_valid checks if a UUID is valid uuid_be_to_bin converts from string to binary (big endian) uuid_le_to_bin converts from string to binary (little endian) They will be used in future, i.e. in the following patches in the series. This also moves the indices arrays to lib/uuid.c to be shared accross modules. [andriy.shevchenko@linux.intel.com: fix typo] Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/uuid.h | 13 +++++++++++ lib/uuid.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/vsprintf.c | 9 ++++---- 3 files changed, 82 insertions(+), 5 deletions(-) commit 8da4b8c48e7b43cb16d05e1dbb34ad9f73ab7efd Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:01:00 2016 -0700 lib/uuid.c: move generate_random_uuid() to uuid.c Let's gather the UUID related functions under one hood. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/char/random.c | 21 +-------------------- fs/btrfs/volumes.c | 2 +- fs/ext4/ioctl.c | 2 +- fs/f2fs/file.c | 2 +- fs/reiserfs/objectid.c | 2 +- fs/ubifs/sb.c | 2 +- include/linux/random.h | 1 - include/linux/uuid.h | 2 ++ lib/uuid.c | 20 ++++++++++++++++++++ 9 files changed, 28 insertions(+), 26 deletions(-) commit b8b572789cde5118b2cee49d426d48fcf5b30e47 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:00:57 2016 -0700 security/integrity/ima/ima_policy.c: use %pU to output UUID in printable format Instead of open coded variant re-use extension that vsprintf.c provides us for ages. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> security/integrity/ima/ima_policy.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit aa4ea1c3b3948d325a6826adf9c367d11fa1ab74 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 20 17:00:54 2016 -0700 lib/vsprintf: simplify UUID printing There are few functions here and there along with type definitions that provide UUID API. This series consolidates everything under one hood and converts current users. This has been tested for a while internally, however it doesn't mean we covered all possible cases (especially accuracy of UUID constants after conversion). So, please test this as much as you can and provide your tag. We appreciate the effort. The ACPI conversion is postponed for now to sort more generic things out first. This patch (of 9): Since we have hex_byte_pack_upper() we may use it directly and avoid second loop. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk> Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.com> Cc: Mimi Zohar <zohar@linux.vnet.ibm.com> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/vsprintf.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit f4970682d73bba79cba10149d62482338d065086 Author: Jiri Slaby <jslaby@suse.cz> Date: Fri May 20 17:00:51 2016 -0700 MAINTAINERS: remove Koichi Yasutake The MTA says: <yasutake.koichi@jp.panasonic.com>: unknown user: "yasutake.koichi@jp.panasonic.com" Link: http://lkml.kernel.org/r/1462776755-9607-1-git-send-email-jslaby@suse.cz Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit 2e11246351012a0247307f8a0545e21dd841ba4f Author: Eric Engestrom <eric.engestrom@imgtec.com> Date: Fri May 20 17:00:49 2016 -0700 MAINTAINERS: remove defunct spear mailing list It looks like the email address for this mailing list doesn't exist anymore: <spear-devel@list.st.com>: host mxb-00178001.gslb.pphosted.com[91.207.212.93] said: 550 5.1.1 User Unknown (in reply to RCPT TO command) Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Kalle Valo <kvalo@codeaurora.org> Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: Jiri Slaby <jslaby@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> MAINTAINERS | 4 ---- 1 file changed, 4 deletions(-) commit 6c41a3b7b2f8d10eefe5be9109fd4258dd6cf495 Author: Jiri Slaby <jslaby@suse.cz> Date: Fri May 20 17:00:46 2016 -0700 MAINTAINERS: remove linux@lists.openrisc.net $ host -t mx lists.openrisc.net Host lists.openrisc.net not found: 3(NXDOMAIN) Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Jonas Bonn <jonas@southpole.se> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> MAINTAINERS | 1 - 1 file changed, 1 deletion(-) commit cf9b1106c81c45cde02208fca49d3f3e4ab6ee74 Author: Petr Mladek <pmladek@suse.com> Date: Fri May 20 17:00:42 2016 -0700 printk/nmi: flush NMI messages on the system panic In NMI context, printk() messages are stored into per-CPU buffers to avoid a possible deadlock. They are normally flushed to the main ring buffer via an IRQ work. But the work is never called when the system calls panic() in the very same NMI handler. This patch tries to flush NMI buffers before the crash dump is generated. In this case it does not risk a double release and bails out when the logbuf_lock is already taken. The aim is to get the messages into the main ring buffer when possible. It makes them better accessible in the vmcore. Then the patch tries to flush the buffers second time when other CPUs are down. It might be more aggressive and reset logbuf_lock. The aim is to get the messages available for the consequent kmsg_dump() and console_flush_on_panic() calls. The patch causes vprintk_emit() to be called even in NMI context again. But it is done via printk_deferred() so that the console handling is skipped. Consoles use internal locks and we could not prevent a deadlock easily. They are explicitly called later when the crash dump is not generated, see console_flush_on_panic(). Signed-off-by: Petr Mladek <pmladek@suse.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Daniel Thompson <daniel.thompson@linaro.org> Cc: David Miller <davem@davemloft.net> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jan Kara <jack@suse.cz> Cc: Jiri Kosina <jkosina@suse.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/printk.h | 2 ++ kernel/kexec_core.c | 1 + kernel/panic.c | 6 +++++- kernel/printk/internal.h | 2 ++ kernel/printk/nmi.c | 39 ++++++++++++++++++++++++++++++++++++++- kernel/printk/printk.c | 2 +- 6 files changed, 49 insertions(+), 3 deletions(-) commit 427934b8714ec130b068d1c9d88f25b24aaede32 Author: Petr Mladek <pmladek@suse.com> Date: Fri May 20 17:00:39 2016 -0700 printk/nmi: increase the size of NMI buffer and make it configurable Testing has shown that the backtrace sometimes does not fit into the 4kB temporary buffer that is used in NMI context. The warnings are gone when I double the temporary buffer size. This patch doubles the buffer size and makes it configurable. Note that this problem existed even in the x86-specific implementation that was added by the commit a9edc8809328 ("x86/nmi: Perform a safe NMI stack trace on all CPUs"). Nobody noticed it because it did not print any warnings. Signed-off-by: Petr Mladek <pmladek@suse.com> Cc: Jan Kara <jack@suse.cz> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jiri Kosina <jkosina@suse.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: David Miller <davem@davemloft.net> Cc: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> init/Kconfig | 22 ++++++++++++++++++++++ kernel/printk/nmi.c | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) commit b522deabc6f18e4f938d93a84f345f2cbf3347d1 Author: Petr Mladek <pmladek@suse.com> Date: Fri May 20 17:00:36 2016 -0700 printk/nmi: warn when some message has been lost in NMI context We could not resize the temporary buffer in NMI context. Let's warn if a message is lost. This is rather theoretical. printk() should not be used in NMI. The only sensible use is when we want to print backtrace from all CPUs. The current buffer should be enough for this purpose. [akpm@linux-foundation.org: whitespace fixlet] Signed-off-by: Petr Mladek <pmladek@suse.com> Cc: Jan Kara <jack@suse.cz> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jiri Kosina <jkosina@suse.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: David Miller <davem@davemloft.net> Cc: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/printk/internal.h | 11 +++++++++++ kernel/printk/nmi.c | 5 ++++- kernel/printk/printk.c | 10 ++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) commit 42a0bb3f71383b457a7db362f1c69e7afb96732b Author: Petr Mladek <pmladek@suse.com> Date: Fri May 20 17:00:33 2016 -0700 printk/nmi: generic solution for safe printk in NMI printk() takes some locks and could not be used a safe way in NMI context. The chance of a deadlock is real especially when printing stacks from all CPUs. This particular problem has been addressed on x86 by the commit a9edc8809328 ("x86/nmi: Perform a safe NMI stack trace on all CPUs"). The patchset brings two big advantages. First, it makes the NMI backtraces safe on all architectures for free. Second, it makes all NMI messages almost safe on all architectures (the temporary buffer is limited. We still should keep the number of messages in NMI context at minimum). Note that there already are several messages printed in NMI context: WARN_ON(in_nmi()), BUG_ON(in_nmi()), anything being printed out from MCE handlers. These are not easy to avoid. This patch reuses most of the code and makes it generic. It is useful for all messages and architectures that support NMI. The alternative printk_func is set when entering and is reseted when leaving NMI context. It queues IRQ work to copy the messages into the main ring buffer in a safe context. __printk_nmi_flush() copies all available messages and reset the buffer. Then we could use a simple cmpxchg operations to get synchronized with writers. There is also used a spinlock to get synchronized with other flushers. We do not longer use seq_buf because it depends on external lock. It would be hard to make all supported operations safe for a lockless use. It would be confusing and error prone to make only some operations safe. The code is put into separate printk/nmi.c as suggested by Steven Rostedt. It needs a per-CPU buffer and is compiled only on architectures that call nmi_enter(). This is achieved by the new HAVE_NMI Kconfig flag. The are MN10300 and Xtensa architectures. We need to clean up NMI handling there first. Let's do it separately. The patch is heavily based on the draft from Peter Zijlstra, see https://lkml.org/lkml/2015/6/10/327 [arnd@arndb.de: printk-nmi: use %zu format string for size_t] [akpm@linux-foundation.org: min_t->min - all types are size_t here] Signed-off-by: Petr Mladek <pmladek@suse.com> Suggested-by: Peter Zijlstra <peterz@infradead.org> Suggested-by: Steven Rostedt <rostedt@goodmis.org> Cc: Jan Kara <jack@suse.cz> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> [arm part] Cc: Daniel Thompson <daniel.thompson@linaro.org> Cc: Jiri Kosina <jkosina@suse.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: David Miller <davem@davemloft.net> Cc: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/Kconfig | 4 + arch/arm/Kconfig | 1 + arch/arm/kernel/smp.c | 2 + arch/avr32/Kconfig | 1 + arch/blackfin/Kconfig | 1 + arch/cris/Kconfig | 1 + arch/mips/Kconfig | 1 + arch/powerpc/Kconfig | 1 + arch/s390/Kconfig | 1 + arch/sh/Kconfig | 1 + arch/sparc/Kconfig | 1 + arch/tile/Kconfig | 1 + arch/x86/Kconfig | 1 + arch/x86/kernel/apic/hw_nmi.c | 1 - include/linux/hardirq.h | 2 + include/linux/percpu.h | 3 - include/linux/printk.h | 12 ++- init/Kconfig | 5 + init/main.c | 1 + kernel/printk/Makefile | 1 + kernel/printk/internal.h | 44 +++++++++ kernel/printk/nmi.c | 219 ++++++++++++++++++++++++++++++++++++++++++ kernel/printk/printk.c | 19 +--- lib/nmi_backtrace.c | 89 +---------------- 24 files changed, 306 insertions(+), 107 deletions(-) commit 2eeed7e98d6a1341b1574893a95ce5b8379140f2 Author: René Nyffenegger <mail@renenyffenegger.ch> Date: Fri May 20 17:00:30 2016 -0700 include/linux/syscalls.h: use pid_t instead of int In include/linux/syscalls.h, the four functions sys_kill, sys_tgkill, sys_tkill and sys_rt_sigqueueinfo are declared with "int pid" and "int tgid". However, in kernel/signal.c, the corresponding definitions use the more appropriate "pid_t" (which is a typedef'd int). This patch changes "int" to "pid_t" in the declarations of sys_kill, sys_tgkill, sys_tkill and sys_rt_sigqueueinfo in <linux/syscalls.h> in order to harmonize the function declarations with their respective definitions. Link: http://lkml.kernel.org/r/57302FDA.7020205@renenyffenegger.ch Signed-off-by: René Nyffenegger <mail@renenyffenegger.ch> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org> Cc: Zach Brown <zab@redhat.com> Cc: Milosz Tanski <milosz@adfin.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/syscalls.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 0740aa5f6375681c57488c4ea55d05a0341cfc9c Author: Jiri Slaby <jslaby@suse.cz> Date: Fri May 20 17:00:25 2016 -0700 fork: free thread in copy_process on failure When using this program (as root): #include <err.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/io.h> #include <sys/types.h> #include <sys/wait.h> #define ITER 1000 #define FORKERS 15 #define THREADS (6000/FORKERS) // 1850 is proc max static void fork_100_wait() { unsigned a, to_wait = 0; printf("\t%d forking %d\n", THREADS, getpid()); for (a = 0; a < THREADS; a++) { switch (fork()) { case 0: usleep(1000); exit(0); break; case -1: break; default: to_wait++; break; } } printf("\t%d forked from %d, waiting for %d\n", THREADS, getpid(), to_wait); for (a = 0; a < to_wait; a++) wait(NULL); printf("\t%d waited from %d\n", THREADS, getpid()); } static void run_forkers() { pid_t forkers[FORKERS]; unsigned a; for (a = 0; a < FORKERS; a++) { switch ((forkers[a] = fork())) { case 0: fork_100_wait(); exit(0); break; case -1: err(1, "DIE fork of %d'th forker", a); break; default: break; } } for (a = 0; a < FORKERS; a++) waitpid(forkers[a], NULL, 0); } int main() { unsigned a; int ret; ret = ioperm(10, 20, 0); if (ret < 0) err(1, "ioperm"); for (a = 0; a < ITER; a++) run_forkers(); return 0; } kmemleak reports many occurences of this leak: unreferenced object 0xffff8805917c8000 (size 8192): comm "fork-leak", pid 2932, jiffies 4295354292 (age 1871.028s) hex dump (first 32 bytes): ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................ backtrace: [<ffffffff814cfbf5>] kmemdup+0x25/0x50 [<ffffffff8103ab43>] copy_thread_tls+0x6c3/0x9a0 [<ffffffff81150174>] copy_process+0x1a84/0x5790 [<ffffffff811dc375>] wake_up_new_task+0x2d5/0x6f0 [<ffffffff8115411d>] _do_fork+0x12d/0x820 ... Due to the leakage of the memory items which should have been freed in arch/x86/kernel/process.c:exit_thread(). Make sure the memory is freed when fork fails later in copy_process. This is done by calling exit_thread with the thread to kill. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: "David S. Miller" <davem@davemloft.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chen Liqin <liqin.linux@gmail.com> Cc: Chris Metcalf <cmetcalf@mellanox.com> Cc: Chris Zankel <chris@zankel.net> Cc: David Howells <dhowells@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Helge Deller <deller@gmx.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Jonas Bonn <jonas@southpole.se> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Lennox Wu <lennox.wu@gmail.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Mark Salter <msalter@redhat.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Simek <monstr@monstr.eu> Cc: Mikael Starvik <starvik@axis.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Rich Felker <dalias@libc.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Richard Weinberger <richard@nod.at> Cc: Russell King <linux@arm.linux.org.uk> Cc: Steven Miao <realmz6@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/fork.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e64646946ed32902fd597fa6e514b1da84642de3 Author: Jiri Slaby <jslaby@suse.cz> Date: Fri May 20 17:00:20 2016 -0700 exit_thread: accept a task parameter to be exited We need to call exit_thread from copy_process in a fail path. So make it accept task_struct as a parameter. [v2] * s390: exit_thread_runtime_instr doesn't make sense to be called for non-current tasks. * arm: fix the comment in vfp_thread_copy * change 'me' to 'tsk' for task_struct * now we can change only archs that actually have exit_thread [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: "David S. Miller" <davem@davemloft.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chen Liqin <liqin.linux@gmail.com> Cc: Chris Metcalf <cmetcalf@mellanox.com> Cc: Chris Zankel <chris@zankel.net> Cc: David Howells <dhowells@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Helge Deller <deller@gmx.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Jonas Bonn <jonas@southpole.se> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Lennox Wu <lennox.wu@gmail.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Mark Salter <msalter@redhat.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Simek <monstr@monstr.eu> Cc: Mikael Starvik <starvik@axis.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Rich Felker <dalias@libc.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Richard Weinberger <richard@nod.at> Cc: Russell King <linux@arm.linux.org.uk> Cc: Steven Miao <realmz6@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/arm/kernel/process.c | 4 ++-- arch/arm/vfp/vfpmodule.c | 4 ---- arch/avr32/kernel/process.c | 4 ++-- arch/cris/arch-v32/kernel/process.c | 4 ++-- arch/ia64/kernel/perfmon.c | 4 ++-- arch/ia64/kernel/process.c | 14 +++++++------- arch/metag/kernel/process.c | 6 +++--- arch/mn10300/kernel/process.c | 4 ++-- arch/s390/kernel/process.c | 5 +++-- arch/sh/kernel/process_64.c | 5 ++--- arch/sparc/kernel/process_32.c | 12 ++++++------ arch/sparc/kernel/process_64.c | 4 ++-- arch/tile/kernel/process.c | 4 ++-- arch/x86/kernel/process.c | 5 ++--- arch/xtensa/kernel/process.c | 4 ++-- include/linux/sched.h | 4 ++-- kernel/exit.c | 2 +- 17 files changed, 42 insertions(+), 47 deletions(-) commit 5f56a5dfdb9bcb3bca03df59980d4d2f012cbb53 Author: Jiri Slaby <jslaby@suse.cz> Date: Fri May 20 17:00:16 2016 -0700 exit_thread: remove empty bodies Define HAVE_EXIT_THREAD for archs which want to do something in exit_thread. For others, let's define exit_thread as an empty inline. This is a cleanup before we change the prototype of exit_thread to accept a task parameter. [akpm@linux-foundation.org: fix mips] Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: "David S. Miller" <davem@davemloft.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chen Liqin <liqin.linux@gmail.com> Cc: Chris Metcalf <cmetcalf@mellanox.com> Cc: Chris Zankel <chris@zankel.net> Cc: David Howells <dhowells@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Helge Deller <deller@gmx.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Jonas Bonn <jonas@southpole.se> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Lennox Wu <lennox.wu@gmail.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Mark Salter <msalter@redhat.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Simek <monstr@monstr.eu> Cc: Mikael Starvik <starvik@axis.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Rich Felker <dalias@libc.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Richard Weinberger <richard@nod.at> Cc: Russell King <linux@arm.linux.org.uk> Cc: Steven Miao <realmz6@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/Kconfig | 5 +++++ arch/alpha/kernel/process.c | 8 -------- arch/arc/kernel/process.c | 7 ------- arch/arm/Kconfig | 1 + arch/arm64/kernel/process.c | 7 ------- arch/avr32/Kconfig | 1 + arch/blackfin/include/asm/processor.h | 7 ------- arch/c6x/kernel/process.c | 4 ---- arch/cris/Kconfig | 1 + arch/cris/arch-v10/kernel/process.c | 9 --------- arch/frv/include/asm/processor.h | 7 ------- arch/h8300/include/asm/processor.h | 7 ------- arch/hexagon/kernel/process.c | 7 ------- arch/ia64/Kconfig | 1 + arch/m32r/kernel/process.c | 9 --------- arch/m68k/include/asm/processor.h | 7 ------- arch/metag/Kconfig | 1 + arch/metag/include/asm/processor.h | 2 -- arch/microblaze/include/asm/processor.h | 10 ---------- arch/mips/kernel/process.c | 4 ---- arch/mn10300/Kconfig | 1 + arch/nios2/include/asm/processor.h | 5 ----- arch/openrisc/include/asm/processor.h | 9 --------- arch/parisc/kernel/process.c | 7 ------- arch/powerpc/kernel/process.c | 4 ---- arch/s390/Kconfig | 1 + arch/score/kernel/process.c | 2 -- arch/sh/Kconfig | 1 + arch/sh/kernel/process_32.c | 7 ------- arch/sparc/Kconfig | 1 + arch/tile/Kconfig | 1 + arch/um/kernel/process.c | 4 ---- arch/unicore32/kernel/process.c | 7 ------- arch/x86/Kconfig | 1 + arch/xtensa/Kconfig | 1 + include/linux/sched.h | 7 +++++++ 36 files changed, 24 insertions(+), 140 deletions(-) commit 2ec656eb4054ce55e6d453b8614ef9669e84c542 Author: Jiri Slaby <jslaby@suse.cz> Date: Fri May 20 17:00:11 2016 -0700 mn10300: let exit_fpu accept a task We need to call exit_thread from copy_process in a fail path. Since exit_thread on mn10300 calls exit_thread_runtime_instr, make it accept task_struct as a parameter now. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: "David S. Miller" <davem@davemloft.net> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "James E.J. Bottomley" <jejb@parisc-linux.org> Cc: Aurelien Jacquiot <a-jacquiot@ti.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Chen Liqin <liqin.linux@gmail.com> Cc: Chris Metcalf <cmetcalf@mellanox.com> Cc: Chris Zankel <chris@zankel.net> Cc: David Howells <dhowells@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Cc: Hans-Christian Egtvedt <egtvedt@samfundet.no> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Helge Deller <deller@gmx.de> Cc: Ingo Molnar <mingo@redhat.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Jonas Bonn <jonas@southpole.se> Cc: Koichi Yasutake <yasutake.koichi@jp.panasonic.com> Cc: Lennox Wu <lennox.wu@gmail.com> Cc: Ley Foon Tan <lftan@altera.com> Cc: Mark Salter <msalter@redhat.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Matt Turner <mattst88@gmail.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Michal Simek <monstr@monstr.eu> Cc: Mikael Starvik <starvik@axis.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Rich Felker <dalias@libc.org> Cc: Richard Henderson <rth@twiddle.net> Cc: Richard Kuo <rkuo@codeaurora.org> Cc: Richard Weinberger <richard@nod.at> Cc: Russell King <linux@arm.linux.org.uk> Cc: Steven Miao <realmz6@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/mn10300/include/asm/fpu.h | 6 ++---- arch/mn10300/kernel/process.c | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) commit 1b3044e39a89cb1d4d5313da477e8dfea2b5232d Author: Janis Danisevskis <jdanis@google.com> Date: Fri May 20 17:00:08 2016 -0700 procfs: fix pthread cross-thread naming if !PR_DUMPABLE The PR_DUMPABLE flag causes the pid related paths of the proc file system to be owned by ROOT. The implementation of pthread_set/getname_np however needs access to /proc/<pid>/task/<tid>/comm. If PR_DUMPABLE is false this implementation is locked out. This patch installs a special permission function for the file "comm" that grants read and write access to all threads of the same group regardless of the ownership of the inode. For all other threads the function falls back to the generic inode permission check. [akpm@linux-foundation.org: fix spello in comment] Signed-off-by: Janis Danisevskis <jdanis@google.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Colin Ian King <colin.king@canonical.com> Cc: David Rientjes <rientjes@google.com> Cc: Minfei Huang <mnfhuang@gmail.com> Cc: John Stultz <john.stultz@linaro.org> Cc: Calvin Owens <calvinowens@fb.com> Cc: Jann Horn <jann@thejh.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/proc/base.c | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) commit 3e42979e65dace1f9268dd5440e5ab096b8dee59 Author: Richard W.M. Jones <rjones@redhat.com> Date: Fri May 20 17:00:05 2016 -0700 procfs: expose umask in /proc/<PID>/status It's not possible to read the process umask without also modifying it, which is what umask(2) does. A library cannot read umask safely, especially if the main program might be multithreaded. Add a new status line ("Umask") in /proc/<PID>/status. It contains the file mode creation mask (umask) in octal. It is only shown for tasks which have task->fs. This patch is adapted from one originally written by Pierre Carrier. The use case is that we have endless trouble with people setting weird umask() values (usually on the grounds of "security"), and then everything breaking. I'm on the hook to fix these. We'd like to add debugging to our program so we can dump out the umask in debug reports. Previous versions of the patch used a syscall so you could only read your own umask. That's all I need. However there was quite a lot of push-back from those, so this new version exports it in /proc. See: https://lkml.org/lkml/2016/4/13/704 [umask2] https://lkml.org/lkml/2016/4/13/487 [getumask] Signed-off-by: Richard W.M. Jones <rjones@redhat.com> Acked-by: Konstantin Khlebnikov <koct9i@gmail.com> Acked-by: Jerome Marchand <jmarchan@redhat.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Michal Hocko <mhocko@kernel.org> Cc: Pierre Carrier <pierre@spotify.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/filesystems/proc.txt | 1 + fs/proc/array.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit 623e47fc64f8de480b322b7ed68855f97137e2a5 Author: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Date: Fri May 20 17:00:02 2016 -0700 zram: introduce per-device debug_stat sysfs node debug_stat sysfs is read-only and represents various debugging data that zram developers may need. This file is not meant to be used by anyone else: its content is not documented and will change any time w/o any notice. Therefore, the output of debug_stat file contains a version string. To avoid any confusion, we will increase the version number every time we modify the output. At the moment this file exports only one value -- the number of re-compressions, IOW, the number of times compression fast path has failed. This stat is temporary any will be useful in case if any per-cpu compression streams regressions will be reported. Link: http://lkml.kernel.org/r/20160513230834.GB26763@bbox Link: http://lkml.kernel.org/r/20160511134553.12655-1-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/ABI/testing/sysfs-block-zram | 9 +++++++++ Documentation/blockdev/zram.txt | 1 + drivers/block/zram/zram_drv.c | 21 +++++++++++++++++++++ drivers/block/zram/zram_drv.h | 1 + 4 files changed, 32 insertions(+) commit 43209ea2d17aae1540d4e28274e36404f72702f2 Author: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Date: Fri May 20 16:59:59 2016 -0700 zram: remove max_comp_streams internals Remove the internal part of max_comp_streams interface, since we switched to per-cpu streams. We will keep RW max_comp_streams attr around, because: a) we may (silently) switch back to idle compression streams list and don't want to disturb user space b) max_comp_streams attr must wait for the next 'lay off cycle'; we give user space 2 years to adjust before we remove/downgrade the attr, and there are already several attrs scheduled for removal in 4.11, so it's too late for max_comp_streams. This slightly change a user visible behaviour: - First, reading from max_comp_stream file now will always return the number of online CPUs. - Second, writing to max_comp_stream will not take any effect. Link: http://lkml.kernel.org/r/20160503165546.25201-1-sergey.senozhatsky@gmail.com Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/blockdev/zram.txt | 27 ++++++++----------------- drivers/block/zram/zcomp.c | 5 ----- drivers/block/zram/zram_drv.c | 45 ++++++++++------------------------------- drivers/block/zram/zram_drv.h | 1 - 4 files changed, 19 insertions(+), 59 deletions(-) commit d34f615720d17c49b6779f6fcd5cb7eb82231a38 Author: Dan Streetman <ddstreet@ieee.org> Date: Fri May 20 16:59:56 2016 -0700 mm/zsmalloc: don't fail if can't create debugfs info Change the return type of zs_pool_stat_create() to void, and remove the logic to abort pool creation if the stat debugfs dir/file could not be created. The debugfs stat file is for debugging/information only, and doesn't affect operation of zsmalloc; there is no reason to abort creating the pool if the stat file can't be created. This was seen with zswap, which used the same name for all pool creations, which caused zsmalloc to fail to create a second pool for zswap if CONFIG_ZSMALLOC_STAT was enabled. Signed-off-by: Dan Streetman <ddstreet@ieee.org> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Dan Streetman <dan.streetman@canonical.com> Cc: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/zsmalloc.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) commit 200867af4dedfe7cb707f96773684de1d1fd21e6 Author: Dan Streetman <ddstreet@ieee.org> Date: Fri May 20 16:59:54 2016 -0700 mm/zswap: use workqueue to destroy pool Add a work_struct to struct zswap_pool, and change __zswap_pool_empty to use the workqueue instead of using call_rcu(). When zswap destroys a pool no longer in use, it uses call_rcu() to perform the destruction/freeing. Since that executes in softirq context, it must not sleep. However, actually destroying the pool involves freeing the per-cpu compressors (which requires locking the cpu_add_remove_lock mutex) and freeing the zpool, for which the implementation may sleep (e.g. zsmalloc calls kmem_cache_destroy, which locks the slab_mutex). So if either mutex is currently taken, or any other part of the compressor or zpool implementation sleeps, it will result in a BUG(). It's not easy to reproduce this when changing zswap's params normally. In testing with a loaded system, this does not fail: $ cd /sys/module/zswap/parameters $ echo lz4 > compressor ; echo zsmalloc > zpool nor does this: $ while true ; do > echo lzo > compressor ; echo zbud > zpool > sleep 1 > echo lz4 > compressor ; echo zsmalloc > zpool > sleep 1 > done although it's still possible either of those might fail, depending on whether anything else besides zswap has locked the mutexes. However, changing a parameter with no delay immediately causes the schedule while atomic BUG: $ while true ; do > echo lzo > compressor ; echo lz4 > compressor > done This is essentially the same as Yu Zhao's proposed patch to zsmalloc, but moved to zswap, to cover compressor and zpool freeing. Fixes: f1c54846ee45 ("zswap: dynamic pool creation") Signed-off-by: Dan Streetman <ddstreet@ieee.org> Reported-by: Yu Zhao <yuzhao@google.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Dan Streetman <dan.streetman@canonical.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/zswap.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit da9556a2367cf2261ab4d3e100693c82fb1ddb26 Author: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Date: Fri May 20 16:59:51 2016 -0700 zram: user per-cpu compression streams Remove idle streams list and keep compression streams in per-cpu data. This removes two contented spin_lock()/spin_unlock() calls from write path and also prevent write OP from being preempted while holding the compression stream, which can cause slow downs. For instance, let's assume that we have N cpus and N-2 max_comp_streams.TASK1 owns the last idle stream, TASK2-TASK3 come in with the write requests: TASK1 TASK2 TASK3 zram_bvec_write() spin_lock find stream spin_unlock compress <<preempted>> zram_bvec_write() spin_lock find stream spin_unlock no_stream schedule zram_bvec_write() spin_lock find_stream spin_unlock no_stream schedule spin_lock release stream spin_unlock wake up TASK2 not only TASK2 and TASK3 will not get the stream, TASK1 will be preempted in the middle of its operation; while we would prefer it to finish compression and release the stream. Test environment: x86_64, 4 CPU box, 3G zram, lzo The following fio tests were executed: read, randread, write, randwrite, rw, randrw with the increasing number of jobs from 1 to 10. 4 streams 8 streams per-cpu =========================================================== jobs1 READ: 2520.1MB/s 2566.5MB/s 2491.5MB/s READ: 2102.7MB/s 2104.2MB/s 2091.3MB/s WRITE: 1355.1MB/s 1320.2MB/s 1378.9MB/s WRITE: 1103.5MB/s 1097.2MB/s 1122.5MB/s READ: 434013KB/s 435153KB/s 439961KB/s WRITE: 433969KB/s 435109KB/s 439917KB/s READ: 403166KB/s 405139KB/s 403373KB/s WRITE: 403223KB/s 405197KB/s 403430KB/s jobs2 READ: 7958.6MB/s 8105.6MB/s 8073.7MB/s READ: 6864.9MB/s 6989.8MB/s 7021.8MB/s WRITE: 2438.1MB/s 2346.9MB/s 3400.2MB/s WRITE: 1994.2MB/s 1990.3MB/s 2941.2MB/s READ: 981504KB/s 973906KB/s 1018.8MB/s WRITE: 981659KB/s 974060KB/s 1018.1MB/s READ: 937021KB/s 938976KB/s 987250KB/s WRITE: 934878KB/s 936830KB/s 984993KB/s jobs3 READ: 13280MB/s 13553MB/s 13553MB/s READ: 11534MB/s 11785MB/s 11755MB/s WRITE: 3456.9MB/s 3469.9MB/s 4810.3MB/s WRITE: 3029.6MB/s 3031.6MB/s 4264.8MB/s READ: 1363.8MB/s 1362.6MB/s 1448.9MB/s WRITE: 1361.9MB/s 1360.7MB/s 1446.9MB/s READ: 1309.4MB/s 1310.6MB/s 1397.5MB/s WRITE: 1307.4MB/s 1308.5MB/s 1395.3MB/s jobs4 READ: 20244MB/s 20177MB/s 20344MB/s READ: 17886MB/s 17913MB/s 17835MB/s WRITE: 4071.6MB/s 4046.1MB/s 6370.2MB/s WRITE: 3608.9MB/s 3576.3MB/s 5785.4MB/s READ: 1824.3MB/s 1821.6MB/s 1997.5MB/s WRITE: 1819.8MB/s 1817.4MB/s 1992.5MB/s READ: 1765.7MB/s 1768.3MB/s 1937.3MB/s WRITE: 1767.5MB/s 1769.1MB/s 1939.2MB/s jobs5 READ: 18663MB/s 18986MB/s 18823MB/s READ: 16659MB/s 16605MB/s 16954MB/s WRITE: 3912.4MB/s 3888.7MB/s 6126.9MB/s WRITE: 3506.4MB/s 3442.5MB/s 5519.3MB/s READ: 1798.2MB/s 1746.5MB/s 1935.8MB/s WRITE: 1792.7MB/s 1740.7MB/s 1929.1MB/s READ: 1727.6MB/s 1658.2MB/s 1917.3MB/s WRITE: 1726.5MB/s 1657.2MB/s 1916.6MB/s jobs6 READ: 21017MB/s 20922MB/s 21162MB/s READ: 19022MB/s 19140MB/s 18770MB/s WRITE: 3968.2MB/s 4037.7MB/s 6620.8MB/s WRITE: 3643.5MB/s 3590.2MB/s 6027.5MB/s READ: 1871.8MB/s 1880.5MB/s 2049.9MB/s WRITE: 1867.8MB/s 1877.2MB/s 2046.2MB/s READ: 1755.8MB/s 1710.3MB/s 1964.7MB/s WRITE: 1750.5MB/s 1705.9MB/s 1958.8MB/s jobs7 READ: 21103MB/s 20677MB/s 21482MB/s READ: 18522MB/s 18379MB/s 19443MB/s WRITE: 4022.5MB/s 4067.4MB/s 6755.9MB/s WRITE: 3691.7MB/s 3695.5MB/s 5925.6MB/s READ: 1841.5MB/s 1933.9MB/s 2090.5MB/s WRITE: 1842.7MB/s 1935.3MB/s 2091.9MB/s READ: 1832.4MB/s 1856.4MB/s 1971.5MB/s WRITE: 1822.3MB/s 1846.2MB/s 1960.6MB/s jobs8 READ: 20463MB/s 20194MB/s 20862MB/s READ: 18178MB/s 17978MB/s 18299MB/s WRITE: 4085.9MB/s 4060.2MB/s 7023.8MB/s WRITE: 3776.3MB/s 3737.9MB/s 6278.2MB/s READ: 1957.6MB/s 1944.4MB/s 2109.5MB/s WRITE: 1959.2MB/s 1946.2MB/s 2111.4MB/s READ: 1900.6MB/s 1885.7MB/s 2082.1MB/s WRITE: 1896.2MB/s 1881.4MB/s 2078.3MB/s jobs9 READ: 19692MB/s 19734MB/s 19334MB/s READ: 17678MB/s 18249MB/s 17666MB/s WRITE: 4004.7MB/s 4064.8MB/s 6990.7MB/s WRITE: 3724.7MB/s 3772.1MB/s 6193.6MB/s READ: 1953.7MB/s 1967.3MB/s 2105.6MB/s WRITE: 1953.4MB/s 1966.7MB/s 2104.1MB/s READ: 1860.4MB/s 1897.4MB/s 2068.5MB/s WRITE: 1858.9MB/s 1895.9MB/s 2066.8MB/s jobs10 READ: 19730MB/s 19579MB/s 19492MB/s READ: 18028MB/s 18018MB/s 18221MB/s WRITE: 4027.3MB/s 4090.6MB/s 7020.1MB/s WRITE: 3810.5MB/s 3846.8MB/s 6426.8MB/s READ: 1956.1MB/s 1994.6MB/s 2145.2MB/s WRITE: 1955.9MB/s 1993.5MB/s 2144.8MB/s READ: 1852.8MB/s 1911.6MB/s 2075.8MB/s WRITE: 1855.7MB/s 1914.6MB/s 2078.1MB/s perf stat 4 streams 8 streams per-cpu ==================================================================================================================== jobs1 stalled-cycles-frontend 23,174,811,209 ( 38.21%) 23,220,254,188 ( 38.25%) 23,061,406,918 ( 38.34%) stalled-cycles-backend 11,514,174,638 ( 18.98%) 11,696,722,657 ( 19.27%) 11,370,852,810 ( 18.90%) instructions 73,925,005,782 ( 1.22) 73,903,177,632 ( 1.22) 73,507,201,037 ( 1.22) branches 14,455,124,835 ( 756.063) 14,455,184,779 ( 755.281) 14,378,599,509 ( 758.546) branch-misses 69,801,336 ( 0.48%) 80,225,529 ( 0.55%) 72,044,726 ( 0.50%) jobs2 stalled-cycles-frontend 49,912,741,782 ( 46.11%) 50,101,189,290 ( 45.95%) 32,874,195,633 ( 35.11%) stalled-cycles-backend 27,080,366,230 ( 25.02%) 27,949,970,232 ( 25.63%) 16,461,222,706 ( 17.58%) instructions 122,831,629,690 ( 1.13) 122,919,846,419 ( 1.13) 121,924,786,775 ( 1.30) branches 23,725,889,239 ( 692.663) 23,733,547,140 ( 688.062) 23,553,950,311 ( 794.794) branch-misses 90,733,041 ( 0.38%) 96,320,895 ( 0.41%) 84,561,092 ( 0.36%) jobs3 stalled-cycles-frontend 66,437,834,608 ( 45.58%) 63,534,923,344 ( 43.69%) 42,101,478,505 ( 33.19%) stalled-cycles-backend 34,940,799,661 ( 23.97%) 34,774,043,148 ( 23.91%) 21,163,324,388 ( 16.68%) instructions 171,692,121,862 ( 1.18) 171,775,373,044 ( 1.18) 170,353,542,261 ( 1.34) branches 32,968,962,622 ( 628.723) 32,987,739,894 ( 630.512) 32,729,463,918 ( 717.027) branch-misses 111,522,732 ( 0.34%) 110,472,894 ( 0.33%) 99,791,291 ( 0.30%) jobs4 stalled-cycles-frontend 98,741,701,675 ( 49.72%) 94,797,349,965 ( 47.59%) 54,535,655,381 ( 33.53%) stalled-cycles-backend 54,642,609,615 ( 27.51%) 55,233,554,408 ( 27.73%) 27,882,323,541 ( 17.14%) instructions 220,884,807,851 ( 1.11) 220,930,887,273 ( 1.11) 218,926,845,851 ( 1.35) branches 42,354,518,180 ( 592.105) 42,362,770,587 ( 590.452) 41,955,552,870 ( 716.154) branch-misses 138,093,449 ( 0.33%) 131,295,286 ( 0.31%) 121,794,771 ( 0.29%) jobs5 stalled-cycles-frontend 116,219,747,212 ( 48.14%) 110,310,397,012 ( 46.29%) 66,373,082,723 ( 33.70%) stalled-cycles-backend 66,325,434,776 ( 27.48%) 64,157,087,914 ( 26.92%) 32,999,097,299 ( 16.76%) instructions 270,615,008,466 ( 1.12) 270,546,409,525 ( 1.14) 268,439,910,948 ( 1.36) branches 51,834,046,557 ( 599.108) 51,811,867,722 ( 608.883) 51,412,576,077 ( 729.213) branch-misses 158,197,086 ( 0.31%) 142,639,805 ( 0.28%) 133,425,455 ( 0.26%) jobs6 stalled-cycles-frontend 138,009,414,492 ( 48.23%) 139,063,571,254 ( 48.80%) 75,278,568,278 ( 32.80%) stalled-cycles-backend 79,211,949,650 ( 27.68%) 79,077,241,028 ( 27.75%) 37,735,797,899 ( 16.44%) instructions 319,763,993,731 ( 1.12) 319,937,782,834 ( 1.12) 316,663,600,784 ( 1.38) branches 61,219,433,294 ( 595.056) 61,250,355,540 ( 598.215) 60,523,446,617 ( 733.706) branch-misses 169,257,123 ( 0.28%) 154,898,028 ( 0.25%) 141,180,587 ( 0.23%) jobs7 stalled-cycles-frontend 162,974,812,119 ( 49.20%) 159,290,061,987 ( 48.43%) 88,046,641,169 ( 33.21%) stalled-cycles-backend 92,223,151,661 ( 27.84%) 91,667,904,406 ( 27.87%) 44,068,454,971 ( 16.62%) instructions 369,516,432,430 ( 1.12) 369,361,799,063 ( 1.12) 365,290,380,661 ( 1.38) branches 70,795,673,950 ( 594.220) 70,743,136,124 ( 597.876) 69,803,996,038 ( 732.822) branch-misses 181,708,327 ( 0.26%) 165,767,821 ( 0.23%) 150,109,797 ( 0.22%) jobs8 stalled-cycles-frontend 185,000,017,027 ( 49.30%) 182,334,345,473 ( 48.37%) 99,980,147,041 ( 33.26%) stalled-cycles-backend 105,753,516,186 ( 28.18%) 107,937,830,322 ( 28.63%) 51,404,177,181 ( 17.10%) instructions 418,153,161,055 ( 1.11) 418,308,565,828 ( 1.11) 413,653,475,581 ( 1.38) branches 80,035,882,398 ( 592.296) 80,063,204,510 ( 589.843) 79,024,105,589 ( 730.530) branch-misses 199,764,528 ( 0.25%) 177,936,926 ( 0.22%) 160,525,449 ( 0.20%) jobs9 stalled-cycles-frontend 210,941,799,094 ( 49.63%) 204,714,679,254 ( 48.55%) 114,251,113,756 ( 33.96%) stalled-cycles-backend 122,640,849,067 ( 28.85%) 122,188,553,256 ( 28.98%) 58,360,041,127 ( 17.35%) instructions 468,151,025,415 ( 1.10) 467,354,869,323 ( 1.11) 462,665,165,216 ( 1.38) branches 89,657,067,510 ( 585.628) 89,411,550,407 ( 588.990) 88,360,523,943 ( 730.151) branch-misses 218,292,301 ( 0.24%) 191,701,247 ( 0.21%) 178,535,678 ( 0.20%) jobs10 stalled-cycles-frontend 233,595,958,008 ( 49.81%) 227,540,615,689 ( 49.11%) 160,341,979,938 ( 43.07%) stalled-cycles-backend 136,153,676,021 ( 29.03%) 133,635,240,742 ( 28.84%) 65,909,135,465 ( 17.70%) instructions 517,001,168,497 ( 1.10) 516,210,976,158 ( 1.11) 511,374,038,613 ( 1.37) branches 98,911,641,329 ( 585.796) 98,700,069,712 ( 591.583) 97,646,761,028 ( 728.712) branch-misses 232,341,823 ( 0.23%) 199,256,308 ( 0.20%) 183,135,268 ( 0.19%) per-cpu streams tend to cause significantly less stalled cycles; execute less branches and hit less branch-misses. perf stat reported execution time 4 streams 8 streams per-cpu ==================================================================== jobs1 seconds elapsed 20.909073870 20.875670495 20.817838540 jobs2 seconds elapsed 18.529488399 18.720566469 16.356103108 jobs3 seconds elapsed 18.991159531 18.991340812 16.766216066 jobs4 seconds elapsed 19.560643828 19.551323547 16.246621715 jobs5 seconds elapsed 24.746498464 25.221646740 20.696112444 jobs6 seconds elapsed 28.258181828 28.289765505 22.885688857 jobs7 seconds elapsed 32.632490241 31.909125381 26.272753738 jobs8 seconds elapsed 35.651403851 36.027596308 29.108024711 jobs9 seconds elapsed 40.569362365 40.024227989 32.898204012 jobs10 seconds elapsed 44.673112304 43.874898137 35.632952191 Please see Link: http://marc.info/?l=linux-kernel&m=146166970727530 Link: http://marc.info/?l=linux-kernel&m=146174716719650 for more test results (under low memory conditions). Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Suggested-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/block/zram/zcomp.c | 297 ++++++++++++------------------------------ drivers/block/zram/zcomp.h | 14 +- drivers/block/zram/zram_drv.c | 36 ++++- 3 files changed, 116 insertions(+), 231 deletions(-) commit d0d8da2dc49dfdfe1d788eaf4d55eb5d4964d926 Author: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Date: Fri May 20 16:59:48 2016 -0700 zsmalloc: require GFP in zs_malloc() Pass GFP flags to zs_malloc() instead of using a fixed mask supplied to zs_create_pool(), so we can be more flexible, but, more importantly, we need this to switch zram to per-cpu compression streams -- zram will try to allocate handle with preemption disabled in a fast path and switch to a slow path (using different gfp mask) if the fast one has failed. Apart from that, this also align zs_malloc() interface with zspool/zbud. [sergey.senozhatsky@gmail.com: pass GFP flags to zs_malloc() instead of using a fixed mask] Link: http://lkml.kernel.org/r/20160429150942.GA637@swordfish Link: http://lkml.kernel.org/r/20160429150942.GA637@swordfish Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Acked-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/block/zram/zram_drv.c | 4 ++-- include/linux/zsmalloc.h | 4 ++-- mm/zsmalloc.c | 24 +++++++++++++----------- 3 files changed, 17 insertions(+), 15 deletions(-) commit 1ee4716585ed80b7917ba3c5aa38e5e0d677d583 Author: Minchan Kim <minchan@kernel.org> Date: Fri May 20 16:59:45 2016 -0700 zsmalloc: remove unused pool param in obj_free Let's remove unused pool param in obj_free Signed-off-by: Minchan Kim <minchan@kernel.org> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/zsmalloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 251cbb951b831acd8451d75b40696834f07c29c5 Author: Minchan Kim <minchan@kernel.org> Date: Fri May 20 16:59:42 2016 -0700 zsmalloc: reorder function parameters Clean up function parameter ordering to order higher data structure first. Signed-off-by: Minchan Kim <minchan@kernel.org> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/zsmalloc.c | 50 ++++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 24 deletions(-) commit 830e4bc5baa9fda5d45257e9a3dbb3555c6c180e Author: Minchan Kim <minchan@kernel.org> Date: Fri May 20 16:59:39 2016 -0700 zsmalloc: clean up many BUG_ON There are many BUG_ON in zsmalloc.c which is not recommened so change them as alternatives. Normal rule is as follows: 1. avoid BUG_ON if possible. Instead, use VM_BUG_ON or VM_BUG_ON_PAGE 2. use VM_BUG_ON_PAGE if we need to see struct page's fields 3. use those assertion in primitive functions so higher functions can rely on the assertion in the primitive function. 4. Don't use assertion if following instruction can trigger Oops Signed-off-by: Minchan Kim <minchan@kernel.org> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/zsmalloc.c | 42 +++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 27 deletions(-) commit a42094676f076534bf4998625456fe0bb99c1f1e Author: Minchan Kim <minchan@kernel.org> Date: Fri May 20 16:59:36 2016 -0700 zsmalloc: use first_page rather than page Clean up function parameter "struct page". Many functions of zsmalloc expect that page paramter is "first_page" so use "first_page" rather than "page" for code readability. Signed-off-by: Minchan Kim <minchan@kernel.org> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/zsmalloc.c | 62 ++++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) commit eae08dcab80c695c16c9f1f7dcd5b8ed52bfc88b Author: Andrey Ryabinin <aryabinin@virtuozzo.com> Date: Fri May 20 16:59:34 2016 -0700 kasan/tests: add tests for user memory access functions Add some tests for the newly-added user memory access API. Link: http://lkml.kernel.org/r/1462538722-1574-1-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/test_kasan.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) commit 1771c6e1a567ea0ba2cccc0a4ffe68a1419fd8ef Author: Andrey Ryabinin <aryabinin@virtuozzo.com> Date: Fri May 20 16:59:31 2016 -0700 x86/kasan: instrument user memory access API Exchange between user and kernel memory is coded in assembly language. Which means that such accesses won't be spotted by KASAN as a compiler instruments only C code. Add explicit KASAN checks to user memory access API to ensure that userspace writes to (or reads from) a valid kernel memory. Note: Unlike others strncpy_from_user() is written mostly in C and KASAN sees memory accesses in it. However, it makes sense to add explicit check for all @count bytes that *potentially* could be written to the kernel. [aryabinin@virtuozzo.com: move kasan check under the condition] Link: http://lkml.kernel.org/r/1462869209-21096-1-git-send-email-aryabinin@virtuozzo.com Link: http://lkml.kernel.org/r/1462538722-1574-4-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/x86/include/asm/uaccess.h | 5 +++++ arch/x86/include/asm/uaccess_64.h | 7 +++++++ lib/strncpy_from_user.c | 2 ++ 3 files changed, 14 insertions(+) commit 64f8ebaf115bcddc4aaa902f981c57ba6506bc42 Author: Andrey Ryabinin <aryabinin@virtuozzo.com> Date: Fri May 20 16:59:28 2016 -0700 mm/kasan: add API to check memory regions Memory access coded in an assembly won't be seen by KASAN as a compiler can instrument only C code. Add kasan_check_[read,write]() API which is going to be used to check a certain memory range. Link: http://lkml.kernel.org/r/1462538722-1574-3-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Acked-by: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> MAINTAINERS | 2 +- include/linux/kasan-checks.h | 12 ++++++++++++ mm/kasan/kasan.c | 12 ++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) commit 936bb4bbbb832f81055328b84e5afe1fc7246a8d Author: Andrey Ryabinin <aryabinin@virtuozzo.com> Date: Fri May 20 16:59:20 2016 -0700 mm/kasan: print name of mem[set,cpy,move]() caller in report When bogus memory access happens in mem[set,cpy,move]() it's usually caller's fault. So don't blame mem[set,cpy,move]() in bug report, blame the caller instead. Before: BUG: KASAN: out-of-bounds access in memset+0x23/0x40 at <address> After: BUG: KASAN: out-of-bounds access in <memset_caller> at <address> Link: http://lkml.kernel.org/r/1462538722-1574-2-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Acked-by: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/kasan/kasan.c | 64 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 34 insertions(+), 30 deletions(-) commit 96fe805fb6fe9b2ed12fc54ad0e3e6829a4152cb Author: Alexander Potapenko <glider@google.com> Date: Fri May 20 16:59:17 2016 -0700 mm, kasan: add a ksize() test Add a test that makes sure ksize() unpoisons the whole chunk. Signed-off-by: Alexander Potapenko <glider@google.com> Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Andrey Konovalov <adech.fo@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Christoph Lameter <cl@linux.com> Cc: Konstantin Serebryany <kcc@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/test_kasan.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 4ebb31a42ffa03912447fe1aabbdb28242f909ba Author: Alexander Potapenko <glider@google.com> Date: Fri May 20 16:59:14 2016 -0700 mm, kasan: don't call kasan_krealloc() from ksize(). Instead of calling kasan_krealloc(), which replaces the memory allocation stack ID (if stack depot is used), just unpoison the whole memory chunk. Signed-off-by: Alexander Potapenko <glider@google.com> Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Cc: Andrey Konovalov <adech.fo@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Christoph Lameter <cl@linux.com> Cc: Konstantin Serebryany <kcc@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 2 +- mm/slub.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit 55834c59098d0c5a97b0f3247e55832b67facdcf Author: Alexander Potapenko <glider@google.com> Date: Fri May 20 16:59:11 2016 -0700 mm: kasan: initial memory quarantine implementation Quarantine isolates freed objects in a separate queue. The objects are returned to the allocator later, which helps to detect use-after-free errors. When the object is freed, its state changes from KASAN_STATE_ALLOC to KASAN_STATE_QUARANTINE. The object is poisoned and put into quarantine instead of being returned to the allocator, therefore every subsequent access to that object triggers a KASAN error, and the error handler is able to say where the object has been allocated and deallocated. When it's time for the object to leave quarantine, its state becomes KASAN_STATE_FREE and it's returned to the allocator. From now on the allocator may reuse it for another allocation. Before that happens, it's still possible to detect a use-after free on that object (it retains the allocation/deallocation stacks). When the allocator reuses this object, the shadow is unpoisoned and old allocation/deallocation stacks are wiped. Therefore a use of this object, even an incorrect one, won't trigger ASan warning. Without the quarantine, it's not guaranteed that the objects aren't reused immediately, that's why the probability of catching a use-after-free is lower than with quarantine in place. Quarantine isolates freed objects in a separate queue. The objects are returned to the allocator later, which helps to detect use-after-free errors. Freed objects are first added to per-cpu quarantine queues. When a cache is destroyed or memory shrinking is requested, the objects are moved into the global quarantine queue. Whenever a kmalloc call allows memory reclaiming, the oldest objects are popped out of the global queue until the total size of objects in quarantine is less than 3/4 of the maximum quarantine size (which is a fraction of installed physical memory). As long as an object remains in the quarantine, KASAN is able to report accesses to it, so the chance of reporting a use-after-free is increased. Once the object leaves quarantine, the allocator may reuse it, in which case the object is unpoisoned and KASAN can't detect incorrect accesses to it. Right now quarantine support is only enabled in SLAB allocator. Unification of KASAN features in SLAB and SLUB will be done later. This patch is based on the "mm: kasan: quarantine" patch originally prepared by Dmitry Chernenkov. A number of improvements have been suggested by Andrey Ryabinin. [glider@google.com: v9] Link: http://lkml.kernel.org/r/1462987130-144092-1-git-send-email-glider@google.com Signed-off-by: Alexander Potapenko <glider@google.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Andrey Konovalov <adech.fo@gmail.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Konstantin Serebryany <kcc@google.com> Cc: Dmitry Chernenkov <dmitryc@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/kasan.h | 13 ++- mm/kasan/Makefile | 1 + mm/kasan/kasan.c | 57 ++++++++-- mm/kasan/kasan.h | 21 +++- mm/kasan/quarantine.c | 291 ++++++++++++++++++++++++++++++++++++++++++++++++++ mm/kasan/report.c | 1 + mm/mempool.c | 2 +- mm/slab.c | 12 ++- mm/slab.h | 2 + mm/slab_common.c | 2 + 10 files changed, 387 insertions(+), 15 deletions(-) commit b8f1a75d61d8405a753380c6fb17ba84a5603cd4 Author: Yang Shi <yang.shi@linaro.org> Date: Fri May 20 16:59:08 2016 -0700 mm: call page_ext_init() after all struct pages are initialized When DEFERRED_STRUCT_PAGE_INIT is enabled, just a subset of memmap at boot are initialized, then the rest are initialized in parallel by starting one-off "pgdatinitX" kernel thread for each node X. If page_ext_init is called before it, some pages will not have valid extension, this may lead the below kernel oops when booting up kernel: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff8118d982>] free_pcppages_bulk+0x2d2/0x8d0 PGD 0 Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC Modules linked in: CPU: 11 PID: 106 Comm: pgdatinit1 Not tainted 4.6.0-rc5-next-20160427 #26 Hardware name: Intel Corporation S5520HC/S5520HC, BIOS S5500.86B.01.10.0025.030220091519 03/02/2009 task: ffff88017c080040 ti: ffff88017c084000 task.ti: ffff88017c084000 RIP: 0010:[<ffffffff8118d982>] [<ffffffff8118d982>] free_pcppages_bulk+0x2d2/0x8d0 RSP: 0000:ffff88017c087c48 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 0000000000000980 RSI: 0000000000000080 RDI: 0000000000660401 RBP: ffff88017c087cd0 R08: 0000000000000401 R09: 0000000000000009 R10: ffff88017c080040 R11: 000000000000000a R12: 0000000000000400 R13: ffffea0019810000 R14: ffffea0019810040 R15: ffff88066cfe6080 FS: 0000000000000000(0000) GS:ffff88066cd40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000002406000 CR4: 00000000000006e0 Call Trace: free_hot_cold_page+0x192/0x1d0 __free_pages+0x5c/0x90 __free_pages_boot_core+0x11a/0x14e deferred_free_range+0x50/0x62 deferred_init_memmap+0x220/0x3c3 kthread+0xf8/0x110 ret_from_fork+0x22/0x40 Code: 49 89 d4 48 c1 e0 06 49 01 c5 e9 de fe ff ff 4c 89 f7 44 89 4d b8 4c 89 45 c0 44 89 5d c8 48 89 4d d0 e8 62 c7 07 00 48 8b 4d d0 <48> 8b 00 44 8b 5d c8 4c 8b 45 c0 44 8b 4d b8 a8 02 0f 84 05 ff RIP [<ffffffff8118d982>] free_pcppages_bulk+0x2d2/0x8d0 RSP <ffff88017c087c48> CR2: 0000000000000000 Move page_ext_init() after page_alloc_init_late() to make sure page extension is setup for all pages. Link: http://lkml.kernel.org/r/1463696006-31360-1-git-send-email-yang.shi@linaro.org Signed-off-by: Yang Shi <yang.shi@linaro.org> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> init/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit dfef2ef4027b1304149a65dc33794eab65e8a3bf Author: David Rientjes <rientjes@google.com> Date: Fri May 20 16:59:05 2016 -0700 mm, migrate: increment fail count on ENOMEM If page migration fails due to -ENOMEM, nr_failed should still be incremented for proper statistics. This was encountered recently when all page migration vmstats showed 0, and inferred that migrate_pages() was never called, although in reality the first page migration failed because compaction_alloc() failed to find a migration target. This patch increments nr_failed so the vmstat is properly accounted on ENOMEM. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1605191510230.32658@chino.kir.corp.google.com Signed-off-by: David Rientjes <rientjes@google.com> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/migrate.c | 1 + 1 file changed, 1 insertion(+) commit 6cd9dc3e75078ef646076fa63adfb9b85ced0b66 Author: Chen Feng <puck.chen@hisilicon.com> Date: Fri May 20 16:59:02 2016 -0700 mm/compaction.c: fix zoneindex in kcompactd() While testing the kcompactd in my platform 3G MEM only DMA ZONE. I found the kcompactd never wakeup. It seems the zoneindex has already minus 1 before. So the traverse here should be <=. It fixes a regression where kswapd could previously compact, but kcompactd not. Not a crash fix though. [akpm@linux-foundation.org: fix kcompactd_do_work() as well, per Hugh] Link: http://lkml.kernel.org/r/1463659121-84124-1-git-send-email-puck.chen@hisilicon.com Fixes: accf62422b3a ("mm, kswapd: replace kswapd compaction with waking up kcompactd") Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Hugh Dickins <hughd@google.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Tejun Heo <tj@kernel.org> Cc: Zhuangluan Su <suzhuangluan@hisilicon.com> Cc: Yiping Xu <xuyiping@hisilicon.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/compaction.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0bb2fd13b69abfd88880f356903b5c7ca36d5eea Author: Yang Shi <yang.shi@linaro.org> Date: Fri May 20 16:58:59 2016 -0700 mm: page_is_guard(): return false when page_ext arrays are not allocated yet When enabling the below kernel configs: CONFIG_DEFERRED_STRUCT_PAGE_INIT CONFIG_DEBUG_PAGEALLOC CONFIG_PAGE_EXTENSION CONFIG_DEBUG_VM kernel bootup may fail due to the following oops: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffff8118d982>] free_pcppages_bulk+0x2d2/0x8d0 PGD 0 Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC Modules linked in: CPU: 11 PID: 106 Comm: pgdatinit1 Not tainted 4.6.0-rc5-next-20160427 #26 Hardware name: Intel Corporation S5520HC/S5520HC, BIOS S5500.86B.01.10.0025.030220091519 03/02/2009 task: ffff88017c080040 ti: ffff88017c084000 task.ti: ffff88017c084000 RIP: 0010:[<ffffffff8118d982>] [<ffffffff8118d982>] free_pcppages_bulk+0x2d2/0x8d0 RSP: 0000:ffff88017c087c48 EFLAGS: 00010046 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000001 RDX: 0000000000000980 RSI: 0000000000000080 RDI: 0000000000660401 RBP: ffff88017c087cd0 R08: 0000000000000401 R09: 0000000000000009 R10: ffff88017c080040 R11: 000000000000000a R12: 0000000000000400 R13: ffffea0019810000 R14: ffffea0019810040 R15: ffff88066cfe6080 FS: 0000000000000000(0000) GS:ffff88066cd40000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000000 CR3: 0000000002406000 CR4: 00000000000006e0 Call Trace: free_hot_cold_page+0x192/0x1d0 __free_pages+0x5c/0x90 __free_pages_boot_core+0x11a/0x14e deferred_free_range+0x50/0x62 deferred_init_memmap+0x220/0x3c3 kthread+0xf8/0x110 ret_from_fork+0x22/0x40 Code: 49 89 d4 48 c1 e0 06 49 01 c5 e9 de fe ff ff 4c 89 f7 44 89 4d b8 4c 89 45 c0 44 89 5d c8 48 89 4d d0 e8 62 c7 07 00 48 8b 4d d0 <48> 8b 00 44 8b 5d c8 4c 8b 45 c0 44 8b 4d b8 a8 02 0f 84 05 ff RIP [<ffffffff8118d982>] free_pcppages_bulk+0x2d2/0x8d0 RSP <ffff88017c087c48> CR2: 0000000000000000 The problem is lookup_page_ext() returns NULL then page_is_guard() tried to access it in page freeing. page_is_guard() depends on PAGE_EXT_DEBUG_GUARD bit of page extension flag, but freeing page might reach here before the page_ext arrays are allocated when feeding a range of pages to the allocator for the first time during bootup or memory hotplug. When it returns NULL, page_is_guard() should just return false instead of checking PAGE_EXT_DEBUG_GUARD unconditionally. Link: http://lkml.kernel.org/r/1463610225-29060-1-git-send-email-yang.shi@linaro.org Signed-off-by: Yang Shi <yang.shi@linaro.org> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm.h | 3 +++ 1 file changed, 3 insertions(+) commit f0508977787b3bcfd54e82111ab50d6245b9f4df Author: David Rientjes <rientjes@google.com> Date: Fri May 20 16:58:56 2016 -0700 mm, thp: khugepaged should scan when sleep value is written If a large value is written to scan_sleep_millisecs, for example, that period must lapse before khugepaged will wake up for periodic collapsing. If this value is tuned to 1 day, for example, and then re-tuned to its default 10s, khugepaged will still wait for a day before scanning again. This patch causes khugepaged to wakeup immediately when the value is changed and then sleep until that value is rewritten or the new value lapses. Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1605181453200.4786@chino.kir.corp.google.com Signed-off-by: David Rientjes <rientjes@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/huge_memory.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit a53eaff8c1192bb5bdfda5deb484bc8f415c5dfd Author: NeilBrown <neilb@suse.com> Date: Fri May 20 16:58:53 2016 -0700 MM: increase safety margin provided by PF_LESS_THROTTLE When nfsd is exporting a filesystem over NFS which is then NFS-mounted on the local machine there is a risk of deadlock. This happens when there are lots of dirty pages in the NFS filesystem and they cause NFSD to be throttled, either in throttle_vm_writeout() or in balance_dirty_pages(). To avoid this problem the PF_LESS_THROTTLE flag is set for NFSD threads and it provides a 25% increase to the limits that affect NFSD. Any process writing to an NFS filesystem will be throttled well before the number of dirty NFS pages reaches the limit imposed on NFSD, so NFSD will not deadlock on pages that it needs to write out. At least it shouldn't. All processes are allowed a small excess margin to avoid performing too many calculations: ratelimit_pages. ratelimit_pages is set so that if a thread on every CPU uses the entire margin, the total will only go 3% over the limit, and this is much less than the 25% bonus that PF_LESS_THROTTLE provides, so this margin shouldn't be a problem. But it is. The "total memory" that these 3% and 25% are calculated against are not really total memory but are "global_dirtyable_memory()" which doesn't include anonymous memory, just free memory and page-cache memory. The "ratelimit_pages" number is based on whatever the global_dirtyable_memory was on the last CPU hot-plug, which might not be what you expect, but is probably close to the total freeable memory. The throttle threshold uses the global_dirtable_memory at the moment when the throttling happens, which could be much less than at the last CPU hotplug. So if lots of anonymous memory has been allocated, thus pushing out lots of page-cache pages, then NFSD might end up being throttled due to dirty NFS pages because the "25%" bonus it gets is calculated against a rather small amount of dirtyable memory, while the "3%" margin that other processes are allowed to dirty without penalty is calculated against a much larger number. To remove this possibility of deadlock we need to make sure that the margin granted to PF_LESS_THROTTLE exceeds that rate-limit margin. Simply adding ratelimit_pages isn't enough as that should be multiplied by the number of cpus. So add "global_wb_domain.dirty_limit / 32" as that more accurately reflects the current total over-shoot margin. This ensures that the number of dirty NFS pages never gets so high that nfsd will be throttled waiting for them to be written. Link: http://lkml.kernel.org/r/87futgowwv.fsf@notabene.neil.brown.name Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page-writeback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e570f56cccd215db68e50870ee74b7d9c0022109 Author: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Date: Fri May 20 16:58:50 2016 -0700 mm: check_new_page_bad() directly returns in __PG_HWPOISON case Currently we check page->flags twice for "HWPoisoned" case of check_new_page_bad(), which can cause a race with unpoisoning. This race unnecessarily taints kernel with "BUG: Bad page state". check_new_page_bad() is the only caller of bad_page() which is interested in __PG_HWPOISON, so let's move the hwpoison related code in bad_page() to it. Link: http://lkml.kernel.org/r/20160518100949.GA17299@hori1.linux.bs1.fc.nec.co.jp Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Mel Gorman <mgorman@techsingularity.net> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 29b52de182acf50f85a8284ad39104d84c9bbf57 Author: seokhoon.yoon <iamyooon@gmail.com> Date: Fri May 20 16:58:47 2016 -0700 mm, kasan: fix to call kasan_free_pages() after poisoning page When CONFIG_PAGE_POISONING and CONFIG_KASAN is enabled, free_pages_prepare()'s codeflow is below. 1)kmemcheck_free_shadow() 2)kasan_free_pages() - set shadow byte of page is freed 3)kernel_poison_pages() 3.1) check access to page is valid or not using kasan ---> error occur, kasan think it is invalid access 3.2) poison page 4)kernel_map_pages() So kasan_free_pages() should be called after poisoning the page. Link: http://lkml.kernel.org/r/1463220405-7455-1-git-send-email-iamyooon@gmail.com Signed-off-by: seokhoon.yoon <iamyooon@gmail.com> Cc: Andrey Ryabinin <a.ryabinin@samsung.com> Cc: Laura Abbott <labbott@fedoraproject.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d0834a6c2c5b0c76cfb806bd7dba6556d8b4edbb Author: Minchan Kim <minchan@kernel.org> Date: Fri May 20 16:58:44 2016 -0700 mm: disable fault around on emulated access bit architecture fault_around aims to reduce minor faults of file-backed pages via speculative ahead pte mapping and relying on readahead logic. However, on non-HW access bit architecture the benefit is highly limited because they should emulate the young bit with minor faults for reclaim's page aging algorithm. IOW, we cannot reduce minor faults on those architectures. I did quick a test on my ARM machine. 512M file mmap sequential every word read on eSATA drive 4 times. stddev is stable. = fault_around 4096 = elapsed time(usec): 6747645 = fault_around 65536 = elapsed time(usec): 6709263 0.5% gain. Even when I tested it with eMMC there is no gain because I guess with slow storage the major fault is the dominant factor. Also, fault_around has the side effect of shrinking slab more aggressively and causes higher vmpressure, so if such speculation fails, it can evict slab more which can result in page I/O (e.g., inode cache). In the end, it would make void any benefit of fault_around. So let's make the default "disabled" on those architectures. Link: http://lkml.kernel.org/r/20160518014229.GB21538@bbox Signed-off-by: Minchan Kim <minchan@kernel.org> Cc: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memory.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 5c0a85fad949212b3e059692deecdeed74ae7ec7 Author: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Date: Fri May 20 16:58:41 2016 -0700 mm: make faultaround produce old ptes Currently, faultaround code produces young pte. This can screw up vmscan behaviour[1], as it makes vmscan think that these pages are hot and not push them out on first round. During sparse file access faultaround gets more pages mapped and all of them are young. Under memory pressure, this makes vmscan swap out anon pages instead, or to drop other page cache pages which otherwise stay resident. Modify faultaround to produce old ptes, so they can easily be reclaimed under memory pressure. This can to some extend defeat the purpose of faultaround on machines without hardware accessed bit as it will not help us with reducing the number of minor page faults. We may want to disable faultaround on such machines altogether, but that's subject for separate patchset. Minchan: "I tested 512M mmap sequential word read test on non-HW access bit system (i.e., ARM) and confirmed it doesn't increase minor fault any more. old: 4096 fault_around minor fault: 131291 elapsed time: 6747645 usec new: 65536 fault_around minor fault: 131291 elapsed time: 6709263 usec 0.56% benefit" [1] https://lkml.kernel.org/r/1460992636-711-1-git-send-email-vinmenon@codeaurora.org Link: http://lkml.kernel.org/r/1463488366-47723-1-git-send-email-kirill.shutemov@linux.intel.com Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Minchan Kim <minchan@kernel.org> Tested-by: Minchan Kim <minchan@kernel.org> Acked-by: Rik van Riel <riel@redhat.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Michal Hocko <mhocko@kernel.org> Cc: Vinayak Menon <vinmenon@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm.h | 2 +- mm/filemap.c | 2 +- mm/memory.c | 23 ++++++++++++++++++----- 3 files changed, 20 insertions(+), 7 deletions(-) commit 4b50bcc7eda4d3cc9e3f2a0aa60e590fedf728c5 Author: Stefan Bader <stefan.bader@canonical.com> Date: Fri May 20 16:58:38 2016 -0700 mm: use phys_addr_t for reserve_bootmem_region() arguments Since commit 92923ca3aace ("mm: meminit: only set page reserved in the memblock region") the reserved bit is set on reserved memblock regions. However start and end address are passed as unsigned long. This is only 32bit on i386, so it can end up marking the wrong pages reserved for ranges at 4GB and above. This was observed on a 32bit Xen dom0 which was booted with initial memory set to a value below 4G but allowing to balloon in memory (dom0_mem=1024M for example). This would define a reserved bootmem region for the additional memory (for example on a 8GB system there was a reverved region covering the 4GB-8GB range). But since the addresses were passed on as unsigned long, this was actually marking all pages from 0 to 4GB as reserved. Fixes: 92923ca3aacef63 ("mm: meminit: only set page reserved in the memblock region") Link: http://lkml.kernel.org/r/1463491221-10573-1-git-send-email-stefan.bader@canonical.com Signed-off-by: Stefan Bader <stefan.bader@canonical.com> Cc: <stable@vger.kernel.org> [4.2+] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm.h | 2 +- mm/page_alloc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d2005e3f41d4f9299e2df6a967c8beb5086967a9 Author: Oleg Nesterov <oleg@redhat.com> Date: Fri May 20 16:58:36 2016 -0700 userfaultfd: don't pin the user memory in userfaultfd_file_create() userfaultfd_file_create() increments mm->mm_users; this means that the memory won't be unmapped/freed if mm owner exits/execs, and UFFDIO_COPY after that can populate the orphaned mm more. Change userfaultfd_file_create() and userfaultfd_ctx_put() to use mm->mm_count to pin mm_struct. This means that atomic_inc_not_zero(mm->mm_users) is needed when we are going to actually play with this memory. Except handle_userfault() path doesn't need this, the caller must already have a reference. The patch adds the new trivial helper, mmget_not_zero(), it can have more users. Link: http://lkml.kernel.org/r/20160516172254.GA8595@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Michal Hocko <mhocko@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/userfaultfd.c | 41 ++++++++++++++++++++++++++++------------- include/linux/sched.h | 7 ++++++- 2 files changed, 34 insertions(+), 14 deletions(-) commit cd33a76b0f2805fb0d6a05a2d53933f3817ccc9b Author: Richard Leitner <dev@g0hl1n.net> Date: Fri May 20 16:58:33 2016 -0700 mm/memblock.c: remove unnecessary always-true comparison Comparing an u64 variable to >= 0 returns always true and can therefore be removed. This issue was detected using the -Wtype-limits gcc flag. This patch fixes following type-limits warning: mm/memblock.c: In function `__next_reserved_mem_region': mm/memblock.c:843:11: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] if (*idx >= 0 && *idx < type->cnt) { Link: http://lkml.kernel.org/r/20160510103625.3a7f8f32@g0hl1n.net Signed-off-by: Richard Leitner <dev@g0hl1n.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memblock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a001fc19cccdeb9be4c3b89ad089d92df303c44 Author: Vitaly Wool <vitalywool@gmail.com> Date: Fri May 20 16:58:30 2016 -0700 z3fold: the 3-fold allocator for compressed pages This patch introduces z3fold, a special purpose allocator for storing compressed pages. It is designed to store up to three compressed pages per physical page. It is a ZBUD derivative which allows for higher compression ratio keeping the simplicity and determinism of its predecessor. This patch comes as a follow-up to the discussions at the Embedded Linux Conference in San-Diego related to the talk [1]. The outcome of these discussions was that it would be good to have a compressed page allocator as stable and deterministic as zbud with with higher compression ratio. To keep the determinism and simplicity, z3fold, just like zbud, always stores an integral number of compressed pages per page, but it can store up to 3 pages unlike zbud which can store at most 2. Therefore the compression ratio goes to around 2.6x while zbud's one is around 1.7x. The patch is based on the latest linux.git tree. This version has been updated after testing on various simulators (e.g. ARM Versatile Express, MIPS Malta, x86_64/Haswell) and basing on comments from Dan Streetman [3]. [1] https://openiotelc2016.sched.org/event/6DAC/swapping-and-embedded-compression-relieves-the-pressure-vitaly-wool-softprise-consulting-ou [2] https://lkml.org/lkml/2016/4/21/799 [3] https://lkml.org/lkml/2016/5/4/852 Link: http://lkml.kernel.org/r/20160509151753.ec3f9fda3c9898d31ff52a32@gmail.com Signed-off-by: Vitaly Wool <vitalywool@gmail.com> Cc: Seth Jennings <sjenning@redhat.com> Cc: Dan Streetman <ddstreet@ieee.org> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/vm/z3fold.txt | 26 ++ mm/Kconfig | 12 +- mm/Makefile | 1 + mm/z3fold.c | 792 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 830 insertions(+), 1 deletion(-) commit d5ee7c3bcca6fe2b4f7a1fdee253250059c110d2 Author: Andrea Arcangeli <aarcange@redhat.com> Date: Fri May 20 16:58:27 2016 -0700 mm: thp: split_huge_pmd_address() comment improvement Comment is partly wrong, this improves it by including the case of split_huge_pmd_address() called by try_to_unmap_one if TTU_SPLIT_HUGE_PMD is set. Link: http://lkml.kernel.org/r/1462547040-1737-4-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/huge_memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 5f527c2b3ea261bfccb7d12f9feade924cc4987c Author: Andrea Arcangeli <aarcange@redhat.com> Date: Fri May 20 16:58:24 2016 -0700 mm: thp: microoptimize compound_mapcount() compound_mapcount() is only called after PageCompound() has already been checked by the caller, so there's no point to check it again. Gcc may optimize it away too because it's inline but this will remove the runtime check for sure and add it'll add an assert instead. Link: http://lkml.kernel.org/r/1462547040-1737-3-git-send-email-aarcange@redhat.com Signed-off-by: Andrea Arcangeli <aarcange@redhat.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7b8da4c7f0777489f8690115b5fd7704ac0abb8f Author: Christoph Lameter <cl@linux.com> Date: Fri May 20 16:58:21 2016 -0700 vmstat: get rid of the ugly cpu_stat_off variable The cpu_stat_off variable is unecessary since we can check if a workqueue request is pending otherwise. Removal of cpu_stat_off makes it pretty easy for the vmstat shepherd to ensure that the proper things happen. Removing the state also removes all races related to it. Should a workqueue not be scheduled as needed for vmstat_update then the shepherd will notice and schedule it as needed. Should a workqueue be unecessarily scheduled then the vmstat updater will disable it. [akpm@linux-foundation.org: fix indentation, per Michal] Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1605061306460.17934@east.gentwo.org Signed-off-by: Christoph Lameter <cl@linux.com> Cc: Tejun Heo <htejun@gmail.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/vmstat.c | 51 ++++++++++----------------------------------------- 1 file changed, 10 insertions(+), 41 deletions(-) commit 51038171b7ecf0017fbe3e06bd246eaa26f4d2e7 Author: Greg Thelen <gthelen@google.com> Date: Fri May 20 16:58:18 2016 -0700 memcg: fix stale mem_cgroup_force_empty() comment Commit f61c42a7d911 ("memcg: remove tasks/children test from mem_cgroup_force_empty()") removed memory reparenting from the function. Fix the function's comment. Link: http://lkml.kernel.org/r/1462569810-54496-1-git-send-email-gthelen@google.com Signed-off-by: Greg Thelen <gthelen@google.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memcontrol.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d2a1a1f0a97a77d25cbada37161dc2ecdf01f93d Author: Yu Zhao <yuzhao@google.com> Date: Fri May 20 16:58:16 2016 -0700 mm: use unsigned long constant for page flags struct page->flags is unsigned long, so when shifting bits we should use UL suffix to match it. Found this problem after I added 64-bit CPU specific page flags and failed to compile the kernel: mm/page_alloc.c: In function '__free_one_page': mm/page_alloc.c:672:2: error: integer overflow in expression [-Werror=overflow] Link: http://lkml.kernel.org/r/1461971723-16187-1-git-send-email-yuzhao@google.com Signed-off-by: Yu Zhao <yuzhao@google.com> Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Jerome Marchand <jmarchan@redhat.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/page-flags.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2a138dc7e50bfdc90f9db9b52584ac5564952425 Author: Minfei Huang <mnghuan@gmail.com> Date: Fri May 20 16:58:13 2016 -0700 mm: use existing helper to convert "on"/"off" to boolean It's more convenient to use existing function helper to convert string "on/off" to boolean. Link: http://lkml.kernel.org/r/1461908824-16129-1-git-send-email-mnghuan@gmail.com Signed-off-by: Minfei Huang <mnghuan@gmail.com> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 9 +-------- mm/page_poison.c | 8 +------- 2 files changed, 2 insertions(+), 15 deletions(-) commit 78ebc2f7146156f488083c9e5a7ded9d5c38c58b Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Date: Fri May 20 16:58:10 2016 -0700 mm,writeback: don't use memory reserves for wb_start_writeback When writeback operation cannot make forward progress because memory allocation requests needed for doing I/O cannot be satisfied (e.g. under OOM-livelock situation), we can observe flood of order-0 page allocation failure messages caused by complete depletion of memory reserves. This is caused by unconditionally allocating "struct wb_writeback_work" objects using GFP_ATOMIC from PF_MEMALLOC context. __alloc_pages_nodemask() { __alloc_pages_slowpath() { __alloc_pages_direct_reclaim() { __perform_reclaim() { current->flags |= PF_MEMALLOC; try_to_free_pages() { do_try_to_free_pages() { wakeup_flusher_threads() { wb_start_writeback() { kzalloc(sizeof(*work), GFP_ATOMIC) { /* ALLOC_NO_WATERMARKS via PF_MEMALLOC */ } } } } } current->flags &= ~PF_MEMALLOC; } } } } Since I/O is stalling, allocating writeback requests forever shall deplete memory reserves. Fortunately, since wb_start_writeback() can fall back to wb_wakeup() when allocating "struct wb_writeback_work" failed, we don't need to allow wb_start_writeback() to use memory reserves. Mem-Info: active_anon:289393 inactive_anon:2093 isolated_anon:29 active_file:10838 inactive_file:113013 isolated_file:859 unevictable:0 dirty:108531 writeback:5308 unstable:0 slab_reclaimable:5526 slab_unreclaimable:7077 mapped:9970 shmem:2159 pagetables:2387 bounce:0 free:3042 free_pcp:0 free_cma:0 Node 0 DMA free:6968kB min:44kB low:52kB high:64kB active_anon:6056kB inactive_anon:176kB active_file:712kB inactive_file:744kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15988kB managed:15904kB mlocked:0kB dirty:756kB writeback:0kB mapped:736kB shmem:184kB slab_reclaimable:48kB slab_unreclaimable:208kB kernel_stack:160kB pagetables:144kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:9708 all_unreclaimable? yes lowmem_reserve[]: 0 1732 1732 1732 Node 0 DMA32 free:5200kB min:5200kB low:6500kB high:7800kB active_anon:1151516kB inactive_anon:8196kB active_file:42640kB inactive_file:451076kB unevictable:0kB isolated(anon):116kB isolated(file):3564kB present:2080640kB managed:1775332kB mlocked:0kB dirty:433368kB writeback:21232kB mapped:39144kB shmem:8452kB slab_reclaimable:22056kB slab_unreclaimable:28100kB kernel_stack:20976kB pagetables:9404kB unstable:0kB bounce:0kB free_pcp:120kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:2701604 all_unreclaimable? no lowmem_reserve[]: 0 0 0 0 Node 0 DMA: 25*4kB (UME) 16*8kB (UME) 3*16kB (UE) 5*32kB (UME) 2*64kB (UM) 2*128kB (ME) 2*256kB (ME) 1*512kB (E) 1*1024kB (E) 2*2048kB (ME) 0*4096kB = 6964kB Node 0 DMA32: 925*4kB (UME) 140*8kB (UME) 5*16kB (ME) 5*32kB (M) 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 5060kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 126847 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 524157 pages RAM 0 pages HighMem/MovableOnly 76348 pages reserved 0 pages hwpoisoned Out of memory: Kill process 4450 (file_io.00) score 998 or sacrifice child Killed process 4450 (file_io.00) total-vm:4308kB, anon-rss:100kB, file-rss:1184kB, shmem-rss:0kB kthreadd: page allocation failure: order:0, mode:0x2200020 file_io.00: page allocation failure: order:0, mode:0x2200020 CPU: 0 PID: 4457 Comm: file_io.00 Not tainted 4.5.0-rc7+ #45 Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/31/2013 Call Trace: warn_alloc_failed+0xf7/0x150 __alloc_pages_nodemask+0x23f/0xa60 alloc_pages_current+0x87/0x110 new_slab+0x3a1/0x440 ___slab_alloc+0x3cf/0x590 __slab_alloc.isra.64+0x18/0x1d kmem_cache_alloc+0x11c/0x150 wb_start_writeback+0x39/0x90 wakeup_flusher_threads+0x7f/0xf0 do_try_to_free_pages+0x1f9/0x410 try_to_free_pages+0x94/0xc0 __alloc_pages_nodemask+0x566/0xa60 alloc_pages_current+0x87/0x110 __page_cache_alloc+0xaf/0xc0 pagecache_get_page+0x88/0x260 grab_cache_page_write_begin+0x21/0x40 xfs_vm_write_begin+0x2f/0xf0 generic_perform_write+0xca/0x1c0 xfs_file_buffered_aio_write+0xcc/0x1f0 xfs_file_write_iter+0x84/0x140 __vfs_write+0xc7/0x100 vfs_write+0x9d/0x190 SyS_write+0x50/0xc0 entry_SYSCALL_64_fastpath+0x12/0x6a Mem-Info: active_anon:293335 inactive_anon:2093 isolated_anon:0 active_file:10829 inactive_file:110045 isolated_file:32 unevictable:0 dirty:109275 writeback:822 unstable:0 slab_reclaimable:5489 slab_unreclaimable:10070 mapped:9999 shmem:2159 pagetables:2420 bounce:0 free:3 free_pcp:0 free_cma:0 Node 0 DMA free:12kB min:44kB low:52kB high:64kB active_anon:6060kB inactive_anon:176kB active_file:708kB inactive_file:756kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15988kB managed:15904kB mlocked:0kB dirty:756kB writeback:0kB mapped:736kB shmem:184kB slab_reclaimable:48kB slab_unreclaimable:7160kB kernel_stack:160kB pagetables:144kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:9844 all_unreclaimable? yes lowmem_reserve[]: 0 1732 1732 1732 Node 0 DMA32 free:0kB min:5200kB low:6500kB high:7800kB active_anon:1167280kB inactive_anon:8196kB active_file:42608kB inactive_file:439424kB unevictable:0kB isolated(anon):0kB isolated(file):128kB present:2080640kB managed:1775332kB mlocked:0kB dirty:436344kB writeback:3288kB mapped:39260kB shmem:8452kB slab_reclaimable:21908kB slab_unreclaimable:33120kB kernel_stack:20976kB pagetables:9536kB unstable:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:11073180 all_unreclaimable? yes lowmem_reserve[]: 0 0 0 0 Node 0 DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB Node 0 DMA32: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB 123086 total pagecache pages 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 524157 pages RAM 0 pages HighMem/MovableOnly 76348 pages reserved 0 pages hwpoisoned SLUB: Unable to allocate memory on node -1 (gfp=0x2088020) cache: kmalloc-64, object size: 64, buffer size: 64, default order: 0, min order: 0 node 0: slabs: 3218, objs: 205952, free: 0 file_io.00: page allocation failure: order:0, mode:0x2200020 CPU: 0 PID: 4457 Comm: file_io.00 Not tainted 4.5.0-rc7+ #45 Assuming that somebody will find a better solution, let's apply this patch for now to stop bleeding, for this problem frequently prevents me from testing OOM livelock condition. Link: http://lkml.kernel.org/r/20160318131136.GE7152@quack.suse.cz Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Jan Kara <jack@suse.cz> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/fs-writeback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 89474d50a0d6b9a06e043351b4e658f4f0b6ee97 Author: Eric Engestrom <eric@engestrom.ch> Date: Fri May 20 16:58:07 2016 -0700 Documentation: vm: fix spelling mistakes Signed-off-by: Eric Engestrom <eric@engestrom.ch> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/vm/transhuge.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit 0c9ad804f178eae02a34045bb0916fa0e31623d5 Author: Weijie Yang <weijie.yang@samsung.com> Date: Fri May 20 16:58:04 2016 -0700 mm fix commmets: if SPARSEMEM, pgdata doesn't have page_ext If SPARSEMEM, use page_ext in mem_section if !SPARSEMEM, use page_ext in pgdata Signed-off-by: Weijie Yang <weijie.yang@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mmzone.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d70c17d436b3fb9dbdae8c93bf908a6110b0cb4f Author: Chen Gang <chengang@emindsoft.com.cn> Date: Fri May 20 16:58:01 2016 -0700 include/linux/hugetlb.h: use bool instead of int for hugepage_migration_supported() It is used as a pure bool function within kernel source wide. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/hugetlb.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7fab358d90e6ba9d9cb702bee0c8a5f5c13bb6df Author: Chen Gang <gang.chen.5i5j@gmail.com> Date: Fri May 20 16:57:59 2016 -0700 include/linux/hugetlb*.h: clean up code Macro HUGETLBFS_SB is clear enough, so one statement is clearer than 3 lines statements. Remove redundant return statements for non-return functions, which can save lines, at least. Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/hugetlb.h | 4 +--- include/linux/hugetlb_cgroup.h | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) commit a4a921aa5c7a1ab621e71fd1a4289e76fe230cbd Author: Ming Li <mingli199x@qq.com> Date: Fri May 20 16:57:56 2016 -0700 mm/swap.c: put activate_page_pvecs and other pagevecs together Put the activate_page_pvecs definition next to those of the other pagevecs, for clarity. Signed-off-by: Ming Li <mingli199x@qq.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/swap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit b8ca9e3a612eaf3e54c6fa136c62246a1a9aece7 Author: Eric Dumazet <edumazet@google.com> Date: Fri May 20 16:57:53 2016 -0700 mm: tighten fault_in_pages_writeable() copy_page_to_iter_iovec() is currently the only user of fault_in_pages_writeable(), and it definitely can use fragments from high order pages. Make sure fault_in_pages_writeable() is only touching two adjacent pages at most, as claimed. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/pagemap.h | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) commit 297880f4af4e492ed5084be9397d65a18ade56ee Author: David Rientjes <rientjes@google.com> Date: Fri May 20 16:57:50 2016 -0700 mm, hugetlb_cgroup: round limit_in_bytes down to hugepage size The page_counter rounds limits down to page size values. This makes sense, except in the case of hugetlb_cgroup where it's not possible to charge partial hugepages. If the hugetlb_cgroup margin is less than the hugepage size being charged, it will fail as expected. Round the hugetlb_cgroup limit down to hugepage size, since it is the effective limit of the cgroup. For consistency, round down PAGE_COUNTER_MAX as well when a hugetlb_cgroup is created: this prevents error reports when a user cannot restore the value to the kernel default. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Nikolay Borisov <kernel@kyup.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/hugetlb_cgroup.c | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) commit 63678c32e209bd165f33432bbed72b2954ce5ae4 Author: Rich Felker <dalias@libc.org> Date: Fri May 20 16:57:47 2016 -0700 tmpfs/ramfs: fix VM_MAYSHARE mappings for NOMMU The nommu do_mmap expects f_op->get_unmapped_area to either succeed or return -ENOSYS for VM_MAYSHARE (e.g. private read-only) mappings. Returning addr in the non-MAP_SHARED case was completely wrong, and only happened to work because addr was 0. However, it prevented VM_MAYSHARE mappings from sharing backing with the fs cache, and forced such mappings (including shareable program text) to be copied whenever the number of mappings transitioned from 0 to 1, impacting performance and memory usage. Subsequent mappings beyond the first still correctly shared memory with the first. Instead, treat VM_MAYSHARE identically to VM_SHARED at the file ops level; do_mmap already handles the semantic differences between them. Signed-off-by: Rich Felker <dalias@libc.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Greg Ungerer <gerg@uclinux.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ramfs/file-nommu.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit f4fcd55841fc9e46daac553b39361572453c2b88 Author: Konstantin Khlebnikov <koct9i@gmail.com> Date: Fri May 20 16:57:45 2016 -0700 mm: enable RLIMIT_DATA by default with workaround for valgrind Since commit 84638335900f ("mm: rework virtual memory accounting") RLIMIT_DATA limits both brk() and private mmap() but this's disabled by default because of incompatibility with older versions of valgrind. Valgrind always set limit to zero and fails if RLIMIT_DATA is enabled. Fortunately it changes only rlim_cur and keeps rlim_max for reverting limit back when needed. This patch checks current usage also against rlim_max if rlim_cur is zero. This is safe because task anyway can increase rlim_cur up to rlim_max. Size of brk is still checked against rlim_cur, so this part is completely compatible - zero rlim_cur forbids brk() but allows private mmap(). Link: http://lkml.kernel.org/r/56A28613.5070104@de.ibm.com Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Cyrill Gorcunov <gorcunov@openvz.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/mmap.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit d5957d2fc232a689543bdbed1a5ff8002f0e9843 Author: Yongji Xie <xyjxie@linux.vnet.ibm.com> Date: Fri May 20 16:57:41 2016 -0700 mm: fix incorrect pfn passed to untrack_pfn() in remap_pfn_range() We use generic hooks in remap_pfn_range() to help archs to track pfnmap regions. The code is something like: int remap_pfn_range() { ... track_pfn_remap(vma, &prot, pfn, addr, PAGE_ALIGN(size)); ... pfn -= addr >> PAGE_SHIFT; ... untrack_pfn(vma, pfn, PAGE_ALIGN(size)); ... } Here we can easily find the pfn is changed but not recovered before untrack_pfn() is called. That's incorrect. There are no known runtime effects - this is from inspection. Signed-off-by: Yongji Xie <xyjxie@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Jerome Marchand <jmarchan@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Matthew Wilcox <matthew.r.wilcox@intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Michal Hocko <mhocko@suse.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 80c4bd7a5e4368b680e0aeb57050a1b06eb573d8 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri May 20 16:57:38 2016 -0700 mm/vmalloc: keep a separate lazy-free list When mixing lots of vmallocs and set_memory_*() (which calls vm_unmap_aliases()) I encountered situations where the performance degraded severely due to the walking of the entire vmap_area list each invocation. One simple improvement is to add the lazily freed vmap_area to a separate lockless free list, such that we then avoid having to walk the full list on each purge. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Roman Pen <r.peniaev@gmail.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Roman Pen <r.peniaev@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Toshi Kani <toshi.kani@hp.com> Cc: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/vmalloc.h | 3 ++- mm/vmalloc.c | 39 +++++++++++++++++++-------------------- 2 files changed, 21 insertions(+), 21 deletions(-) commit f705ac4b39f30a6a5f8411a42114758f4d4655bc Author: Alexander Kuleshov <kuleshovmail@gmail.com> Date: Fri May 20 16:57:35 2016 -0700 mm/memblock.c: move memblock_{add,reserve}_region into memblock_{add,reserve} memblock_add_region() and memblock_reserve_region() do nothing specific before the call of memblock_add_range(), only print debug output. We can do the same in memblock_add() and memblock_reserve() since both memblock_add_region() and memblock_reserve_region() are not used by anybody outside of memblock.c and memblock_{add,reserve}() have the same set of flags and nids. Since memblock_add_region() and memblock_reserve_region() will be inlined, there will not be functional changes, but will improve code readability a little. Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Pekka Enberg <penberg@kernel.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Tang Chen <tangchen@cn.fujitsu.com> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memblock.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) commit 495367c051fb200a42636bdc63be78ca1713a85a Author: Chen Yucong <slaoub@gmail.com> Date: Fri May 20 16:57:32 2016 -0700 mm/memory-failure.c: replace "MCE" with "Memory failure" HWPoison was specific to some particular x86 platforms. And it is often seen as high level machine check handler. And therefore, 'MCE' is used for the format prefix of printk(). However, 'PowerNV' has also used HWPoison for handling memory errors[1], so 'MCE' is no longer suitable to memory_failure.c. Additionally, 'MCE' and 'Memory failure' have different context. The former belongs to exception context and the latter belongs to process context. Furthermore, HWPoison can also be used for off-lining those sub-health pages that do not trigger any machine check exception. This patch aims to replace 'MCE' with a more appropriate prefix. [1] commit 75eb3d9b60c2 ("powerpc/powernv: Get FSP memory errors and plumb into memory poison infrastructure.") Signed-off-by: Chen Yucong <slaoub@gmail.com> Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memory-failure.c | 72 +++++++++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 32 deletions(-) commit 340a43bed674a70308f196f2a61ec0b01f8a14d9 Author: Yang Shi <yang.shi@linaro.org> Date: Fri May 20 16:57:30 2016 -0700 mm: thp: simplify the implementation of mk_huge_pmd() The implementation of mk_huge_pmd looks verbose, it could be just simplified to one line code. Signed-off-by: Yang Shi <yang.shi@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/huge_memory.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit f44666b04605d1c7fd94ab90b7ccf633e7eff228 Author: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Date: Fri May 20 16:57:27 2016 -0700 mm,oom: speed up select_bad_process() loop Since commit 3a5dda7a17cf ("oom: prevent unnecessary oom kills or kernel panics"), select_bad_process() is using for_each_process_thread(). Since oom_unkillable_task() scans all threads in the caller's thread group and oom_task_origin() scans signal_struct of the caller's thread group, we don't need to call oom_unkillable_task() and oom_task_origin() on each thread. Also, since !mm test will be done later at oom_badness(), we don't need to do !mm test on each thread. Therefore, we only need to do TIF_MEMDIE test on each thread. Although the original code was correct it was quite inefficient because each thread group was scanned num_threads times which can be a lot especially with processes with many threads. Even though the OOM is extremely cold path it is always good to be as effective as possible when we are inside rcu_read_lock() - aka unpreemptible context. If we track number of TIF_MEMDIE threads inside signal_struct, we don't need to do TIF_MEMDIE test on each thread. This will allow select_bad_process() to use for_each_process(). This patch adds a counter to signal_struct for tracking how many TIF_MEMDIE threads are in a given thread group, and check it at oom_scan_process_thread() so that select_bad_process() can use for_each_process() rather than for_each_process_thread(). [mhocko@suse.com: do not blow the signal_struct size] Link: http://lkml.kernel.org/r/20160520075035.GF19172@dhcp22.suse.cz Link: http://lkml.kernel.org/r/201605182230.IDC73435.MVSOHLFOQFOJtF@I-love.SAKURA.ne.jp Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Acked-by: Michal Hocko <mhocko@suse.com> Cc: David Rientjes <rientjes@google.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/sched.h | 1 + mm/oom_kill.c | 17 ++++++----------- 2 files changed, 7 insertions(+), 11 deletions(-) commit 98748bd722005be9de2662bd4f7e41ad8148bdbd Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:57:24 2016 -0700 oom: consider multi-threaded tasks in task_will_free_mem task_will_free_mem is a misnomer for a more complex PF_EXITING test for early break out from the oom killer because it is believed that such a task would release its memory shortly and so we do not have to select an oom victim and perform a disruptive action. Currently we make sure that the given task is not participating in the core dumping because it might get blocked for a long time - see commit d003f371b270 ("oom: don't assume that a coredumping thread will exit soon"). The check can still do better though. We shouldn't consider the task unless the whole thread group is going down. This is rather unlikely but not impossible. A single exiting thread would surely leave all the address space behind. If we are really unlucky it might get stuck on the exit path and keep its TIF_MEMDIE and so block the oom killer. Link: http://lkml.kernel.org/r/1460452756-15491-1-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/oom.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) commit ec8d7c14ea14922fe21945b458a75e39f11dd832 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:57:21 2016 -0700 mm, oom_reaper: do not mmput synchronously from the oom reaper context Tetsuo has properly noted that mmput slow path might get blocked waiting for another party (e.g. exit_aio waits for an IO). If that happens the oom_reaper would be put out of the way and will not be able to process next oom victim. We should strive for making this context as reliable and independent on other subsystems as much as possible. Introduce mmput_async which will perform the slow path from an async (WQ) context. This will delay the operation but that shouldn't be a problem because the oom_reaper has reclaimed the victim's address space for most cases as much as possible and the remaining context shouldn't bind too much memory anymore. The only exception is when mmap_sem trylock has failed which shouldn't happen too often. The issue is only theoretical but not impossible. Signed-off-by: Michal Hocko <mhocko@suse.com> Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm_types.h | 2 ++ include/linux/sched.h | 5 +++++ kernel/fork.c | 50 +++++++++++++++++++++++++++++++++--------------- mm/oom_kill.c | 8 ++++++-- 4 files changed, 48 insertions(+), 17 deletions(-) commit bb8a4b7fd1266ef888b3a80aa5f266062b224ef4 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:57:18 2016 -0700 mm, oom_reaper: hide oom reaped tasks from OOM killer more carefully Commit 36324a990cf5 ("oom: clear TIF_MEMDIE after oom_reaper managed to unmap the address space") not only clears TIF_MEMDIE for oom reaped task but also set OOM_SCORE_ADJ_MIN for the target task to hide it from the oom killer. This works in simple cases but it is not sufficient for (unlikely) cases where the mm is shared between independent processes (as they do not share signal struct). If the mm had only small amount of memory which could be reaped then another task sharing the mm could be selected and that wouldn't help to move out from the oom situation. Introduce MMF_OOM_REAPED mm flag which is checked in oom_badness (same as OOM_SCORE_ADJ_MIN) and task is skipped if the flag is set. Set the flag after __oom_reap_task is done with a task. This will force the select_bad_process() to ignore all already oom reaped tasks as well as no such task is sacrificed for its parent. Signed-off-by: Michal Hocko <mhocko@suse.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/sched.h | 1 + mm/oom_kill.c | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) commit 31e49bfda18464b9b0cfe42044d5a4be4a0ca0f3 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:57:15 2016 -0700 mm, oom: protect !costly allocations some more for !CONFIG_COMPACTION Joonsoo has reported that he is able to trigger OOM for !costly high order requests (heavy fork() workload close the OOM) with the new oom detection rework. This is because we rely only on should_reclaim_retry when the compaction is disabled and it only checks watermarks for the requested order and so we might trigger OOM when there is a lot of free memory. It is not very clear what are the usual workloads when the compaction is disabled. Relying on high order allocations heavily without any mechanism to create those orders except for unbound amount of reclaim is certainly not a good idea. To prevent from potential regressions let's help this configuration some. We have to sacrifice the determinsm though because there simply is none here possible. should_compact_retry implementation for !CONFIG_COMPACTION, which was empty so far, will do watermark check for order-0 on all eligible zones. This will cause retrying until either the reclaim cannot make any further progress or all the zones are depleted even for order-0 pages. This means that the number of retries is basically unbounded for !costly orders but that was the case before the rework as well so this shouldn't regress. [akpm@linux-foundation.org: coding-style fixes] Link: http://lkml.kernel.org/r/1463051677-29418-3-git-send-email-mhocko@kernel.org Reported-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 86a294a81f93d6f36d00ec3ff779d36d218f852d Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:57:12 2016 -0700 mm, oom, compaction: prevent from should_compact_retry looping for ever for costly orders "mm: consider compaction feedback also for costly allocation" has removed the upper bound for the reclaim/compaction retries based on the number of reclaimed pages for costly orders. While this is desirable the patch did miss a mis interaction between reclaim, compaction and the retry logic. The direct reclaim tries to get zones over min watermark while compaction backs off and returns COMPACT_SKIPPED when all zones are below low watermark + 1<<order gap. If we are getting really close to OOM then __compaction_suitable can keep returning COMPACT_SKIPPED a high order request (e.g. hugetlb order-9) while the reclaim is not able to release enough pages to get us over low watermark. The reclaim is still able to make some progress (usually trashing over few remaining pages) so we are not able to break out from the loop. I have seen this happening with the same test described in "mm: consider compaction feedback also for costly allocation" on a swapless system. The original problem got resolved by "vmscan: consider classzone_idx in compaction_ready" but it shows how things might go wrong when we approach the oom event horizont. The reason why compaction requires being over low rather than min watermark is not clear to me. This check was there essentially since 56de7263fcf3 ("mm: compaction: direct compact when a high-order allocation fails"). It is clearly an implementation detail though and we shouldn't pull it into the generic retry logic while we should be able to cope with such eventuality. The only place in should_compact_retry where we retry without any upper bound is for compaction_withdrawn() case. Introduce compaction_zonelist_suitable function which checks the given zonelist and returns true only if there is at least one zone which would would unblock __compaction_suitable if more memory got reclaimed. In this implementation it checks __compaction_suitable with NR_FREE_PAGES plus part of the reclaimable memory as the target for the watermark check. The reclaimable memory is reduced linearly by the allocation order. The idea is that we do not want to reclaim all the remaining memory for a single allocation request just unblock __compaction_suitable which doesn't guarantee we will make a further progress. The new helper is then used if compaction_withdrawn() feedback was provided so we do not retry if there is no outlook for a further progress. !costly requests shouldn't be affected much - e.g. order-2 pages would require to have at least 64kB on the reclaimable LRUs while order-9 would need at least 32M which should be enough to not lock up. [vbabka@suse.cz: fix classzone_idx vs. high_zoneidx usage in compaction_zonelist_suitable] [akpm@linux-foundation.org: fix it for Mel's mm-page_alloc-remove-field-from-alloc_context.patch] Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/compaction.h | 4 ++++ include/linux/mmzone.h | 3 +++ mm/compaction.c | 42 +++++++++++++++++++++++++++++++++++++++--- mm/page_alloc.c | 23 +++++++++++++---------- 4 files changed, 59 insertions(+), 13 deletions(-) commit 7854ea6c28c6076050e24773eeb78e2925bd7411 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:57:09 2016 -0700 mm: consider compaction feedback also for costly allocation PAGE_ALLOC_COSTLY_ORDER retry logic is mostly handled inside should_reclaim_retry currently where we decide to not retry after at least order worth of pages were reclaimed or the watermark check for at least one zone would succeed after reclaiming all pages if the reclaim hasn't made any progress. Compaction feedback is mostly ignored and we just try to make sure that the compaction did at least something before giving up. The first condition was added by a41f24ea9fd6 ("page allocator: smarter retry of costly-order allocations) and it assumed that lumpy reclaim could have created a page of the sufficient order. Lumpy reclaim, has been removed quite some time ago so the assumption doesn't hold anymore. Remove the check for the number of reclaimed pages and rely on the compaction feedback solely. should_reclaim_retry now only makes sure that we keep retrying reclaim for high order pages only if they are hidden by watermaks so order-0 reclaim makes really sense. should_compact_retry now keeps retrying even for the costly allocations. The number of retries is reduced wrt. !costly requests because they are less important and harder to grant and so their pressure shouldn't cause contention for other requests or cause an over reclaim. We also do not reset no_progress_loops for costly request to make sure we do not keep reclaiming too agressively. This has been tested by running a process which fragments memory: - compact memory - mmap large portion of the memory (1920M on 2GRAM machine with 2G of swapspace) - MADV_DONTNEED single page in PAGE_SIZE*((1UL<<MAX_ORDER)-1) steps until certain amount of memory is freed (250M in my test) and reduce the step to (step / 2) + 1 after reaching the end of the mapping - then run a script which populates the page cache 2G (MemTotal) from /dev/zero to a new file And then tries to allocate nr_hugepages=$(awk '/MemAvailable/{printf "%d\n", $2/(2*1024)}' /proc/meminfo) huge pages. root@test1:~# echo 1 > /proc/sys/vm/overcommit_memory;echo 1 > /proc/sys/vm/compact_memory; ./fragment-mem-and-run /root/alloc_hugepages.sh 1920M 250M Node 0, zone DMA 31 28 31 10 2 0 2 1 2 3 1 Node 0, zone DMA32 437 319 171 50 28 25 20 16 16 14 437 * This is the /proc/buddyinfo after the compaction Done fragmenting. size=2013265920 freed=262144000 Node 0, zone DMA 165 48 3 1 2 0 2 2 2 2 0 Node 0, zone DMA32 35109 14575 185 51 41 12 6 0 0 0 0 * /proc/buddyinfo after memory got fragmented Executing "/root/alloc_hugepages.sh" Eating some pagecache 508623+0 records in 508623+0 records out 2083319808 bytes (2.1 GB) copied, 11.7292 s, 178 MB/s Node 0, zone DMA 3 5 3 1 2 0 2 2 2 2 0 Node 0, zone DMA32 111 344 153 20 24 10 3 0 0 0 0 * /proc/buddyinfo after page cache got eaten Trying to allocate 129 129 * 129 hugepages requested and all of them granted. Node 0, zone DMA 3 5 3 1 2 0 2 2 2 2 0 Node 0, zone DMA32 127 97 30 99 11 6 2 1 4 0 0 * /proc/buddyinfo after hugetlb allocation. 10 runs will behave as follows: Trying to allocate 130 130 -- Trying to allocate 129 129 -- Trying to allocate 128 128 -- Trying to allocate 129 129 -- Trying to allocate 128 128 -- Trying to allocate 129 129 -- Trying to allocate 132 132 -- Trying to allocate 129 129 -- Trying to allocate 128 128 -- Trying to allocate 129 129 So basically 100% success for all 10 attempts. Without the patch numbers looked much worse: Trying to allocate 128 12 -- Trying to allocate 129 14 -- Trying to allocate 129 7 -- Trying to allocate 129 16 -- Trying to allocate 129 30 -- Trying to allocate 129 38 -- Trying to allocate 129 19 -- Trying to allocate 129 37 -- Trying to allocate 129 28 -- Trying to allocate 129 37 Just for completness the base kernel without oom detection rework looks as follows: Trying to allocate 127 30 -- Trying to allocate 129 12 -- Trying to allocate 129 52 -- Trying to allocate 128 32 -- Trying to allocate 129 12 -- Trying to allocate 129 10 -- Trying to allocate 129 32 -- Trying to allocate 128 14 -- Trying to allocate 128 16 -- Trying to allocate 129 8 As we can see the success rate is much more volatile and smaller without this patch. So the patch not only makes the retry logic for costly requests more sensible the success rate is even higher. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 63 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 31 deletions(-) commit 33c2d21438daea807947923377995c73ee8ed3fc Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:57:06 2016 -0700 mm, oom: protect !costly allocations some more should_reclaim_retry will give up retries for higher order allocations if none of the eligible zones has any requested or higher order pages available even if we pass the watermak check for order-0. This is done because there is no guarantee that the reclaimable and currently free pages will form the required order. This can, however, lead to situations where the high-order request (e.g. order-2 required for the stack allocation during fork) will trigger OOM too early - e.g. after the first reclaim/compaction round. Such a system would have to be highly fragmented and there is no guarantee further reclaim/compaction attempts would help but at least make sure that the compaction was active before we go OOM and keep retrying even if should_reclaim_retry tells us to oom if - the last compaction round backed off or - we haven't completed at least MAX_COMPACT_RETRIES active compaction rounds. The first rule ensures that the very last attempt for compaction was not ignored while the second guarantees that the compaction has done some work. Multiple retries might be needed to prevent occasional pigggy backing of other contexts to steal the compacted pages before the current context manages to retry to allocate them. compaction_failed() is taken as a final word from the compaction that the retry doesn't make much sense. We have to be careful though because the first compaction round is MIGRATE_ASYNC which is rather weak as it ignores pages under writeback and gives up too easily in other situations. We therefore have to make sure that MIGRATE_SYNC_LIGHT mode has been used before we give up. With this logic in place we do not have to increase the migration mode unconditionally and rather do it only if the compaction failed for the weaker mode. A nice side effect is that the stronger migration mode is used only when really needed so this has a potential of smaller latencies in some cases. Please note that the compaction doesn't tell us much about how successful it was when returning compaction_made_progress so we just have to blindly trust that another retry is worthwhile and cap the number to something reasonable to guarantee a convergence. If the given number of successful retries is not sufficient for a reasonable workloads we should focus on the collected compaction tracepoints data and try to address the issue in the compaction code. If this is not feasible we can increase the retries limit. [mhocko@suse.com: fix warning] Link: http://lkml.kernel.org/r/20160512061636.GA4200@dhcp22.suse.cz Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 78 insertions(+), 10 deletions(-) commit ede37713737834d98ec72ed299a305d53e909f73 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:57:03 2016 -0700 mm: throttle on IO only when there are too many dirty and writeback pages wait_iff_congested has been used to throttle allocator before it retried another round of direct reclaim to allow the writeback to make some progress and prevent reclaim from looping over dirty/writeback pages without making any progress. We used to do congestion_wait before commit 0e093d99763e ("writeback: do not sleep on the congestion queue if there are no congested BDIs or if significant congestion is not being encountered in the current zone") but that led to undesirable stalls and sleeping for the full timeout even when the BDI wasn't congested. Hence wait_iff_congested was used instead. But it seems that even wait_iff_congested doesn't work as expected. We might have a small file LRU list with all pages dirty/writeback and yet the bdi is not congested so this is just a cond_resched in the end and can end up triggering pre mature OOM. This patch replaces the unconditional wait_iff_congested by congestion_wait which is executed only if we _know_ that the last round of direct reclaim didn't make any progress and dirty+writeback pages are more than a half of the reclaimable pages on the zone which might be usable for our target allocation. This shouldn't reintroduce stalls fixed by 0e093d99763e because congestion_wait is called only when we are getting hopeless when sleeping is a better choice than OOM with many pages under IO. We have to preserve logic introduced by commit 373ccbe59270 ("mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress") into the __alloc_pages_slowpath now that wait_iff_congested is not used anymore. As the only remaining user of wait_iff_congested is shrink_inactive_list we can remove the WQ specific short sleep from wait_iff_congested because the sleep is needed to be done only once in the allocation retry cycle. [mhocko@suse.com: high_zoneidx->ac_classzone_idx to evaluate memory reserves properly] Link: http://lkml.kernel.org/r/1463051677-29418-2-git-send-email-mhocko@kernel.org Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/backing-dev.c | 20 +++----------------- mm/page_alloc.c | 41 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 40 insertions(+), 21 deletions(-) commit 0a0337e0d1d134465778a16f5cbea95086e8e9e0 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:57:00 2016 -0700 mm, oom: rework oom detection __alloc_pages_slowpath has traditionally relied on the direct reclaim and did_some_progress as an indicator that it makes sense to retry allocation rather than declaring OOM. shrink_zones had to rely on zone_reclaimable if shrink_zone didn't make any progress to prevent from a premature OOM killer invocation - the LRU might be full of dirty or writeback pages and direct reclaim cannot clean those up. zone_reclaimable allows to rescan the reclaimable lists several times and restart if a page is freed. This is really subtle behavior and it might lead to a livelock when a single freed page keeps allocator looping but the current task will not be able to allocate that single page. OOM killer would be more appropriate than looping without any progress for unbounded amount of time. This patch changes OOM detection logic and pulls it out from shrink_zone which is too low to be appropriate for any high level decisions such as OOM which is per zonelist property. It is __alloc_pages_slowpath which knows how many attempts have been done and what was the progress so far therefore it is more appropriate to implement this logic. The new heuristic is implemented in should_reclaim_retry helper called from __alloc_pages_slowpath. It tries to be more deterministic and easier to follow. It builds on an assumption that retrying makes sense only if the currently reclaimable memory + free pages would allow the current allocation request to succeed (as per __zone_watermark_ok) at least for one zone in the usable zonelist. This alone wouldn't be sufficient, though, because the writeback might get stuck and reclaimable pages might be pinned for a really long time or even depend on the current allocation context. Therefore there is a backoff mechanism implemented which reduces the reclaim target after each reclaim round without any progress. This means that we should eventually converge to only NR_FREE_PAGES as the target and fail on the wmark check and proceed to OOM. The backoff is simple and linear with 1/16 of the reclaimable pages for each round without any progress. We are optimistic and reset counter for successful reclaim rounds. Costly high order pages mostly preserve their semantic and those without __GFP_REPEAT fail right away while those which have the flag set will back off after the amount of reclaimable pages reaches equivalent of the requested order. The only difference is that if there was no progress during the reclaim we rely on zone watermark check. This is more logical thing to do than previous 1<<order attempts which were a result of zone_reclaimable faking the progress. [vdavydov@virtuozzo.com: check classzone_idx for shrink_zone] [hannes@cmpxchg.org: separate the heuristic into should_reclaim_retry] [rientjes@google.com: use zone_page_state_snapshot for NR_FREE_PAGES] [rientjes@google.com: shrink_zones doesn't need to return anything] Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/swap.h | 1 + mm/page_alloc.c | 100 ++++++++++++++++++++++++++++++++++++++++++++++----- mm/vmscan.c | 25 +++---------- 3 files changed, 97 insertions(+), 29 deletions(-) commit cab1802b5f0dddea30547a7451fda8c7e4c593f0 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:56:56 2016 -0700 mm, compaction: abstract compaction feedback to helpers Compaction can provide a wild variation of feedback to the caller. Many of them are implementation specific and the caller of the compaction (especially the page allocator) shouldn't be bound to specifics of the current implementation. This patch abstracts the feedback into three basic types: - compaction_made_progress - compaction was active and made some progress. - compaction_failed - compaction failed and further attempts to invoke it would most probably fail and therefore it is not worth retrying - compaction_withdrawn - compaction wasn't invoked for an implementation specific reasons. In the current implementation it means that the compaction was deferred, contended or the page scanners met too early without any progress. Retrying is still worthwhile. [vbabka@suse.cz: do not change thp back off behavior] [akpm@linux-foundation.org: fix typo in comment, per Hillf] Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/compaction.h | 79 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) commit c5d01d0d18e2ab7a21f0371b00e4d1a06f79cdf5 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:56:53 2016 -0700 mm, compaction: simplify __alloc_pages_direct_compact feedback interface __alloc_pages_direct_compact communicates potential back off by two variables: - deferred_compaction tells that the compaction returned COMPACT_DEFERRED - contended_compaction is set when there is a contention on zone->lock resp. zone->lru_lock locks __alloc_pages_slowpath then backs of for THP allocation requests to prevent from long stalls. This is rather messy and it would be much cleaner to return a single compact result value and hide all the nasty details into __alloc_pages_direct_compact. This patch shouldn't introduce any functional changes. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 67 ++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 36 deletions(-) commit 4f9a358c36fcdad3ea1db263ec4d484a70ad543e Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:56:50 2016 -0700 mm, compaction: update compaction_result ordering compaction_result will be used as the primary feedback channel for compaction users. At the same time try_to_compact_pages (and potentially others) assume a certain ordering where a more specific feedback takes precendence. This gets a bit awkward when we have conflicting feedback from different zones. E.g one returing COMPACT_COMPLETE meaning the full zone has been scanned without any outcome while other returns with COMPACT_PARTIAL aka made some progress. The caller should get COMPACT_PARTIAL because that means that the compaction still can make some progress. The same applies for COMPACT_PARTIAL vs COMPACT_PARTIAL_SKIPPED. Reorder PARTIAL to be the largest one so the larger the value is the more progress we have done. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/compaction.h | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) commit c8f7de0bfae36e8532e5e25a39d15407f02aca78 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:56:47 2016 -0700 mm, compaction: distinguish between full and partial COMPACT_COMPLETE COMPACT_COMPLETE now means that compaction and free scanner met. This is not very useful information if somebody just wants to use this feedback and make any decisions based on that. The current caller might be a poor guy who just happened to scan tiny portion of the zone and that could be the reason no suitable pages were compacted. Make sure we distinguish the full and partial zone walks. Consumers should treat COMPACT_PARTIAL_SKIPPED as a potential success and be optimistic in retrying. The existing users of COMPACT_COMPLETE are conservatively changed to use COMPACT_PARTIAL_SKIPPED as well but some of them should be probably reconsidered and only defer the compaction only for COMPACT_COMPLETE with the new semantic. This patch shouldn't introduce any functional changes. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/compaction.h | 10 +++++++++- include/trace/events/compaction.h | 1 + mm/compaction.c | 14 +++++++++++--- mm/internal.h | 1 + 4 files changed, 22 insertions(+), 4 deletions(-) commit 1d4746d395975e0ff5103e20ab169d1a95b4ef9e Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:56:44 2016 -0700 mm, compaction: distinguish COMPACT_DEFERRED from COMPACT_SKIPPED try_to_compact_pages() can currently return COMPACT_SKIPPED even when the compaction is defered for some zone just because zone DMA is skipped in 99% of cases due to watermark checks. This makes COMPACT_DEFERRED basically unusable for the page allocator as a feedback mechanism. Make sure we distinguish those two states properly and switch their ordering in the enum. This would mean that the COMPACT_SKIPPED will be returned only when all eligible zones are skipped. As a result COMPACT_DEFERRED handling for THP in __alloc_pages_slowpath will be more precise and we would bail out rather than reclaim. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/compaction.h | 7 +++++-- include/trace/events/compaction.h | 2 +- mm/compaction.c | 8 +++++--- 3 files changed, 11 insertions(+), 6 deletions(-) commit c46649deae3f00aa8ba8716f0ddb8eef2dc9532f Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:56:41 2016 -0700 mm, compaction: cover all compaction mode in compact_zone The compiler is complaining after "mm, compaction: change COMPACT_ constants into enum" mm/compaction.c: In function `compact_zone': mm/compaction.c:1350:2: warning: enumeration value `COMPACT_DEFERRED' not handled in switch [-Wswitch] switch (ret) { ^ mm/compaction.c:1350:2: warning: enumeration value `COMPACT_COMPLETE' not handled in switch [-Wswitch] mm/compaction.c:1350:2: warning: enumeration value `COMPACT_NO_SUITABLE_PAGE' not handled in switch [-Wswitch] mm/compaction.c:1350:2: warning: enumeration value `COMPACT_NOT_SUITABLE_ZONE' not handled in switch [-Wswitch] mm/compaction.c:1350:2: warning: enumeration value `COMPACT_CONTENDED' not handled in switch [-Wswitch] compaction_suitable is allowed to return only COMPACT_PARTIAL, COMPACT_SKIPPED and COMPACT_CONTINUE so other cases are simply impossible. Put a VM_BUG_ON to catch an impossible return value. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/compaction.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) commit ea7ab982b6bdb7ce218fd3a7850bb2e2b414fdd0 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:56:38 2016 -0700 mm, compaction: change COMPACT_ constants into enum Compaction code is doing weird dances between COMPACT_FOO -> int -> unsigned long But there doesn't seem to be any reason for that. All functions which return/use one of those constants are not expecting any other value so it really makes sense to define an enum for them and make it clear that no other values are expected. This is a pure cleanup and shouldn't introduce any functional changes. Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/compaction.h | 45 +++++++++++++++++++++++++++------------------ mm/compaction.c | 27 ++++++++++++++------------- mm/page_alloc.c | 2 +- 3 files changed, 42 insertions(+), 32 deletions(-) commit b6459cc154e804f0de0d61fa023c4946b742cc96 Author: Michal Hocko <mhocko@suse.com> Date: Fri May 20 16:56:34 2016 -0700 vmscan: consider classzone_idx in compaction_ready Motivation: As pointed out by Linus [2][3] relying on zone_reclaimable as a way to communicate the reclaim progress is rater dubious. I tend to agree, not only it is really obscure, it is not hard to imagine cases where a single page freed in the loop keeps all the reclaimers looping without getting any progress because their gfp_mask wouldn't allow to get that page anyway (e.g. single GFP_ATOMIC alloc and free loop). This is rather rare so it doesn't happen in the practice but the current logic which we have is rather obscure and hard to follow a also non-deterministic. This is an attempt to make the OOM detection more deterministic and easier to follow because each reclaimer basically tracks its own progress which is implemented at the page allocator layer rather spread out between the allocator and the reclaim. The more on the implementation is described in the first patch. I have tested several different scenarios but it should be clear that testing OOM killer is quite hard to be representative. There is usually a tiny gap between almost OOM and full blown OOM which is often time sensitive. Anyway, I have tested the following 2 scenarios and I would appreciate if there are more to test. Testing environment: a virtual machine with 2G of RAM and 2CPUs without any swap to make the OOM more deterministic. 1) 2 writers (each doing dd with 4M blocks to an xfs partition with 1G file size, removes the files and starts over again) running in parallel for 10s to build up a lot of dirty pages when 100 parallel mem_eaters (anon private populated mmap which waits until it gets signal) with 80M each. This causes an OOM flood of course and I have compared both patched and unpatched kernels. The test is considered finished after there are no OOM conditions detected. This should tell us whether there are any excessive kills or some of them premature (e.g. due to dirty pages): I have performed two runs this time each after a fresh boot. * base kernel $ grep "Out of memory:" base-oom-run1.log | wc -l 78 $ grep "Out of memory:" base-oom-run2.log | wc -l 78 $ grep "Kill process" base-oom-run1.log | tail -n1 [ 91.391203] Out of memory: Kill process 3061 (mem_eater) score 39 or sacrifice child $ grep "Kill process" base-oom-run2.log | tail -n1 [ 82.141919] Out of memory: Kill process 3086 (mem_eater) score 39 or sacrifice child $ grep "DMA32 free:" base-oom-run1.log | sed 's@.*free:\([0-9]*\)kB.*@\1@' | calc_min_max.awk min: 5376.00 max: 6776.00 avg: 5530.75 std: 166.50 nr: 61 $ grep "DMA32 free:" base-oom-run2.log | sed 's@.*free:\([0-9]*\)kB.*@\1@' | calc_min_max.awk min: 5416.00 max: 5608.00 avg: 5514.15 std: 42.94 nr: 52 $ grep "DMA32.*all_unreclaimable? no" base-oom-run1.log | wc -l 1 $ grep "DMA32.*all_unreclaimable? no" base-oom-run2.log | wc -l 3 * patched kernel $ grep "Out of memory:" patched-oom-run1.log | wc -l 78 miso@tiehlicka /mnt/share/devel/miso/kvm $ grep "Out of memory:" patched-oom-run2.log | wc -l 77 e grep "Kill process" patched-oom-run1.log | tail -n1 [ 497.317732] Out of memory: Kill process 3108 (mem_eater) score 39 or sacrifice child $ grep "Kill process" patched-oom-run2.log | tail -n1 [ 316.169920] Out of memory: Kill process 3093 (mem_eater) score 39 or sacrifice child $ grep "DMA32 free:" patched-oom-run1.log | sed 's@.*free:\([0-9]*\)kB.*@\1@' | calc_min_max.awk min: 5420.00 max: 5808.00 avg: 5513.90 std: 60.45 nr: 78 $ grep "DMA32 free:" patched-oom-run2.log | sed 's@.*free:\([0-9]*\)kB.*@\1@' | calc_min_max.awk min: 5380.00 max: 6384.00 avg: 5520.94 std: 136.84 nr: 77 e grep "DMA32.*all_unreclaimable? no" patched-oom-run1.log | wc -l 2 $ grep "DMA32.*all_unreclaimable? no" patched-oom-run2.log | wc -l 3 The patched kernel run noticeably longer while invoking OOM killer same number of times. This means that the original implementation is much more aggressive and triggers the OOM killer sooner. free pages stats show that neither kernels went OOM too early most of the time, though. I guess the difference is in the backoff when retries without any progress do sleep for a while if there is memory under writeback or dirty which is highly likely considering the parallel IO. Both kernels have seen races where zone wasn't marked unreclaimable and we still hit the OOM killer. This is most likely a race where a task managed to exit between the last allocation attempt and the oom killer invocation. 2) 2 writers again with 10s of run and then 10 mem_eaters to consume as much memory as possible without triggering the OOM killer. This required a lot of tuning but I've considered 3 consecutive runs in three different boots without OOM as a success. * base kernel size=$(awk '/MemFree/{printf "%dK", ($2/10)-(16*1024)}' /proc/meminfo) * patched kernel size=$(awk '/MemFree/{printf "%dK", ($2/10)-(12*1024)}' /proc/meminfo) That means 40M more memory was usable without triggering OOM killer. The base kernel sometimes managed to handle the same as patched but it wasn't consistent and failed in at least on of the 3 runs. This seems like a minor improvement. I was testing also GPF_REPEAT costly requests (hughetlb) with fragmented memory and under memory pressure. The results are in patch 11 where the logic is implemented. In short I can see huge improvement there. I am certainly interested in other usecases as well as well as any feedback. Especially those which require higher order requests. This patch (of 14): While playing with the oom detection rework [1] I have noticed that my heavy order-9 (hugetlb) load close to OOM ended up in an endless loop where the reclaim hasn't made any progress but did_some_progress didn't reflect that and compaction_suitable was backing off because no zone is above low wmark + 1 << order. It turned out that this is in fact an old standing bug in compaction_ready which ignores the requested_highidx and did the watermark check for 0 classzone_idx. This succeeds for zone DMA most of the time as the zone is mostly unused because of lowmem protection. As a result costly high order allocatios always report a successfull progress even when there was none. This wasn't a problem so far because these allocations usually fail quite early or retry only few times with __GFP_REPEAT but this will change after later patch in this series so make sure to not lie about the progress and propagate requested_highidx down to compaction_ready and use it for both the watermak check and compaction_suitable to fix this issue. [1] http://lkml.kernel.org/r/1459855533-4600-1-git-send-email-mhocko@kernel.org [2] https://lkml.org/lkml/2015/10/12/808 [3] https://lkml.org/lkml/2015/10/13/597 Signed-off-by: Michal Hocko <mhocko@suse.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@suse.de> Cc: David Rientjes <rientjes@google.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Joonsoo Kim <js1304@gmail.com> Cc: Vladimir Davydov <vdavydov@virtuozzo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/vmscan.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 59dc76b0d4dfdd7dc46a1010e4afb44f60f3e97f Author: Rik van Riel <riel@redhat.com> Date: Fri May 20 16:56:31 2016 -0700 mm: vmscan: reduce size of inactive file list The inactive file list should still be large enough to contain readahead windows and freshly written file data, but it no longer is the only source for detecting multiple accesses to file pages. The workingset refault measurement code causes recently evicted file pages that get accessed again after a shorter interval to be promoted directly to the active list. With that mechanism in place, we can afford to (on a larger system) dedicate more memory to the active file list, so we can actually cache more of the frequently used file pages in memory, and not have them pushed out by streaming writes, once-used streaming file reads, etc. This can help things like database workloads, where only half the page cache can currently be used to cache the database working set. This patch automatically increases that fraction on larger systems, using the same ratio that has already been used for anonymous memory. [hannes@cmpxchg.org: cgroup-awareness] Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reported-by: Andres Freund <andres@anarazel.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/memcontrol.h | 25 ----------- mm/page_alloc.c | 44 ------------------- mm/vmscan.c | 104 ++++++++++++++++++--------------------------- 3 files changed, 42 insertions(+), 131 deletions(-) commit bbddabe2e436aa7869b3ac5248df5c14ddde0cbf Author: Johannes Weiner <hannes@cmpxchg.org> Date: Fri May 20 16:56:28 2016 -0700 mm: filemap: only do access activations on reads Andres observed that his database workload is struggling with the transaction journal creating pressure on frequently read pages. Access patterns like transaction journals frequently write the same pages over and over, but in the majority of cases those pages are never read back. There are no caching benefits to be had for those pages, so activating them and having them put pressure on pages that do benefit from caching is a bad choice. Leave page activations to read accesses and don't promote pages based on writes alone. It could be said that partially written pages do contain cache-worthy data, because even if *userspace* does not access the unwritten part, the kernel still has to read it from the filesystem for correctness. However, a counter argument is that these pages enjoy at least *some* protection over other inactive file pages through the writeback cache, in the sense that dirty pages are written back with a delay and cache reclaim leaves them alone until they have been written back to disk. Should that turn out to be insufficient and we see increased read IO from partial writes under memory pressure, we can always go back and update grab_cache_page_write_begin() to take (pos, len) so that it can tell partial writes from pages that don't need partial reads. But for now, keep it simple. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reported-by: Andres Freund <andres@anarazel.de> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/filemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f0281a00fe80f0e689dd51e68c3aed5f6ef1bf58 Author: Rik van Riel <riel@redhat.com> Date: Fri May 20 16:56:25 2016 -0700 mm: workingset: only do workingset activations on reads This is a follow-up to http://www.spinics.net/lists/linux-mm/msg101739.html where Andres reported his database workingset being pushed out by the minimum size enforcement of the inactive file list - currently 50% of cache - as well as repeatedly written file pages that are never actually read. Two changes fell out of the discussions. The first change observes that pages that are only ever written don't benefit from caching beyond what the writeback cache does for partial page writes, and so we shouldn't promote them to the active file list where they compete with pages whose cached data is actually accessed repeatedly. This change comes in two patches - one for in-cache write accesses and one for refaults triggered by writes, neither of which should promote a cache page. Second, with the refault detection we don't need to set 50% of the cache aside for used-once cache anymore since we can detect frequently used pages even when they are evicted between accesses. We can allow the active list to be bigger and thus protect a bigger workingset that isn't challenged by streamers. Depending on the access patterns, this can increase major faults during workingset transitions for better performance during stable phases. This patch (of 3): When rewriting a page, the data in that page is replaced with new data. This means that evicting something else from the active file list, in order to cache data that will be replaced by something else, is likely to be a waste of memory. It is better to save the active list for frequently read pages, because reads actually use the data that is in the page. This patch ignores partial writes, because it is unclear whether the complexity of identifying those is worth any potential performance gain obtained from better caching pages that see repeated partial writes at large enough intervals to not get caught by the use-twice promotion code used for the inactive file list. Signed-off-by: Rik van Riel <riel@redhat.com> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reported-by: Andres Freund <andres@anarazel.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/filemap.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 20c698d7791420fb242a0d49b80790fb2d951ace Merge: 33656a1 6b1cabe Author: David S. Miller <davem@davemloft.net> Date: Fri May 20 17:55:51 2016 -0700 Merge branch 'sparc32-cosmetic-changes' Sam Ravnborg says: ==================== sparc32: kgdb_32 and STRICT_MM_TYPECHECKS updates A few cosmetic pathes for sparc32 follows. I noticed some inconsistency in kgdb_32 that triggered a few patches. The inconsistency in kgdb_32 turned out to have no functional impact. But I anyway fixed it so kgdb_32 and kgdb_64 became just a tiny bit more alike. The STRICT_MM_TYPECHECKS patch was triggered by a discussion on linux-arch where Arnd considered removing this cruft. The resulting benary of srmmu.c (I checked an assembler file) was _smaller_ when I defined STRICT_MM_TYPECHECKS. But due to lack of testing I left it undefined. With the build errors fixed it should be trivial to try out if defining STRICT_MM_TYPECHECKS breaks anything. Any takers? As I miss any working sparc32 gear for the moment this has only been build tested - so please consider if it is worth taking the risk to apply the patches. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 6b1cabe8992441afb542503781f11b9cce91e285 Author: Sam Ravnborg <sam@ravnborg.org> Date: Fri Apr 22 19:41:07 2016 +0200 sparc32: drop superfluous cast in calls to __nocache_pa() Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net> arch/sparc/include/asm/pgalloc_32.h | 2 +- arch/sparc/mm/srmmu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 6e6e41879e07daccb967bc75a31f29689354d11b Author: Sam Ravnborg <sam@ravnborg.org> Date: Fri Apr 22 19:41:06 2016 +0200 sparc32: fix build with STRICT_MM_TYPECHECKS Based on recent thread on linux-arch (some weeks ago) I decided to check how much work was required to build sparc32 with STRICT_MM_TYPECHECKS enabled. The resulting binary (checked srmmu.o) was to my suprise smaller with STRICT_MM_TYPECHECKS defined, than without. As I have no working gear to test sparc32 bits at for the moment, I did not enable STRICT_MM_TYPECHECKS - but was tempeted to do so. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net> arch/sparc/include/asm/page_32.h | 2 -- arch/sparc/include/asm/pgalloc_32.h | 2 +- arch/sparc/include/asm/pgtable_32.h | 2 +- arch/sparc/mm/io-unit.c | 4 ++-- arch/sparc/mm/srmmu.c | 15 ++++++++++----- 5 files changed, 14 insertions(+), 11 deletions(-) commit 3c46e2d61cfc389dc6e000489fcfcaea805710e0 Author: Sam Ravnborg <sam@ravnborg.org> Date: Fri Apr 22 19:41:05 2016 +0200 sparc32: use proper prototype for trapbase This killed an extern ... in a .c file. No functional change. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net> arch/sparc/kernel/kernel.h | 1 + arch/sparc/kernel/kgdb_32.c | 3 +-- arch/sparc/kernel/setup_32.c | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) commit 06fc7b5008d7f0be2912b830725035616756d183 Author: Sam Ravnborg <sam@ravnborg.org> Date: Fri Apr 22 19:41:04 2016 +0200 sparc32: drop local prototype in kgdb_32 Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net> arch/sparc/kernel/kgdb_32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d097efa95059e6a36a365add3deaf43fcafc4067 Author: Sam Ravnborg <sam@ravnborg.org> Date: Fri Apr 22 19:41:03 2016 +0200 sparc32: drop hardcoding trap_level in kgdb_trap Fix this so we pass the trap_level from the actual trap code like we do in sparc64. Add use on ENTRY(), ENDPROC() in the assembler function too. This fixes a bug where the hardcoded value for trap_level was the sparc64 value. As the generic code does not use the trap_level argument (for sparc32) - this patch does not have any functional impact. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net> arch/sparc/include/asm/head_32.h | 8 ++++---- arch/sparc/include/asm/kgdb.h | 2 +- arch/sparc/kernel/entry.S | 10 ++++------ arch/sparc/kernel/kgdb_32.c | 6 +++--- 4 files changed, 12 insertions(+), 14 deletions(-) commit 95829b3a9c0b1d88778b23bc2afdf5a83de066ff Author: Neil Horman <nhorman@tuxdriver.com> Date: Thu May 19 11:30:54 2016 -0400 net: suppress warnings on dev_alloc_skb Noticed an allocation failure in a network driver the other day on a 32 bit system: DMA-API: debugging out of memory - disabling bnx2fc: adapter_lookup: hba NULL lldpad: page allocation failure. order:0, mode:0x4120 Pid: 4556, comm: lldpad Not tainted 2.6.32-639.el6.i686.debug #1 Call Trace: [<c08a4086>] ? printk+0x19/0x23 [<c05166a4>] ? __alloc_pages_nodemask+0x664/0x830 [<c0649d02>] ? free_object+0x82/0xa0 [<fb4e2c9b>] ? ixgbe_alloc_rx_buffers+0x10b/0x1d0 [ixgbe] [<fb4e2fff>] ? ixgbe_configure_rx_ring+0x29f/0x420 [ixgbe] [<fb4e228c>] ? ixgbe_configure_tx_ring+0x15c/0x220 [ixgbe] [<fb4e3709>] ? ixgbe_configure+0x589/0xc00 [ixgbe] [<fb4e7be7>] ? ixgbe_open+0xa7/0x5c0 [ixgbe] [<fb503ce6>] ? ixgbe_init_interrupt_scheme+0x5b6/0x970 [ixgbe] [<fb4e8e54>] ? ixgbe_setup_tc+0x1a4/0x260 [ixgbe] [<fb505a9f>] ? ixgbe_dcbnl_set_state+0x7f/0x90 [ixgbe] [<c088d80d>] ? dcb_doit+0x10ed/0x16d0 ... Thought that perhaps the big splat in the logs wasn't really necessecary, as all call sites for dev_alloc_skb: a) check the return code for the function and b) either print their own error message or have a recovery path that makes the warning moot. Fix it by modifying dev_alloc_pages to pass __GFP_NOWARN as a gfp flag to suppress the warning applies to the net tree Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: "David S. Miller" <davem@davemloft.net> CC: Eric Dumazet <eric.dumazet@gmail.com> CC: Alexander Duyck <alexander.duyck@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/linux/skbuff.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f0a3fdca794d1e68ae284ef4caefe681f7c18e89 Author: Nicolas Dichtel <nicolas.dichtel@6wind.com> Date: Thu May 19 17:26:29 2016 +0200 uapi glibc compat: fix compilation when !__USE_MISC in glibc These structures are defined only if __USE_MISC is set in glibc net/if.h headers, ie when _BSD_SOURCE or _SVID_SOURCE are defined. CC: Jan Engelhardt <jengelh@inai.de> CC: Josh Boyer <jwboyer@fedoraproject.org> CC: Stephen Hemminger <shemming@brocade.com> CC: Waldemar Brodkorb <mail@waldemar-brodkorb.de> CC: Gabriel Laskar <gabriel@lse.epita.fr> CC: Mikko Rapeli <mikko.rapeli@iki.fi> Fixes: 4a91cb61bb99 ("uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/uapi/linux/libc-compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e5aed006be918af163eb397e45aa5ea6cefd5e01 Author: Hannes Frederic Sowa <hannes@stressinduktion.org> Date: Thu May 19 15:58:33 2016 +0200 udp: prevent skbs lingering in tunnel socket queues In case we find a socket with encapsulation enabled we should call the encap_recv function even if just a udp header without payload is available. The callbacks are responsible for correctly verifying and dropping the packets. Also, in case the header validation fails for geneve and vxlan we shouldn't put the skb back into the socket queue, no one will pick them up there. Instead we can simply discard them in the respective encap_recv functions. Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/geneve.c | 10 +++------- drivers/net/vxlan.c | 4 ++-- net/ipv4/udp.c | 2 +- net/ipv6/udp.c | 2 +- 4 files changed, 7 insertions(+), 11 deletions(-) commit cb543e80f43b2db9d3adcc80d522b27829e60d82 Merge: 238a958 1b9b69e Author: David S. Miller <davem@davemloft.net> Date: Fri May 20 19:53:09 2016 -0400 Merge branch 'bpf-verifier-fixes' Alexei Starovoitov says: ==================== bpf: verifier fixes Further testing of 'direct packet access' uncovered several usability issues. Fix them. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 1b9b69ecb3a5236d4d3da0f0fa11af916371841e Author: Alexei Starovoitov <ast@fb.com> Date: Thu May 19 18:17:14 2016 -0700 bpf: teach verifier to recognize imm += ptr pattern Humans don't write C code like: u8 *ptr = skb->data; int imm = 4; imm += ptr; but from llvm backend point of view 'imm' and 'ptr' are registers and imm += ptr may be preferred vs ptr += imm depending which register value will be used further in the code, while verifier can only recognize ptr += imm. That caused small unrelated changes in the C code of the bpf program to trigger rejection by the verifier. Therefore teach the verifier to recognize both ptr += imm and imm += ptr. For example: when R6=pkt(id=0,off=0,r=62) R7=imm22 after r7 += r6 instruction will be R6=pkt(id=0,off=0,r=62) R7=pkt(id=0,off=22,r=62) Fixes: 969bf05eb3ce ("bpf: direct packet access") Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net> kernel/bpf/verifier.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit d91b28ed42de99217efb2e8cb0357263d6fb737c Author: Alexei Starovoitov <ast@fb.com> Date: Thu May 19 18:17:13 2016 -0700 bpf: support decreasing order in direct packet access when packet headers are accessed in 'decreasing' order (like TCP port may be fetched before the program reads IP src) the llvm may generate the following code: [...] // R7=pkt(id=0,off=22,r=70) r2 = *(u32 *)(r7 +0) // good access [...] r7 += 40 // R7=pkt(id=0,off=62,r=70) r8 = *(u32 *)(r7 +0) // good access [...] r1 = *(u32 *)(r7 -20) // this one will fail though it's within a safe range // it's doing *(u32*)(skb->data + 42) Fix verifier to recognize such code pattern Alos turned out that 'off > range' condition is not a verifier bug. It's a buggy program that may do something like: if (ptr + 50 > data_end) return 0; ptr += 60; *(u32*)ptr; in such case emit "invalid access to packet, off=0 size=4, R1(id=0,off=60,r=50)" error message, so all information is available for the program author to fix the program. Fixes: 969bf05eb3ce ("bpf: direct packet access") Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net> kernel/bpf/verifier.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 238a9584e9e2c7b3ea23924e9183fee05d584789 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Thu May 19 19:26:50 2016 +0530 net: usb: ch9200: use kmemdup Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/usb/ch9200.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 5877debe27917dfd7aa8f960c228dbbc1de8282f Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Thu May 19 19:24:41 2016 +0530 ps3_gelic: use kmemdup Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/toshiba/ps3_gelic_wireless.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 7c542772cc5ff061ec3d06658f5d36304bcd5395 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Thu May 19 19:22:49 2016 +0530 net:liquidio: use kmemdup Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/cavium/liquidio/octeon_device.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit e27f4a942a0ee4b84567a3c6cfa84f273e55cbb7 Author: Eric W. Biederman <ebiederm@xmission.com> Date: Fri May 20 17:22:48 2016 -0500 bpf: Use mount_nodev not mount_ns to mount the bpf filesystem While reviewing the filesystems that set FS_USERNS_MOUNT I spotted the bpf filesystem. Looking at the code I saw a broken usage of mount_ns with current->nsproxy->mnt_ns. As the code does not acquire a reference to the mount namespace it can not possibly be correct to store the mount namespace on the superblock as it does. Replace mount_ns with mount_nodev so that each mount of the bpf filesystem returns a distinct instance, and the code is not buggy. In discussion with Hannes Frederic Sowa it was reported that the use of mount_ns was an attempt to have one bpf instance per mount namespace, in an attempt to keep resources that pin resources from hiding. That intent simply does not work, the vfs is not built to allow that kind of behavior. Which means that the bpf filesystem really is buggy both semantically and in it's implemenation as it does not nor can it implement the original intent. This change is userspace visible, but my experience with similar filesystems leads me to believe nothing will break with a model of each mount of the bpf filesystem is distinct from all others. Fixes: b2197755b263 ("bpf: add support for persistent maps/progs") Cc: Hannes Frederic Sowa <hannes@stressinduktion.org> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> Acked-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: David S. Miller <davem@davemloft.net> kernel/bpf/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 56025caa821d8e398b7cff2c45fb1e3e769549d7 Merge: 05a5648 52776a7 Author: David S. Miller <davem@davemloft.net> Date: Fri May 20 19:40:35 2016 -0400 Merge tag 'wireless-drivers-next-for-davem-2016-05-13' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next Kalle Valo says: ==================== wireless-drivers patches for 4.7 Major changes: iwlwifi * remove IWLWIFI_DEBUG_EXPERIMENTAL_UCODE kconfig option * work for RX multiqueue continues * dynamic queue allocation work continues * add Luca as maintainer * a bunch of fixes and improvements all over brcmfmac * add 4356 sdio support ath6kl * add ability to set debug uart baud rate with a module parameter wil6210 * add debugfs file to configure firmware led functionality ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 05a56487174d33fff5986f13c0c8e4b32f046da9 Author: Rafal Redzimski <rafal.f.redzimski@intel.com> Date: Thu May 19 11:56:09 2016 +0200 net: cdc_ncm: update datagram size after changing mtu Current implementation updates the mtu size and notify cdc_ncm device using USB_CDC_SET_MAX_DATAGRAM_SIZE request about datagram size change instead of changing rx_urb_size. Whenever mtu is being changed, datagram size should also be updated. Also updating maxmtu formula so it takes max_datagram_size with use of cdc_ncm_max_dgram_size() and not ctx. Signed-off-by: Robert Dobrowolski <robert.dobrowolski@linux.intel.com> Signed-off-by: Rafal Redzimski <rafal.f.redzimski@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/usb/cdc_ncm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit addf8fc4acb1cf79492ac64966f07178793cb3d7 Author: Jason Wang <jasowang@redhat.com> Date: Thu May 19 13:36:51 2016 +0800 tuntap: correctly wake up process during uninit We used to check dev->reg_state against NETREG_REGISTERED after each time we are woke up. But after commit 9e641bdcfa4e ("net-tun: restructure tun_do_read for better sleep/wakeup efficiency"), it uses skb_recv_datagram() which does not check dev->reg_state. This will result if we delete a tun/tap device after a process is blocked in the reading. The device will wait for the reference count which was held by that process for ever. Fixes this by using RCV_SHUTDOWN which will be checked during sk_recv_datagram() before trying to wake up the process during uninit. Fixes: 9e641bdcfa4e ("net-tun: restructure tun_do_read for better sleep/wakeup efficiency") Cc: Eric Dumazet <edumazet@google.com> Cc: Xi Wang <xii@google.com> Cc: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Acked-by: Eric Dumazet <edumazet@google.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/tun.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 7fd3c56d60e9919be6b1ef70524eeb28f140653b Merge: 9a0351d bf2d1df Author: David S. Miller <davem@davemloft.net> Date: Fri May 20 19:25:58 2016 -0400 Merge branch 'GREoIPV6-followups' Alexander Duyck says: ==================== Follow-ups for GUEoIPv6 patches This patch series is meant to be applied after: [PATCH v7 net-next 00/16] ipv6: Enable GUEoIPv6 and more fixes for v6 tunneling The first patch addresses an issue we already resolved in the GREv4 and is now present in GREv6 with the introduction of FOU/GUE for IPv6 based GRE tunnels. The second patch goes through and enables IPv6 tunnel offloads for the Intel NICs that already support the IPv4 based IP-in-IP tunnel offloads. I have only done a bit of touch testing but have seen ~20 Gb/s over an i40e interface using a v4-in-v6 tunnel, and I have verified IPv6 GRE is still passing traffic at around the same rate. I plan to do further testing but with these patches present it should enable a wider audience to be able to test the new features introduced in Tom's patchset with hardware offloads. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit bf2d1df395028519f7a435ccde02820d16ec27a7 Author: Alexander Duyck <aduyck@mirantis.com> Date: Wed May 18 10:44:53 2016 -0700 intel: Add support for IPv6 IP-in-IP offload This patch adds support for offloading IPXIP6 type packets that represent either IPv4 or IPv6 encapsulated inside of an IPv6 outer IP header. In addition with this change we should also be able to support FOU encapsulated traffic with outer IPv6 headers. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/intel/i40e/i40e_main.c | 1 + drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1 + drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 1 + drivers/net/ethernet/intel/i40evf/i40evf_main.c | 1 + drivers/net/ethernet/intel/igb/igb_main.c | 1 + drivers/net/ethernet/intel/igbvf/netdev.c | 1 + drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 + drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 1 + 8 files changed, 8 insertions(+) commit 6a5536810180bb2c739df890a36cfa29da1914eb Author: Alexander Duyck <aduyck@mirantis.com> Date: Wed May 18 10:44:47 2016 -0700 ip6_gre: Do not allow segmentation offloads GRE_CSUM is enabled with FOU/GUE This patch addresses the same issue we had for IPv4 where enabling GRE with an inner checksum cannot be supported with FOU/GUE due to the fact that they will jump past the GRE header at it is treated like a tunnel header. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_gre.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 5dfa0c73953360e07a47731e412d33dfc896bf4e Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Thu May 19 09:11:52 2016 +0100 ACPI / battery: Correctly serialise with the pending async probe async_synchronize_cookie() only serialises all tasks up to the specified cookie, and importantly does not wait for the task corresponding with the cookie. [This is so that it can be trivially used from inside the async_func_t in order to serialise with all preceding tasks.] In order to serialise with acpi_battery_init_async() we need to compensate and pass in the next cookie instead. The impact today is zero since performing an async_schedule() from inside a module init function will trigger an async_synchronize_full() prior to the module loader's completion. However, if the probe was moved to its own unregistered async_domain, then the async_synchronize_cookie would be replaced with an async_synchronize_full_domain. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/battery.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a0351dfca14b44443a98c0cafe4de234d1ba469 Merge: fc64869 c948bb5 Author: David S. Miller <davem@davemloft.net> Date: Fri May 20 19:20:12 2016 -0400 Merge branch 'rds-conn-spamming' Sowmini Varadhan says: ==================== RDS: TCP: connection spamming fixes We have been testing the RDS-TCP code with a connection spammer that sends incoming SYNs to the RDS listen port well after an rds-tcp connection has been established, and found a few race-windows that are fixed by this patch series. Patch 1 avoids a null pointer deref when an incoming SYN shows up when a netns is being dismantled, or when the rds-tcp module is being unloaded. Patch 2 addresses the case when a SYN is received after the connection arbitration algorithm has converged: the incoming SYN should not needlessly quiesce the transmit path, and it should not result in needless TCP connection resets due to re-execution of the connection arbitration logic. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit c948bb5c2cc4d63f9d76fc02baf5a8331e3cd27f Author: Sowmini Varadhan <sowmini.varadhan@oracle.com> Date: Wed May 18 10:06:24 2016 -0700 RDS: TCP: Avoid rds connection churn from rogue SYNs When a rogue SYN is received after the connection arbitration algorithm has converged, the incoming SYN should not needlessly quiesce the transmit path, and it should not result in needless TCP connection resets due to re-execution of the connection arbitration logic. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/rds/tcp_listen.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 37e14f4fe2991f6089a9c8a3830e3ab634ec7190 Author: Sowmini Varadhan <sowmini.varadhan@oracle.com> Date: Wed May 18 10:06:23 2016 -0700 RDS: TCP: rds_tcp_accept_worker() must exit gracefully when terminating rds-tcp There are two instances where we want to terminate RDS-TCP: when exiting the netns or during module unload. In either case, the termination sequence is to stop the listen socket, mark the rtn->rds_tcp_listen_sock as null, and flush any accept workqs. Thus any workqs that get flushed at this point will encounter a null rds_tcp_listen_sock, and must exit gracefully to allow the RDS-TCP termination to complete successfully. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/rds/tcp_listen.c | 3 +++ 1 file changed, 3 insertions(+) commit be1332c0994fbf016fa4ef0f0c4acda566fe6cb3 Merge: e7f44b6 68cd4ce Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 15:11:26 2016 -0700 Merge tag 'gfs2-4.7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 Pull GFS2 updates from Bob Peterson: "We've got nine patches this time: - Abhi Das has two patches that fix a GFS2 splice issue (and an adjustment). - Ben Marzinski has a patch which allows the proper unmount of a GFS2 file system after hitting a withdraw error. - I have a patch to fix a problem where GFS2 would dereference an error value, plus three cosmetic / refactoring patches. - Daniel DeFreez has a patch to fix two glock reference count problems, where GFS2 was not properly "uninitializing" its glock holder on error paths. - Denys Vlasenko has a patch to change a function to not be inlined, thus reducing the memory footprint of the GFS2 module" * tag 'gfs2-4.7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2: GFS2: Refactor gfs2_remove_from_journal GFS2: Remove allocation parms from gfs2_rbm_find gfs2: use inode_lock/unlock instead of accessing i_mutex directly GFS2: Add calls to gfs2_holder_uninit in two error handlers GFS2: Don't dereference inode in gfs2_inode_lookup until it's valid GFS2: fs/gfs2/glock.c: Deinline do_error, save 1856 bytes gfs2: Use gfs2 wrapper to sync inode before calling generic_file_splice_read() GFS2: Get rid of dead code in inode_go_demote_ok GFS2: ignore unlock failures after withdraw commit fc64869c48494a401b1fb627c9ecc4e6c1d74b0d Author: Andrey Ryabinin <aryabinin@virtuozzo.com> Date: Wed May 18 19:19:27 2016 +0300 net: sock: move ->sk_shutdown out of bitfields. ->sk_shutdown bits share one bitfield with some other bits in sock struct, such as ->sk_no_check_[r,t]x, ->sk_userlocks ... sock_setsockopt() may write to these bits, while holding the socket lock. In case of AF_UNIX sockets, we change ->sk_shutdown bits while holding only unix_state_lock(). So concurrent setsockopt() and shutdown() may lead to corrupting these bits. Fix this by moving ->sk_shutdown bits out of bitfield into a separate byte. This will not change the 'struct sock' size since ->sk_shutdown moved into previously unused 16-bit hole. Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com> Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/sock.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 911f6b1f57c48c9f379e6658e2e5198d84acdab3 Merge: 9483501 3ee93ea Author: David S. Miller <davem@davemloft.net> Date: Fri May 20 18:03:26 2016 -0400 Merge branch 'GREoIPV6' Tom Herbert says: ==================== ipv6: Enable GUEoIPv6 and more fixes for v6 tunneling This patch set: - Fixes GRE6 to process translate flags correctly from configuration - Adds support for GSO and GRO for ip6ip6 and ip4ip6 - Add support for FOU and GUE in IPv6 - Support GRE, ip6ip6 and ip4ip6 over FOU/GUE - Fixes ip6_input to deal with UDP encapsulations - Some other minor fixes v2: - Removed a check of GSO types in MPLS - Define GSO type SKB_GSO_IPXIP6 and SKB_GSO_IPXIP4 (based on input from Alexander) - Don't define GSO types specifically for IP6IP6 and IP4IP6, above fix makes that unnecessary - Don't bother clearing encapsulation flag in UDP tunnel segment (another item suggested by Alexander). v3: - Address some minor comments from Alexander v4: - Rebase on changes to fix IP TX tunnels - Fix MTU issues in ip4ip6, ip6ip6 - Add test data for above v5: - Address feedback from Shmulik Ladkani regarding extension header code that does not return next header but in instead relies on returning value via nhoff. Solution here is to fix EH processing to return nexthdr value. - Refactored IPv4 encaps so that we won't need to create a ip6_tunnel_core.c when adding encap support IPv6. v6: - Fix build issues with regard to new GSO constants - FIx MTU calculation issues ip6_tunnel.c pointed out byt ALex - Add encap_hlen into headroom for GREv6 to work with FOU/GUE v7: - Added skb_set_inner_ipproto to ip4ip6 and ip6ip6 - Clarified max_headroom in ip6_tnl_xmit - Set features for IPv6 tunnels - Other cleanup suggested by Alexander - Above fixes throughput performance issues in ip4ip6 and ip6ip6, updated test results to reflect that Tested: Various cases of IP tunnels with netperf TCP_STREAM and TCP_RR. - IPv4/GRE/GUE/IPv6 with RCO 1 TCP_STREAM 6616 Mbps 200 TCP_RR 1244043 tps 141/243/446 90/95/99% latencies 86.61% CPU utilization - IPv6/GRE/GUE/IPv6 with RCO 1 TCP_STREAM 6940 Mbps 200 TCP_RR 1270903 tps 138/236/440 90/95/99% latencies 87.51% CPU utilization - IP6IP6 1 TCP_STREAM 5307 Mbps 200 TCP_RR 498981 tps 388/498/631 90/95/99% latencies 19.75% CPU utilization (1 CPU saturated) - IP6IP6/GUE with RCO 1 TCP_STREAM 5575 Mbps 200 TCP_RR 1233818 tps 143/244/451 90/95/99% latencies 87.57 CPU utilization - IP4IP6 1 TCP_STREAM 5235 Mbps 200 TCP_RR 763774 tps 250/318/466 90/95/99% latencies 35.25% CPU utilization (1 CPU saturated) - IP4IP6/GUE with RCO 1 TCP_STREAM 5337 Mbps 200 TCP_RR 1196385 tps 148/251/460 90/95/99% latencies 87.56 CPU utilization - GRE with keyid 200 TCP_RR 744173 tps 258/332/461 90/95/99% latencies 34.59% CPU utilization (1 CPU saturated) ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 3ee93eaf2bbfbe0083f71a18a265d48adbd5bb27 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:24 2016 -0700 ipv6: Don't reset inner headers in ip6_tnl_xmit Since iptunnel_handle_offloads() is called in all paths we can probably drop the block in ip6_tnl_xmit that was checking for skb->encapsulation and resetting the inner headers. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_tunnel.c | 5 ----- 1 file changed, 5 deletions(-) commit b8921ca83eed2496108ee308e9a41c5084089680 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:23 2016 -0700 ip4ip6: Support for GSO/GRO Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/inet_common.h | 5 +++++ net/ipv4/af_inet.c | 12 +++++++----- net/ipv6/ip6_offload.c | 33 ++++++++++++++++++++++++++++++++- net/ipv6/ip6_tunnel.c | 5 +++++ 4 files changed, 49 insertions(+), 6 deletions(-) commit 815d22e55b0eba3bfb8f0ba532ce9ae364fee556 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:22 2016 -0700 ip6ip6: Support for GSO/GRO Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_offload.c | 24 +++++++++++++++++++++--- net/ipv6/ip6_tunnel.c | 5 +++++ 2 files changed, 26 insertions(+), 3 deletions(-) commit 51c052d4f5871554377278762065450b4e64f6d1 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:21 2016 -0700 ipv6: Set features for IPv6 tunnels Need to set dev features, use same values that are used in GREv6. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_tunnel.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit b3a27b519b22d4bf03788f6826190d4c5a130b3c Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:20 2016 -0700 ip6_tunnel: Add support for fou/gue encapsulation Add netlink and setup for encapsulation Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_tunnel.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 1faf3d9f7c06c803397665ada1448f374e8f48e0 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:19 2016 -0700 ip6_gre: Add support for fou/gue encapsulation Add netlink and setup for encapsulation Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_gre.c | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 4 deletions(-) commit aa3463d65e7b9f5ae322db4a12214c2cb041bc8e Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:18 2016 -0700 fou: Add encap ops for IPv6 tunnels This patch add a new fou6 module that provides encapsulation operations for IPv6. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/fou.h | 2 +- net/ipv6/Makefile | 1 + net/ipv6/fou6.c | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+), 1 deletion(-) commit 058214a4d1dfefed9f01a277fadd3590acb5f990 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:17 2016 -0700 ip6_tun: Add infrastructure for doing encapsulation Add encap_hlen and ip_tunnel_encap structure to ip6_tnl. Add functions for getting encap hlen, setting up encap on a tunnel, performing encapsulation operation. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/ip6_tunnel.h | 58 +++++++++++++++++++++++++++++ net/ipv4/ip_tunnel_core.c | 5 +++ net/ipv6/ip6_tunnel.c | 94 ++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 144 insertions(+), 13 deletions(-) commit 5f914b681253966612e052df364c3b8e4a3d5f63 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:16 2016 -0700 fou: Support IPv6 in fou This patch adds receive path support for IPv6 with fou. - Add address family to fou structure for open sockets. This supports AF_INET and AF_INET6. Lookups for fou ports are performed on both the port number and family. - In fou and gue receive adjust tot_len in IPv4 header or payload_len based on address family. - Allow AF_INET6 in FOU_ATTR_AF netlink attribute. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv4/fou.c | 47 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 12 deletions(-) commit dc969b81ebb37d6ec3d7659763bf017ee03f3ac1 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:15 2016 -0700 fou: Split out {fou,gue}_build_header Create __fou_build_header and __gue_build_header. These implement the protocol generic parts of building the fou and gue header. fou_build_header and gue_build_header implement the IPv4 specific functions and call the __*_build_header functions. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/fou.h | 8 ++++---- net/ipv4/fou.c | 47 +++++++++++++++++++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 14 deletions(-) commit 440924bbc0e11fb429ccc25f6d9597d5a7a02296 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:14 2016 -0700 fou: Call setup_udp_tunnel_sock Use helper function to set up UDP tunnel related information for a fou socket. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv4/fou.c | 50 ++++++++++++++++---------------------------------- 1 file changed, 16 insertions(+), 34 deletions(-) commit 55c2bc1432241e7be39b11339bd00e85f878ebd6 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:13 2016 -0700 net: Cleanup encap items in ip_tunnels.h Consolidate all the ip_tunnel_encap definitions in one spot in the header file. Also, move ip_encap_hlen and ip_tunnel_encap from ip_tunnel.c to ip_tunnels.h so they call be called without a dependency on ip_tunnel module. Similarly, move iptun_encaps to ip_tunnel_core.c. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/ip_tunnels.h | 76 ++++++++++++++++++++++++++++++++++++----------- net/ipv4/ip_tunnel.c | 45 ---------------------------- net/ipv4/ip_tunnel_core.c | 4 +++ 3 files changed, 62 insertions(+), 63 deletions(-) commit 1da44f9c15e6389d45e034d5fd0b937e2928b412 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:12 2016 -0700 ipv6: Change "final" protocol processing for encapsulation When performing foo-over-UDP, UDP packets are processed by the encapsulation handler which returns another protocol to process. This may result in processing two (or more) protocols in the loop that are marked as INET6_PROTO_FINAL. The actions taken for hitting a final protocol, in particular the skb_postpull_rcsum can only be performed once. This patch set adds a check of a final protocol has been seen. The rules are: - If the final protocol has not been seen any protocol is processed (final and non-final). In the case of a final protocol, the final actions are taken (like the skb_postpull_rcsum) - If a final protocol has been seen (e.g. an encapsulating UDP header) then no further non-final protocols are allowed (e.g. extension headers). For more final protocols the final actions are not taken (e.g. skb_postpull_rcsum). Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_input.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) commit 4c64242a90a4932260d9ad32b12c745c466e2987 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:11 2016 -0700 ipv6: Fix nexthdr for reinjection In ip6_input_finish the nexthdr protocol is retrieved from the next header offset that is returned in the cb of the skb. This method does not work for UDP encapsulation that may not even have a concept of a nexthdr field (e.g. FOU). This patch checks for a final protocol (INET6_PROTO_FINAL) when a protocol handler returns > 0. If the protocol is not final then resubmission is performed on nhoff value. If the protocol is final then the nexthdr is taken to be the return value. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_input.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) commit 7e13318daa4a67bff2f800923a993ef3818b3c53 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:10 2016 -0700 net: define gso types for IPx over IPv4 and IPv6 This patch defines two new GSO definitions SKB_GSO_IPXIP4 and SKB_GSO_IPXIP6 along with corresponding NETIF_F_GSO_IPXIP4 and NETIF_F_GSO_IPXIP6. These are used to described IP in IP tunnel and what the outer protocol is. The inner protocol can be deduced from other GSO types (e.g. SKB_GSO_TCPV4 and SKB_GSO_TCPV6). The GSO types of SKB_GSO_IPIP and SKB_GSO_SIT are removed (these are both instances of SKB_GSO_IPXIP4). SKB_GSO_IPXIP6 will be used when support for GSO with IP encapsulation over IPv6 is added. Signed-off-by: Tom Herbert <tom@herbertland.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 5 ++--- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++--- drivers/net/ethernet/intel/i40e/i40e_main.c | 3 +-- drivers/net/ethernet/intel/i40e/i40e_txrx.c | 3 +-- drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 3 +-- drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 +-- drivers/net/ethernet/intel/igb/igb_main.c | 3 +-- drivers/net/ethernet/intel/igbvf/netdev.c | 3 +-- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 3 +-- drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 3 +-- include/linux/netdev_features.h | 12 ++++++------ include/linux/netdevice.h | 4 ++-- include/linux/skbuff.h | 4 ++-- net/core/ethtool.c | 4 ++-- net/ipv4/af_inet.c | 2 +- net/ipv4/ipip.c | 2 +- net/ipv6/ip6_offload.c | 4 ++-- net/ipv6/sit.c | 4 ++-- net/netfilter/ipvs/ip_vs_xmit.c | 17 +++++++---------- 19 files changed, 37 insertions(+), 50 deletions(-) commit 5c7cdf339af560f980b12eb6b0b5aa5f68ac6658 Author: Tom Herbert <tom@herbertland.com> Date: Wed May 18 09:06:09 2016 -0700 gso: Remove arbitrary checks for unsupported GSO In several gso_segment functions there are checks of gso_type against a seemingly arbitrary list of SKB_GSO_* flags. This seems like an attempt to identify unsupported GSO types, but since the stack is the one that set these GSO types in the first place this seems unnecessary to do. If a combination isn't valid in the first place that stack should not allow setting it. This is a code simplication especially for add new GSO types. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv4/af_inet.c | 18 ------------------ net/ipv4/gre_offload.c | 14 -------------- net/ipv4/tcp_offload.c | 19 ------------------- net/ipv4/udp_offload.c | 10 ---------- net/ipv6/ip6_offload.c | 18 ------------------ net/ipv6/udp_offload.c | 13 ------------- net/mpls/mpls_gso.c | 11 +---------- 7 files changed, 1 insertion(+), 102 deletions(-) commit 948350140ef060a42621de0de5c396807f7ec1fc Author: Fabio Estevam <fabio.estevam@nxp.com> Date: Wed May 18 13:05:00 2016 -0300 Revert "phy: add support for a reset-gpio specification" Commit da47b4572056 ("phy: add support for a reset-gpio specification") causes the following xtensa qemu crash according to Guenter Roeck: [ 9.366256] libphy: ethoc-mdio: probed [ 9.367389] (null): could not attach to PHY [ 9.368555] (null): failed to probe MDIO bus [ 9.371540] Unable to handle kernel paging request at virtual address 0000001c [ 9.371540] pc = d0320926, ra = 903209d1 [ 9.375358] Oops: sig: 11 [#1] This reverts commit da47b4572056487fd7941c26f73b3e8815ff712a. Reported-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/devicetree/bindings/net/phy.txt | 3 --- drivers/net/phy/phy_device.c | 8 -------- 2 files changed, 11 deletions(-) commit 0f3311a8c266b9f4fae4e5cdfcd9a86970e2b9bd Author: Chao Yu <yuchao0@huawei.com> Date: Sat May 21 00:11:09 2016 +0800 f2fs: fix to update dirty page count correctly Once we failed to merge inline data into inode page during flushing inline inode, we will skip invoking inode_dec_dirty_pages, which makes dirty page count incorrect, result in panic in ->evict_inode, Fix it. ------------[ cut here ]------------ kernel BUG at /home/yuchao/git/devf2fs/inode.c:336! invalid opcode: 0000 [#1] PREEMPT SMP CPU: 3 PID: 10004 Comm: umount Tainted: G O 4.6.0-rc5+ #17 Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006 task: f0c33000 ti: c5212000 task.ti: c5212000 EIP: 0060:[<f89aacb5>] EFLAGS: 00010202 CPU: 3 EIP is at f2fs_evict_inode+0x85/0x490 [f2fs] EAX: 00000001 EBX: c4529ea0 ECX: 00000001 EDX: 00000000 ESI: c0131000 EDI: f89dd0a0 EBP: c5213e9c ESP: c5213e78 DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 CR0: 80050033 CR2: b75878c0 CR3: 1a36a700 CR4: 000406f0 Stack: c4529ea0 c4529ef4 c5213e8c c176d45c c4529ef4 00000000 c4529ea0 c4529fac f89dd0a0 c5213eb0 c1204a68 c5213ed8 c452a2b4 c6680930 c5213ec0 c1204b64 c6680d44 c6680620 c5213eec c120588d ee84b000 ee84b5c0 c5214000 ee84b5e0 Call Trace: [<c176d45c>] ? _raw_spin_unlock+0x2c/0x50 [<c1204a68>] evict+0xa8/0x170 [<c1204b64>] dispose_list+0x34/0x50 [<c120588d>] evict_inodes+0x10d/0x130 [<c11ea941>] generic_shutdown_super+0x41/0xe0 [<c1185190>] ? unregister_shrinker+0x40/0x50 [<c1185190>] ? unregister_shrinker+0x40/0x50 [<c11eac52>] kill_block_super+0x22/0x70 [<f89af23e>] kill_f2fs_super+0x1e/0x20 [f2fs] [<c11eae1d>] deactivate_locked_super+0x3d/0x70 [<c11eb383>] deactivate_super+0x43/0x60 [<c1208ec9>] cleanup_mnt+0x39/0x80 [<c1208f50>] __cleanup_mnt+0x10/0x20 [<c107d091>] task_work_run+0x71/0x90 [<c105725a>] exit_to_usermode_loop+0x72/0x9e [<c1001c7c>] do_fast_syscall_32+0x19c/0x1c0 [<c176dd48>] sysenter_past_esp+0x45/0x74 EIP: [<f89aacb5>] f2fs_evict_inode+0x85/0x490 [f2fs] SS:ESP 0068:c5213e78 ---[ end trace d30536330b7fdc58 ]--- Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/node.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit e7f44b65b532040ac90b73b60ea0b629742ced33 Merge: 76b584d f2c2776 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 14:51:34 2016 -0700 Merge tag 'devicetree-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull devicetree updates from Rob Herring: - Rewrite of the unflattening code to avoid recursion and lessen the stack usage. - Rewrite of the phandle args parsing code to get rid of the fixed args size. This is needed for IOMMU code. - Sync to latest dtc which adds more dts style checking. These warnings are enabled with "W=1" compiles. - Tegra documentation updates related to the above warnings. - A bunch of spelling and other doc fixes. - Various vendor prefix additions. * tag 'devicetree-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (52 commits) devicetree: Add Creative Technology vendor id gpio: dt-bindings: add ibm,ppc4xx-gpio binding of/unittest: Remove unnecessary module.h header inclusion drivers/of: Fix build warning in populate_node() drivers/of: Fix depth when unflattening devicetree of: dynamic: changeset prop-update revert fix drivers/of: Export of_detach_node() drivers/of: Return allocated memory from of_fdt_unflatten_tree() drivers/of: Specify parent node in of_fdt_unflatten_tree() drivers/of: Rename unflatten_dt_node() drivers/of: Avoid recursively calling unflatten_dt_node() drivers/of: Split unflatten_dt_node() of: include errno.h in of_graph.h of: document refcount incrementation of of_get_cpu_node() Documentation: dt: soc: fix spelling mistakes Documentation: dt: power: fix spelling mistake Documentation: dt: pinctrl: fix spelling mistake Documentation: dt: opp: fix spelling mistake Documentation: dt: net: fix spelling mistakes Documentation: dt: mtd: fix spelling mistake ... commit c0fcded2e6879d817cec822b8513a2f6b6e4dfe9 Author: Paul Durrant <Paul.Durrant@citrix.com> Date: Wed May 18 15:55:42 2016 +0100 xen-netback: only deinitialized hash if it was initialized A domain with a frontend that does not implement a control ring has been seen to cause a crash during domain save. This was apparently because the call to xenvif_deinit_hash() in xenvif_disconnect_ctrl() is made regardless of whether a control ring was connected, and hence xenvif_hash_init() was called. This patch brings the call to xenvif_deinit_hash() in xenvif_disconnect_ctrl() inside the if clause that checks whether the control ring event channel was connected. This is sufficient to ensure it is only called if xenvif_init_hash() was called previously. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/xen-netback/interface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 76b584d3125a1f7d8b64e9c522a4555bc2844bde Merge: 7992893 c16d275 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 14:35:07 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma Pull rdma updates from Doug Ledford: "Primary 4.7 merge window changes - Updates to the new Intel X722 iWARP driver - Updates to the hfi1 driver - Fixes for the iw_cxgb4 driver - Misc core fixes - Generic RDMA READ/WRITE API addition - SRP updates - Misc ipoib updates - Minor mlx5 updates" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dledford/rdma: (148 commits) IB/mlx5: Fire the CQ completion handler from tasklet net/mlx5_core: Use tasklet for user-space CQ completion events IB/core: Do not require CAP_NET_ADMIN for packet sniffing IB/mlx4: Fix unaligned access in send_reply_to_slave IB/mlx5: Report Scatter FCS device capability when supported IB/mlx5: Add Scatter FCS support for Raw Packet QP IB/core: Add Scatter FCS create flag IB/core: Add Raw Scatter FCS device capability IB/core: Add extended device capability flags i40iw: pass hw_stats by reference rather than by value i40iw: Remove unnecessary synchronize_irq() before free_irq() i40iw: constify i40iw_vf_cqp_ops structure IB/mlx5: Add UARs write-combining and non-cached mapping IB/mlx5: Allow mapping the free running counter on PROT_EXEC IB/mlx4: Use list_for_each_entry_safe IB/SA: Use correct free function IB/core: Fix a potential array overrun in CMA and SA agent IB/core: Remove unnecessary check in ibnl_rcv_msg IB/IWPM: Fix a potential skb leak RDMA/nes: replace custom print_hex_dump() ... commit 3a17fb329da68cb00558721aff876a80bba2fdb9 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Fri May 20 23:09:49 2016 +0200 PM / sleep: Handle failures in device_suspend_late() consistently Grygorii Strashko reports: The PM runtime will be left disabled for the device if its .suspend_late() callback fails and async suspend is not allowed for this device. In this case device will not be added in dpm_late_early_list and dpm_resume_early() will ignore this device, as result PM runtime will be disabled for it forever (side effect: after 8 subsequent failures for the same device the PM runtime will be reenabled due to disable_depth overflow). To fix this problem, add devices to dpm_late_early_list regardless of whether or not device_suspend_late() returns errors for them. That will ensure failures in there to be handled consistently for all devices regardless of their async suspend/resume status. Reported-by: Grygorii Strashko <grygorii.strashko@ti.com> Tested-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Cc: All applicable <stable@vger.kernel.org> drivers/base/power/main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 7992893c5a9fdffa42117f6f749359466e06bdf6 Merge: 6eb59af 4a99fa0 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 14:06:21 2016 -0700 Merge tag 'for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply Pull power supply and reset updates from Sebastian Reichel: - alternative reset driver for new at91 SoCs - misc fixes * tag 'for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: sbs-battery: fix power status when battery charging near dry power: ipaq-micro-battery: freeing the wrong variable power/max8925: freeing wrong variable power: reset: at91-shdwc: add new shutdown controller driver ARM: dts: at91: shdwc binding: add new shutdown controller documentation commit fcee59065e58498682c60069cc6fb90694bab27e Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed May 18 21:47:38 2016 +0200 drm: Nuke ->vblank_disable_allowed This was added in commit 0a3e67a4caac273a3bfc4ced3da364830b1ab241 Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Tue Sep 30 12:14:26 2008 -0700 drm: Rework vblank-wait handling to allow interrupt reduction. to stay backwards-compatible with old UMS code that didn't even tell the kernel when it did a modeset, so that the kernel could save/restore vblank counters. At worst this means vblanks will be somewhat funky on a setup that very likely no one still runs. So let's just nuke it. Plan B would be to set it unconditionally in drm_vblank_init for kms drivers, instead of in each driver separately. So if this patch breaks anything please only restore the hunks in drmP.h and drm_irq.c, plus add a check for DRIVER_MODESET in drm_vblank_init. Stumbled over this in a discussion on irc with Chris. Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Liviu Dudau <liviu.dudau@arm.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Liviu Dudau <Liviu.Dudau@arm.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Dave Airlie <airlied@redhat.com> drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 1 - drivers/gpu/drm/arm/hdlcd_drv.c | 1 - drivers/gpu/drm/armada/armada_drv.c | 1 - drivers/gpu/drm/drm_irq.c | 6 ------ drivers/gpu/drm/exynos/exynos_drm_drv.c | 7 ------- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 1 - drivers/gpu/drm/gma500/psb_drv.c | 1 - drivers/gpu/drm/i915/i915_dma.c | 3 --- drivers/gpu/drm/imx/imx-drm-core.c | 7 ------- drivers/gpu/drm/radeon/radeon_irq_kms.c | 1 - drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 ------- drivers/gpu/drm/tegra/drm.c | 1 - drivers/gpu/drm/vc4/vc4_kms.c | 2 -- include/drm/drmP.h | 8 -------- 14 files changed, 47 deletions(-) commit fc7fedc20b7c819b9ef003afa16a64dc9e5ac30e Merge: d5fa33f f921791 Author: Dave Airlie <airlied@redhat.com> Date: Sat May 21 06:41:59 2016 +1000 Merge tag 'vmwgfx-next-160520' of git://people.freedesktop.org/~thomash/linux into drm-next Pull request of 2016-05-20 * tag 'vmwgfx-next-160520' of git://people.freedesktop.org/~thomash/linux: drm/vmwgfx: Report vmwgfx version to vmware.log drm/vmwgfx: Add VMWare host messaging capability drm/vmwgfx: Kill some lockdep warnings commit eb0a4a47ae89aaa0674ab3180de6a162f3be2ddf Author: Miklos Szeredi <mszeredi@redhat.com> Date: Fri May 20 22:13:45 2016 +0200 af_unix: fix hard linked sockets on overlay Overlayfs uses separate inodes even in the case of hard links on the underlying filesystems. This is a problem for AF_UNIX socket implementation which indexes sockets based on the inode. This resulted in hard linked sockets not working. The fix is to use the real, underlying inode. Test case follows: -- ovl-sock-test.c -- #include <unistd.h> #include <err.h> #include <sys/socket.h> #include <sys/un.h> #define SOCK "test-sock" #define SOCK2 "test-sock2" int main(void) { int fd, fd2; struct sockaddr_un addr = { .sun_family = AF_UNIX, .sun_path = SOCK, }; struct sockaddr_un addr2 = { .sun_family = AF_UNIX, .sun_path = SOCK2, }; unlink(SOCK); unlink(SOCK2); if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) err(1, "socket"); if (bind(fd, (struct sockaddr *) &addr, sizeof(addr)) == -1) err(1, "bind"); if (listen(fd, 0) == -1) err(1, "listen"); if (link(SOCK, SOCK2) == -1) err(1, "link"); if ((fd2 = socket(AF_UNIX, SOCK_STREAM, 0)) == -1) err(1, "socket"); if (connect(fd2, (struct sockaddr *) &addr2, sizeof(addr2)) == -1) err (1, "connect"); return 0; } ---- Reported-by: Alexander Morozov <alexandr.morozov@docker.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Cc: <stable@vger.kernel.org> net/unix/af_unix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit a118084432d642eeccb961c7c8cc61525a941fcb Author: Miklos Szeredi <mszeredi@redhat.com> Date: Fri May 20 22:13:45 2016 +0200 vfs: add d_real_inode() helper Needed by the following fix. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Cc: <stable@vger.kernel.org> include/linux/dcache.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit d5fa33f28401414959b68591075c8053e8276547 Merge: 24e04d7 ca79e49 Author: Dave Airlie <airlied@redhat.com> Date: Sat May 21 06:12:13 2016 +1000 Merge branch 'linux-4.7' of git://github.com/skeggsb/linux into drm-next Nothing too exciting here, there's a larger chunk of work that still needs more testing but not likely to get that done today - so - here's the rest of it. Assuming nothing else goes horribly wrong, I should be able to send the rest Monday if it isn't too late.... Changes: - Improvements to power sensor support - Initial attempt at GM108 support - Minor fixes to GR init + ucode - Make use of topology information (provided by the GPU) in various places, should at least fix some fault recovery issues and engine/runlist mapping confusion on newer GPUs. * 'linux-4.7' of git://github.com/skeggsb/linux: (51 commits) drm/nouveau/gr/gf100-: fix race condition in fecs/gpccs ucode drm/nouveau/core: recognise GM108 chipsets drm/nouveau/gr/gm107-: fix touching non-existent ppcs in attrib cb setup drm/nouveau/gr/gk104-: share implementation of ppc exception init drm/nouveau/gr/gk104-: move rop_active_fbps init to nonctx drm/nouveau/bios/pll: check BIT table version before trying to parse it drm/nouveau/bios/pll: prevent oops when limits table can't be parsed drm/nouveau/volt/gk104: round up in gk104_volt_set drm/nouveau/fb/gm200: setup mmu debug buffer registers at init() drm/nouveau/fb/gk20a,gm20b: setup mmu debug buffer registers at init() drm/nouveau/fb/gf100-: allocate mmu debug buffers drm/nouveau/fb: allow chipset-specific actions for oneinit() drm/nouveau/gr/gm200-: fix bad hardcoding of a max-tpcs-per-gpc value drm/nouveau/gr/gm200-: rop count == ltc count drm/nouveau/gr/gm200: modify the mask when copying mmu settings from fb drm/nouveau/gr/gm200: move some code into init_gpc_mmu() hook drm/nouveau/gr/gm200: make generate_main() static drm/nouveau/gr/gf100-: abstract fetching rop count drm/nouveau/gr/gf100-: rename magic_not_rop_nr to screen_tile_row_offset drm/nouveau/gr/gf100-: remove hardcoded idle_timeout values ... commit 38f91ca8c0ea69f707c26f592dcc70f937088bcc Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Wed May 18 14:07:56 2016 -0700 f2fs: flush pending bios right away when error occurs Given errors, this patch flushes pending bios as soon as possible. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/checkpoint.c | 10 +++++++++- fs/f2fs/data.c | 2 +- fs/f2fs/f2fs.h | 7 +------ fs/f2fs/file.c | 8 ++++---- fs/f2fs/inode.c | 2 +- 5 files changed, 16 insertions(+), 13 deletions(-) commit 975756c41332bc5e523e9f843271ed5ab6aaaaaa Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Thu May 19 11:57:21 2016 -0700 f2fs: avoid ENOSPC fault in the recovery process This patch avoids impossible error injection, ENOSPC, during recovery process. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/recovery.c | 4 ++++ 1 file changed, 4 insertions(+) commit e6790fd861100a01838077b9b59bc339a80ee462 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 18 16:21:07 2016 +0200 mlx5: avoid unused variable warning When CONFIG_NET_CLS_ACT is disabled, we get a new warning in the mlx5 ethernet driver because the tc_for_each_action() loop never references the iterator: mellanox/mlx5/core/en_tc.c: In function 'mlx5e_stats_flower': mellanox/mlx5/core/en_tc.c:431:20: error: unused variable 'a' [-Werror=unused-variable] struct tc_action *a; This changes the dummy tc_for_each_action() macro by adding a cast to void, letting the compiler know that the variable is intentionally declared but not used here. I could not come up with a nicer workaround, but this seems to do the trick. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: aad7e08d39bd ("net/mlx5e: Hardware offloaded flower filter statistics support") Fixes: 00175aec941e ("net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef") Acked-By: Amir Vadai <amir@vadai.me> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/act_api.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4c1d76a1e15e0d66e581764b4d29d08d207aff4a Merge: 7f058c0 e4c740e Author: Arnd Bergmann <arnd@arndb.de> Date: Fri May 20 20:22:44 2016 +0200 Merge tag 'pxa-for-4.7' of https://github.com/rjarzmik/linux into fixes Merge "pxa changes for v4.7 cycle" from Robert Jarzmik: This is a minor cycle with : - cleanup fix from Stephen on clocks (CLK_ROOT deprecated) - pin control activation for device-tree platforms * tag 'pxa-for-4.7' of https://github.com/rjarzmik/linux: ARM: pxa: Remove CLK_IS_ROOT ARM: pxa: activate pinctrl for device-tree machines These should have been part of the original pull request but got accidentally dropped. Both changes in this branch can be considered bugfixes, so I'm putting them in the fixes branch now. commit b7552e1bccbe3da9c8e7386c6188e8ea4667c8e7 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Wed May 18 14:14:28 2016 +0200 bpf: rather use get_random_int for randomizations Start address randomization and blinding in BPF currently use prandom_u32(). prandom_u32() values are not exposed to unpriviledged user space to my knowledge, but given other kernel facilities such as ASLR, stack canaries, etc make use of stronger get_random_int(), we better make use of it here as well given blinding requests successively new random values. get_random_int() has minimal entropy pool depletion, is not cryptographically secure, but doesn't need to be for our use cases here. Suggested-by: Hannes Frederic Sowa <hannes@stressinduktion.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> kernel/bpf/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 09ec8e7fb6bcb351bbded18a571ea037504bb3a6 Author: Manish Chopra <manish.chopra@qlogic.com> Date: Wed May 18 07:43:57 2016 -0400 qede: Fix DMA address APIs usage Driver incorrectly uses dma_unmap_addr_set() to set a variable which is in truth a dma_addr_t [i.e not defined using DEFINE_DMA_UNMAP_ADDR()] and is being used by the driver flows other than unmapping physical addresses. This patch fixes driver fastpath where CONFIG_NEED_DMA_MAP_STATE is not set. Signed-off-by: Manish Chopra <manish.chopra@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qede/qede_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 1968a0b8b6ca088bc029bd99ee696f1aca4090d0 Author: Sabrina Dubroca <sd@queasysnail.net> Date: Wed May 18 13:34:40 2016 +0200 macsec: fix netlink attribute for key id In my last commit I replaced MACSEC_SA_ATTR_KEYID by MACSEC_SA_ATTR_KEY. Fixes: 8acca6acebd0 ("macsec: key identifier is 128 bits, not 64") Signed-off-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/macsec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 6eb59af580dcffc6f6982ac8ef6d27a1a5f26b27 Merge: 4d230d4 b52207e Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 11:10:24 2016 -0700 Merge tag 'mfd-for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers: - Add new driver for MAXIM MAX77620/MAX20024 PMIC - Add new driver for Hisilicon HI665X PMIC New Device Support: - Add support for AXP809 in axp20x-rsb - Add support for Power Supply in axp20x New core features: - devm_mfd_* managed resources Fix-ups: - Remove unused code (da9063-irq, wm8400-core, tps6105x, smsc-ece1099, twl4030-power) - Improve clean-up in error path (intel_quark_i2c_gpio) - Explicitly include headers (syscon.h) - Allow building as modules (max77693) - Use IS_ENABLED() instead of rolling your own (dm355evm_msp, wm8400-core) - DT adaptions (axp20x, hi655x, arizona, max77620) - Remove CLK_IS_ROOT flag (intel-lpss, intel_quark) - Move to gpiochip API (asic3, dm355evm_msp, htc-egpio, htc-i2cpld, sm501, tc6393xb, tps65010, ucb1x00, vexpress) - Make use of devm_mfd_* calls (act8945a, as3711, atmel-hlcdc, bcm590xx, hi6421-pmic-core, lp3943, menf21bmc, mt6397, rdc321x, rk808, rn5t618, rt5033, sky81452, stw481x, tps6507x, tps65217, wm8400) Bug Fixes" - Fix ACPI child matching (mfd-core) - Fix start-up ordering issues (mt6397-core, arizona-core) - Fix forgotten register state on resume (intel-lpss) - Fix Clock related issues (twl6040) - Fix scheduling whilst atomic (omap-usb-tll) - Kconfig changes (vexpress)" * tag 'mfd-for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (73 commits) mfd: hi655x: Add MFD driver for hi655x mfd: ab8500-debugfs: Trivial fix of spelling mistake on "between" mfd: vexpress: Add !ARCH_USES_GETTIMEOFFSET dependency mfd: Add device-tree binding doc for PMIC MAX77620/MAX20024 mfd: max77620: Add core driver for MAX77620/MAX20024 mfd: arizona: Add defines for GPSW values that can be used from DT mfd: omap-usb-tll: Fix scheduling while atomic BUG mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile mfd: axp20x: Add a cell for the ac power_supply part of the axp20x PMICs mfd: intel_soc_pmic_core: Terminate panel control GPIO lookup table correctly mfd: wl1273-core: Use devm_mfd_add_devices() for mfd_device registration mfd: tps65910: Use devm_mfd_add_devices and devm_regmap_add_irq_chip mfd: sec: Use devm_mfd_add_devices and devm_regmap_add_irq_chip mfd: rc5t583: Use devm_mfd_add_devices and devm_request_threaded_irq mfd: max77686: Use devm_mfd_add_devices and devm_regmap_add_irq_chip mfd: as3722: Use devm_mfd_add_devices and devm_regmap_add_irq_chip mfd: twl4030-power: Remove driver path in file comment MAINTAINERS: Add entry for X-Powers AXP family PMIC drivers mfd: smsc-ece1099: Remove unnecessarily remove callback mfd: Use IS_ENABLED(CONFIG_FOO) instead of checking FOO || FOO_MODULE ... commit 4d230d4d030e34e6eb8911fb669d1b42298eca9e Merge: 410b429 c2f90a4 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 11:05:40 2016 -0700 Merge tag 'hsi-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi Pull HSI updates from Sebastian Reichel: - merge omap-ssi and omap-ssi-port modules - fix omap-ssi module reloading - add DVFS support to omap-ssi * tag 'hsi-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-hsi: HSI: omap-ssi: move omap_ssi_port_update_fclk HSI: omap-ssi: include pinctrl header files HSI: omap-ssi: add COMMON_CLK dependency HSI: omap-ssi: add clk change support HSI: omap_ssi: built omap_ssi and omap_ssi_port into one module HSI: omap_ssi: fix removal of port platform device HSI: omap_ssi: make sure probe stays available HSI: omap_ssi: fix module unloading HSI: omap_ssi_port: switch to gpiod API commit 410b42978a241dc4a269d0d75c75d260e6d016e8 Merge: e4fba88 ab366b4 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 11:01:02 2016 -0700 Merge tag 'fbdev-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux Pull fbdev updates from Tomi Valkeinen: - imxfb: fix lcd power up - small fixes and cleanups * tag 'fbdev-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: fbdev: Use IS_ENABLED() instead of checking for built-in or module efifb: Don't show the mapping VA video: AMBA CLCD: Remove unncessary include in amba-clcd.c fbdev: ssd1307fb: Fix charge pump setting Documentation: fb: fix spelling mistakes fbdev: fbmem: implement error handling in fbmem_init() fbdev: sh_mipi_dsi: remove driver video: fbdev: imxfb: add some error handling video: fbdev: imxfb: fix semantic of .get_power and .set_power video: fbdev: omap2: Remove deprecated regulator_can_change_voltage() usage commit affa80bd97f7ca282d1faa91667b3ee9e4c590e6 Author: Ricky Liang <jcliang@chromium.org> Date: Fri May 20 10:58:59 2016 -0700 Input: uinput - handle compat ioctl for UI_SET_PHYS When running a 32-bit userspace on a 64-bit kernel, the UI_SET_PHYS ioctl needs to be treated with special care, as it has the pointer size encoded in the command. Signed-off-by: Ricky Liang <jcliang@chromium.org> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/misc/uinput.c | 6 ++++++ 1 file changed, 6 insertions(+) commit d4c6fb36ac2c82f8f0c05b04cf102dcdc2d5a14d Author: Wang Nan <wangnan0@huawei.com> Date: Fri May 20 16:38:24 2016 +0000 perf evsel: Record fd into perf_mmap Add a fd field into struct perf_mmap so that perf can track the mmap fd. This feature will be used for toggling overwrite ring buffers. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1463762315-155689-3-git-send-email-wangnan0@huawei.com Signed-off-by: He Kuang <hekuang@huawei.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/evlist.c | 6 ++++++ tools/perf/util/evlist.h | 1 + 2 files changed, 7 insertions(+) commit b90dc17a5d14a881f9bb3b58edb3d71075d58afb Author: Wang Nan <wangnan0@huawei.com> Date: Fri May 20 16:38:23 2016 +0000 perf evsel: Add overwrite attribute and check write_backward Add 'overwrite' attribute to evsel to mark whether this event is overwritable. The following commits will support syntax like: # perf record -e cycles/overwrite/ ... An overwritable evsel requires kernel support for the perf_event_attr.write_backward ring buffer feature. Add it to perf_missing_feature. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1463762315-155689-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/evsel.c | 13 +++++++++++++ tools/perf/util/evsel.h | 1 + 2 files changed, 14 insertions(+) commit f86911e2de129fb3c8ca402c251138d12c4a9d37 Author: Paul Durrant <Paul.Durrant@citrix.com> Date: Wed May 18 08:53:01 2016 +0100 xen-netback: correct length checks on hash copy_ops The length checks on the grant table copy_ops for setting hash key and hash mapping are checking the local 'len' value which is correct in the case of the former but not the latter. This was picked up by static analysis checks. This patch replaces checks of 'len' with 'copy_op.len' in both cases to correct the incorrect check, keep the two checks consistent, and to make it clear what the checks are for. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/xen-netback/hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 185be5aef1739fff0298f59b54f2ef7ccf5a849d Author: Rabin Vincent <rabinv@axis.com> Date: Wed May 18 12:47:31 2016 +0200 phy: fix crash in fixed_phy_add() Since e7f4dc3536a ("mdio: Move allocation of interrupts into core"), platforms which call fixed_phy_add() before fixed_mdio_bus_init() is called (for example, because the platform code and the fixed_phy driver use the same initcall level) crash in fixed_phy_add() since the ->mii_bus is not allocated. Also since e7f4dc3536a, these interrupts are initalized to polling by default. The few (old) platforms which directly use fixed_phy_add() from their platform code all pass PHY_POLL for the irq argument, so we can keep these platforms not crashing by simply not attempting to set the irq if PHY_POLL is passed. Also, even if problems have not been reported on more modern platforms which used fixed_phy_register() from drivers' probe functions, we return -EPROBE_DEFER if the MDIO bus is not yet registered so that the probe is retried later. Fixes: e7f4dc3536a400 ("mdio: Move allocation of interrupts into core") Signed-off-by: Rabin Vincent <rabinv@axis.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/fixed_phy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 408cf677073a5d1a7343bc6430a7297ba7b280d4 Merge: 1ab9418 a706670 Author: Ingo Molnar <mingo@kernel.org> Date: Fri May 20 19:37:43 2016 +0200 Merge tag 'perf-core-for-mingo-20160520' 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: User visible changes: - We should not use the current value of the kernel.perf_event_max_stack as the default value for --max-stack in tools that can process perf.data files, they will only match if that sysctl wasn't changed from its default value at the time the perf.data file was recorded, fix it. This fixes a bug where a 'perf record -a --call-graph dwarf ; perf report' produces a glibc invalid free backtrace (Arnaldo Carvalho de Melo) - Provide a better warning when running 'perf trace' on a system where the kernel.kptr_restrict is set to 1, similar to the one produced by 'perf record', noticed on ubuntu 16.04 where this is the default kptr_restrict setting. (Arnaldo Carvalho de Melo) - Fix ordering of instructions in the annotation code, noticed when annotating ARM binaries, now that table is auto-ordered at first use, to avoid more such problems (Chris Ryder) - Set buildid dir under symfs when --symfs is provided (He Kuang) - Fix the 'exit_group()' syscall output in 'perf trace' (Arnaldo Carvalho de Melo) - Only auto set call-graph to "dwarf" in 'perf trace' when syscalls are being traced (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 8329e818f14926a6040df86b2668568bde342ebf Author: Steven Rostedt <rostedt@goodmis.org> Date: Mon May 16 23:00:35 2016 -0400 ftrace/x86: Set ftrace_stub to weak to prevent gcc from using short jumps to it Matt Fleming reported seeing crashes when enabling and disabling function profiling which uses function graph tracer. Later Namhyung Kim hit a similar issue and he found that the issue was due to the jmp to ftrace_stub in ftrace_graph_call was only two bytes, and when it was changed to jump to the tracing code, it overwrote the ftrace_stub that was after it. Masami Hiramatsu bisected this down to a binutils change: 8dcea93252a9ea7dff57e85220a719e2a5e8ab41 is the first bad commit commit 8dcea93252a9ea7dff57e85220a719e2a5e8ab41 Author: H.J. Lu <hjl.tools@gmail.com> Date: Fri May 15 03:17:31 2015 -0700 Add -mshared option to x86 ELF assembler This patch adds -mshared option to x86 ELF assembler. By default, assembler will optimize out non-PLT relocations against defined non-weak global branch targets with default visibility. The -mshared option tells the assembler to generate code which may go into a shared library where all non-weak global branch targets with default visibility can be preempted. The resulting code is slightly bigger. This option only affects the handling of branch instructions. Declaring ftrace_stub as a weak call prevents gas from using two byte jumps to it, which would be converted to a jump to the function graph code. Link: http://lkml.kernel.org/r/20160516230035.1dbae571@gandalf.local.home Reported-by: Matt Fleming <matt@codeblueprint.co.uk> Reported-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Matt Fleming <matt@codeblueprint.co.uk> Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> arch/x86/kernel/mcount_64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e4fba88d00d21f50239eac7d653027bfaf844296 Merge: ffd565e 4a6b27b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 10:25:16 2016 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto fix from Herbert Xu: "Fix a regression that causes sha-mb to crash" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: sha1-mb - make sha1_x8_avx2() conform to C function ABI commit ffd565e315aa8211365bb6864000f04e7b277f59 Author: Arnd Bergmann <arnd@arndb.de> Date: Thu May 12 23:03:35 2016 +0200 irqchip: nps: add 64BIT dependency The newly added nps irqchip driver causes build warnings on ARM64. include/soc/nps/common.h: In function 'nps_host_reg_non_cl': include/soc/nps/common.h:148:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] As the driver is only used on ARC, we don't need to see it without COMPILE_TEST elsewhere, and we can avoid the warnings by only building on 32-bit architectures even with CONFIG_COMPILE_TEST. Acked-by: Marc Zyngier <narc.zyngier@arm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/irqchip/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6112a300c9e41993cc0dc56ac393743d28381284 Author: Soumya PN <soumya.p.n@hpe.com> Date: Tue May 17 21:31:14 2016 +0530 ftrace: Don't disable irqs when taking the tasklist_lock read_lock In ftrace.c inside the function alloc_retstack_tasklist() (which will be invoked when function_graph tracing is on) the tasklist_lock is being held as reader while iterating through a list of threads. Here the lock is being held as reader with irqs disabled. The tasklist_lock is never write_locked in interrupt context so it is safe to not disable interrupts for the duration of read_lock in this block which, can be significant, given the block of code iterates through all threads. Hence changing the code to call read_lock() and read_unlock() instead of read_lock_irqsave() and read_unlock_irqrestore(). A similar change was made in commits: 8063e41d2ffc ("tracing: Change syscall_*regfunc() to check PF_KTHREAD and use for_each_process_thread()")' and 3472eaa1f12e ("sched: normalize_rt_tasks(): Don't use _irqsave for tasklist_lock, use task_rq_lock()")' Link: http://lkml.kernel.org/r/1463500874-77480-1-git-send-email-soumya.p.n@hpe.com Signed-off-by: Soumya PN <soumya.p.n@hpe.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> kernel/trace/ftrace.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c04a5880299eab3da8c10547db96ea9cdffd44a6 Merge: a1c28b7 138a076 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 10:12:41 2016 -0700 Merge tag 'powerpc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux Pull powerpc updates from Michael Ellerman: "Highlights: - Support for Power ISA 3.0 (Power9) Radix Tree MMU from Aneesh Kumar K.V - Live patching support for ppc64le (also merged via livepatching.git) Various cleanups & minor fixes from: - Aaro Koskinen, Alexey Kardashevskiy, Andrew Donnellan, Aneesh Kumar K.V, Chris Smart, Daniel Axtens, Frederic Barrat, Gavin Shan, Ian Munsie, Lennart Sorensen, Madhavan Srinivasan, Mahesh Salgaonkar, Markus Elfring, Michael Ellerman, Oliver O'Halloran, Paul Gortmaker, Paul Mackerras, Rashmica Gupta, Russell Currey, Suraj Jitindar Singh, Thiago Jung Bauermann, Valentin Rothberg, Vipin K Parashar. General: - Update LMB associativity index during DLPAR add/remove from Nathan Fontenot - Fix branching to OOL handlers in relocatable kernel from Hari Bathini - Add support for userspace Power9 copy/paste from Chris Smart - Always use STRICT_MM_TYPECHECKS from Michael Ellerman - Add mask of possible MMU features from Michael Ellerman PCI: - Enable pass through of NVLink to guests from Alexey Kardashevskiy - Cleanups in preparation for powernv PCI hotplug from Gavin Shan - Don't report error in eeh_pe_reset_and_recover() from Gavin Shan - Restore initial state in eeh_pe_reset_and_recover() from Gavin Shan - Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell" from Guilherme G Piccoli - Remove the dependency on EEH struct in DDW mechanism from Guilherme G Piccoli selftests: - Test cp_abort during context switch from Chris Smart - Add several tests for transactional memory support from Rashmica Gupta perf: - Add support for sampling interrupt register state from Anju T - Add support for unwinding perf-stackdump from Chandan Kumar cxl: - Configure the PSL for two CAPI ports on POWER8NVL from Philippe Bergheaud - Allow initialization on timebase sync failures from Frederic Barrat - Increase timeout for detection of AFU mmio hang from Frederic Barrat - Handle num_of_processes larger than can fit in the SPA from Ian Munsie - Ensure PSL interrupt is configured for contexts with no AFU IRQs from Ian Munsie - Add kernel API to allow a context to operate with relocate disabled from Ian Munsie - Check periodically the coherent platform function's state from Christophe Lombard Freescale: - Updates from Scott: "Contains 86xx fixes, minor device tree fixes, an erratum workaround, and a kconfig dependency fix." * tag 'powerpc-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (192 commits) powerpc/86xx: Fix PCI interrupt map definition powerpc/86xx: Move pci1 definition to the include file powerpc/fsl: Fix build of the dtb embedded kernel images powerpc/fsl: Fix rcpm compatible string powerpc/fsl: Remove FSL_SOC dependency from FSL_LBC powerpc/fsl-pci: Add a workaround for PCI 5 errata powerpc/fsl: Fix SPI compatible on t208xrdb and t1040rdb powerpc/powernv/npu: Add PE to PHB's list powerpc/powernv: Fix insufficient memory allocation powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell" powerpc/eeh: Drop unnecessary label in eeh_pe_change_owner() powerpc/eeh: Ignore handlers in eeh_pe_reset_and_recover() powerpc/eeh: Restore initial state in eeh_pe_reset_and_recover() powerpc/eeh: Don't report error in eeh_pe_reset_and_recover() Revert "powerpc/powernv: Exclude root bus in pnv_pci_reset_secondary_bus()" powerpc/powernv/npu: Enable NVLink pass through powerpc/powernv/npu: Rework TCE Kill handling powerpc/powernv/npu: Add set/unset window helpers powerpc/powernv/ioda2: Export debug helper pe_level_printk() ... commit a1c28b75a95808161cacbb3531c418abe248994e Merge: a05a70d 5632a9f Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Fri May 20 10:01:38 2016 -0700 Merge branch 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm Pull ARM updates from Russell King: "Changes included in this pull request: - revert pxa2xx-flash back to using ioremap_cached() and switch memremap() to use arch_memremap_wb() - remove pci=firmware command line argument handling - remove unnecessary arm_dma_set_mask() implementation, the generic implementation will do for ARM - removal of the ARM kallsyms "hack" to work around mode switching veneers and vectors located below PAGE_OFFSET - tidy up build system output a little - add L2 cache power management DT bindings - remove duplicated local_irq_disable() in reboot paths - handle AMBA primecell devices better at registration time with PM domains (needed for Samsung SoCs) - ARM specific preparation to support Keystone II kexec" * 'for-linus' of git://git.armlinux.org.uk/~rmk/linux-arm: ARM: 8567/1: cache-uniphier: activate ways for secondary CPUs ARM: 8570/2: Documentation: devicetree: Add PL310 PM bindings ARM: 8569/1: pl2x0: Add OF control of cache power management ARM: 8568/1: reboot: remove duplicated local_irq_disable() ARM: 8566/1: drivers: amba: properly handle devices with power domains ARM: provide arm_has_idmap_alias() helper ARM: kexec: remove 512MB restriction on kexec crashdump ARM: provide improved virt_to_idmap() functionality ARM: kexec: fix crashkernel= handling ARM: 8557/1: specify install, zinstall, and uinstall as PHONY targets ARM: 8562/1: suppress "include/generated/mach-types.h is up to date." ARM: 8553/1: kallsyms: remove --page-offset command line option ARM: 8552/1: kallsyms: remove special lower address limit for CONFIG_ARM ARM: 8555/1: kallsyms: ignore ARM mode switching veneers ARM: 8548/1: dma-mapping: remove arm_dma_set_mask() ARM: 8554/1: kernel: pci: remove pci=firmware command line parameter handling ARM: memremap: implement arch_memremap_wb() memremap: add arch specific hook for MEMREMAP_WB mappings mtd: pxa2xx-flash: switch back from memremap to ioremap_cached ARM: reintroduce ioremap_cached() for creating cached I/O mappings commit f921791314811afa00bb7fbbd40f51bd3b8eff01 Author: Sinclair Yeh <syeh@vmware.com> Date: Wed Apr 27 19:11:18 2016 -0700 drm/vmwgfx: Report vmwgfx version to vmware.log When tracking down a customer issue, it is useful to know exactly which version of the vmwgfx they are using. Since vmware.log is often the only available debug log, report vmwgfx version in there. Signed-off-by: Sinclair Yeh <syeh@vmware.com> Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> drivers/gpu/drm/vmwgfx/Makefile | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 19 ++++++++++++++++++- drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 6 ++++++ 3 files changed, 25 insertions(+), 2 deletions(-) commit 89da76fde68de1205756707133508e930be4f389 Author: Sinclair Yeh <syeh@vmware.com> Date: Wed Apr 27 19:10:19 2016 -0700 drm/vmwgfx: Add VMWare host messaging capability This patch adds capabilities for a VMWare guest to send and receive messages from the host, and adds functions to sending log messages to vmware.log and to request device settings that aren't available through the virtual hardware, e.g. certain settings in the VMX file. Signed-off-by: Sinclair Yeh <syeh@vmware.com> Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com> drivers/gpu/drm/vmwgfx/vmwgfx_msg.c | 416 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/vmwgfx/vmwgfx_msg.h | 191 +++++++++++++++++ 2 files changed, 607 insertions(+) commit 93cd16817ae5ddcfc548784b51c76bf6d7923442 Author: Thomas Hellstrom <thellstrom@vmware.com> Date: Tue May 3 11:24:35 2016 +0200 drm/vmwgfx: Kill some lockdep warnings Some global KMS state that is elsewhere protected by the mode_config mutex here needs to be protected with a local mutex. Remove corresponding lockdep checks and introduce a new driver-private global_kms_state_mutex, and make sure its locking order is *after* the crtc locks in order to avoid having to release those when the new mutex is taken. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Sinclair Yeh <syeh@vmware.com> Cc: <stable@vger.kernel.org> # 4.6 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_drv.h | 1 + drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 27 +++++++++++++-------------- drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 3 +++ drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 3 +++ 5 files changed, 21 insertions(+), 14 deletions(-) commit a706670900073d236938d539d1109338d64b47bb Author: He Kuang <hekuang@huawei.com> Date: Thu May 19 11:47:37 2016 +0000 perf tools: Set buildid dir under symfs when --symfs is provided This patch moves the reference of buildid dir to 'symfs/.debug' and skips the local buildid dir when '--symfs' is given, so that every single file opened by perf is relative to symfs directory now. Signed-off-by: He Kuang <hekuang@huawei.com> Acked-by: David Ahern <dsahern@gmail.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1463658462-85131-2-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-annotate.c | 5 +++-- tools/perf/builtin-diff.c | 5 +++-- tools/perf/builtin-report.c | 5 +++-- tools/perf/builtin-script.c | 5 +++-- tools/perf/builtin-timechart.c | 5 +++-- tools/perf/util/dso.c | 4 +--- tools/perf/util/symbol.c | 23 +++++++++++++++++++++++ tools/perf/util/symbol.h | 2 ++ 8 files changed, 41 insertions(+), 13 deletions(-) commit caa36ed7ba82caa9f685dd04aa10d0bf87ea8b6a Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Thu May 19 19:00:27 2016 -0300 perf trace: Only auto set call-graph to "dwarf" when syscalls are being traced When --min-stack or --max-stack is passwd but --no-syscalls is also in effect, there is no point in automatically setting '--call-graph dwarf'. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-pq922i7h9wef0pho1dqpttvn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7e4c1498130d7b6c26e6669839af4c7e321c9fec Author: Chris Ryder <chris.ryder@arm.com> Date: Thu May 19 17:59:46 2016 +0100 perf annotate: Sort list of recognised instructions Currently the list of instructions recognised by perf annotate has to be explicitly written in sorted order. This makes it easy to make mistakes when adding new instructions. Sort the list of instructions on first access. Signed-off-by: Chris Ryder <chris.ryder@arm.com> Acked-by: Pawel Moll <pawel.moll@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will.deacon@arm.com> Link: http://lkml.kernel.org/r/4268febaf32f47f322c166fb2fe98cfec7041e11.1463676839.git.chris.ryder@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/annotate.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 58c0400176b2cd35da43f3115fa94ca937483aca Author: Chris Ryder <chris.ryder@arm.com> Date: Thu May 19 17:59:45 2016 +0100 perf annotate: Fix identification of ARM blt and bls instructions The ARM blt and bls instructions are not correctly identified when parsing assembly because the list of recognised instructions must be sorted by name. Swap the ordering of blt and bls. Signed-off-by: Chris Ryder <chris.ryder@arm.com> Acked-by: Pawel Moll <pawel.moll@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Will Deacon <will.deacon@arm.com> Link: http://lkml.kernel.org/r/560e196b7c79b7ff853caae13d8719a31479cb1a.1463676839.git.chris.ryder@arm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/annotate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fe176085a4d45fb241c04beea872ecbb8bef6a55 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Thu May 19 11:34:06 2016 -0300 perf tools: Fix usage of max_stack sysctl We cannot limit processing stacks from the current value of the sysctl, as we may be processing perf.data files, possibly from other machines. Instead use the old PERF_MAX_STACK_DEPTH, the sysctl default, that can be overriden using --max-stack or equivalent. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: Wang Nan <wangnan0@huawei.com> Cc: Zefan Li <lizefan@huawei.com> Fixes: 4cb93446c587 ("perf tools: Set the maximum allowed stack from /proc/sys/kernel/perf_event_max_stack") Link: http://lkml.kernel.org/n/tip-eqeutsr7n7wy0c36z24ytvii@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/Documentation/perf-report.txt | 2 +- tools/perf/Documentation/perf-script.txt | 2 +- tools/perf/Documentation/perf-trace.txt | 3 ++- tools/perf/builtin-report.c | 2 +- tools/perf/builtin-script.c | 2 -- tools/perf/builtin-trace.c | 2 +- tools/perf/util/db-export.c | 3 +-- tools/perf/util/scripting-engines/trace-event-perl.c | 3 +-- 8 files changed, 8 insertions(+), 11 deletions(-) commit bf8bddbf1971d40549f33bc6f70623cf53bbfa2f Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Thu May 19 11:14:15 2016 -0300 perf callchain: Stop validating callchains by the max_stack sysctl As thread__resolve_callchain_sample can be used for handling perf.data files, that could've been recorded with a large max_stack sysctl setting than what the system used for analysis has set. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: Wang Nan <wangnan0@huawei.com> Cc: Zefan Li <lizefan@huawei.com> Link: http://lkml.kernel.org/n/tip-2995bt2g5yq2m05vga4kip6m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/machine.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) commit c008f78f9309a3be3548e11f48b8dfb08f2eb8fc Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue May 17 12:13:54 2016 -0300 perf trace: Fix exit_group() formatting This doesn't return, so there is no raw_syscalls:sys_exit for it, add the ending ')', without any return value, since it is void. Reported-by: Ingo Molnar <mingo@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-vh2mii0g4qlveuc4joufbipu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e77a07425f4391da2f08b0f9a09df4e70626204d Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue May 17 11:58:52 2016 -0300 perf top: Use machine->kptr_restrict_warned Its now there, no need to have it too. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-y18oeou494uy11im7u9to0dx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-top.c | 6 +++--- tools/perf/util/top.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) commit caf8a0d0499792ac1b3f5b0b84e5890df0039cb6 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue May 17 11:56:24 2016 -0300 perf trace: Warn when trying to resolve kernel addresses with kptr_restrict=1 Hook into the libtraceevent plugin kernel symbol resolver to warn the user that that can't happen with kptr_restrict=1. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-9gc412xx1gl0lvqj1d1xwlyb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-trace.c | 20 +++++++++++++++++++- tools/perf/util/machine.c | 1 + tools/perf/util/machine.h | 1 + 3 files changed, 21 insertions(+), 1 deletion(-) commit 45e90056904b12d8dd74e0d2ea6dfd5e4394104d Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue May 17 11:52:26 2016 -0300 perf machine: Do not bail out if not managing to read ref reloc symbol This means the user can't access /proc/kallsyms, for instance, because /proc/sys/kernel/kptr_restrict is set to 1. Instead leave the ref_reloc_sym as NULL and code using it will cope. This allows 'perf trace' to work on such systems for !root, the only issue would be when trying to resolve kernel symbols, which happens, for instance, in some libtracevent plugins. A warning for that case will be provided in the next patch in this series. Noticed in Ubuntu 16.04, that comes with kptr_restrict=1. Reported-by: Milian Wolff <milian.wolff@kdab.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-knpu3z4iyp2dxpdfm798fac4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/machine.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 35a2d58588f0992627e74b447ccab21570544c86 Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Fri May 20 15:25:28 2016 +0200 KVM: arm/arm64: vgic-new: Synchronize changes to active state When modifying the active state of an interrupt via the MMIO interface, we should ensure that the write has the intended effect. If a guest sets an interrupt to active, but that interrupt is already flushed into a list register on a running VCPU, then that VCPU will write the active state back into the struct vgic_irq upon returning from the guest and syncing its state. This is a non-benign race, because the guest can observe that an interrupt is not active, and it can have a reasonable expectations that other VCPUs will not ack any IRQs, and then set the state to active, and expect it to stay that way. Currently we are not honoring this case. Thefore, change both the SACTIVE and CACTIVE mmio handlers to stop the world, change the irq state, potentially queue the irq if we're setting it to active, and then continue. We take this chance to slightly optimize these functions by not stopping the world when touching private interrupts where there is inherently no possible race. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> arch/arm/include/asm/kvm_host.h | 2 + arch/arm/kvm/arm.c | 8 ++- arch/arm64/include/asm/kvm_host.h | 2 + virt/kvm/arm/vgic/vgic-mmio.c | 105 ++++++++++++++++++++++++-------------- 4 files changed, 77 insertions(+), 40 deletions(-) commit e5bbf30733f930a1d17b4ccf19eac88e30a39cc7 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Thu May 19 15:25:42 2016 +0200 mmc: sdhci-acpi: Ensure connected devices are powered when probing Some devices connected to the SDHCI controller may have separate enabling lines that are controlled through GPIO. These devices need to be powered on and enabled before probing. This is to ensure all devices connected can be seen by the controller. Note, for "stable" this patch depends on the following change: commit 78a898d0e395 ("ACPI / PM: Export acpi_device_fix_up_power()") Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reported-and-tested-by: Laszlo Fiat <laszlo.fiat@gmail.com> Cc: <stable@vger.kernel.org> # 4.5+ Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reported-by: Laszlo Fiat <laszlo.fiat@gmail.com> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=112571 Link: http://lkml.kernel.org/r/CA+7w51inLtQSr656bJvOjGG9oQWKYPXH+xxDPJKbeJ=CcrkS9Q@mail.gmail.com drivers/mmc/host/sdhci-acpi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 78a898d0e39513469858de990de83210fee28ee9 Author: Ulf Hansson <ulf.hansson@linaro.org> Date: Thu May 19 15:25:41 2016 +0200 ACPI / PM: Export acpi_device_fix_up_power() Drivers that needs acpi_device_fix_up_power(), allow them to be built as modules by exporting this function. Cc: <stable@vger.kernel.org> # 4.5+ Tested-by: Laszlo Fiat <laszlo.fiat@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/device_pm.c | 1 + 1 file changed, 1 insertion(+) commit efffe55af5e16f7935aa0175cf25c386f08219f5 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Mar 16 15:06:41 2016 +0000 KVM: arm/arm64: vgic-new: enable build Now that the new VGIC implementation has reached feature parity with the old one, add the new files to the build system and add a Kconfig option to switch between the two versions. We set the default to the new version to get maximum test coverage, in case people experience problems they can switch back to the old behaviour if needed. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org> arch/arm/kvm/Kconfig | 7 +++++++ arch/arm/kvm/Makefile | 11 +++++++++++ arch/arm64/kvm/Kconfig | 7 +++++++ arch/arm64/kvm/Makefile | 12 ++++++++++++ virt/kvm/arm/hyp/vgic-v2-sr.c | 5 +++++ 5 files changed, 42 insertions(+) commit 568e8c901eaa62004640cad8b9773819f27461a0 Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 22 00:52:33 2015 +0000 KVM: arm/arm64: vgic-new: implement mapped IRQ handling We now store the mapped hardware IRQ number in our struct, so we don't need the irq_phys_map for the new VGIC. Implement the hardware IRQ mapping on top of the reworked arch timer interface. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/vgic/vgic.h | 5 +++++ virt/kvm/arm/vgic/vgic.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) commit 03f0c94c73b9d7d55e057e4035cf3127ac44d41e Author: Andre Przywara <andre.przywara@arm.com> Date: Fri Mar 25 00:04:53 2016 +0000 KVM: arm/arm64: vgic-new: Wire up irqfd injection Connect to the new VGIC to the irqfd framework, so that we can inject IRQs. GSI routing and MSI routing is not yet implemented. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-irqfd.c | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) commit f7b6985cc3d0f0f6f35990301d80d858c148e10c Author: Eric Auger <eric.auger@linaro.org> Date: Wed Dec 2 10:30:13 2015 +0100 KVM: arm/arm64: vgic-new: Add vgic_v2/v3_enable Enable the VGIC operation by properly initialising the registers in the hypervisor GIC interface. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-v2.c | 11 ++++++++++- virt/kvm/arm/vgic/vgic-v3.c | 23 ++++++++++++++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) commit b0442ee227e826afc4df16cdfb8bd6eef6a8f425 Author: Eric Auger <eric.auger@linaro.org> Date: Mon Dec 21 15:04:42 2015 +0100 KVM: arm/arm64: vgic-new: vgic_init: implement map_resources map_resources is the last initialization step. It is executed on first VCPU run. At that stage the code checks that userspace has provided the base addresses for the relevant VGIC regions, which depend on the type of VGIC that is exposed to the guest. Also we check if the two regions overlap. If the checks succeeded, we register the respective register frames with the kvm_io_bus framework. If we emulate a GICv2, the function also forces vgic_init execution if it has not been executed yet. Also we map the virtual GIC CPU interface onto the guest's CPU interface. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/vgic/vgic.h | 1 + virt/kvm/arm/vgic/vgic-init.c | 28 +++++++++++++++++ virt/kvm/arm/vgic/vgic-v2.c | 69 +++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-v3.c | 71 +++++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 7 +++++ 5 files changed, 176 insertions(+) commit ad275b8bb1e659b14120174d87e3c1fdc22e9978 Author: Eric Auger <eric.auger@linaro.org> Date: Mon Dec 21 18:09:38 2015 +0100 KVM: arm/arm64: vgic-new: vgic_init: implement vgic_init This patch allocates and initializes the data structures used to model the vgic distributor and virtual cpu interfaces. At that stage the number of IRQs and number of virtual CPUs is frozen. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/vgic/vgic.h | 7 +- virt/kvm/arm/vgic/vgic-init.c | 217 ++++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-v2.c | 5 + virt/kvm/arm/vgic/vgic-v3.c | 5 + virt/kvm/arm/vgic/vgic.c | 4 + virt/kvm/arm/vgic/vgic.h | 8 ++ 6 files changed, 245 insertions(+), 1 deletion(-) commit 5e6431da8f3a04759ac8d77b7c98eec0de580343 Author: Eric Auger <eric.auger@linaro.org> Date: Mon Dec 21 14:50:50 2015 +0100 KVM: arm/arm64: vgic-new: vgic_init: implement vgic_create This patch implements the vgic_creation function which is called on CREATE_IRQCHIP VM IOCTL (v2 only) or KVM_CREATE_DEVICE Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/vgic/vgic.h | 1 + virt/kvm/arm/vgic/vgic-init.c | 84 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 85 insertions(+) commit 909777324588b40d431e6e3af0911ee62e0d00e3 Author: Eric Auger <eric.auger@linaro.org> Date: Tue Dec 1 15:02:35 2015 +0100 KVM: arm/arm64: vgic-new: vgic_init: implement kvm_vgic_hyp_init Implements kvm_vgic_hyp_init and vgic_probe function. This uses the new firmware independent VGIC probing to support both ACPI and DT based systems (code from Marc Zyngier). The vgic_global struct is enriched with new fields populated by those functions. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/vgic/vgic.h | 1 + virt/kvm/arm/vgic/vgic-init.c | 123 ++++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-v2.c | 64 ++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-v3.c | 49 +++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 9 ++++ 5 files changed, 246 insertions(+) commit 878c569e45066a76a2a841dab965e6d22c4e187e Author: Andre Przywara <andre.przywara@arm.com> Date: Thu Dec 3 11:48:42 2015 +0000 KVM: arm/arm64: vgic-new: Add userland GIC CPU interface access Using the VMCR accessors we provide access to GIC CPU interface state to userland by wiring it up to the existing userland interface. [Marc: move and make VMCR accessors static, streamline MMIO handlers] Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-kvm-device.c | 2 +- virt/kvm/arm/vgic/vgic-mmio-v2.c | 114 +++++++++++++++++++++++++++++++++++- virt/kvm/arm/vgic/vgic.h | 2 + 3 files changed, 116 insertions(+), 2 deletions(-) commit e4823a7a1b4a4f2549dd223f243779ab9510db22 Author: Andre Przywara <andre.przywara@arm.com> Date: Thu Dec 3 11:47:37 2015 +0000 KVM: arm/arm64: vgic-new: Add GICH_VMCR accessors Since the GIC CPU interface is always virtualized by the hardware, we don't have CPU interface state information readily available in our emulation if userland wants to save or restore it. Fortunately the GIC hypervisor interface provides the VMCR register to access the required virtual CPU interface bits. Provide wrappers for GICv2 and GICv3 hosts to have access to this register. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-v2.c | 29 +++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-v3.c | 22 ++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 21 +++++++++++++++++++++ 3 files changed, 72 insertions(+) commit 7d450e2821710718fd6703e9c486249cee913bab Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 1 22:36:37 2015 +0000 KVM: arm/arm64: vgic-new: Add userland access to VGIC dist registers Userland may want to save and restore the state of the in-kernel VGIC, so we provide the code which takes a userland request and translate that into calls to our MMIO framework. From Christoffer: When accessing the VGIC state from userspace we really don't want a VCPU to be messing with the state at the same time, and the API specifies that we should return -EBUSY if any VCPUs are running. Check and prevent VCPUs from running by grabbing their mutexes, one by one, and error out if we fail. (Note: This could potentially be simplified to just do a simple check and see if any VCPUs are running, and return -EBUSY then, without enforcing the locking throughout the duration of the uaccess, if we think that taking/releasing all these mutexes for every single GIC register access is too heavyweight.) Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-kvm-device.c | 55 ++++++++++++++++++++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) commit c3199f28e09496aa9fec9313b4f6e90e7dc913f0 Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Mon Apr 25 01:11:37 2016 +0200 KVM: arm/arm64: vgic-new: Export register access interface Userland can access the emulated GIC to save and restore its state for initialization or migration purposes. The kvm_io_bus API requires an absolute gpa, which does not fit the KVM_DEV_ARM_VGIC_GRP_DIST_REGS user API, that only provides relative offsets. So we provide a wrapper to plug into our MMIO framework and find the respective register handler. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> virt/kvm/arm/vgic/vgic-mmio-v2.c | 36 ++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 2 ++ 2 files changed, 38 insertions(+) commit f94591e2e6fdca6e9a2cbf23e36a8803b4f605fe Author: Eric Auger <eric.auger@linaro.org> Date: Mon Dec 21 17:34:52 2015 +0100 KVM: arm/arm64: vgic-new: vgic_kvm_device: access to VGIC registers This patch implements the switches for KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS API which allows the userspace to access VGIC registers. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-kvm-device.c | 53 +++++++++++++++++++++++++++++++++++-- virt/kvm/arm/vgic/vgic-mmio-v2.c | 38 ++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 1 + 3 files changed, 90 insertions(+), 2 deletions(-) commit e5c3029467cfa0acd89cfbd9cee1ae848e5eb8b0 Author: Eric Auger <eric.auger@linaro.org> Date: Mon Dec 21 17:27:39 2015 +0100 KVM: arm/arm64: vgic-new: vgic_kvm_device: KVM_DEV_ARM_VGIC_GRP_ADDR This patch implements the KVM_DEV_ARM_VGIC_GRP_ADDR group which enables to set the base address of GIC regions as seen by the guest. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-kvm-device.c | 38 +++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit e2c1f9abff83ee0ad0f78e03918c7edf070edb39 Author: Eric Auger <eric.auger@linaro.org> Date: Mon Dec 21 16:36:04 2015 +0100 KVM: arm/arm64: vgic-new: vgic_kvm_device: implement kvm_vgic_addr kvm_vgic_addr is used by the userspace to set the base address of the following register regions, as seen by the guest: - distributor(v2 and v3), - re-distributors (v3), - CPU interface (v2). Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/vgic/vgic.h | 2 + virt/kvm/arm/vgic/vgic-kvm-device.c | 86 +++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 3 ++ 3 files changed, 91 insertions(+) commit afcc7c50ce6e2fb18fd0535813c1d612265b1899 Author: Eric Auger <eric.auger@linaro.org> Date: Mon Dec 21 17:22:05 2015 +0100 KVM: arm/arm64: vgic-new: vgic_kvm_device: KVM_DEV_ARM_VGIC_GRP_CTRL This patch implements the KVM_DEV_ARM_VGIC_GRP_CTRL group API featuring KVM_DEV_ARM_VGIC_CTRL_INIT attribute. The vgic_init function is not yet implemented though. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-kvm-device.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit fca256026bb0d78991f975a7d4a3f601b7234401 Author: Eric Auger <eric.auger@linaro.org> Date: Mon Dec 21 16:33:22 2015 +0100 KVM: arm/arm64: vgic-new: vgic_kvm_device: KVM_DEV_ARM_VGIC_GRP_NR_IRQS This patch implements the KVM_DEV_ARM_VGIC_GRP_NR_IRQS group. This modality is supported by both VGIC V2 and V3 KVM device as will be other groups, hence the introduction of common helpers. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-kvm-device.c | 83 +++++++++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 4 deletions(-) commit c86c772191d7e65f873e6908e9604b31168936cd Author: Eric Auger <eric.auger@linaro.org> Date: Mon Nov 30 14:01:58 2015 +0100 KVM: arm/arm64: vgic-new: vgic_kvm_device: KVM device ops registration This patch introduces the skeleton for the KVM device operations associated to KVM_DEV_TYPE_ARM_VGIC_V2 and KVM_DEV_TYPE_ARM_VGIC_V3. At that stage kvm_vgic_create is stubbed. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-kvm-device.c | 108 ++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 2 + 2 files changed, 110 insertions(+) commit 621ecd8d2123bc13e140b519e01a18200aeb614c Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Jan 26 15:31:15 2016 +0000 KVM: arm/arm64: vgic-new: Add GICv3 SGI system register trap handler In contrast to GICv2 SGIs in a GICv3 implementation are not triggered by a MMIO write, but with a system register write. KVM knows about that register already, we just need to implement the handler and wire it up to the core KVM/ARM code. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/vgic/vgic.h | 8 +++ virt/kvm/arm/vgic/vgic-mmio-v3.c | 106 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) commit 78a714aba030395e72d03f0ff8a4c1481956e808 Author: Andre Przywara <andre.przywara@arm.com> Date: Mon Jan 25 16:45:37 2016 +0000 KVM: arm/arm64: vgic-new: Add GICv3 IROUTER register handlers Since GICv3 supports much more than the 8 CPUs the GICv2 ITARGETSR register can handle, the new IROUTER register covers the whole range of possible target (V)CPUs by using the same MPIDR that the cores report themselves. In addition to translating this MPIDR into a vcpu pointer we store the originally written value as well. The architecture allows to write any values into the register, which must be read back as written. Since we don't support affinity level 3, we don't need to take care about the upper word of this 64-bit register, which simplifies the handling a bit. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v3.c | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) commit 54f59d2b3a0a3d4e6f5038f5831aedb21350209d Author: Andre Przywara <andre.przywara@arm.com> Date: Fri Jan 22 18:18:52 2016 +0000 KVM: arm/arm64: vgic-new: Add GICv3 IDREGS register handler We implement the only one ID register that is required by the architecture, also this is the one that Linux actually checks. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v3.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) commit 741972d8a69ce748d84dfe0d68403054dfcae657 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Jan 27 14:54:46 2016 +0000 KVM: arm/arm64: vgic-new: Add GICv3 redistributor IIDR and TYPER handler The redistributor TYPER tells the OS about the associated MPIDR, also the LAST bit is crucial to determine the number of redistributors. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v3.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit fd59ed3be17e414aa3400f35d0f5faa01dd74185 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Jan 27 14:54:30 2016 +0000 KVM: arm/arm64: vgic-new: Add GICv3 CTLR, IIDR, TYPER handlers As in the GICv2 emulation we handle those three registers in one function. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v3.c | 48 +++++++++++++++++++++++++++++++++++++++- virt/kvm/arm/vgic/vgic.h | 1 + 2 files changed, 48 insertions(+), 1 deletion(-) commit ed9b8cefa91695119e634979db6090d0700a21f8 Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 1 14:34:34 2015 +0000 KVM: arm/arm64: vgic-new: Add GICv3 MMIO handling framework Create a new file called vgic-mmio-v3.c and describe the GICv3 distributor and redistributor registers there. This adds a special macro to deal with the split of SGI/PPI in the redistributor and SPIs in the distributor, which allows us to reuse the existing GICv2 handlers for those registers which are compatible. Also we provide a function to deal with the registration of the two separate redistributor frames per VCPU. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v3.c | 224 +++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.c | 5 + virt/kvm/arm/vgic/vgic-mmio.h | 2 + virt/kvm/arm/vgic/vgic.h | 7 ++ 4 files changed, 238 insertions(+) commit ed40213ef9b02b0f5e9e1807c45ee45407765a27 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Dec 9 16:21:37 2015 +0000 KVM: arm/arm64: vgic-new: Add SGIPENDR register handlers As this register is v2 specific, its implementation lives entirely in vgic-mmio-v2.c. This register allows setting the source mask of an IPI. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v2.c | 62 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 2 deletions(-) commit 55cc01fb9004ea93345f30aa26a3c3fc22d4f46a Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 1 12:42:05 2015 +0000 KVM: arm/arm64: vgic-new: Add SGIR register handler Triggering an IPI via this register is v2 specific, so the implementation lives entirely in vgic-mmio-v2.c. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v2.c | 43 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit 2c234d6f18267614aaa9b0e9148a7daa6e2b234d Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 1 12:41:55 2015 +0000 KVM: arm/arm64: vgic-new: Add TARGET registers handlers The target register handlers are v2 emulation specific, so their implementation lives entirely in vgic-mmio-v2.c. We copy the old VGIC behaviour of assigning an IRQ to the first VCPU set in the target mask instead of making it possibly pending on multiple VCPUs. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v2.c | 43 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) commit 79717e4ac09c7c0c1414a3338fec457d982e9dd8 Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 1 12:41:31 2015 +0000 KVM: arm/arm64: vgic-new: Add CONFIG registers handlers The config register handlers are shared between the v2 and v3 emulation, so their implementation goes into vgic-mmio.c, to be easily referenced from the v3 emulation as well later. Signed-off-by: Andre Przywara <andre.przywara@arm.com> virt/kvm/arm/vgic/vgic-mmio-v2.c | 2 +- virt/kvm/arm/vgic/vgic-mmio.c | 47 ++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.h | 7 ++++++ 3 files changed, 55 insertions(+), 1 deletion(-) commit 055658bf48fcc6afdf90810e7e8f4e98f486c0d2 Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 1 14:34:02 2015 +0000 KVM: arm/arm64: vgic-new: Add PRIORITY registers handlers The priority register handlers are shared between the v2 and v3 emulation, so their implementation goes into vgic-mmio.c, to be easily referenced from the v3 emulation as well later. There is a corner case when we change the priority of a pending interrupt which we don't handle at the moment. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v2.c | 2 +- virt/kvm/arm/vgic/vgic-mmio.c | 40 ++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.h | 7 +++++++ virt/kvm/arm/vgic/vgic.h | 2 ++ 4 files changed, 50 insertions(+), 1 deletion(-) commit 69b6fe0c6e7f560165d655bbb127f8d69b7358ea Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 1 12:40:58 2015 +0000 KVM: arm/arm64: vgic-new: Add ACTIVE registers handlers The active register handlers are shared between the v2 and v3 emulation, so their implementation goes into vgic-mmio.c, to be easily referenced from the v3 emulation as well later. Since activation/deactivation of an interrupt may happen entirely in the guest without it ever exiting, we need some extra logic to properly track the active state. For clearing the active state, we basically have to halt the guest to make sure this is properly propagated into the respective VCPUs. Signed-off-by: Andre Przywara <andre.przywara@arm.com> virt/kvm/arm/vgic/vgic-mmio-v2.c | 4 +- virt/kvm/arm/vgic/vgic-mmio.c | 81 ++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.h | 10 +++++ 3 files changed, 93 insertions(+), 2 deletions(-) commit 96b298000db48360e49a1f8f9edc6d2b9c1b2548 Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 1 14:33:41 2015 +0000 KVM: arm/arm64: vgic-new: Add PENDING registers handlers The pending register handlers are shared between the v2 and v3 emulation, so their implementation goes into vgic-mmio.c, to be easily referenced from the v3 emulation as well later. For level triggered interrupts the real line level is unaffected by this write, so we keep this state separate and combine it with the device's level to get the actual pending state. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v2.c | 4 +-- virt/kvm/arm/vgic/vgic-mmio.c | 60 ++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.h | 12 ++++++++ 3 files changed, 74 insertions(+), 2 deletions(-) commit fd122e620983003c376aca56892ac14a34a38d57 Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Dec 1 14:33:05 2015 +0000 KVM: arm/arm64: vgic-new: Add ENABLE registers handlers As the enable register handlers are shared between the v2 and v3 emulation, their implementation goes into vgic-mmio.c, to be easily referenced from the v3 emulation as well later. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v2.c | 4 +-- virt/kvm/arm/vgic/vgic-mmio.c | 56 ++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.h | 11 ++++++++ 3 files changed, 69 insertions(+), 2 deletions(-) commit 2b0cda8789654bfcebca397daebc37aff081bd75 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Tue Apr 26 11:06:47 2016 +0100 KVM: arm/arm64: vgic-new: Add CTLR, TYPER and IIDR handlers Those three registers are v2 emulation specific, so their implementation lives entirely in vgic-mmio-v2.c. Also they are handled in one function, as their implementation is pretty simple. When the guest enables the distributor, we kick all VCPUs to get potentially pending interrupts serviced. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/linux/irqchip/arm-gic.h | 1 + virt/kvm/arm/vgic/vgic-mmio-v2.c | 46 +++++++++++++++++++++++++++++++++++++++- virt/kvm/arm/vgic/vgic.c | 15 +++++++++++++ virt/kvm/arm/vgic/vgic.h | 4 ++++ 4 files changed, 65 insertions(+), 1 deletion(-) commit fb848db39661a1243f6ae939ef7e9251a765b972 Author: Andre Przywara <andre.przywara@arm.com> Date: Tue Apr 26 21:32:49 2016 +0100 KVM: arm/arm64: vgic-new: Add GICv2 MMIO handling framework Create vgic-mmio-v2.c to describe GICv2 emulation specific handlers using the initializer macros provided by the VGIC MMIO framework. Provide a function to register the GICv2 distributor registers to the kvm_io_bus framework. The actual handler functions are still stubs in this patch. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic/vgic-mmio-v2.c | 76 ++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.c | 26 ++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.h | 2 ++ virt/kvm/arm/vgic/vgic.h | 2 ++ 4 files changed, 106 insertions(+) commit 4493b1c4866a03963a35be7d157c911a617a3694 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Tue Apr 26 11:06:12 2016 +0100 KVM: arm/arm64: vgic-new: Add MMIO handling framework Add an MMIO handling framework to the VGIC emulation: Each register is described by its offset, size (or number of bits per IRQ, if applicable) and the read/write handler functions. We provide initialization macros to describe each GIC register later easily. Separate dispatch functions for read and write accesses are connected to the kvm_io_bus framework and binary-search for the responsible register handler based on the offset address within the region. We convert the incoming data (referenced by a pointer) to the host's endianess and use pass-by-value to hand the data over to the actual handler functions. The register handler prototype and the endianess conversion are courtesy of Christoffer Dall. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/vgic/vgic.h | 13 +++ virt/kvm/arm/vgic/vgic-mmio.c | 184 ++++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic-mmio.h | 99 +++++++++++++++++++++++ 3 files changed, 296 insertions(+) commit 90eee56c5f9081686035972dfcddfd6c85cafdf9 Author: Eric Auger <eric.auger@linaro.org> Date: Mon Dec 7 15:30:38 2015 +0000 KVM: arm/arm64: vgic-new: Implement kvm_vgic_vcpu_pending_irq Tell KVM whether a particular VCPU has an IRQ that needs handling in the guest. This is used to decide whether a VCPU is runnable. Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> include/kvm/vgic/vgic.h | 2 ++ virt/kvm/arm/vgic/vgic.c | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) commit 59529f69f5048e50dcde3434661981c01f8208b4 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Mon Nov 30 13:09:53 2015 +0000 KVM: arm/arm64: vgic-new: Add GICv3 world switch backend As the GICv3 virtual interface registers differ from their GICv2 siblings, we need different handlers for processing maintenance interrupts and reading/writing to the LRs. Implement the respective handler functions and connect them to existing code to be called if the host is using a GICv3. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/linux/irqchip/arm-gic-v3.h | 1 + virt/kvm/arm/vgic/vgic-v3.c | 162 +++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.c | 25 ++++-- virt/kvm/arm/vgic/vgic.h | 29 +++++++ 4 files changed, 212 insertions(+), 5 deletions(-) commit 140b086dd19771410915a924db2e635c2b51a0f4 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Thu Nov 26 17:19:25 2015 +0000 KVM: arm/arm64: vgic-new: Add GICv2 world switch backend Processing maintenance interrupts and accessing the list registers are dependent on the host's GIC version. Introduce vgic-v2.c to contain GICv2 specific functions. Implement the GICv2 specific code for syncing the emulation state into the VGIC registers. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/linux/irqchip/arm-gic.h | 1 + virt/kvm/arm/vgic/vgic-v2.c | 176 ++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.c | 6 ++ virt/kvm/arm/vgic/vgic.h | 6 ++ 4 files changed, 189 insertions(+) commit 0919e84c0fc1fc73525fdcedefab89ea8460f697 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Thu Nov 26 17:19:25 2015 +0000 KVM: arm/arm64: vgic-new: Add IRQ sync/flush framework Implement the framework for syncing IRQs between our emulation and the list registers, which represent the guest's view of IRQs. This is done in kvm_vgic_flush_hwstate and kvm_vgic_sync_hwstate, which gets called on guest entry and exit. The code talking to the actual GICv2/v3 hardware is added in the following patches. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Eric Auger <eric.auger@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/vgic/vgic.h | 4 + virt/kvm/arm/vgic/vgic.c | 192 +++++++++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 2 + 3 files changed, 198 insertions(+) commit 8e4447457965a7ddc576d0b9fd34c9905eb0416d Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Wed Nov 25 10:02:16 2015 -0800 KVM: arm/arm64: vgic-new: Add IRQ sorting Adds the sorting function to cover the case where you have more IRQs to consider than you have LRs. We now consider priorities. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> virt/kvm/arm/vgic/vgic.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit 81eeb95ddbabbb998a6b39f762bc7edaa2a979b4 Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Wed Nov 25 10:02:16 2015 -0800 KVM: arm/arm64: vgic-new: Implement virtual IRQ injection Provide a vgic_queue_irq_unlock() function which decides whether a given IRQ needs to be queued to a VCPU's ap_list. This should be called whenever an IRQ becomes pending or enabled, either as a result of userspace injection, from in-kernel emulated devices like the architected timer or from MMIO accesses to the distributor emulation. Also provides the necessary functions to allow userland to inject an IRQ to a guest. Since this is the first code that starts using our locking mechanism, we add some (hopefully) clear documentation of our locking strategy and requirements along with this patch. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> include/kvm/vgic/vgic.h | 3 + virt/kvm/arm/vgic/vgic.c | 211 +++++++++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 1 + 3 files changed, 215 insertions(+) commit 64a959d66e47039833e7f3c8d7e50fd4afa078ca Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Tue Nov 24 16:51:12 2015 +0100 KVM: arm/arm64: vgic-new: Add acccessor to new struct vgic_irq instance The new VGIC implementation centers around a struct vgic_irq instance per virtual IRQ. Provide a function to retrieve the right instance for a given IRQ number and (in case of private interrupts) the right VCPU. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Acked-by: Marc Zyngier <marc.zyngier@arm.com> virt/kvm/arm/vgic/vgic.c | 41 +++++++++++++++++++++++++++++++++++++++++ virt/kvm/arm/vgic/vgic.h | 22 ++++++++++++++++++++++ 2 files changed, 63 insertions(+) commit b18b57787f5e469b2825784ae3c522fc14472e97 Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Mon Nov 23 07:20:05 2015 -0800 KVM: arm/arm64: vgic-new: Add data structure definitions Add a new header file for the new and improved GIC implementation. The big change is that we now have a struct vgic_irq per IRQ instead of spreading all the information over various bitmaps. We include this new header conditionally from within the old header file for the time being to avoid touching all the users. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> include/kvm/arm_vgic.h | 5 ++ include/kvm/vgic/vgic.h | 201 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 206 insertions(+) commit 44bfc42e94cd76a0bd44f3fce98d4a7b76f31bc0 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed May 4 14:35:48 2016 +0100 KVM: arm/arm64: move GICv2 emulation defines into arm-gic-v3.h As (some) GICv3 hosts can emulate a GICv2, some GICv2 specific masks for the list register definition also apply to GICv3 LRs. At the moment we have those definitions in the KVM VGICv3 implementation, so let's move them into the GICv3 header file to have them automatically defined. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> include/linux/irqchip/arm-gic-v3.h | 5 +++++ virt/kvm/arm/vgic-v3.c | 8 +------- 2 files changed, 6 insertions(+), 7 deletions(-) commit b13216cf6010ef482e69875e00711de7f9573c80 Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Wed Apr 27 10:28:00 2016 +0100 KVM: arm/arm64: Provide functionality to pause and resume a guest For some rare corner cases in our VGIC emulation later we have to stop the guest to make sure the VGIC state is consistent. Provide the necessary framework to pause and resume a guest. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> arch/arm/include/asm/kvm_host.h | 4 ++++ arch/arm/kvm/arm.c | 25 +++++++++++++------------ arch/arm64/include/asm/kvm_host.h | 4 ++++ 3 files changed, 21 insertions(+), 12 deletions(-) commit 2defaff48aaf16072a6eac4cf8234917197dfa72 Author: Andre Przywara <andre.przywara@arm.com> Date: Mon Mar 7 17:32:29 2016 +0700 KVM: arm/arm64: pmu: abstract access to number of SPIs Currently the PMU uses a member of the struct vgic_dist directly, which not only breaks abstraction, but will fail with the new VGIC. Abstract this access in the VGIC header file and refactor the validity check in the PMU code. Signed-off-by: Andre Przywara <andre.przywara@arm.com> include/kvm/arm_vgic.h | 2 ++ virt/kvm/arm/pmu.c | 25 ++++++++++++++----------- 2 files changed, 16 insertions(+), 11 deletions(-) commit d5a5a0eff368f039ed2222b47c15f09cb60e1245 Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Sun Apr 24 21:41:36 2016 +0200 KVM: arm/arm64: Export mmio_read/write_bus Rename mmio_{read,write}_bus to kvm_mmio_{read,write}_bus and export them out of mmio.c. This will be needed later for the new VGIC implementation. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> arch/arm/include/asm/kvm_mmio.h | 3 +++ arch/arm/kvm/mmio.c | 10 +++++----- arch/arm64/include/asm/kvm_mmio.h | 3 +++ 3 files changed, 11 insertions(+), 5 deletions(-) commit 83091db981e105d97562d3ed3ffe676e21927e3a Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Tue Mar 29 14:29:28 2016 +0200 KVM: arm/arm64: Fix MMIO emulation data handling When the kernel was handling a guest MMIO read access internally, we need to copy the emulation result into the run->mmio structure in order for the kvm_handle_mmio_return() function to pick it up and inject the result back into the guest. Currently the only user of kvm_io_bus for ARM is the VGIC, which did this copying itself, so this was not causing issues so far. But with the upcoming new vgic implementation we need this done properly. Update the kvm_handle_mmio_return description and cleanup the code to only perform a single copying when needed. Code and commit message inspired by Andre Przywara. Reported-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> arch/arm/kvm/mmio.c | 14 +++++++------- virt/kvm/arm/vgic.c | 7 ------- 2 files changed, 7 insertions(+), 14 deletions(-) commit 2db4c104fa2a9af12c07433642e2e4fee37fe2fd Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Wed Apr 6 14:48:53 2016 +0200 KVM: arm/arm64: Get rid of vgic_cpu->nr_lr The number of list registers is a property of the underlying system, not of emulated VGIC CPU interface. As we are about to move this variable to global state in the new vgic for clarity, move it from the legacy implementation as well to make the merge of the new code easier. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com> include/kvm/arm_vgic.h | 3 --- virt/kvm/arm/hyp/vgic-v2-sr.c | 12 +++++++----- virt/kvm/arm/vgic-v2.c | 4 +++- virt/kvm/arm/vgic.c | 12 ++---------- 4 files changed, 12 insertions(+), 19 deletions(-) commit 41a54482c010d8806cf56e1501bb3b61fac14cf9 Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Wed May 18 16:26:00 2016 +0100 KVM: arm/arm64: Move timer IRQ map to latest possible time We are about to modify the VGIC to allocate all data structures dynamically and store mapped IRQ information on a per-IRQ struct, which is indeed allocated dynamically at init time. Therefore, we cannot record the mapped IRQ info from the timer at timer reset time like it's done now, because VCPU reset happens before timer init. A possible later time to do this is on the first run of a per VCPU, it just requires us to move the enable state to be a per-VCPU state and do the lookup of the physical IRQ number when we are about to run the VCPU. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> arch/arm/kvm/arm.c | 6 ++-- include/kvm/arm_arch_timer.h | 8 +++--- virt/kvm/arm/arch_timer.c | 66 +++++++++++++++++++++++++------------------- virt/kvm/arm/hyp/timer-sr.c | 5 ++-- 4 files changed, 47 insertions(+), 38 deletions(-) commit c8eb3f6b9bc31abc0ab3230737fde1639c8b1ea6 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Apr 13 11:49:07 2016 +0100 KVM: arm/arm64: vgic: Remove irq_phys_map from interface Now that the virtual arch timer does not care about the irq_phys_map anymore, let's rework kvm_vgic_map_phys_irq() to return an error value instead. Any reference to that mapping can later be done by passing the correct combination of VCPU and virtual IRQ number. This makes the irq_phys_map handling completely private to the VGIC code. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/arm_vgic.h | 3 +-- virt/kvm/arm/arch_timer.c | 7 +------ virt/kvm/arm/vgic.c | 15 +++++++-------- 3 files changed, 9 insertions(+), 16 deletions(-) commit a7e33ad9b25552b75a2523cc598db8bcd218ede5 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Apr 13 11:03:02 2016 +0100 KVM: arm/arm64: arch_timer: Remove irq_phys_map Now that the interface between the arch timer and the VGIC does not require passing the irq_phys_map entry pointer anymore, let's remove it from the virtual arch timer and use the virtual IRQ number instead directly. The remaining pointer returned by kvm_vgic_map_phys_irq() will be removed in the following patch. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/arm_arch_timer.h | 3 --- virt/kvm/arm/arch_timer.c | 10 ++++------ 2 files changed, 4 insertions(+), 9 deletions(-) commit b452cb52072d21f026e38ac7af36a969bab2ed22 Author: Christoffer Dall <christoffer.dall@linaro.org> Date: Sat Jun 4 15:41:00 2016 +0100 KVM: arm/arm64: Remove the IRQ field from struct irq_phys_map The communication of a Linux IRQ number from outside the VGIC to the vgic was a leftover from the day when the vgic code cared about how a particular device injects virtual interrupts mapped to a physical interrupt. We can safely remove this notion, leaving all physical IRQ handling to be done in the device driver (the arch timer in this case), which makes room for a saner API for the new VGIC. Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> include/kvm/arm_vgic.h | 3 +-- virt/kvm/arm/arch_timer.c | 23 +++++++++++++++++++++-- virt/kvm/arm/vgic.c | 28 ++++++---------------------- 3 files changed, 28 insertions(+), 26 deletions(-) commit 63306c28ac92bdf9e41aef367708d762f9f725f2 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Apr 13 10:04:06 2016 +0100 KVM: arm/arm64: vgic: avoid map in kvm_vgic_unmap_phys_irq() kvm_vgic_unmap_phys_irq() only needs the virtual IRQ number, so let's just pass that between the arch timer and the VGIC to get rid of the irq_phys_map pointer. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/arm_vgic.h | 2 +- virt/kvm/arm/arch_timer.c | 2 +- virt/kvm/arm/vgic.c | 11 ++++------- 3 files changed, 6 insertions(+), 9 deletions(-) commit e262f4193638fff2de458f0c70284f0cb50926a7 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Apr 13 10:03:49 2016 +0100 KVM: arm/arm64: vgic: avoid map in kvm_vgic_map_is_active() For getting the active state of a mapped IRQ, we actually only need the virtual IRQ number, not the pointer to the mapping entry. Pass the virtual IRQ number from the arch timer to the VGIC directly. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/arm_vgic.h | 2 +- virt/kvm/arm/arch_timer.c | 6 ++---- virt/kvm/arm/vgic.c | 6 +++--- 3 files changed, 6 insertions(+), 8 deletions(-) commit 4f551a3d96a2de85a041ee60e806bda1d5b06255 Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Apr 13 09:48:02 2016 +0100 KVM: arm/arm64: vgic: avoid map in kvm_vgic_inject_mapped_irq() When we want to inject a hardware mapped IRQ into a guest, we actually only need the virtual IRQ number from the irq_phys_map. So let's pass this number directly from the arch timer to the VGIC to avoid using the map as a parameter. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> include/kvm/arm_vgic.h | 2 +- virt/kvm/arm/arch_timer.c | 2 +- virt/kvm/arm/vgic.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) commit 7cbc084dc22ca4adb8fd741502e43f29b577abfb Author: Andre Przywara <andre.przywara@arm.com> Date: Wed Apr 13 09:43:59 2016 +0100 KVM: arm/arm64: vgic: streamline vgic_update_irq_pending() interface We actually don't use the irq_phys_map parameter in vgic_update_irq_pending(), so let's just remove it. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Eric Auger <eric.auger@linaro.org> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> virt/kvm/arm/vgic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e4fe9e7dc3828bf6a5714eb3c55aef6260d823a2 Author: Matt Evans <matt.evans@arm.com> Date: Mon May 16 13:54:56 2016 +0100 kvm: arm64: Fix EC field in inject_abt64 The EC field of the constructed ESR is conditionally modified by ORing in ESR_ELx_EC_DABT_LOW for a data abort. However, ESR_ELx_EC_SHIFT is missing from this condition. Signed-off-by: Matt Evans <matt.evans@arm.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Cc: <stable@vger.kernel.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> arch/arm64/kvm/inject_fault.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3497610a45d15bd33d1993ddd84951ad21b35ded Author: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Date: Sat Apr 30 20:11:30 2016 +0100 rtc: stmp3xxx: print message on error stmp3xxx_wdt_register() can fail as platform_device_alloc() or platform_device_add() can fail. But when it fails it failed silently. Lets print out an error message on failure so that user will atlest know that there was some error. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-stmp3xxx.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 6fca3fc51632685635cb7143065ae74d44673871 Author: Javier Martinez Canillas <javier@osg.samsung.com> Date: Tue Apr 26 18:17:35 2016 -0400 rtc: Use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-cmos.c | 2 +- drivers/rtc/rtc-mrst.c | 2 +- drivers/rtc/rtc-rs5c372.c | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) commit b4b77f3c280e38cec178f81d7a4d7e65f4045913 Author: Qianyu Gong <qianyu.gong@nxp.com> Date: Thu Apr 21 14:55:40 2016 +0800 rtc: ds3232: fix call trace when rtc->ops_lock is used as NULL The rtc->ops_lock would be accessed in ds3232_irq() without being initialized as rtc_device_register() is called too late. So move devm_rtc_device_register() just before registering irq handler to initialize rtc->ops_lock earlier. Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com> Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-ds3232.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit a350259da4b0556fcf276c506a14f406d608c2b3 Author: Stefan Agner <stefan@agner.ch> Date: Wed Apr 20 16:09:57 2016 -0700 rtc: snvs: return error in case enable_irq_wake fails If enable_irq_wake fails, we should return that error code so that entering suspend fails. Otherwise we will get a WARNING along with the hint of a unbalanced wake disable: Unbalanced IRQ 37 wake disable Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-snvs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b62c3a1158c0abc98e03c68934fa7ee6ca10dd49 Author: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com> Date: Wed Apr 20 21:17:35 2016 +0530 rtc: zynqmp: Update seconds time programming logic We program RTC time using SET_TIME_WRITE register and read the RTC current time using CURRENT_TIME register. When we set the time by writing into SET_TIME_WRITE Register and immediately try to read the rtc time from CURRENT_TIME register, the previous old value is returned instead of the new loaded time. This is because RTC takes nearly 1 sec to update the new loaded value into the CURRENT_TIME register. This behaviour is expected in our RTC IP. This patch updates the driver to read the current time from SET_TIME_WRITE register instead of CURRENT_TIME when rtc time is requested within an 1sec period after setting the RTC time. Doing so will ensure the correct time is given to the user. Since there is a delay of 1sec in updating the CURRENT_TIME we are loading set time +1sec while programming the SET_TIME_WRITE register, doing this will give correct time without any delay when read from CURRENT_TIME. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-zynqmp.c | 45 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 6 deletions(-) commit 01dc6992b3e888e7bf17691e4e86c9cc33e8f8b5 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Wed Apr 20 17:32:18 2016 +0200 rtc: sa1100: DT spelling s/interrupt-name/interrupt-names/ Fix typo in interrupt-names Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Documentation/devicetree/bindings/rtc/sa1100-rtc.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5333a4044d7b4af8bb01e031d0ee619e9ab86601 Author: Wolfram Sang <w.sang@pengutronix.de> Date: Wed May 4 17:31:26 2011 +0200 rtc: mc13xxx: remove UIE signaling The RTC core handles it since 6610e08 (RTC: Rework RTC code to use timerqueue for events). So far, only the callbacks to the RTC core have been removed, but not the handlers. Do this now. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-mc13xxx.c | 19 ------------------- 1 file changed, 19 deletions(-) commit 1726982f20ebb90f9b2fcdda6686e244f6af83e2 Author: Wolfram Sang <w.sang@pengutronix.de> Date: Wed May 4 17:31:28 2011 +0200 rtc: mxc: remove UIE signaling The RTC core handles it since 6610e08 (RTC: Rework RTC code to use timerqueue for events). Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-mxc.c | 3 --- 1 file changed, 3 deletions(-) commit 7457d5f588dfc038cef66e4645abbe9c06481504 Author: Stephen Boyd <sboyd@codeaurora.org> Date: Tue Apr 19 18:15:48 2016 -0700 rtc: ds1307: Remove CLK_IS_ROOT This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Cc: Akinobu Mita <akinobu.mita@gmail.com> Cc: Michael Tatarinov <kukabu@gmail.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-ds1307.c | 2 -- 1 file changed, 2 deletions(-) commit bdcaace5ef99eeb112decfa739b4b16e709a677b Author: Stephen Boyd <sboyd@codeaurora.org> Date: Tue Apr 19 18:13:58 2016 -0700 rtc: hym8563: Remove CLK_IS_ROOT This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Cc: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-hym8563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74e1af3246dfb9840d99a18363dec4dc66ac9731 Author: Stephen Boyd <sboyd@codeaurora.org> Date: Tue Apr 19 18:12:19 2016 -0700 rtc: pcf8563: Remove CLK_IS_ROOT This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Cc: Heiko Schocher <hs@denx.de> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Heiko Schocher <hs@denx.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-pcf8563.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 58c4ed3ba2e0c97e33affd237dc05738fa55a725 Author: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com> Date: Tue Apr 12 17:45:45 2016 +0530 rtc: zynqmp: Write Calibration value before setting time It is suggested to program CALIB_WRITE register with the calibration value before updating the SET_TIME_WRITE register, doing so will clear the Tick Counter and force the next second to be signaled exactly in 1 second. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-zynqmp.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit 9092984f1a8440ea52bf53c2d53bf8f5953a5126 Author: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com> Date: Tue Apr 12 17:45:44 2016 +0530 rtc: zynqmp: Enable RTC switching to battery power when VCC_PSAUX is N/A In order to conserve battery energy, during the PS operation, it is expected that the supply for the battery-powered domain to be switched from the battery (VCC_PSBATT) to (VCC_PSAUX) and automatically be switched back to battery when VCC_PSAUX voltage drops below a limit, doing so prevents the logic within the battery-powered domain from functioning incorrectly. Signed-off-by: Anurag Kumar Vulisha <anuragku@xilinx.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-zynqmp.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 19105f424b803f32757abab5fb13eaac22b6481f Author: Josh Poimboeuf <jpoimboe@redhat.com> Date: Fri Apr 15 09:21:10 2016 -0500 rtc: ds1685: actually spin forever in poweroff path objtool reports the following warning: drivers/rtc/rtc-ds1685.o: warning: objtool: ds1685_rtc_poweroff() falls through to next function ds1685_rtc_work_queue() Similar to commit 361c6ed6b153 ("rtc: ds1685: actually spin forever in poweroff error path"), there's another unreachable() annotation which is actually reachable, which we missed the first time. Actually spin forever to be consistent with the comment and to make the unreachable() annotation guaranteed to be unreachable. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-ds1685.c | 1 + 1 file changed, 1 insertion(+) commit 6406d96e74a59ae98cf3197a9f9498e14d2df562 Author: Steve Twiss <stwiss.opensource@diasemi.com> Date: Thu Apr 14 12:04:54 2016 +0100 rtc: da9053: fix access ordering error during RTC interrupt at system power on This fix alters the ordering of the IRQ and device registrations in the RTC driver probe function. This change will apply to the RTC driver that supports both DA9052 and DA9053 PMICs. A problem could occur with the existing RTC driver if: A system is started from a cold boot using the PMIC RTC IRQ to initiate a power on operation. For instance, if an RTC alarm is used to start a platform from power off. The existing driver IRQ is requested before the device has been properly registered. i.e. ret = da9052_request_irq() comes before rtc->rtc = devm_rtc_device_register(); In this case, an interrupt exists before the device has been registered and the IRQ handler can be called immediately: this can happen be before the memory for rtc->rtc has been allocated. The IRQ handler da9052_rtc_irq() contains the function call: rtc_update_irq(rtc->rtc, 1, RTC_IRQF | RTC_AF); which in turn tries to access the unavailable rtc->rtc. The fix is to reorder the functions inside the RTC probe. The IRQ is requested after the RTC device resource has been registered so that da9052_request_irq() is the last thing to happen. Signed-off-by: Steve Twiss <stwiss.opensource@diasemi.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-da9052.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 5919fb97dd85e7ee200ab60151244cca62f61368 Author: Nicolas Boullis <nboullis@debian.org> Date: Sun Apr 10 13:23:05 2016 +0200 rtc: ds1307: ensure that any pending alarm is cleared before a new alarm is enabled If a previously-set alarm was disabled and then triggered, it may still be pending when a new alarm is configured. Then, if the alarm is enabled before the pending alarm is cleared, then an interrupt is immediately raised. Unfortunately, when the alarm is cleared and enabled during the same I²C block write, the chip (at least the DS1339 I have) considers that the alarm is enabled before it is cleared, and raises an interrupt. This patch ensures that the pending alarm is cleared before the alarm is enabled. Signed-off-by: Nicolas Boullis <nboullis@debian.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-ds1307.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 1d87951c398e35118a0fb67b287022f008513f42 Author: Nicolas Boullis <nboullis@debian.org> Date: Sun Apr 3 00:10:37 2016 +0200 rtc: ds1307: fix ds1307_native_smbus_read_block_data function The i2c_smbus_read_i2c_block_data function returns 0 on success, not the number of bytes written. Hence, when there are 32 bytes or less to send, the ds1307_native_smbus_write_block_data function returns 0 on success, while it returns the number of bytes when there are more than 32. The ds1307_write_block_data always returns the number of bytes on success. Signed-off-by: Nicolas Boullis <nboullis@debian.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-ds1307.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ef50f86e15f2516658f0badd7890292d7a685106 Author: Akinobu Mita <akinobu.mita@gmail.com> Date: Sun Apr 10 23:59:24 2016 +0900 rtc: ds1302: fix write value for day of week register The valid range of day of week register for DS1302 is 1 to 7. But the set_time callback for rtc-ds1302 attempts to write the value of tm->tm_wday which is in the range 0 to 6. While the get_time callback correctly decodes the register. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Sergey Yanovich <ynvich@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-ds1302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bc83a141b8351f6d4458dd13eca5a66f2c0f3323 Author: Akinobu Mita <akinobu.mita@gmail.com> Date: Sun Apr 10 23:59:23 2016 +0900 rtc: ds1302: fix error check in set_time The set_time callback for rtc-ds1302 doesn't write clock registers because the error check for the return value from spi_write_then_read() is not correct. spi_write_then_read() which returns zero on success. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Sergey Yanovich <ynvich@gmail.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-ds1302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 05a7f27a889f1635b7b7d5b051b17cacb25267fa Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue Mar 29 08:56:05 2016 +0200 rtc: m41t80: handle oscillator failure bit Handle the Oscillator Failure (OF) bit on each read of date-time. If the OF is set, an error is returned (-EINVAL) instead of the date-time. The OF bit is cleared each time the date is set. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-m41t80.c | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) commit 3726a21833c9c96255735bddb5dacc8eacbff3ef Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue Mar 29 08:56:04 2016 +0200 rtc: m41t80: add wakealarm functionality To enable the wakealarm, the device must be able to wakeup. This is done by setting the device wakeup capability to true with 'device_init_wakeup' function. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-m41t80.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c6dfed92c3e86d6f84780625c0595ba56d03986 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue Mar 29 11:04:13 2016 +0200 rtc: m41t80: add alarm functionality Previous 'commit c3b79770e51a ("Expire alarms after the time is set")' and 'commit 48e9766726eb ("remove disabled alarm functionality")' removed the alarm support because the alarm irq was not functional. Add the alarm IRQ functionality with newer functions than previous code. Tested with 'rtctest' and the alarm is functional. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-m41t80.c | 180 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 167 insertions(+), 13 deletions(-) commit fc99b90154e519dd6cd21cb11d013f36017a1b94 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue Mar 29 08:56:02 2016 +0200 rtc: m41t80: remove warnings and replace obsolete function Replace the obsolete "simple_strtoul" function to "kstrtoul". Remove some checkpatch's errors, warnings and checks : - alignment with open parenthesis - spaces around '<' and '<<' - blank line after structure - quoted string split across lines Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-m41t80.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) commit 54339f3b311f1b2cbef7b84d6794e00e7ecb2184 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue Mar 29 08:56:01 2016 +0200 rtc: m41t80: add the use of 'BIT' macro Replace bit shifts by BIT macro. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-m41t80.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit f2b84ee88d367dd563c25b6900da279ab2ffa3ea Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue Mar 29 08:56:00 2016 +0200 rtc: m41t80: replace i2c functions for smbus ones The driver used i2c_transfer methods to read and set date/time. The smbus methods should be used. This commit replaces i2c_transfer functions by i2c_smbus_XX_i2c_block_data for reading and setting the datetime. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-m41t80.c | 134 ++++++++++++++++------------------------------- 1 file changed, 44 insertions(+), 90 deletions(-) commit ca91607fe76cc34b54957f5963f7102b37b861dd Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue Mar 29 08:55:59 2016 +0200 rtc: m41t80: remove proc macro Remove the CONFIG_RTC_INTF_PROC and CONFIG_RTC_INTF_PROC_MODULE macro which is not necessary anymore. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-m41t80.c | 4 ---- 1 file changed, 4 deletions(-) commit ef6b3125ca6f4319e760dc27617025b8af58d9d3 Author: Mylène Josserand <mylene.josserand@free-electrons.com> Date: Tue Mar 29 08:55:58 2016 +0200 rtc: m41t80: update sysfs entries export The driver used an old sysfs entry export. Update it to use the DEVICE_ATTR_XX macro and remove the unnecessary CONFIG_RTC_INTF_SYSFS macro. Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-m41t80.c | 56 +++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 24 deletions(-) commit fa5691131a87a36ee2d535aa3e8886e4e4f1e9f3 Author: Alexandre Belloni <alexandre.belloni@free-electrons.com> Date: Thu Mar 31 15:07:26 2016 +0200 rtc: remove useless DRV_VERSION Many drivers are defining a DRV_VERSION. This is often only used for MODULE_VERSION and sometimes to print an info message at probe time. This is kind of pointless as they are all versionned with the kernel anyway. Also the core will print a message when a new rtc is found. Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-ds1216.c | 3 --- drivers/rtc/rtc-ds1286.c | 3 --- drivers/rtc/rtc-ds1302.c | 2 -- drivers/rtc/rtc-ds1343.c | 2 -- drivers/rtc/rtc-ds1511.c | 3 --- drivers/rtc/rtc-ds1553.c | 3 --- drivers/rtc/rtc-ds1672.c | 5 ----- drivers/rtc/rtc-ds1685.c | 3 --- drivers/rtc/rtc-ds1742.c | 3 --- drivers/rtc/rtc-ep93xx.c | 3 --- drivers/rtc/rtc-gemini.c | 1 - drivers/rtc/rtc-isl12022.c | 5 ----- drivers/rtc/rtc-isl1208.c | 6 ------ drivers/rtc/rtc-m48t35.c | 3 --- drivers/rtc/rtc-m48t86.c | 4 ---- drivers/rtc/rtc-max6900.c | 5 ----- drivers/rtc/rtc-pcf2123.c | 4 ---- drivers/rtc/rtc-pcf8563.c | 5 ----- drivers/rtc/rtc-rs5c313.c | 2 -- drivers/rtc/rtc-rs5c348.c | 4 ---- drivers/rtc/rtc-rs5c372.c | 6 +----- drivers/rtc/rtc-rx8581.c | 5 ----- drivers/rtc/rtc-sh.c | 2 -- drivers/rtc/rtc-stk17ta8.c | 3 --- drivers/rtc/rtc-x1205.c | 5 ----- 25 files changed, 1 insertion(+), 89 deletions(-) commit df2d741f0e00669b94d675564f92949752a5d241 Author: Colin Ian King <colin.king@canonical.com> Date: Mon Mar 28 12:24:00 2016 +0100 rtc: at91sam9: remove duplicate assignment of variable mr mr is written twice with the same value, remove one of the redundant assignments to mr. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> drivers/rtc/rtc-at91sam9.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d25a5ed37d5fdd25f3cfbffc2f9a0f62e58f884c Author: Sergey Yanovich <ynvich@gmail.com> Date: Tue Feb 23 13:54:57 2016 +0300 rtc: ds1302: rewrite using SPI DS1302 is an half-duplex SPI device. The driver respects this fact now. Pin configurations should be implemented using SPI subsystem. Signed-off-by: Sergei Ianovich <ynvich@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> .../devicetree/bindings/rtc/maxim-ds1302.txt | 46 +++ drivers/rtc/Kconfig | 15 +- drivers/rtc/rtc-ds1302.c | 348 ++++++++++----------- 3 files changed, 212 insertions(+), 197 deletions(-) commit 423cd785619ac6778252fbdb916505aa1c153959 Author: Kai-Heng Feng <kaihengfeng@gmail.com> Date: Fri May 20 15:47:23 2016 +0800 ALSA: hda - Fix headphone noise on Dell XPS 13 9360 The headphone has noise when playing sound or switching microphone sources. It uses the same codec on XPS 13 9350, but with different subsystem ID. Applying the fixup can solve the issue. Also, changing the model name to better differentiate models. v2: Reorder by device ID. Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/hda/patch_realtek.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 1ab94188e4923629f296eb065ebf56d64ef3324a Author: Colin Ian King <colin.king@canonical.com> Date: Tue May 17 17:40:15 2016 +0100 perf/x86/intel/p4: Trival indentation fix, remove space Remove an extraneous space to fix up indentation. Trivial and no functional change Signed-off-by: Colin Ian King <colin.king@canonical.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Quentin Casasnovas <quentin.casasnovas@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1463503215-18339-1-git-send-email-colin.king@canonical.com Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/events/intel/p4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dc4fac84f8e66b147921ebdc385e767d5def7422 Author: Andy Lutomirski <luto@kernel.org> Date: Tue May 10 14:10:29 2016 -0700 x86/mm: Switch from TASK_SIZE to TASK_SIZE_MAX in the page fault code x86's page fault handlers had two TASK_SIZE uses that should have been TASK_SIZE_MAX. I don't think that either one had a visible effect, but this makes the code clearer and should save a few bytes of text. (And I eventually want to eradicate TASK_SIZE. This will help.) Reported-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Dmitry Safonov <0x7f454c46@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Pavel Emelyanov <xemul@parallels.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ruslan Kabatsayev <b7.10110111@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1242fb23b0d05c3069dbf5758ac55d26bc114bef.1462914565.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/mm/fault.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit d696ca016d579d43fc043f28ba656d9305fba651 Author: Andy Lutomirski <luto@kernel.org> Date: Tue May 10 09:18:46 2016 -0700 x86/fsgsbase/64: Use TASK_SIZE_MAX for FSBASE/GSBASE upper limits The GSBASE upper limit exists to prevent user code from confusing the paranoid idtentry path. The FSBASE upper limit is just for consistency. There's no need to enforce a smaller limit for 32-bit tasks. Just use TASK_SIZE_MAX. This simplifies the logic and will save a few bytes of code. Signed-off-by: Andy Lutomirski <luto@kernel.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/5357f2fe0f103eabf005773b70722451eab09a89.1462897104.git.luto@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/kernel/process_64.c | 4 ++-- arch/x86/kernel/ptrace.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 06cd3d8c14bdd06f49f1c6a06acf219749c5598e Merge: 0f6ff2b bc231d9 Author: Ingo Molnar <mingo@kernel.org> Date: Fri May 20 09:09:26 2016 +0200 Merge branch 'linus' into x86/urgent, to refresh the tree Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 0f6ff2bce0d4c3e4ff34f5d2ffb7329025b30844 Author: Dave Hansen <dave@sr71.net> Date: Thu May 12 15:04:00 2016 -0700 x86/mm/mpx: Work around MPX erratum SKD046 This erratum essentially causes the CPU to forget which privilege level it is operating on (kernel vs. user) for the purposes of MPX. This erratum can only be triggered when a system is not using Supervisor Mode Execution Prevention (SMEP). Our workaround for the erratum is to ensure that MPX can only be used in cases where SMEP is present in the processor and is enabled. This erratum only affects Core processors. Atom is unaffected. But, there is no architectural way to determine Atom vs. Core. So, we just apply this workaround to all processors. It's possible that it will mistakenly disable MPX on some Atom processsors or future unaffected Core processors. There are currently no processors that have MPX and not SMEP. It would take something akin to a hypervisor masking SMEP out on an Atom processor for this to present itself on current hardware. More details can be found at: http://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/desktop-6th-gen-core-family-spec-update.pdf " SKD046 Branch Instructions May Initialize MPX Bound Registers Incorrectly Problem: Depending on the current Intel MPX (Memory Protection Extensions) configuration, execution of certain branch instructions (near CALL, near RET, near JMP, and Jcc instructions) without a BND prefix (F2H) initialize the MPX bound registers. Due to this erratum, such a branch instruction that is executed both with CPL = 3 and with CPL < 3 may not use the correct MPX configuration register (BNDCFGU or BNDCFGS, respectively) for determining whether to initialize the bound registers; it may thus initialize the bound registers when it should not, or fail to initialize them when it should. Implication: A branch instruction that has executed both in user mode and in supervisor mode (from the same linear address) may cause a #BR (bound range fault) when it should not have or may not cause a #BR when it should have. Workaround An operating system can avoid this erratum by setting CR4.SMEP[bit 20] to enable supervisor-mode execution prevention (SMEP). When SMEP is enabled, no code can be executed both with CPL = 3 and with CPL < 3. " Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Hansen <dave@sr71.net> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20160512220400.3B35F1BC@viggo.jf.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/include/asm/bugs.h | 8 ++++++++ arch/x86/kernel/cpu/common.c | 3 +++ arch/x86/kernel/cpu/intel.c | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) commit 21f77d231fabd33c5de61fbff31818d93203353e Merge: b0a434f a29d5c9 Author: Ingo Molnar <mingo@kernel.org> Date: Fri May 20 08:19:20 2016 +0200 Merge tag 'perf-core-for-mingo-20160516' 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: - Honour the kernel.perf_event_max_stack knob more precisely by not counting PERF_CONTEXT_{KERNEL,USER} when deciding when to stop adding entries to the perf_sample->ip_callchain[] array (Arnaldo Carvalho de Melo) - Fix identation of 'stalled-backend-cycles' in 'perf stat' (Namhyung Kim) - Update runtime using 'cpu-clock' event in 'perf stat' (Namhyung Kim) - Use 'cpu-clock' for cpu targets in 'perf stat' (Namhyung Kim) - Avoid fractional digits for integer scales in 'perf stat' (Andi Kleen) - Store vdso buildid unconditionally, as it appears in callchains and we're not checking those when creating the build-id table, so we end up not being able to resolve VDSO symbols when doing analysis on a different machine than the one where recording was done, possibly of a different arch even (arm -> x86_64) (He Kuang) Infrastructure changes: - Generalize max_stack sysctl handler, will be used for configuring multiple kernel knobs related to callchains (Arnaldo Carvalho de Melo) Cleanups: - Introduce DSO__NAME_KALLSYMS and DSO__NAME_KCORE, to stop using open coded strings (Masami Hiramatsu) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 52103b70e13ae1381020b5a9fa15824a9b35baeb Author: David S. Miller <davem@davemloft.net> Date: Thu May 19 22:56:48 2016 -0700 Revert "net: pegasus: remove dead coding" This reverts commit e00be9e4d0ffcc0121606229f0aa4b246d6881d7. It causes warnings and has several problems. Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/usb/pegasus.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) commit ca79e49d6add77b69be3362ddfe5b068f62bf1de Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri May 20 09:04:41 2016 +1000 drm/nouveau/gr/gf100-: fix race condition in fecs/gpccs ucode This is a simplied version of the fix by Roy in fdo#93629. While this doesn't appear to fix the issues for the users in that report, it's a real issue that deserves to be resolved. Reported-by: Roy Spliet <rspliet@eclipso.eu> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc | 7 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf100.fuc3.h | 9 +++++---- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgf117.fuc3.h | 11 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk104.fuc3.h | 11 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk110.fuc3.h | 11 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgk208.fuc5.h | 11 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h | 11 ++++++----- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hub.fuc | 7 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf100.fuc3.h | 13 +++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgf117.fuc3.h | 13 +++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk104.fuc3.h | 13 +++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk110.fuc3.h | 13 +++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgk208.fuc5.h | 13 +++++++------ drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/hubgm107.fuc5.h | 13 +++++++------ 14 files changed, 85 insertions(+), 71 deletions(-) commit f9e2029443afc550365864abf760419371cc3bc1 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 21 10:35:38 2016 +1000 drm/nouveau/core: recognise GM108 chipsets Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 35 +++++++++++++++++++++++ 1 file changed, 35 insertions(+) commit 00f50c662c5aa3cebea62015d1df8cd5b19a41b6 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 21 10:28:55 2016 +1000 drm/nouveau/gr/gm107-: fix touching non-existent ppcs in attrib cb setup Also removes an XXX; according to nvgpu headers the field is called NV_PGRAPH_GPCS_SWDX_TC_BETA_CB_SIZE_DIV3, so, apparently not some magic we need to figure out :) Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit a00ecf2212be0196c7485786c7b0c0263dfbf88a Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 21 10:23:10 2016 +1000 drm/nouveau/gr/gk104-: share implementation of ppc exception init This was really inconsistent, some implementations could touch PPCs that didn't exist, others neglected to touch ones that did. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 19 ++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 7 ++++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 7 ++++--- 7 files changed, 31 insertions(+), 7 deletions(-) commit 87ac331e3f9aca9bdc3697bb936b3b2b43cbf5a0 Author: Ben Skeggs <bskeggs@redhat.com> Date: Tue Apr 19 11:10:38 2016 +1000 drm/nouveau/gr/gk104-: move rop_active_fbps init to nonctx Matches newer RM. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c | 10 ---------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk20a.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 11 ----------- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm20b.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 12 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 12 ++++++++++++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gm20b.c | 1 + 15 files changed, 36 insertions(+), 28 deletions(-) commit 4d3df19a8e6c9e60eed7f3c6e2025362b3ca2da5 Author: Ben Skeggs <bskeggs@redhat.com> Date: Tue Apr 19 10:28:44 2016 +1000 drm/nouveau/bios/pll: check BIT table version before trying to parse it Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 2781c928b1b3d5d56d72b4955e19c0d963e2c22e Author: Ben Skeggs <bskeggs@redhat.com> Date: Tue Apr 19 10:07:04 2016 +1000 drm/nouveau/bios/pll: prevent oops when limits table can't be parsed Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d07a97e939cd1e257d833758c43dd5b7ffd7ba44 Author: Karol Herbst <nouveau@karolherbst.de> Date: Sat Apr 16 20:01:59 2016 +0200 drm/nouveau/volt/gk104: round up in gk104_volt_set We always want a equal or higher voltage than the requested ones, otherwise nouveau undervolts. Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk104.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e976278ad231dbc44c00729df72cf9fe9a164412 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 11:14:33 2016 +1000 drm/nouveau/fb/gm200: setup mmu debug buffer registers at init() Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 +-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 6 --- drivers/gpu/drm/nouveau/nvkm/subdev/fb/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm200.c | 60 +++++++++++++++++++++++ 5 files changed, 65 insertions(+), 9 deletions(-) commit 834b21f5e902b4fdf3217779d10d4f388b667e85 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 10:50:55 2016 +1000 drm/nouveau/fb/gk20a,gm20b: setup mmu debug buffer registers at init() Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 5 ----- drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk20a.c | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) commit 99c5917253a6c5584a7052f9ee578e2c6852253f Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 10:39:18 2016 +1000 drm/nouveau/fb/gf100-: allocate mmu debug buffers Later chipsets require setting this up both in FB and GR, so let's just move the allocation to FB. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/fb.h | 3 +++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 29 ++++-------------------- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 3 --- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 7 ++++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 6 +++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 6 +++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 6 +++-- drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 4 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/gf100.c | 26 +++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h | 1 + 13 files changed, 58 insertions(+), 36 deletions(-) commit 917d95a86e7b7036d481323240443566be82a619 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 10:38:55 2016 +1000 drm/nouveau/fb: allow chipset-specific actions for oneinit() Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 8 ++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/fb/priv.h | 1 + 2 files changed, 9 insertions(+) commit 06d4f26cc33b11be4b41fa0409130cbdf34d9343 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 15:36:16 2016 +1000 drm/nouveau/gr/gm200-: fix bad hardcoding of a max-tpcs-per-gpc value Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit 734a0aa669fd032f40e27e3d3df7228e1fe27681 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 14:28:03 2016 +1000 drm/nouveau/gr/gm200-: rop count == ltc count Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 8 +++++++- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm20b.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) commit c83e7d6836e1e7bf6ed30905444fa47d4ef0a82e Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 14:41:52 2016 +1000 drm/nouveau/gr/gm200: modify the mask when copying mmu settings from fb Appears to more closely match what RM does. For GM20B, now also copying bit 12 from NV_PFB_MMU_CTRL as upcoming changes will require it. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 4 +--- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm20b.c | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) commit 54aa38a8ad5cf91fece3d4b70f9eb1701599c0d1 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 11:19:54 2016 +1000 drm/nouveau/gr/gm200: move some code into init_gpc_mmu() hook Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 28 +++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 560e6da2678d033cd8dac3cea7acf987d16f4550 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 12:58:29 2016 +1000 drm/nouveau/gr/gm200: make generate_main() static Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 1 - drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 64cb5a31f477fe1540bfdbb7f72e7324d21208f4 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 14:26:18 2016 +1000 drm/nouveau/gr/gf100-: abstract fetching rop count Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 12 ++++++++++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/gr/gm20b.c | 1 + 15 files changed, 25 insertions(+), 2 deletions(-) commit 5ec3def7355a6f4d08ca612c775cf2320c1012e4 Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 14:08:25 2016 +1000 drm/nouveau/gr/gf100-: rename magic_not_rop_nr to screen_tile_row_offset Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 24 +++++++++++------------ drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gk20a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c | 4 ++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/gm200.c | 4 ++-- 8 files changed, 26 insertions(+), 26 deletions(-) commit 933ad445946f3818fc9f991c989de01993c1e8dc Author: Ben Skeggs <bskeggs@redhat.com> Date: Thu Apr 14 12:57:01 2016 +1000 drm/nouveau/gr/gf100-: remove hardcoded idle_timeout values Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c | 5 +++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c | 5 +++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c | 5 +++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk20a.c | 7 +++---- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c | 5 +++-- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 6 +++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm20b.c | 7 +++---- 7 files changed, 21 insertions(+), 19 deletions(-) commit 0cdc3fdfb7162c0ea5d467ae0c06bc47c6fea26e Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/fifo/gm107-: remove engines from mmu engine mapping array These are specified by PTOP on Maxwell GPUs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 25 +++++++++++++++++++++++- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c | 2 +- 4 files changed, 28 insertions(+), 3 deletions(-) commit 289e082706ca8191be16298ca8f06879a70d0f46 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/fifo/gk104-: identify mmu engine ids for host faults It appears these don't map to PBDMAs (at least on Kepler, it may or may be valid for Fermi - this hasn't been checked), but to runlists. This drops the NVKM_ENGINE_FIFO data from the entries too, as resetting all of PFIFO is *not* the way to handle such faults. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) commit e50d0237fc371be7053082f35efab03a740d055f Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/fifo/gk104-: implement support for PTOP fault info Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 91419acf7819d8a0ca5f36b924f224c92f96eeb8 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/fifo/gk104-: abstract mmu fault data structures Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 223 ++++++++++++----------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 14 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 4 + drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c | 4 + 8 files changed, 150 insertions(+), 111 deletions(-) commit 98ac3f061afa9b8347948451cb4e2d336d0a8912 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/fifo/gk104-: subclass func Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 11 +++++ drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 55 ++++++++++++++++-------- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h | 15 +++---- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c | 9 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c | 9 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c | 9 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c | 9 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c | 9 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c | 9 +--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h | 3 ++ 10 files changed, 65 insertions(+), 73 deletions(-) commit e93e198d468f6ae41cf62265f389da2925fe16bb Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/fifo/gk104-: use device info from top subdev Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 89 +++++------------------- 1 file changed, 16 insertions(+), 73 deletions(-) commit 56d06fa29edd58c448766014afd833b7ff51247b Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/core: remove pmc_enable argument from subdev ctor These are now specified directly in the MC subdev. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/core/engine.h | 6 ++---- drivers/gpu/drm/nouveau/include/nvkm/core/subdev.h | 3 +-- drivers/gpu/drm/nouveau/include/nvkm/engine/falcon.h | 1 - drivers/gpu/drm/nouveau/include/nvkm/engine/xtensa.h | 1 - drivers/gpu/drm/nouveau/nvkm/core/engine.c | 14 ++++++-------- drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/ce/gf100.c | 2 -- drivers/gpu/drm/nouveau/nvkm/engine/ce/gk104.c | 14 +------------- drivers/gpu/drm/nouveau/nvkm/engine/ce/gm107.c | 14 +------------- drivers/gpu/drm/nouveau/nvkm/engine/ce/gm200.c | 14 +------------- drivers/gpu/drm/nouveau/nvkm/engine/ce/gt215.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/disp/base.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/dma/base.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/falcon.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/gr/base.c | 5 ++--- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv04.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv10.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv20.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv40.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/nv50.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/gr/priv.h | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/g84.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv31.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv44.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/mpeg/nv50.c | 3 +-- drivers/gpu/drm/nouveau/nvkm/engine/mspdec/g98.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gf100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gk104.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/mspdec/gt215.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/msppp/g98.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/msppp/gf100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/msppp/gt215.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/msvld/g98.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/msvld/gf100.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/msvld/gk104.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/msvld/gt215.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/msvld/mcp89.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/pm/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/sec/g98.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/sw/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c | 1 - drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bar/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bios/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/bus/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fb/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/fuse/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gpio/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gf117.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk104.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gk20a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ibus/gm200.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/instmem/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/ltc/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 7 +------ drivers/gpu/drm/nouveau/nvkm/subdev/mmu/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pci/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk20a.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/secboot/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c | 2 +- 74 files changed, 62 insertions(+), 139 deletions(-) commit d85e2a8dd8f0d7592feaecb97ad0b0478f4e2cb7 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc/nv04: define reset masks + intr cleanup Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv04.c | 14 +++++--------- drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 1 - 2 files changed, 5 insertions(+), 10 deletions(-) commit 667e99ab23c21b2f38f64dded0c0061ec712c40e Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc/nv11: define reset masks + intr cleanup Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv04.c | 7 ++++ drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv11.c | 50 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 1 + 6 files changed, 61 insertions(+), 1 deletion(-) commit 79360b7d5f6be90b934c20345ab3bac1d98e3c08 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc/nv17: define reset masks + intr cleanup Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 40 +++++++++++------------ drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv17.c | 27 +++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv44.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv50.c | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 1 + 6 files changed, 52 insertions(+), 21 deletions(-) commit 9199fbdbf8a94dae63615cceed79766fa04f3db8 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc/nv50: define reset masks + intr cleanup Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/mc/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv17.c | 32 +++++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv50.c | 20 +++++++---------- drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 3 ++- 4 files changed, 43 insertions(+), 13 deletions(-) commit 7354902001eef2299826ced3c4e2a7235b6b1f30 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc/g84: define reset masks + intr cleanup Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 12 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/mc/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/g84.c | 68 +++++++++++++++++++++++ 4 files changed, 76 insertions(+), 6 deletions(-) commit e56f90fe1702a533f78b2dfc08b038a93111b24d Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc/g98: define reset masks + intr cleanup Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/mc/g98.c | 36 +++++++++++++++++----------- 1 file changed, 22 insertions(+), 14 deletions(-) commit 88c0de2cdb25b8b9e1c286a9f4a3a8de898151ce Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc/gt215: define reset masks + intr cleanup Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 8 +-- drivers/gpu/drm/nouveau/nvkm/subdev/mc/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/gt215.c | 70 +++++++++++++++++++++++ 4 files changed, 76 insertions(+), 4 deletions(-) commit a6bb38e90232dfc9c592cf1dca935f69b9b9b3f4 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc/gf100: define reset masks + intr cleanup Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c | 49 ++++++++++++++++---------- drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 1 - 2 files changed, 30 insertions(+), 20 deletions(-) commit 33537d6fdc2e7ed87d569a2a9ab0a571385d4318 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc/gk104: define reset masks + intr cleanup Engine fields have been removed, as they're specified by PTOP. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 10 ++-- drivers/gpu/drm/nouveau/nvkm/subdev/mc/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/mc/gk104.c | 64 +++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/mc/gk20a.c | 3 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 3 ++ 6 files changed, 76 insertions(+), 6 deletions(-) commit 921be10d85ca10973b374ef10273c2f228081ee8 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc: implement support for PTOP interrupt routing Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 583f8e4ea216d9d0212e63ede384893ec0c1b742 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc: implement support for PTOP reset info Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 70b01f07dbd093c96e9910ba613c3d40346ee222 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc: allow for local definition of reset bits With the addition of PTOP-specified reset bits, it makes more sense to move the definitions here rather than in individual subdev implementations. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 17 +++++++++++++++-- drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) commit 6defde5ab3e1d8b8fcd187517f878955b5e30465 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc: add helper function to handle device reset This will be later extended to handle PTOP-specified reset masks as well as the hardcoded ones. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/mc.h | 1 + drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 8 ++------ drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 20 ++++++++++++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) commit 87f313e6e6dcd1f46cc4ad134980584c822b67d6 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/mc: rename struct nvkm_mc_intr to nvkm_mc_map This will also be used to define NV_PMC_ENABLE <-> subdev mappings in an upcoming commit. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/g98.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv04.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv50.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 10 +++++----- 6 files changed, 10 insertions(+), 10 deletions(-) commit fb3e9c61caef12e537d6d8cd79b6c8d3de238d79 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/top/gk104: initial implementation Ported from the code currently in engine/fifo/gk104.c. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h | 2 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 13 +++ drivers/gpu/drm/nouveau/nvkm/subdev/top/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/top/gk104.c | 110 ++++++++++++++++++++++ 4 files changed, 126 insertions(+) commit 5f76f294d1ffb2955370b439226ea072c378a3f7 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/top: initial implementation Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h | 7 + drivers/gpu/drm/nouveau/nvkm/subdev/top/Kbuild | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c | 148 ++++++++++++++++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h | 20 +++ 4 files changed, 176 insertions(+), 1 deletion(-) commit eaebfcc34e52ca2c1a0d852674b72eecf31a2737 Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri Apr 8 17:24:40 2016 +1000 drm/nouveau/core: add top plumbing Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 3 +++ drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h | 8 ++++++++ drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 1 + drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 2 ++ drivers/gpu/drm/nouveau/nvkm/engine/device/priv.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/top/Kbuild | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h | 5 +++++ 8 files changed, 22 insertions(+) commit 2e9a43f901482195144e04311f682ede5d6d73f6 Author: Karol Herbst <nouveau@karolherbst.de> Date: Mon Mar 28 14:24:32 2016 +0200 drm/nouveau/iccsense: configure sensors like nvidia does v2: rename ina209/ina219 read function Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> .../gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) commit 5f1f07de4114ae0012d98330d8e6b5c1cfcace41 Author: Karol Herbst <nouveau@karolherbst.de> Date: Mon Mar 28 14:24:31 2016 +0200 drm/nouveau/iccsense: split sensor into own struct v2: add list_del call, reword error message Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> .../gpu/drm/nouveau/include/nvkm/subdev/iccsense.h | 1 + .../gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 142 +++++++++++++++------ .../gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h | 15 ++- 3 files changed, 113 insertions(+), 45 deletions(-) commit 92224e751f97847195b8e90a033b3e7b30ff0bd3 Author: Karol Herbst <nouveau@karolherbst.de> Date: Mon Mar 28 14:24:30 2016 +0200 drm/nouveau/iccsense: convert to linked list v2: add list_del calls Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> .../gpu/drm/nouveau/include/nvkm/subdev/iccsense.h | 4 +-- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +- .../gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 34 ++++++++++------------ .../gpu/drm/nouveau/nvkm/subdev/iccsense/priv.h | 1 + 4 files changed, 19 insertions(+), 22 deletions(-) commit d03e0f2748a7da3911fd54af16eb07f325ce830f Author: Karol Herbst <nouveau@karolherbst.de> Date: Mon Mar 28 14:24:29 2016 +0200 drm/nouveau/iccsense: remove read function Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Reviewed-by: Martin Peres <martin.peres@free.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> .../gpu/drm/nouveau/include/nvkm/subdev/iccsense.h | 1 - .../gpu/drm/nouveau/nvkm/subdev/iccsense/base.c | 23 ++++++++++------------ 2 files changed, 10 insertions(+), 14 deletions(-) commit 7d28dbae228d16b28b6af98bf020effabfb7e0b0 Author: Karol Herbst <nouveau@karolherbst.de> Date: Mon Jan 11 02:58:03 2016 +0100 drm/nouveau/pmu: be more strict about locking When we start communicating with the pmu a bit more, the current code is a real issue. I encountered a dead lock here, while testing my dynamic reclocking code Signed-off-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit c6007dc4e55e1a483c4d1e32dc1055b41aeacfc1 Author: Alexandre Courbot <acourbot@nvidia.com> Date: Fri Apr 1 15:40:59 2016 +0900 drm/nouveau/devinit/gf100: make devinit on resume safer In case of successful suspend, devinit will have to be run and this is the behavior currently hardcoded. However, as FD bug 94725 suggests, there might be cases where runtime suspend leaves the GPU powered, and in such cases devinit should not be run on resume. On GF100+ we have a reliable way to know whether we need to run devinit. Use it instead of blindly trusting the flag set by nvkm_devinit_fini(). The code around the NvForcePost also needs to be slightly reworked in order to keep working. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Suggested-by: Dave Airlie <airlied@redhat.com> Suggested-by: Karol Herbst <nouveau@karolherbst.de> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/include/nvkm/subdev/devinit.h | 1 + drivers/gpu/drm/nouveau/nvkm/subdev/devinit/base.c | 8 +++++++- drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gf100.c | 8 +++++--- 3 files changed, 13 insertions(+), 4 deletions(-) commit 4dc28134a8c124aa01b441e1e5b8b54312edc5dd Author: Ben Skeggs <bskeggs@redhat.com> Date: Fri May 20 09:22:55 2016 +1000 drm/nouveau: rename nouveau_drm.h to nouveau_drv.h Fixes out-of-tree build issue where uapi/drm/nouveau_drm.h gets picked up instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com> drivers/gpu/drm/nouveau/dispnv04/arb.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 3 +- drivers/gpu/drm/nouveau/dispnv04/cursor.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/dac.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/dfp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/disp.h | 2 +- drivers/gpu/drm/nouveau/dispnv04/hw.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/overlay.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/tvmodesnv17.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/tvnv04.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 +- drivers/gpu/drm/nouveau/nouveau_abi16.c | 2 +- drivers/gpu/drm/nouveau/nouveau_acpi.c | 2 +- drivers/gpu/drm/nouveau/nouveau_backlight.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bios.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- drivers/gpu/drm/nouveau/nouveau_chan.c | 2 +- drivers/gpu/drm/nouveau/nouveau_connector.c | 2 +- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 2 +- drivers/gpu/drm/nouveau/nouveau_debugfs.h | 2 +- drivers/gpu/drm/nouveau/nouveau_display.h | 2 +- drivers/gpu/drm/nouveau/nouveau_dma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_dp.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_drm.h | 207 ------------------------- drivers/gpu/drm/nouveau/nouveau_drv.h | 207 +++++++++++++++++++++++++ drivers/gpu/drm/nouveau/nouveau_fbcon.c | 2 +- drivers/gpu/drm/nouveau/nouveau_fence.c | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.c | 2 +- drivers/gpu/drm/nouveau/nouveau_gem.h | 2 +- drivers/gpu/drm/nouveau/nouveau_hwmon.c | 2 +- drivers/gpu/drm/nouveau/nouveau_nvif.c | 2 +- drivers/gpu/drm/nouveau/nouveau_platform.h | 2 +- drivers/gpu/drm/nouveau/nouveau_prime.c | 2 +- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 2 +- drivers/gpu/drm/nouveau/nouveau_ttm.c | 2 +- drivers/gpu/drm/nouveau/nouveau_usif.c | 2 +- drivers/gpu/drm/nouveau/nouveau_vga.c | 2 +- drivers/gpu/drm/nouveau/nv04_fbcon.c | 2 +- drivers/gpu/drm/nouveau/nv04_fence.c | 2 +- drivers/gpu/drm/nouveau/nv10_fence.c | 2 +- drivers/gpu/drm/nouveau/nv17_fence.c | 2 +- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- drivers/gpu/drm/nouveau/nv50_fbcon.c | 2 +- drivers/gpu/drm/nouveau/nv50_fence.c | 2 +- drivers/gpu/drm/nouveau/nv84_fence.c | 2 +- drivers/gpu/drm/nouveau/nvc0_fbcon.c | 2 +- drivers/gpu/drm/nouveau/nvc0_fence.c | 2 +- 49 files changed, 255 insertions(+), 254 deletions(-) commit a05a70db34ba24ca009e1c9cedaef26fd17d5470 Merge: 03b979d 4741526 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 20:00:06 2016 -0700 Merge branch 'akpm' (patches from Andrew) Merge updates from Andrew Morton: - fsnotify fix - poll() timeout fix - a few scripts/ tweaks - debugobjects updates - the (small) ocfs2 queue - Minor fixes to kernel/padata.c - Maybe half of the MM queue * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (117 commits) mm, page_alloc: restore the original nodemask if the fast path allocation failed mm, page_alloc: uninline the bad page part of check_new_page() mm, page_alloc: don't duplicate code in free_pcp_prepare mm, page_alloc: defer debugging checks of pages allocated from the PCP mm, page_alloc: defer debugging checks of freed pages until a PCP drain cpuset: use static key better and convert to new API mm, page_alloc: inline pageblock lookup in page free fast paths mm, page_alloc: remove unnecessary variable from free_pcppages_bulk mm, page_alloc: pull out side effects from free_pages_check mm, page_alloc: un-inline the bad part of free_pages_check mm, page_alloc: check multiple page fields with a single branch mm, page_alloc: remove field from alloc_context mm, page_alloc: avoid looking up the first zone in a zonelist twice mm, page_alloc: shortcut watermark checks for order-0 pages mm, page_alloc: reduce cost of fair zone allocation policy retry mm, page_alloc: shorten the page allocator fast path mm, page_alloc: check once if a zone has isolated pageblocks mm, page_alloc: move __GFP_HARDWALL modifications out of the fastpath mm, page_alloc: simplify last cpupid reset mm, page_alloc: remove unnecessary initialisation from __alloc_pages_nodemask() ... commit 48a77aa7e20557319205f9bd4cc02d4b67b5f761 Author: Steve French <smfrench@gmail.com> Date: Wed May 18 20:48:32 2016 -0500 CIFS: Remove some obsolete comments Remove some obsolete comments in the cifs inode_operations structs that were pointed out by Stephen Rothwell. CC: Stephen Rothwell <sfr@canb.auug.org.au> CC: Al Viro <viro@zeniv.linux.org.uk> Reviewed-by: Sachin Prabhu <sprabhu@redhat.com> Signed-off-by: Steve French <steve.french@primarydata.com> fs/cifs/cifsfs.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit b74cb9a80268be5c80cf4c87c74debf0ff2129ac Author: Sachin Prabhu <sprabhu@redhat.com> Date: Tue May 17 18:20:13 2016 -0500 cifs: Create dedicated keyring for spnego operations The session key is the default keyring set for request_key operations. This session key is revoked when the user owning the session logs out. Any long running daemon processes started by this session ends up with revoked session keyring which prevents these processes from using the request_key mechanism from obtaining the krb5 keys. The problem has been reported by a large number of autofs users. The problem is also seen with multiuser mounts where the share may be used by processes run by a user who has since logged out. A reproducer using automount is available on the Red Hat bz. The patch creates a new keyring which is used to cache cifs spnego upcalls. Red Hat bz: 1267754 Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Reported-by: Scott Mayhew <smayhew@redhat.com> Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> CC: Stable <stable@vger.kernel.org> Signed-off-by: Steve French <smfrench@gmail.com> fs/cifs/cifs_spnego.c | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++ fs/cifs/cifsfs.c | 4 +-- fs/cifs/cifsproto.h | 2 ++ 3 files changed, 71 insertions(+), 2 deletions(-) commit 4741526b83c5d3a3d661d1896f9e7414c5730bcb Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:44 2016 -0700 mm, page_alloc: restore the original nodemask if the fast path allocation failed The page allocator fast path uses either the requested nodemask or cpuset_current_mems_allowed if cpusets are enabled. If the allocation context allows watermarks to be ignored then it can also ignore memory policies. However, on entering the allocator slowpath the nodemask may still be cpuset_current_mems_allowed and the policies are enforced. This patch resets the nodemask appropriately before entering the slowpath. Link: http://lkml.kernel.org/r/20160504143628.GU2858@techsingularity.net Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 4e6118016eb7986109ad61b00186579f384f956a Author: Vlastimil Babka <vbabka@suse.cz> Date: Thu May 19 17:14:41 2016 -0700 mm, page_alloc: uninline the bad page part of check_new_page() Bad pages should be rare so the code handling them doesn't need to be inline for performance reasons. Put it to separate function which returns void. This also assumes that the initial page_expected_state() result will match the result of the thorough check, i.e. the page doesn't become "good" in the meanwhile. This matches the same expectations already in place in free_pages_check(). !DEBUG_VM bloat-o-meter: add/remove: 1/0 grow/shrink: 0/1 up/down: 134/-274 (-140) function old new delta check_new_page_bad - 134 +134 get_page_from_freelist 3468 3194 -274 Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit e2769dbdc51f1baa1908ecf6c84d50f19577e1db Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:38 2016 -0700 mm, page_alloc: don't duplicate code in free_pcp_prepare The new free_pcp_prepare() function shares a lot of code with free_pages_prepare(), which makes this a maintenance risk when some future patch modifies only one of them. We should be able to achieve the same effect (skipping free_pages_check() from !DEBUG_VM configs) by adding a parameter to free_pages_prepare() and making it inline, so the checks (and the order != 0 parts) are eliminated from the call from free_pcp_prepare(). !DEBUG_VM: bloat-o-meter reports no difference, as my gcc was already inlining free_pages_prepare() and the elimination seems to work as expected DEBUG_VM bloat-o-meter: add/remove: 0/1 grow/shrink: 2/0 up/down: 1035/-778 (257) function old new delta __free_pages_ok 297 1060 +763 free_hot_cold_page 480 752 +272 free_pages_prepare 778 - -778 Here inlining didn't occur before, and added some code, but it's ok for a debug option. [akpm@linux-foundation.org: fix build] Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 133 +++++++++++++++++++++++--------------------------------- 1 file changed, 55 insertions(+), 78 deletions(-) commit 479f854a207ce2b97545a0a83856778b541063d0 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:35 2016 -0700 mm, page_alloc: defer debugging checks of pages allocated from the PCP Every page allocated checks a number of page fields for validity. This catches corruption bugs of pages that are already freed but it is expensive. This patch weakens the debugging check by checking PCP pages only when the PCP lists are being refilled. All compound pages are checked. This potentially avoids debugging checks entirely if the PCP lists are never emptied and refilled so some corruption issues may be missed. Full checking requires DEBUG_VM. With the two deferred debugging patches applied, the impact to a page allocator microbenchmark is 4.6.0-rc3 4.6.0-rc3 inline-v3r6 deferalloc-v3r7 Min alloc-odr0-1 344.00 ( 0.00%) 317.00 ( 7.85%) Min alloc-odr0-2 248.00 ( 0.00%) 231.00 ( 6.85%) Min alloc-odr0-4 209.00 ( 0.00%) 192.00 ( 8.13%) Min alloc-odr0-8 181.00 ( 0.00%) 166.00 ( 8.29%) Min alloc-odr0-16 168.00 ( 0.00%) 154.00 ( 8.33%) Min alloc-odr0-32 161.00 ( 0.00%) 148.00 ( 8.07%) Min alloc-odr0-64 158.00 ( 0.00%) 145.00 ( 8.23%) Min alloc-odr0-128 156.00 ( 0.00%) 143.00 ( 8.33%) Min alloc-odr0-256 168.00 ( 0.00%) 154.00 ( 8.33%) Min alloc-odr0-512 178.00 ( 0.00%) 167.00 ( 6.18%) Min alloc-odr0-1024 186.00 ( 0.00%) 174.00 ( 6.45%) Min alloc-odr0-2048 192.00 ( 0.00%) 180.00 ( 6.25%) Min alloc-odr0-4096 198.00 ( 0.00%) 184.00 ( 7.07%) Min alloc-odr0-8192 200.00 ( 0.00%) 188.00 ( 6.00%) Min alloc-odr0-16384 201.00 ( 0.00%) 188.00 ( 6.47%) Min free-odr0-1 189.00 ( 0.00%) 180.00 ( 4.76%) Min free-odr0-2 132.00 ( 0.00%) 126.00 ( 4.55%) Min free-odr0-4 104.00 ( 0.00%) 99.00 ( 4.81%) Min free-odr0-8 90.00 ( 0.00%) 85.00 ( 5.56%) Min free-odr0-16 84.00 ( 0.00%) 80.00 ( 4.76%) Min free-odr0-32 80.00 ( 0.00%) 76.00 ( 5.00%) Min free-odr0-64 78.00 ( 0.00%) 74.00 ( 5.13%) Min free-odr0-128 77.00 ( 0.00%) 73.00 ( 5.19%) Min free-odr0-256 94.00 ( 0.00%) 91.00 ( 3.19%) Min free-odr0-512 108.00 ( 0.00%) 112.00 ( -3.70%) Min free-odr0-1024 115.00 ( 0.00%) 118.00 ( -2.61%) Min free-odr0-2048 120.00 ( 0.00%) 125.00 ( -4.17%) Min free-odr0-4096 123.00 ( 0.00%) 129.00 ( -4.88%) Min free-odr0-8192 126.00 ( 0.00%) 130.00 ( -3.17%) Min free-odr0-16384 126.00 ( 0.00%) 131.00 ( -3.97%) Note that the free paths for large numbers of pages is impacted as the debugging cost gets shifted into that path when the page data is no longer necessarily cache-hot. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 92 +++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 64 insertions(+), 28 deletions(-) commit 4db7548ccbd9ec8e666f35df4a530f55904dec39 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:32 2016 -0700 mm, page_alloc: defer debugging checks of freed pages until a PCP drain Every page free checks a number of page fields for validity. This catches premature frees and corruptions but it is also expensive. This patch weakens the debugging check by checking PCP pages at the time they are drained from the PCP list. This will trigger the bug but the site that freed the corrupt page will be lost. To get the full context, a kernel rebuild with DEBUG_VM is necessary. [akpm@linux-foundation.org: fix build] Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 152 +++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 101 insertions(+), 51 deletions(-) commit 002f290627c27068087f6204baec7a334e5a3b48 Author: Vlastimil Babka <vbabka@suse.cz> Date: Thu May 19 17:14:30 2016 -0700 cpuset: use static key better and convert to new API An important function for cpusets is cpuset_node_allowed(), which optimizes on the fact if there's a single root CPU set, it must be trivially allowed. But the check "nr_cpusets() <= 1" doesn't use the cpusets_enabled_key static key the right way where static keys eliminate branching overhead with jump labels. This patch converts it so that static key is used properly. It's also switched to the new static key API and the checking functions are converted to return bool instead of int. We also provide a new variant __cpuset_zone_allowed() which expects that the static key check was already done and they key was enabled. This is needed for get_page_from_freelist() where we want to also avoid the relatively slower check when ALLOC_CPUSET is not set in alloc_flags. The impact on the page allocator microbenchmark is less than expected but the cleanup in itself is worthwhile. 4.6.0-rc2 4.6.0-rc2 multcheck-v1r20 cpuset-v1r20 Min alloc-odr0-1 348.00 ( 0.00%) 348.00 ( 0.00%) Min alloc-odr0-2 254.00 ( 0.00%) 254.00 ( 0.00%) Min alloc-odr0-4 213.00 ( 0.00%) 213.00 ( 0.00%) Min alloc-odr0-8 186.00 ( 0.00%) 183.00 ( 1.61%) Min alloc-odr0-16 173.00 ( 0.00%) 171.00 ( 1.16%) Min alloc-odr0-32 166.00 ( 0.00%) 163.00 ( 1.81%) Min alloc-odr0-64 162.00 ( 0.00%) 159.00 ( 1.85%) Min alloc-odr0-128 160.00 ( 0.00%) 157.00 ( 1.88%) Min alloc-odr0-256 169.00 ( 0.00%) 166.00 ( 1.78%) Min alloc-odr0-512 180.00 ( 0.00%) 180.00 ( 0.00%) Min alloc-odr0-1024 188.00 ( 0.00%) 187.00 ( 0.53%) Min alloc-odr0-2048 194.00 ( 0.00%) 193.00 ( 0.52%) Min alloc-odr0-4096 199.00 ( 0.00%) 198.00 ( 0.50%) Min alloc-odr0-8192 202.00 ( 0.00%) 201.00 ( 0.50%) Min alloc-odr0-16384 203.00 ( 0.00%) 202.00 ( 0.49%) Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Zefan Li <lizefan@huawei.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/cpuset.h | 42 ++++++++++++++++++++++++++++-------------- kernel/cpuset.c | 14 +++++++------- mm/page_alloc.c | 2 +- 3 files changed, 36 insertions(+), 22 deletions(-) commit 0b423ca22f95a867f789aab1fe57ee4e378df43b Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:27 2016 -0700 mm, page_alloc: inline pageblock lookup in page free fast paths The function call overhead of get_pfnblock_flags_mask() is measurable in the page free paths. This patch uses an inlined version that is faster. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mmzone.h | 7 -- mm/page_alloc.c | 188 ++++++++++++++++++++++++++----------------------- mm/page_owner.c | 2 +- mm/vmstat.c | 2 +- 4 files changed, 102 insertions(+), 97 deletions(-) commit e5b31ac2ca2cd0cf6bf2fcbb708ed01466c89aaa Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:24 2016 -0700 mm, page_alloc: remove unnecessary variable from free_pcppages_bulk The original count is never reused so it can be removed. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit da838d4fcba675cbf864f225d76f970e91220ee6 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:21 2016 -0700 mm, page_alloc: pull out side effects from free_pages_check Check without side-effects should be easier to maintain. It also removes the duplicated cpupid and flags reset done in !DEBUG_VM variant of both free_pcp_prepare() and then bulkfree_pcp_prepare(). Finally, it enables the next patch. It shouldn't result in new branches, thanks to inlining of the check. !DEBUG_VM bloat-o-meter: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-27 (-27) function old new delta __free_pages_ok 748 739 -9 free_pcppages_bulk 1403 1385 -18 DEBUG_VM: add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-28 (-28) function old new delta free_pages_prepare 806 778 -28 This is also slightly faster because cpupid information is not set on tail pages so we can avoid resets there. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit bb552ac6c6b4f24e7a7b491286f87b63f9478d42 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:18 2016 -0700 mm, page_alloc: un-inline the bad part of free_pages_check From: Vlastimil Babka <vbabka@suse.cz> !DEBUG_VM size and bloat-o-meter: add/remove: 1/0 grow/shrink: 0/2 up/down: 124/-370 (-246) function old new delta free_pages_check_bad - 124 +124 free_pcppages_bulk 1288 1171 -117 __free_pages_ok 948 695 -253 DEBUG_VM: add/remove: 1/0 grow/shrink: 0/1 up/down: 124/-214 (-90) function old new delta free_pages_check_bad - 124 +124 free_pages_prepare 1112 898 -214 [akpm@linux-foundation.org: fix whitespace] Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) commit 7bfec6f47bb0ffd207c7e813e819235e6c1c0f34 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:15 2016 -0700 mm, page_alloc: check multiple page fields with a single branch Every page allocated or freed is checked for sanity to avoid corruptions that are difficult to detect later. A bad page could be due to a number of fields. Instead of using multiple branches, this patch combines multiple fields into a single branch. A detailed check is only necessary if that check fails. 4.6.0-rc2 4.6.0-rc2 initonce-v1r20 multcheck-v1r20 Min alloc-odr0-1 359.00 ( 0.00%) 348.00 ( 3.06%) Min alloc-odr0-2 260.00 ( 0.00%) 254.00 ( 2.31%) Min alloc-odr0-4 214.00 ( 0.00%) 213.00 ( 0.47%) Min alloc-odr0-8 186.00 ( 0.00%) 186.00 ( 0.00%) Min alloc-odr0-16 173.00 ( 0.00%) 173.00 ( 0.00%) Min alloc-odr0-32 165.00 ( 0.00%) 166.00 ( -0.61%) Min alloc-odr0-64 162.00 ( 0.00%) 162.00 ( 0.00%) Min alloc-odr0-128 161.00 ( 0.00%) 160.00 ( 0.62%) Min alloc-odr0-256 170.00 ( 0.00%) 169.00 ( 0.59%) Min alloc-odr0-512 181.00 ( 0.00%) 180.00 ( 0.55%) Min alloc-odr0-1024 190.00 ( 0.00%) 188.00 ( 1.05%) Min alloc-odr0-2048 196.00 ( 0.00%) 194.00 ( 1.02%) Min alloc-odr0-4096 202.00 ( 0.00%) 199.00 ( 1.49%) Min alloc-odr0-8192 205.00 ( 0.00%) 202.00 ( 1.46%) Min alloc-odr0-16384 205.00 ( 0.00%) 203.00 ( 0.98%) Again, the benefit is marginal but avoiding excessive branches is important. Ideally the paths would not have to check these conditions at all but regrettably abandoning the tests would make use-after-free bugs much harder to detect. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 55 +++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 43 insertions(+), 12 deletions(-) commit 93ea9964d14ad583492ffb9ab7543f015876aaf2 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:13 2016 -0700 mm, page_alloc: remove field from alloc_context The classzone_idx can be inferred from preferred_zoneref so remove the unnecessary field and save stack space. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/compaction.c | 4 ++-- mm/internal.h | 3 ++- mm/page_alloc.c | 8 +++----- 3 files changed, 7 insertions(+), 8 deletions(-) commit c33d6c06f60f710f0305ae792773e1c2560e1e51 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:10 2016 -0700 mm, page_alloc: avoid looking up the first zone in a zonelist twice The allocator fast path looks up the first usable zone in a zonelist and then get_page_from_freelist does the same job in the zonelist iterator. This patch preserves the necessary information. 4.6.0-rc2 4.6.0-rc2 fastmark-v1r20 initonce-v1r20 Min alloc-odr0-1 364.00 ( 0.00%) 359.00 ( 1.37%) Min alloc-odr0-2 262.00 ( 0.00%) 260.00 ( 0.76%) Min alloc-odr0-4 214.00 ( 0.00%) 214.00 ( 0.00%) Min alloc-odr0-8 186.00 ( 0.00%) 186.00 ( 0.00%) Min alloc-odr0-16 173.00 ( 0.00%) 173.00 ( 0.00%) Min alloc-odr0-32 165.00 ( 0.00%) 165.00 ( 0.00%) Min alloc-odr0-64 161.00 ( 0.00%) 162.00 ( -0.62%) Min alloc-odr0-128 159.00 ( 0.00%) 161.00 ( -1.26%) Min alloc-odr0-256 168.00 ( 0.00%) 170.00 ( -1.19%) Min alloc-odr0-512 180.00 ( 0.00%) 181.00 ( -0.56%) Min alloc-odr0-1024 190.00 ( 0.00%) 190.00 ( 0.00%) Min alloc-odr0-2048 196.00 ( 0.00%) 196.00 ( 0.00%) Min alloc-odr0-4096 202.00 ( 0.00%) 202.00 ( 0.00%) Min alloc-odr0-8192 206.00 ( 0.00%) 205.00 ( 0.49%) Min alloc-odr0-16384 206.00 ( 0.00%) 205.00 ( 0.49%) The benefit is negligible and the results are within the noise but each cycle counts. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/buffer.c | 10 +++++----- include/linux/mmzone.h | 18 +++++++++++------- mm/internal.h | 2 +- mm/mempolicy.c | 19 ++++++++++--------- mm/page_alloc.c | 34 ++++++++++++++++------------------ 5 files changed, 43 insertions(+), 40 deletions(-) commit 48ee5f3696f62496481a8b6d852bcad9b3ebbe37 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:07 2016 -0700 mm, page_alloc: shortcut watermark checks for order-0 pages Watermarks have to be checked on every allocation including the number of pages being allocated and whether reserves can be accessed. The reserves only matter if memory is limited and the free_pages adjustment only applies to high-order pages. This patch adds a shortcut for order-0 pages that avoids numerous calculations if there is plenty of free memory yielding the following performance difference in a page allocator microbenchmark; 4.6.0-rc2 4.6.0-rc2 optfair-v1r20 fastmark-v1r20 Min alloc-odr0-1 380.00 ( 0.00%) 364.00 ( 4.21%) Min alloc-odr0-2 273.00 ( 0.00%) 262.00 ( 4.03%) Min alloc-odr0-4 227.00 ( 0.00%) 214.00 ( 5.73%) Min alloc-odr0-8 196.00 ( 0.00%) 186.00 ( 5.10%) Min alloc-odr0-16 183.00 ( 0.00%) 173.00 ( 5.46%) Min alloc-odr0-32 173.00 ( 0.00%) 165.00 ( 4.62%) Min alloc-odr0-64 169.00 ( 0.00%) 161.00 ( 4.73%) Min alloc-odr0-128 169.00 ( 0.00%) 159.00 ( 5.92%) Min alloc-odr0-256 180.00 ( 0.00%) 168.00 ( 6.67%) Min alloc-odr0-512 190.00 ( 0.00%) 180.00 ( 5.26%) Min alloc-odr0-1024 198.00 ( 0.00%) 190.00 ( 4.04%) Min alloc-odr0-2048 204.00 ( 0.00%) 196.00 ( 3.92%) Min alloc-odr0-4096 209.00 ( 0.00%) 202.00 ( 3.35%) Min alloc-odr0-8192 213.00 ( 0.00%) 206.00 ( 3.29%) Min alloc-odr0-16384 214.00 ( 0.00%) 206.00 ( 3.74%) Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 305347550becd08fdb576df32fc0767842ed71a6 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:04 2016 -0700 mm, page_alloc: reduce cost of fair zone allocation policy retry The fair zone allocation policy is not without cost but it can be reduced slightly. This patch removes an unnecessary local variable, checks the likely conditions of the fair zone policy first, uses a bool instead of a flags check and falls through when a remote node is encountered instead of doing a full restart. The benefit is marginal but it's there 4.6.0-rc2 4.6.0-rc2 decstat-v1r20 optfair-v1r20 Min alloc-odr0-1 377.00 ( 0.00%) 380.00 ( -0.80%) Min alloc-odr0-2 273.00 ( 0.00%) 273.00 ( 0.00%) Min alloc-odr0-4 226.00 ( 0.00%) 227.00 ( -0.44%) Min alloc-odr0-8 196.00 ( 0.00%) 196.00 ( 0.00%) Min alloc-odr0-16 183.00 ( 0.00%) 183.00 ( 0.00%) Min alloc-odr0-32 175.00 ( 0.00%) 173.00 ( 1.14%) Min alloc-odr0-64 172.00 ( 0.00%) 169.00 ( 1.74%) Min alloc-odr0-128 170.00 ( 0.00%) 169.00 ( 0.59%) Min alloc-odr0-256 183.00 ( 0.00%) 180.00 ( 1.64%) Min alloc-odr0-512 191.00 ( 0.00%) 190.00 ( 0.52%) Min alloc-odr0-1024 199.00 ( 0.00%) 198.00 ( 0.50%) Min alloc-odr0-2048 204.00 ( 0.00%) 204.00 ( 0.00%) Min alloc-odr0-4096 210.00 ( 0.00%) 209.00 ( 0.48%) Min alloc-odr0-8192 213.00 ( 0.00%) 213.00 ( 0.00%) Min alloc-odr0-16384 214.00 ( 0.00%) 214.00 ( 0.00%) The benefit is marginal at best but one of the most important benefits, avoiding a second search when falling back to another node is not triggered by this particular test so the benefit for some corner cases is understated. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) commit 4fcb0971175f6037590d7b7772fe6619261d2165 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:14:01 2016 -0700 mm, page_alloc: shorten the page allocator fast path The page allocator fast path checks page multiple times unnecessarily. This patch avoids all the slowpath checks if the first allocation attempt succeeds. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) commit 3777999dd47ec00ec34a151b1d93c0a2b721e822 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:58 2016 -0700 mm, page_alloc: check once if a zone has isolated pageblocks When bulk freeing pages from the per-cpu lists the zone is checked for isolated pageblocks on every release. This patch checks it once per drain. [mgorman@techsingularity.net: fix locking radce, per Vlastimil] Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 83d4ca8148fd9092715fd8ef75b30bbfd67fd2a9 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:56 2016 -0700 mm, page_alloc: move __GFP_HARDWALL modifications out of the fastpath __GFP_HARDWALL only has meaning in the context of cpusets but the fast path always applies the flag on the first attempt. Move the manipulations into the cpuset paths where they will be masked by a static branch in the common case. With the other micro-optimisations in this series combined, the impact on a page allocator microbenchmark is 4.6.0-rc2 4.6.0-rc2 decstat-v1r20 micro-v1r20 Min alloc-odr0-1 381.00 ( 0.00%) 377.00 ( 1.05%) Min alloc-odr0-2 275.00 ( 0.00%) 273.00 ( 0.73%) Min alloc-odr0-4 229.00 ( 0.00%) 226.00 ( 1.31%) Min alloc-odr0-8 199.00 ( 0.00%) 196.00 ( 1.51%) Min alloc-odr0-16 186.00 ( 0.00%) 183.00 ( 1.61%) Min alloc-odr0-32 179.00 ( 0.00%) 175.00 ( 2.23%) Min alloc-odr0-64 174.00 ( 0.00%) 172.00 ( 1.15%) Min alloc-odr0-128 172.00 ( 0.00%) 170.00 ( 1.16%) Min alloc-odr0-256 181.00 ( 0.00%) 183.00 ( -1.10%) Min alloc-odr0-512 193.00 ( 0.00%) 191.00 ( 1.04%) Min alloc-odr0-1024 201.00 ( 0.00%) 199.00 ( 1.00%) Min alloc-odr0-2048 206.00 ( 0.00%) 204.00 ( 0.97%) Min alloc-odr0-4096 212.00 ( 0.00%) 210.00 ( 0.94%) Min alloc-odr0-8192 215.00 ( 0.00%) 213.00 ( 0.93%) Min alloc-odr0-16384 216.00 ( 0.00%) 214.00 ( 0.93%) Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit 09940a4f1e816abe3248fa0d185fc0e7f54c8c12 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:53 2016 -0700 mm, page_alloc: simplify last cpupid reset The current reset unnecessarily clears flags and makes pointless calculations. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 5bb1b169757875a72e05bfcbb76e22602cb1a760 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:50 2016 -0700 mm, page_alloc: remove unnecessary initialisation from __alloc_pages_nodemask() page is guaranteed to be set before it is read with or without the initialisation. [akpm@linux-foundation.org: fix warning] Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit be06af002f6d50de10fd602ce3a6aa5d28e88d38 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:47 2016 -0700 mm, page_alloc: remove unnecessary initialisation in get_page_from_freelist Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4dfa6cd8fdb1682586d463bc34888980fe98eb46 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:44 2016 -0700 mm, page_alloc: remove unnecessary local variable in get_page_from_freelist zonelist here is a copy of a struct field that is used once. Ditch it. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fa379b9586c7507c607d031dadf3681ed29614a9 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:41 2016 -0700 mm, page_alloc: convert nr_fair_skipped to bool The number of zones skipped to a zone expiring its fair zone allocation quota is irrelevant. Convert to bool. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c603844bdcb5238980de8d58b393f52d7729d651 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:38 2016 -0700 mm, page_alloc: convert alloc_flags to unsigned alloc_flags is a bitmask of flags but it is signed which does not necessarily generate the best code depending on the compiler. Even without an impact, it makes more sense that this be unsigned. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/compaction.h | 6 +++--- include/linux/mmzone.h | 3 ++- mm/compaction.c | 12 +++++++----- mm/internal.h | 2 +- mm/page_alloc.c | 26 ++++++++++++++------------ 5 files changed, 27 insertions(+), 22 deletions(-) commit f75fb889d18d362e336f8d3fba158a8636d0a063 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:36 2016 -0700 mm, page_alloc: avoid unnecessary zone lookups during pageblock operations Pageblocks have an associated bitmap to store migrate types and whether the pageblock should be skipped during compaction. The bitmap may be associated with a memory section or a zone but the zone is looked up unconditionally. The compiler should optimise this away automatically so this is a cosmetic patch only in many cases. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) commit 754078eb45df8069f389f3371002e7e24962e1a2 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:33 2016 -0700 mm, page_alloc: use __dec_zone_state for order-0 page allocation __dec_zone_state is cheaper to use for removing an order-0 page as it has fewer conditions to check. The performance difference on a page allocator microbenchmark is; 4.6.0-rc2 4.6.0-rc2 optiter-v1r20 decstat-v1r20 Min alloc-odr0-1 382.00 ( 0.00%) 381.00 ( 0.26%) Min alloc-odr0-2 282.00 ( 0.00%) 275.00 ( 2.48%) Min alloc-odr0-4 233.00 ( 0.00%) 229.00 ( 1.72%) Min alloc-odr0-8 203.00 ( 0.00%) 199.00 ( 1.97%) Min alloc-odr0-16 188.00 ( 0.00%) 186.00 ( 1.06%) Min alloc-odr0-32 182.00 ( 0.00%) 179.00 ( 1.65%) Min alloc-odr0-64 177.00 ( 0.00%) 174.00 ( 1.69%) Min alloc-odr0-128 175.00 ( 0.00%) 172.00 ( 1.71%) Min alloc-odr0-256 184.00 ( 0.00%) 181.00 ( 1.63%) Min alloc-odr0-512 197.00 ( 0.00%) 193.00 ( 2.03%) Min alloc-odr0-1024 203.00 ( 0.00%) 201.00 ( 0.99%) Min alloc-odr0-2048 209.00 ( 0.00%) 206.00 ( 1.44%) Min alloc-odr0-4096 214.00 ( 0.00%) 212.00 ( 0.93%) Min alloc-odr0-8192 218.00 ( 0.00%) 215.00 ( 1.38%) Min alloc-odr0-16384 219.00 ( 0.00%) 216.00 ( 1.37%) Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 682a3385e7734fa3abbd504cbeb5fe91793f1827 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:30 2016 -0700 mm, page_alloc: inline the fast path of the zonelist iterator The page allocator iterates through a zonelist for zones that match the addressing limitations and nodemask of the caller but many allocations will not be restricted. Despite this, there is always functional call overhead which builds up. This patch inlines the optimistic basic case and only calls the iterator function for the complex case. A hindrance was the fact that cpuset_current_mems_allowed is used in the fastpath as the allowed nodemask even though all nodes are allowed on most systems. The patch handles this by only considering cpuset_current_mems_allowed if a cpuset exists. As well as being faster in the fast-path, this removes some junk in the slowpath. The performance difference on a page allocator microbenchmark is; 4.6.0-rc2 4.6.0-rc2 statinline-v1r20 optiter-v1r20 Min alloc-odr0-1 412.00 ( 0.00%) 382.00 ( 7.28%) Min alloc-odr0-2 301.00 ( 0.00%) 282.00 ( 6.31%) Min alloc-odr0-4 247.00 ( 0.00%) 233.00 ( 5.67%) Min alloc-odr0-8 215.00 ( 0.00%) 203.00 ( 5.58%) Min alloc-odr0-16 199.00 ( 0.00%) 188.00 ( 5.53%) Min alloc-odr0-32 191.00 ( 0.00%) 182.00 ( 4.71%) Min alloc-odr0-64 187.00 ( 0.00%) 177.00 ( 5.35%) Min alloc-odr0-128 185.00 ( 0.00%) 175.00 ( 5.41%) Min alloc-odr0-256 193.00 ( 0.00%) 184.00 ( 4.66%) Min alloc-odr0-512 207.00 ( 0.00%) 197.00 ( 4.83%) Min alloc-odr0-1024 213.00 ( 0.00%) 203.00 ( 4.69%) Min alloc-odr0-2048 220.00 ( 0.00%) 209.00 ( 5.00%) Min alloc-odr0-4096 226.00 ( 0.00%) 214.00 ( 5.31%) Min alloc-odr0-8192 229.00 ( 0.00%) 218.00 ( 4.80%) Min alloc-odr0-16384 229.00 ( 0.00%) 219.00 ( 4.37%) perf indicated that next_zones_zonelist disappeared in the profile and __next_zones_zonelist did not appear. This is expected as the micro-benchmark would hit the inlined fast-path every time. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mmzone.h | 13 +++++++++++-- mm/mmzone.c | 2 +- mm/page_alloc.c | 26 +++++++++----------------- 3 files changed, 21 insertions(+), 20 deletions(-) commit 060e74173f292fb3e0398b3dca8765568d195ff1 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:27 2016 -0700 mm, page_alloc: inline zone_statistics zone_statistics has one call-site but it's a public function. Make it static and inline. The performance difference on a page allocator microbenchmark is; 4.6.0-rc2 4.6.0-rc2 statbranch-v1r20 statinline-v1r20 Min alloc-odr0-1 419.00 ( 0.00%) 412.00 ( 1.67%) Min alloc-odr0-2 305.00 ( 0.00%) 301.00 ( 1.31%) Min alloc-odr0-4 250.00 ( 0.00%) 247.00 ( 1.20%) Min alloc-odr0-8 219.00 ( 0.00%) 215.00 ( 1.83%) Min alloc-odr0-16 203.00 ( 0.00%) 199.00 ( 1.97%) Min alloc-odr0-32 195.00 ( 0.00%) 191.00 ( 2.05%) Min alloc-odr0-64 191.00 ( 0.00%) 187.00 ( 2.09%) Min alloc-odr0-128 189.00 ( 0.00%) 185.00 ( 2.12%) Min alloc-odr0-256 198.00 ( 0.00%) 193.00 ( 2.53%) Min alloc-odr0-512 210.00 ( 0.00%) 207.00 ( 1.43%) Min alloc-odr0-1024 216.00 ( 0.00%) 213.00 ( 1.39%) Min alloc-odr0-2048 221.00 ( 0.00%) 220.00 ( 0.45%) Min alloc-odr0-4096 227.00 ( 0.00%) 226.00 ( 0.44%) Min alloc-odr0-8192 232.00 ( 0.00%) 229.00 ( 1.29%) Min alloc-odr0-16384 232.00 ( 0.00%) 229.00 ( 1.29%) Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/vmstat.h | 2 -- mm/page_alloc.c | 31 +++++++++++++++++++++++++++++++ mm/vmstat.c | 29 ----------------------------- 3 files changed, 31 insertions(+), 31 deletions(-) commit b9f00e147f27d86691f7f52a3c8126d25432477c Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:24 2016 -0700 mm, page_alloc: reduce branches in zone_statistics zone_statistics has more branches than it really needs to take an unlikely GFP flag into account. Reduce the number and annotate the unlikely flag. The performance difference on a page allocator microbenchmark is; 4.6.0-rc2 4.6.0-rc2 nocompound-v1r10 statbranch-v1r10 Min alloc-odr0-1 417.00 ( 0.00%) 419.00 ( -0.48%) Min alloc-odr0-2 308.00 ( 0.00%) 305.00 ( 0.97%) Min alloc-odr0-4 253.00 ( 0.00%) 250.00 ( 1.19%) Min alloc-odr0-8 221.00 ( 0.00%) 219.00 ( 0.90%) Min alloc-odr0-16 205.00 ( 0.00%) 203.00 ( 0.98%) Min alloc-odr0-32 199.00 ( 0.00%) 195.00 ( 2.01%) Min alloc-odr0-64 193.00 ( 0.00%) 191.00 ( 1.04%) Min alloc-odr0-128 191.00 ( 0.00%) 189.00 ( 1.05%) Min alloc-odr0-256 200.00 ( 0.00%) 198.00 ( 1.00%) Min alloc-odr0-512 212.00 ( 0.00%) 210.00 ( 0.94%) Min alloc-odr0-1024 219.00 ( 0.00%) 216.00 ( 1.37%) Min alloc-odr0-2048 225.00 ( 0.00%) 221.00 ( 1.78%) Min alloc-odr0-4096 231.00 ( 0.00%) 227.00 ( 1.73%) Min alloc-odr0-8192 234.00 ( 0.00%) 232.00 ( 0.85%) Min alloc-odr0-16384 234.00 ( 0.00%) 232.00 ( 0.85%) Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/vmstat.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) commit 175145748d00794369317070dd19ce12dd816241 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:21 2016 -0700 mm, page_alloc: use new PageAnonHead helper in the free page fast path The PageAnon check always checks for compound_head but this is a relatively expensive check if the caller already knows the page is a head page. This patch creates a helper and uses it in the page free path which only operates on head pages. With this patch and "Only check PageCompound for high-order pages", the performance difference on a page allocator microbenchmark is; 4.6.0-rc2 4.6.0-rc2 vanilla nocompound-v1r20 Min alloc-odr0-1 425.00 ( 0.00%) 417.00 ( 1.88%) Min alloc-odr0-2 313.00 ( 0.00%) 308.00 ( 1.60%) Min alloc-odr0-4 257.00 ( 0.00%) 253.00 ( 1.56%) Min alloc-odr0-8 224.00 ( 0.00%) 221.00 ( 1.34%) Min alloc-odr0-16 208.00 ( 0.00%) 205.00 ( 1.44%) Min alloc-odr0-32 199.00 ( 0.00%) 199.00 ( 0.00%) Min alloc-odr0-64 195.00 ( 0.00%) 193.00 ( 1.03%) Min alloc-odr0-128 192.00 ( 0.00%) 191.00 ( 0.52%) Min alloc-odr0-256 204.00 ( 0.00%) 200.00 ( 1.96%) Min alloc-odr0-512 213.00 ( 0.00%) 212.00 ( 0.47%) Min alloc-odr0-1024 219.00 ( 0.00%) 219.00 ( 0.00%) Min alloc-odr0-2048 225.00 ( 0.00%) 225.00 ( 0.00%) Min alloc-odr0-4096 230.00 ( 0.00%) 231.00 ( -0.43%) Min alloc-odr0-8192 235.00 ( 0.00%) 234.00 ( 0.43%) Min alloc-odr0-16384 235.00 ( 0.00%) 234.00 ( 0.43%) Min free-odr0-1 215.00 ( 0.00%) 191.00 ( 11.16%) Min free-odr0-2 152.00 ( 0.00%) 136.00 ( 10.53%) Min free-odr0-4 119.00 ( 0.00%) 107.00 ( 10.08%) Min free-odr0-8 106.00 ( 0.00%) 96.00 ( 9.43%) Min free-odr0-16 97.00 ( 0.00%) 87.00 ( 10.31%) Min free-odr0-32 91.00 ( 0.00%) 83.00 ( 8.79%) Min free-odr0-64 89.00 ( 0.00%) 81.00 ( 8.99%) Min free-odr0-128 88.00 ( 0.00%) 80.00 ( 9.09%) Min free-odr0-256 106.00 ( 0.00%) 95.00 ( 10.38%) Min free-odr0-512 116.00 ( 0.00%) 111.00 ( 4.31%) Min free-odr0-1024 125.00 ( 0.00%) 118.00 ( 5.60%) Min free-odr0-2048 133.00 ( 0.00%) 126.00 ( 5.26%) Min free-odr0-4096 136.00 ( 0.00%) 130.00 ( 4.41%) Min free-odr0-8192 138.00 ( 0.00%) 130.00 ( 5.80%) Min free-odr0-16384 137.00 ( 0.00%) 130.00 ( 5.11%) There is a sizable boost to the free allocator performance. While there is an apparent boost on the allocation side, it's likely a co-incidence or due to the patches slightly reducing cache footprint. Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/page-flags.h | 7 ++++++- mm/page_alloc.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) commit d61f8590397480981f0d3ee7a2b38b5ea990db52 Author: Mel Gorman <mgorman@techsingularity.net> Date: Thu May 19 17:13:18 2016 -0700 mm, page_alloc: only check PageCompound for high-order pages Another year, another round of page allocator optimisations focusing this time on the alloc and free fast paths. This should be of help to workloads that are allocator-intensive from kernel space where the cost of zeroing is not nceessraily incurred. The series is motivated by the observation that page alloc microbenchmarks on multiple machines regressed between 3.12.44 and 4.4. Second, there is discussions before LSF/MM considering the possibility of adding another page allocator which is potentially hazardous but a patch series improving performance is better than whining. After the series is applied, there are still hazards. In the free paths, the debugging checking and page zone/pageblock lookups dominate but there was not an obvious solution to that. In the alloc path, the major contributers are dealing with zonelists, new page preperation, the fair zone allocation and numerous statistic updates. The fair zone allocator is removed by the per-node LRU series if that gets merged so it's nor a major concern at the moment. On normal userspace benchmarks, there is little impact as the zeroing cost is significant but it's visible aim9 4.6.0-rc3 4.6.0-rc3 vanilla deferalloc-v3 Min page_test 828693.33 ( 0.00%) 887060.00 ( 7.04%) Min brk_test 4847266.67 ( 0.00%) 4966266.67 ( 2.45%) Min exec_test 1271.00 ( 0.00%) 1275.67 ( 0.37%) Min fork_test 12371.75 ( 0.00%) 12380.00 ( 0.07%) The overall impact on a page allocator microbenchmark for a range of orders and number of pages allocated in a batch is 4.6.0-rc3 4.6.0-rc3 vanilla deferalloc-v3r7 Min alloc-odr0-1 428.00 ( 0.00%) 316.00 ( 26.17%) Min alloc-odr0-2 314.00 ( 0.00%) 231.00 ( 26.43%) Min alloc-odr0-4 256.00 ( 0.00%) 192.00 ( 25.00%) Min alloc-odr0-8 222.00 ( 0.00%) 166.00 ( 25.23%) Min alloc-odr0-16 207.00 ( 0.00%) 154.00 ( 25.60%) Min alloc-odr0-32 197.00 ( 0.00%) 148.00 ( 24.87%) Min alloc-odr0-64 193.00 ( 0.00%) 144.00 ( 25.39%) Min alloc-odr0-128 191.00 ( 0.00%) 143.00 ( 25.13%) Min alloc-odr0-256 203.00 ( 0.00%) 153.00 ( 24.63%) Min alloc-odr0-512 212.00 ( 0.00%) 165.00 ( 22.17%) Min alloc-odr0-1024 221.00 ( 0.00%) 172.00 ( 22.17%) Min alloc-odr0-2048 225.00 ( 0.00%) 179.00 ( 20.44%) Min alloc-odr0-4096 232.00 ( 0.00%) 185.00 ( 20.26%) Min alloc-odr0-8192 235.00 ( 0.00%) 187.00 ( 20.43%) Min alloc-odr0-16384 236.00 ( 0.00%) 188.00 ( 20.34%) Min alloc-odr1-1 519.00 ( 0.00%) 450.00 ( 13.29%) Min alloc-odr1-2 391.00 ( 0.00%) 336.00 ( 14.07%) Min alloc-odr1-4 313.00 ( 0.00%) 268.00 ( 14.38%) Min alloc-odr1-8 277.00 ( 0.00%) 235.00 ( 15.16%) Min alloc-odr1-16 256.00 ( 0.00%) 218.00 ( 14.84%) Min alloc-odr1-32 252.00 ( 0.00%) 212.00 ( 15.87%) Min alloc-odr1-64 244.00 ( 0.00%) 206.00 ( 15.57%) Min alloc-odr1-128 244.00 ( 0.00%) 207.00 ( 15.16%) Min alloc-odr1-256 243.00 ( 0.00%) 207.00 ( 14.81%) Min alloc-odr1-512 245.00 ( 0.00%) 209.00 ( 14.69%) Min alloc-odr1-1024 248.00 ( 0.00%) 214.00 ( 13.71%) Min alloc-odr1-2048 253.00 ( 0.00%) 220.00 ( 13.04%) Min alloc-odr1-4096 258.00 ( 0.00%) 224.00 ( 13.18%) Min alloc-odr1-8192 261.00 ( 0.00%) 229.00 ( 12.26%) Min alloc-odr2-1 560.00 ( 0.00%) 753.00 (-34.46%) Min alloc-odr2-2 424.00 ( 0.00%) 351.00 ( 17.22%) Min alloc-odr2-4 339.00 ( 0.00%) 393.00 (-15.93%) Min alloc-odr2-8 298.00 ( 0.00%) 246.00 ( 17.45%) Min alloc-odr2-16 276.00 ( 0.00%) 227.00 ( 17.75%) Min alloc-odr2-32 271.00 ( 0.00%) 221.00 ( 18.45%) Min alloc-odr2-64 264.00 ( 0.00%) 217.00 ( 17.80%) Min alloc-odr2-128 264.00 ( 0.00%) 217.00 ( 17.80%) Min alloc-odr2-256 264.00 ( 0.00%) 218.00 ( 17.42%) Min alloc-odr2-512 269.00 ( 0.00%) 223.00 ( 17.10%) Min alloc-odr2-1024 279.00 ( 0.00%) 230.00 ( 17.56%) Min alloc-odr2-2048 283.00 ( 0.00%) 235.00 ( 16.96%) Min alloc-odr2-4096 285.00 ( 0.00%) 239.00 ( 16.14%) Min alloc-odr3-1 629.00 ( 0.00%) 505.00 ( 19.71%) Min alloc-odr3-2 472.00 ( 0.00%) 374.00 ( 20.76%) Min alloc-odr3-4 383.00 ( 0.00%) 301.00 ( 21.41%) Min alloc-odr3-8 341.00 ( 0.00%) 266.00 ( 21.99%) Min alloc-odr3-16 316.00 ( 0.00%) 248.00 ( 21.52%) Min alloc-odr3-32 308.00 ( 0.00%) 241.00 ( 21.75%) Min alloc-odr3-64 305.00 ( 0.00%) 241.00 ( 20.98%) Min alloc-odr3-128 308.00 ( 0.00%) 244.00 ( 20.78%) Min alloc-odr3-256 317.00 ( 0.00%) 249.00 ( 21.45%) Min alloc-odr3-512 327.00 ( 0.00%) 256.00 ( 21.71%) Min alloc-odr3-1024 331.00 ( 0.00%) 261.00 ( 21.15%) Min alloc-odr3-2048 333.00 ( 0.00%) 266.00 ( 20.12%) Min alloc-odr4-1 767.00 ( 0.00%) 572.00 ( 25.42%) Min alloc-odr4-2 578.00 ( 0.00%) 429.00 ( 25.78%) Min alloc-odr4-4 474.00 ( 0.00%) 346.00 ( 27.00%) Min alloc-odr4-8 422.00 ( 0.00%) 310.00 ( 26.54%) Min alloc-odr4-16 399.00 ( 0.00%) 295.00 ( 26.07%) Min alloc-odr4-32 392.00 ( 0.00%) 293.00 ( 25.26%) Min alloc-odr4-64 394.00 ( 0.00%) 293.00 ( 25.63%) Min alloc-odr4-128 405.00 ( 0.00%) 305.00 ( 24.69%) Min alloc-odr4-256 417.00 ( 0.00%) 319.00 ( 23.50%) Min alloc-odr4-512 425.00 ( 0.00%) 326.00 ( 23.29%) Min alloc-odr4-1024 426.00 ( 0.00%) 329.00 ( 22.77%) Min free-odr0-1 216.00 ( 0.00%) 178.00 ( 17.59%) Min free-odr0-2 152.00 ( 0.00%) 125.00 ( 17.76%) Min free-odr0-4 120.00 ( 0.00%) 99.00 ( 17.50%) Min free-odr0-8 106.00 ( 0.00%) 85.00 ( 19.81%) Min free-odr0-16 97.00 ( 0.00%) 80.00 ( 17.53%) Min free-odr0-32 92.00 ( 0.00%) 76.00 ( 17.39%) Min free-odr0-64 89.00 ( 0.00%) 74.00 ( 16.85%) Min free-odr0-128 89.00 ( 0.00%) 73.00 ( 17.98%) Min free-odr0-256 107.00 ( 0.00%) 90.00 ( 15.89%) Min free-odr0-512 117.00 ( 0.00%) 108.00 ( 7.69%) Min free-odr0-1024 125.00 ( 0.00%) 118.00 ( 5.60%) Min free-odr0-2048 132.00 ( 0.00%) 125.00 ( 5.30%) Min free-odr0-4096 135.00 ( 0.00%) 130.00 ( 3.70%) Min free-odr0-8192 137.00 ( 0.00%) 130.00 ( 5.11%) Min free-odr0-16384 137.00 ( 0.00%) 131.00 ( 4.38%) Min free-odr1-1 318.00 ( 0.00%) 289.00 ( 9.12%) Min free-odr1-2 228.00 ( 0.00%) 207.00 ( 9.21%) Min free-odr1-4 182.00 ( 0.00%) 165.00 ( 9.34%) Min free-odr1-8 163.00 ( 0.00%) 146.00 ( 10.43%) Min free-odr1-16 151.00 ( 0.00%) 135.00 ( 10.60%) Min free-odr1-32 146.00 ( 0.00%) 129.00 ( 11.64%) Min free-odr1-64 145.00 ( 0.00%) 130.00 ( 10.34%) Min free-odr1-128 148.00 ( 0.00%) 134.00 ( 9.46%) Min free-odr1-256 148.00 ( 0.00%) 137.00 ( 7.43%) Min free-odr1-512 151.00 ( 0.00%) 140.00 ( 7.28%) Min free-odr1-1024 154.00 ( 0.00%) 143.00 ( 7.14%) Min free-odr1-2048 156.00 ( 0.00%) 144.00 ( 7.69%) Min free-odr1-4096 156.00 ( 0.00%) 142.00 ( 8.97%) Min free-odr1-8192 156.00 ( 0.00%) 140.00 ( 10.26%) Min free-odr2-1 361.00 ( 0.00%) 457.00 (-26.59%) Min free-odr2-2 258.00 ( 0.00%) 224.00 ( 13.18%) Min free-odr2-4 208.00 ( 0.00%) 223.00 ( -7.21%) Min free-odr2-8 185.00 ( 0.00%) 160.00 ( 13.51%) Min free-odr2-16 173.00 ( 0.00%) 149.00 ( 13.87%) Min free-odr2-32 166.00 ( 0.00%) 145.00 ( 12.65%) Min free-odr2-64 166.00 ( 0.00%) 146.00 ( 12.05%) Min free-odr2-128 169.00 ( 0.00%) 148.00 ( 12.43%) Min free-odr2-256 170.00 ( 0.00%) 152.00 ( 10.59%) Min free-odr2-512 177.00 ( 0.00%) 156.00 ( 11.86%) Min free-odr2-1024 182.00 ( 0.00%) 162.00 ( 10.99%) Min free-odr2-2048 181.00 ( 0.00%) 160.00 ( 11.60%) Min free-odr2-4096 180.00 ( 0.00%) 159.00 ( 11.67%) Min free-odr3-1 431.00 ( 0.00%) 367.00 ( 14.85%) Min free-odr3-2 306.00 ( 0.00%) 259.00 ( 15.36%) Min free-odr3-4 249.00 ( 0.00%) 208.00 ( 16.47%) Min free-odr3-8 224.00 ( 0.00%) 186.00 ( 16.96%) Min free-odr3-16 208.00 ( 0.00%) 176.00 ( 15.38%) Min free-odr3-32 206.00 ( 0.00%) 174.00 ( 15.53%) Min free-odr3-64 210.00 ( 0.00%) 178.00 ( 15.24%) Min free-odr3-128 215.00 ( 0.00%) 182.00 ( 15.35%) Min free-odr3-256 224.00 ( 0.00%) 189.00 ( 15.62%) Min free-odr3-512 232.00 ( 0.00%) 195.00 ( 15.95%) Min free-odr3-1024 230.00 ( 0.00%) 195.00 ( 15.22%) Min free-odr3-2048 229.00 ( 0.00%) 193.00 ( 15.72%) Min free-odr4-1 561.00 ( 0.00%) 439.00 ( 21.75%) Min free-odr4-2 418.00 ( 0.00%) 318.00 ( 23.92%) Min free-odr4-4 339.00 ( 0.00%) 269.00 ( 20.65%) Min free-odr4-8 299.00 ( 0.00%) 239.00 ( 20.07%) Min free-odr4-16 289.00 ( 0.00%) 234.00 ( 19.03%) Min free-odr4-32 291.00 ( 0.00%) 235.00 ( 19.24%) Min free-odr4-64 298.00 ( 0.00%) 238.00 ( 20.13%) Min free-odr4-128 308.00 ( 0.00%) 251.00 ( 18.51%) Min free-odr4-256 321.00 ( 0.00%) 267.00 ( 16.82%) Min free-odr4-512 327.00 ( 0.00%) 269.00 ( 17.74%) Min free-odr4-1024 326.00 ( 0.00%) 271.00 ( 16.87%) Min total-odr0-1 644.00 ( 0.00%) 494.00 ( 23.29%) Min total-odr0-2 466.00 ( 0.00%) 356.00 ( 23.61%) Min total-odr0-4 376.00 ( 0.00%) 291.00 ( 22.61%) Min total-odr0-8 328.00 ( 0.00%) 251.00 ( 23.48%) Min total-odr0-16 304.00 ( 0.00%) 234.00 ( 23.03%) Min total-odr0-32 289.00 ( 0.00%) 224.00 ( 22.49%) Min total-odr0-64 282.00 ( 0.00%) 218.00 ( 22.70%) Min total-odr0-128 280.00 ( 0.00%) 216.00 ( 22.86%) Min total-odr0-256 310.00 ( 0.00%) 243.00 ( 21.61%) Min total-odr0-512 329.00 ( 0.00%) 273.00 ( 17.02%) Min total-odr0-1024 346.00 ( 0.00%) 290.00 ( 16.18%) Min total-odr0-2048 357.00 ( 0.00%) 304.00 ( 14.85%) Min total-odr0-4096 367.00 ( 0.00%) 315.00 ( 14.17%) Min total-odr0-8192 372.00 ( 0.00%) 317.00 ( 14.78%) Min total-odr0-16384 373.00 ( 0.00%) 319.00 ( 14.48%) Min total-odr1-1 838.00 ( 0.00%) 739.00 ( 11.81%) Min total-odr1-2 619.00 ( 0.00%) 543.00 ( 12.28%) Min total-odr1-4 495.00 ( 0.00%) 433.00 ( 12.53%) Min total-odr1-8 440.00 ( 0.00%) 382.00 ( 13.18%) Min total-odr1-16 407.00 ( 0.00%) 353.00 ( 13.27%) Min total-odr1-32 398.00 ( 0.00%) 341.00 ( 14.32%) Min total-odr1-64 389.00 ( 0.00%) 336.00 ( 13.62%) Min total-odr1-128 392.00 ( 0.00%) 341.00 ( 13.01%) Min total-odr1-256 391.00 ( 0.00%) 344.00 ( 12.02%) Min total-odr1-512 396.00 ( 0.00%) 349.00 ( 11.87%) Min total-odr1-1024 402.00 ( 0.00%) 357.00 ( 11.19%) Min total-odr1-2048 409.00 ( 0.00%) 364.00 ( 11.00%) Min total-odr1-4096 414.00 ( 0.00%) 366.00 ( 11.59%) Min total-odr1-8192 417.00 ( 0.00%) 369.00 ( 11.51%) Min total-odr2-1 921.00 ( 0.00%) 1210.00 (-31.38%) Min total-odr2-2 682.00 ( 0.00%) 576.00 ( 15.54%) Min total-odr2-4 547.00 ( 0.00%) 616.00 (-12.61%) Min total-odr2-8 483.00 ( 0.00%) 406.00 ( 15.94%) Min total-odr2-16 449.00 ( 0.00%) 376.00 ( 16.26%) Min total-odr2-32 437.00 ( 0.00%) 366.00 ( 16.25%) Min total-odr2-64 431.00 ( 0.00%) 363.00 ( 15.78%) Min total-odr2-128 433.00 ( 0.00%) 365.00 ( 15.70%) Min total-odr2-256 434.00 ( 0.00%) 371.00 ( 14.52%) Min total-odr2-512 446.00 ( 0.00%) 379.00 ( 15.02%) Min total-odr2-1024 461.00 ( 0.00%) 392.00 ( 14.97%) Min total-odr2-2048 464.00 ( 0.00%) 395.00 ( 14.87%) Min total-odr2-4096 465.00 ( 0.00%) 398.00 ( 14.41%) Min total-odr3-1 1060.00 ( 0.00%) 872.00 ( 17.74%) Min total-odr3-2 778.00 ( 0.00%) 633.00 ( 18.64%) Min total-odr3-4 632.00 ( 0.00%) 510.00 ( 19.30%) Min total-odr3-8 565.00 ( 0.00%) 452.00 ( 20.00%) Min total-odr3-16 524.00 ( 0.00%) 424.00 ( 19.08%) Min total-odr3-32 514.00 ( 0.00%) 415.00 ( 19.26%) Min total-odr3-64 515.00 ( 0.00%) 419.00 ( 18.64%) Min total-odr3-128 523.00 ( 0.00%) 426.00 ( 18.55%) Min total-odr3-256 541.00 ( 0.00%) 438.00 ( 19.04%) Min total-odr3-512 559.00 ( 0.00%) 451.00 ( 19.32%) Min total-odr3-1024 561.00 ( 0.00%) 456.00 ( 18.72%) Min total-odr3-2048 562.00 ( 0.00%) 459.00 ( 18.33%) Min total-odr4-1 1328.00 ( 0.00%) 1011.00 ( 23.87%) Min total-odr4-2 997.00 ( 0.00%) 747.00 ( 25.08%) Min total-odr4-4 813.00 ( 0.00%) 615.00 ( 24.35%) Min total-odr4-8 721.00 ( 0.00%) 550.00 ( 23.72%) Min total-odr4-16 689.00 ( 0.00%) 529.00 ( 23.22%) Min total-odr4-32 683.00 ( 0.00%) 528.00 ( 22.69%) Min total-odr4-64 692.00 ( 0.00%) 531.00 ( 23.27%) Min total-odr4-128 713.00 ( 0.00%) 556.00 ( 22.02%) Min total-odr4-256 738.00 ( 0.00%) 586.00 ( 20.60%) Min total-odr4-512 753.00 ( 0.00%) 595.00 ( 20.98%) Min total-odr4-1024 752.00 ( 0.00%) 600.00 ( 20.21%) This patch (of 27): order-0 pages by definition cannot be compound so avoid the check in the fast path for those pages. [akpm@linux-foundation.org: use unlikely(order) in free_pages_prepare(), per Vlastimil] Signed-off-by: Mel Gorman <mgorman@techsingularity.net> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 449d777d7ad6d7f9ac5ed8f618fa13e6ff36c32f Author: Michal Hocko <mhocko@suse.com> Date: Thu May 19 17:13:15 2016 -0700 mm, oom_reaper: clear TIF_MEMDIE for all tasks queued for oom_reaper Right now the oom reaper will clear TIF_MEMDIE only for tasks which were successfully reaped. This is the safest option because we know that such an oom victim would only block forward progress of the oom killer without a good reason because it is highly unlikely it would release much more memory. Basically most of its memory has been already torn down. We can relax this assumption to catch more corner cases though. The first obvious one is when the oom victim clears its mm and gets stuck later on. oom_reaper would back of on find_lock_task_mm returning NULL. We can safely try to clear TIF_MEMDIE in this case because such a task would be ignored by the oom killer anyway. The flag would be cleared by that time already most of the time anyway. The less obvious one is when the oom reaper fails due to mmap_sem contention. Even if we clear TIF_MEMDIE for this task then it is not very likely that we would select another task too easily because we haven't reaped the last victim and so it would be still the #1 candidate. There is a rare race condition possible when the current victim terminates before the next select_bad_process but considering that oom_reap_task had retried several times before giving up then this sounds like a borderline thing. After this patch we should have a guarantee that the OOM killer will not be block for unbounded amount of time for most cases. Signed-off-by: Michal Hocko <mhocko@suse.com> Cc: Raushaniya Maksudova <rmaksudova@parallels.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/oom_kill.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 3ef22dfff2390e75b379f9715388a852aa56e0d5 Author: Michal Hocko <mhocko@suse.com> Date: Thu May 19 17:13:12 2016 -0700 oom, oom_reaper: try to reap tasks which skip regular OOM killer path If either the current task is already killed or PF_EXITING or a selected task is PF_EXITING then the oom killer is suppressed and so is the oom reaper. This patch adds try_oom_reaper which checks the given task and queues it for the oom reaper if that is safe to be done meaning that the task doesn't share the mm with an alive process. This might help to release the memory pressure while the task tries to exit. [akpm@linux-foundation.org: fix nommu build] Signed-off-by: Michal Hocko <mhocko@suse.com> Cc: Raushaniya Maksudova <rmaksudova@parallels.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/oom.h | 8 +++++ mm/memcontrol.c | 1 + mm/oom_kill.c | 86 ++++++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 77 insertions(+), 18 deletions(-) commit 3da88fb3bacfaa33ff9d13730d17110bb2d9604d Author: Michal Hocko <mhocko@suse.com> Date: Thu May 19 17:13:09 2016 -0700 mm, oom: move GFP_NOFS check to out_of_memory __alloc_pages_may_oom is the central place to decide when the out_of_memory should be invoked. This is a good approach for most checks there because they are page allocator specific and the allocation fails right after for all of them. The notable exception is GFP_NOFS context which is faking did_some_progress and keep the page allocator looping even though there couldn't have been any progress from the OOM killer. This patch doesn't change this behavior because we are not ready to allow those allocation requests to fail yet (and maybe we will face the reality that we will never manage to safely fail these request). Instead __GFP_FS check is moved down to out_of_memory and prevent from OOM victim selection there. There are two reasons for that - OOM notifiers might release some memory even from this context as none of the registered notifier seems to be FS related - this might help a dying thread to get an access to memory reserves and move on which will make the behavior more consistent with the case when the task gets killed from a different context. Keep a comment in __alloc_pages_may_oom to make sure we do not forget how GFP_NOFS is special and that we really want to do something about it. Note to the current oom_notifier users: The observable difference for you is that oom notifiers cannot depend on any fs locks because we could deadlock. Not that this would be allowed today because that would just lockup machine in most of the cases and ruling out the OOM killer along the way. Another difference is that callbacks might be invoked sooner now because GFP_NOFS is a weaker reclaim context and so there could be reclaimable memory which is just not reachable now. That would require GFP_NOFS only loads which are really rare and more importantly the observable result would be dropping of reconstructible object and potential performance drop which is not such a big deal when we are struggling to fulfill other important allocation requests. Signed-off-by: Michal Hocko <mhocko@suse.com> Cc: Raushaniya Maksudova <rmaksudova@parallels.com> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: David Rientjes <rientjes@google.com> Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Cc: Daniel Vetter <daniel.vetter@intel.com> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/oom_kill.c | 9 +++++++++ mm/page_alloc.c | 24 ++++++++++-------------- 2 files changed, 19 insertions(+), 14 deletions(-) commit 86dd995d63241039e0ad9123f9b424013c611510 Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Thu May 19 17:13:06 2016 -0700 memory_hotplug: introduce memhp_default_state= command line parameter CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE specifies the default value for the memory hotplug onlining policy. Add a command line parameter to make it possible to override the default. It may come handy for debug and testing purposes. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Dan Williams <dan.j.williams@intel.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: David Vrabel <david.vrabel@citrix.com> Cc: David Rientjes <rientjes@google.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Lennart Poettering <lennart@poettering.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/kernel-parameters.txt | 8 ++++++++ mm/memory_hotplug.c | 11 +++++++++++ 2 files changed, 19 insertions(+) commit 8604d9e534a3e662600e288bcfd1a5acd2763d28 Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Thu May 19 17:13:03 2016 -0700 memory_hotplug: introduce CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE This patchset continues the work I started with commit 31bc3858ea3e ("memory-hotplug: add automatic onlining policy for the newly added memory"). Initially I was going to stop there and bring the policy setting logic to userspace. I met two issues on this way: 1) It is possible to have memory hotplugged at boot (e.g. with QEMU). These blocks stay offlined if we turn the onlining policy on by userspace. 2) My attempt to bring this policy setting to systemd failed, systemd maintainers suggest to change the default in kernel or ... to use tmpfiles.d to alter the policy (which looks like a hack to me): https://github.com/systemd/systemd/pull/2938 Here I suggest to add a config option to set the default value for the policy and a kernel command line parameter to make the override. This patch (of 2): Introduce config option to set the default value for memory hotplug onlining policy (/sys/devices/system/memory/auto_online_blocks). The reason one would want to turn this option on are to have early onlining for hotpluggable memory available at boot and to not require any userspace actions to make memory hotplug work. [akpm@linux-foundation.org: tweak Kconfig text] Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Dan Williams <dan.j.williams@intel.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: David Vrabel <david.vrabel@citrix.com> Cc: David Rientjes <rientjes@google.com> Cc: Igor Mammedov <imammedo@redhat.com> Cc: Lennart Poettering <lennart@poettering.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/memory-hotplug.txt | 9 +++++---- mm/Kconfig | 16 ++++++++++++++++ mm/memory_hotplug.c | 4 ++++ 3 files changed, 25 insertions(+), 4 deletions(-) commit fd8cfd3000191cb7f5b9ea8640bd46181f6b4b74 Author: Hugh Dickins <hughd@google.com> Date: Thu May 19 17:13:00 2016 -0700 arch: fix has_transparent_hugepage() I've just discovered that the useful-sounding has_transparent_hugepage() is actually an architecture-dependent minefield: on some arches it only builds if CONFIG_TRANSPARENT_HUGEPAGE=y, on others it's also there when not, but on some of those (arm and arm64) it then gives the wrong answer; and on mips alone it's marked __init, which would crash if called later (but so far it has not been called later). Straighten this out: make it available to all configs, with a sensible default in asm-generic/pgtable.h, removing its definitions from those arches (arc, arm, arm64, sparc, tile) which are served by the default, adding #define has_transparent_hugepage has_transparent_hugepage to those (mips, powerpc, s390, x86) which need to override the default at runtime, and removing the __init from mips (but maybe that kind of code should be avoided after init: set a static variable the first time it's called). Signed-off-by: Hugh Dickins <hughd@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Yang Shi <yang.shi@linaro.org> Cc: Ning Qu <quning@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Vineet Gupta <vgupta@synopsys.com> [arch/arc] Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [arch/s390] Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/arc/include/asm/hugepage.h | 2 -- arch/arm/include/asm/pgtable-3level.h | 5 ----- arch/arm64/include/asm/pgtable.h | 5 ----- arch/mips/include/asm/pgtable.h | 1 + arch/mips/mm/tlb-r4k.c | 21 +++++++++++---------- arch/powerpc/include/asm/book3s/64/pgtable.h | 1 + arch/powerpc/include/asm/pgtable.h | 1 - arch/s390/include/asm/pgtable.h | 1 + arch/sparc/include/asm/pgtable_64.h | 2 -- arch/tile/include/asm/pgtable.h | 1 - arch/x86/include/asm/pgtable.h | 1 + include/asm-generic/pgtable.h | 8 ++++++++ 12 files changed, 23 insertions(+), 26 deletions(-) commit 1d069b7dd56728a0eb6acb138dce0d37600dee00 Author: Hugh Dickins <hughd@google.com> Date: Thu May 19 17:12:57 2016 -0700 huge pagecache: extend mremap pmd rmap lockout to files Whatever huge pagecache implementation we go with, file rmap locking must be added to anon rmap locking, when mremap's move_page_tables() finds a pmd_trans_huge pmd entry: a simple change, let's do it now. Factor out take_rmap_locks() and drop_rmap_locks() to handle the locking for make move_ptes() and move_page_tables(), and delete the VM_BUG_ON_VMA which rejected vm_file and required anon_vma. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Yang Shi <yang.shi@linaro.org> Cc: Ning Qu <quning@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/mremap.c | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) commit bf8616d5fa179d6c755f06726567c6d63c6fbbc7 Author: Hugh Dickins <hughd@google.com> Date: Thu May 19 17:12:54 2016 -0700 huge mm: move_huge_pmd does not need new_vma Remove move_huge_pmd()'s redundant new_vma arg: all it was used for was a VM_NOHUGEPAGE check on new_vma flags, but the new_vma is cloned from the old vma, so a trans_huge_pmd in the new_vma will be as acceptable as it was in the old vma, alignment and size permitting. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Yang Shi <yang.shi@linaro.org> Cc: Ning Qu <quning@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/huge_mm.h | 4 +--- mm/huge_memory.c | 7 ++----- mm/mremap.c | 5 ++--- 3 files changed, 5 insertions(+), 11 deletions(-) commit 52b6f46bc163eef17ecba4cd552beeafe2b24453 Author: Hugh Dickins <hughd@google.com> Date: Thu May 19 17:12:50 2016 -0700 mm: /proc/sys/vm/stat_refresh to force vmstat update Provide /proc/sys/vm/stat_refresh to force an immediate update of per-cpu into global vmstats: useful to avoid a sleep(2) or whatever before checking counts when testing. Originally added to work around a bug which left counts stranded indefinitely on a cpu going idle (an inaccuracy magnified when small below-batch numbers represent "huge" amounts of memory), but I believe that bug is now fixed: nonetheless, this is still a useful knob. Its schedule_on_each_cpu() is probably too expensive just to fold into reading /proc/meminfo itself: give this mode 0600 to prevent abuse. Allow a write or a read to do the same: nothing to read, but "grep -h Shmem /proc/sys/vm/stat_refresh /proc/meminfo" is convenient. Oh, and since global_page_state() itself is careful to disguise any underflow as 0, hack in an "Invalid argument" and pr_warn() if a counter is negative after the refresh - this helped to fix a misaccounting of NR_ISOLATED_FILE in my migration code. But on recent kernels, I find that NR_ALLOC_BATCH and NR_PAGES_SCANNED often go negative some of the time. I have not yet worked out why, but have no evidence that it's actually harmful. Punt for the moment by just ignoring the anomaly on those. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Yang Shi <yang.shi@linaro.org> Cc: Ning Qu <quning@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/sysctl/vm.txt | 14 +++++++++++ include/linux/vmstat.h | 4 +++ kernel/sysctl.c | 7 ++++++ mm/vmstat.c | 60 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 85 insertions(+) commit 9e18eb29356b7dfd55183bd42cf73919d1590835 Author: Andres Lagar-Cavilla <andreslc@google.com> Date: Thu May 19 17:12:47 2016 -0700 tmpfs: mem_cgroup charge fault to vm_mm not current mm Although shmem_fault() has been careful to count a major fault to vm_mm, shmem_getpage_gfp() has been careless in charging a remote access fault to current->mm owner's memcg instead of to vma->vm_mm owner's memcg: that is inconsistent with all the mem_cgroup charging on remote access faults in mm/memory.c. Fix it by passing fault_mm along with fault_type to shmem_get_page_gfp(); but in that case, now knowing the right mm, it's better for it to handle the PGMAJFAULT updates itself. And let's keep this clutter out of most callers' way: change the common shmem_getpage() wrapper to hide fault_mm and fault_type as well as gfp. Signed-off-by: Andres Lagar-Cavilla <andreslc@google.com> Signed-off-by: Hugh Dickins <hughd@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Yang Shi <yang.shi@linaro.org> Cc: Ning Qu <quning@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/shmem.c | 61 ++++++++++++++++++++++++++++++++++--------------------------- 1 file changed, 34 insertions(+), 27 deletions(-) commit 75edd345e8ede51bc8f00672feff5d622f2b3af6 Author: Hugh Dickins <hughd@google.com> Date: Thu May 19 17:12:44 2016 -0700 tmpfs: preliminary minor tidyups Make a few cleanups in mm/shmem.c, before going on to complicate it. shmem_alloc_page() will become more complicated: we can't afford to to have that complication duplicated between a CONFIG_NUMA version and a !CONFIG_NUMA version, so rearrange the #ifdef'ery there to yield a single shmem_swapin() and a single shmem_alloc_page(). Yes, it's a shame to inflict the horrid pseudo-vma on non-NUMA configurations, but eliminating it is a larger cleanup: I have an alloc_pages_mpol() patchset not yet ready - mpol handling is subtle and bug-prone, and changed yet again since my last version. Move __SetPageLocked, __SetPageSwapBacked from shmem_getpage_gfp() to shmem_alloc_page(): that SwapBacked flag will be useful in future, to help to distinguish different cases appropriately. And the SGP_DIRTY variant of SGP_CACHE is hard to understand and of little use (IIRC it dates back to when shmem_getpage() returned the page unlocked): kill it and do the necessary in shmem_file_read_iter(). But an arm64 build then complained that info may be uninitialized (where shmem_getpage_gfp() deletes a freshly alloced page beyond eof), and advancing to an "sgp <= SGP_CACHE" test jogged it back to reality. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Yang Shi <yang.shi@linaro.org> Cc: Ning Qu <quning@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mempolicy.h | 6 +++++ mm/shmem.c | 69 ++++++++++++++++++----------------------------- 2 files changed, 32 insertions(+), 43 deletions(-) commit fa9949da59a15017a02c86b087c7499d7b5702be Author: Hugh Dickins <hughd@google.com> Date: Thu May 19 17:12:41 2016 -0700 mm: use __SetPageSwapBacked and dont ClearPageSwapBacked v3.16 commit 07a427884348 ("mm: shmem: avoid atomic operation during shmem_getpage_gfp") rightly replaced one instance of SetPageSwapBacked by __SetPageSwapBacked, pointing out that the newly allocated page is not yet visible to other users (except speculative get_page_unless_zero- ers, who may not update page flags before their further checks). That was part of a series in which Mel was focused on tmpfs profiles: but almost all SetPageSwapBacked uses can be so optimized, with the same justification. Remove ClearPageSwapBacked from __read_swap_cache_async() error path: it's not an error to free a page with PG_swapbacked set. Follow a convention of __SetPageLocked, __SetPageSwapBacked instead of doing it differently in different places; but that's for tidiness - if the ordering actually mattered, we should not be using the __variants. There's probably scope for further __SetPageFlags in other places, but SwapBacked is the one I'm interested in at the moment. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Yang Shi <yang.shi@linaro.org> Cc: Ning Qu <quning@gmail.com> Reviewed-by: Mel Gorman <mgorman@techsingularity.net> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/migrate.c | 6 +++--- mm/rmap.c | 2 +- mm/shmem.c | 4 ++-- mm/swap_state.c | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) commit 9d5e6a9f22311b00a20ff9b072760ad3e73f0d99 Author: Hugh Dickins <hughd@google.com> Date: Thu May 19 17:12:38 2016 -0700 mm: update_lru_size do the __mod_zone_page_state Konstantin Khlebnikov pointed out (nearly four years ago, when lumpy reclaim was removed) that lru_size can be updated by -nr_taken once per call to isolate_lru_pages(), instead of page by page. Update it inside isolate_lru_pages(), or at its two callsites? I chose to update it at the callsites, rearranging and grouping the updates by nr_taken and nr_scanned together in both. With one exception, mem_cgroup_update_lru_size(,lru,) is then used where __mod_zone_page_state(,NR_LRU_BASE+lru,) is used; and we shall be adding some more calls in a future commit. Make the code a little smaller and simpler by incorporating stat update in lru_size update. The exception was move_active_pages_to_lru(), which aggregated the pgmoved stat update separately from the individual lru_size updates; but I still think this a simplification worth making. However, the __mod_zone_page_state is not peculiar to mem_cgroups: so better use the name update_lru_size, calls mem_cgroup_update_lru_size when CONFIG_MEMCG. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Yang Shi <yang.shi@linaro.org> Cc: Ning Qu <quning@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/memcontrol.h | 6 ------ include/linux/mm_inline.h | 24 ++++++++++++++++++------ mm/memcontrol.c | 2 ++ mm/vmscan.c | 23 ++++++++++------------- 4 files changed, 30 insertions(+), 25 deletions(-) commit ca707239e8a7958ffb1c31737d41cae1a674c938 Author: Hugh Dickins <hughd@google.com> Date: Thu May 19 17:12:35 2016 -0700 mm: update_lru_size warn and reset bad lru_size Though debug kernels have a VM_BUG_ON to help protect from misaccounting lru_size, non-debug kernels are liable to wrap it around: and then the vast unsigned long size draws page reclaim into a loop of repeatedly doing nothing on an empty list, without even a cond_resched(). That soft lockup looks confusingly like an over-busy reclaim scenario, with lots of contention on the lru_lock in shrink_inactive_list(): yet has a totally different origin. Help differentiate with a custom warning in mem_cgroup_update_lru_size(), even in non-debug kernels; and reset the size to avoid the lockup. But the particular bug which suggested this change was mine alone, and since fixed. Make it a WARN_ONCE: the first occurrence is the most informative, a flurry may follow, yet even when rate-limited little more is learnt. Signed-off-by: Hugh Dickins <hughd@google.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Yang Shi <yang.shi@linaro.org> Cc: Ning Qu <quning@gmail.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Andres Lagar-Cavilla <andreslc@google.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm_inline.h | 2 +- mm/memcontrol.c | 24 ++++++++++++++++++++---- 2 files changed, 21 insertions(+), 5 deletions(-) commit 1269019e69a6798db15edea8921f83215ef954d6 Author: Konstantin Khlebnikov <koct9i@gmail.com> Date: Thu May 19 17:12:32 2016 -0700 mm/mmap: kill hook arch_rebalance_pgtables() Nobody uses it. Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/mmap.c | 5 ----- 1 file changed, 5 deletions(-) commit e87d59f7a2002aa2d4582d4ea16da91dd3c72752 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:12:29 2016 -0700 mm/vmstat: make node_page_state() handles all zones by itself node_page_state() manually adds statistics per each zone and returns total value for all zones. Whenever we add a new zone, we need to consider this function and it's really troublesome. Make it handle all zones by itself. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/vmstat.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) commit 33499bfe507c844f2c6f55ae8cec17705d0eda95 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:12:26 2016 -0700 mm/highmem: make nr_free_highpages() handles all highmem zones by itself nr_free_highpages() manually adds statistics per each highmem zone and returns a total value for them. Whenever we add a new highmem zone, we need to consider this function and it's really troublesome. Make it handle all highmem zones by itself. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/highmem.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit fc2bd799c7c79c84a59da6f9221370bc6f38c503 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:12:23 2016 -0700 mm/page_alloc: correct highmem memory statistics ZONE_MOVABLE could be treated as highmem so we need to consider it for accurate statistics. And, in following patches, ZONE_CMA will be introduced and it can be treated as highmem, too. So, instead of manually adding stat of ZONE_MOVABLE, looping all zones and check whether the zone is highmem or not and add stat of the zone which can be treated as highmem. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) commit 09b4ab3c433733127f8644290e94548a4cb8122f Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:12:20 2016 -0700 mm/writeback: correct dirty page calculation for highmem ZONE_MOVABLE could be treated as highmem so we need to consider it for accurate calculation of dirty pages. And, in following patches, ZONE_CMA will be introduced and it can be treated as highmem, too. So, instead of manually adding stat of ZONE_MOVABLE, looping all zones and check whether the zone is highmem or not and add stat of the zone which can be treated as highmem. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page-writeback.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit ba6b0979e346fd91d3b7ef6956d7155877308f0f Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:12:16 2016 -0700 power: add zone range overlapping check There is a system thats node's pfns are overlapped as follows: -----pfn--------> N0 N1 N2 N0 N1 N2 Therefore, we need to care this overlapping when iterating pfn range. mark_free_pages() iterates requested zone's pfn range and unset all range's bitmap first. And then it marks freepages in a zone to the bitmap. If there is an overlapping zone, above unset could clear previous marked bit and reference to this bitmap in the future will cause the problem. To prevent it, this patch adds a zone check in mark_free_pages(). Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 4 ++++ 1 file changed, 4 insertions(+) commit 9d43f5aec9506d98ad492a783aa8a18226c5d474 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:12:13 2016 -0700 mm/page_owner: add zone range overlapping check There is a system thats node's pfns are overlapped as follows: -----pfn--------> N0 N1 N2 N0 N1 N2 Therefore, we need to care this overlapping when iterating pfn range. There are one place in page_owner.c that iterates pfn range and it doesn't consider this overlapping. Add it. Without this patch, above system could over count early allocated page number before page_owner is activated. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_owner.c | 3 +++ 1 file changed, 3 insertions(+) commit a91c43c7313a995a8908f8f6b911a85d00fdbffd Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:12:10 2016 -0700 mm/vmstat: add zone range overlapping check There is a system thats node's pfns are overlapped as follows: -----pfn--------> N0 N1 N2 N0 N1 N2 Therefore, we need to care this overlapping when iterating pfn range. There are two places in vmstat.c that iterates pfn range and they don't consider this overlapping. Add it. Without this patch, above system could over count pageblock number on a zone. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@suse.de> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/vmstat.c | 7 +++++++ 1 file changed, 7 insertions(+) commit b9eb63191a6ad70127ebdd83650b810cdc1d1117 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:12:06 2016 -0700 mm/memory_hotplug: add comment to some functions related to memory hotplug __offline_isolated_pages() and test_pages_isolated() are used by memory hotplug. These functions require that range is in a single zone but there is no code to do this because memory hotplug checks it before calling these functions. To avoid confusing future user of these functions, this patch adds comments to them. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 3 ++- mm/page_isolation.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit f44b2dda8bc29de36ccdc1e04092de7d0b2d5868 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:12:03 2016 -0700 mm/hugetlb: add same zone check in pfn_range_valid_gigantic() This patchset deals with some problematic sites that iterate pfn ranges. There is a system thats node's pfns are overlapped as follows: -----pfn--------> N0 N1 N2 N0 N1 N2 Therefore, we need to take care of this overlapping when iterating pfn range. I audit many iterating sites that uses pfn_valid(), pfn_valid_within(), zone_start_pfn and etc. and others looks safe to me. This is a preparation step for a new CMA implementation, ZONE_CMA (https://lkml.org/lkml/2015/2/12/95), because it would be easily overlapped with other zones. But, zone overlap check is also needed for the general case so I send it separately. This patch (of 5): alloc_gigantic_page() uses alloc_contig_range() and this requires that the requested range is in a single zone. To satisfy this requirement, add this check to pfn_range_valid_gigantic(). Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Rik van Riel <riel@redhat.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Minchan Kim <minchan@kernel.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: Michal Nazarewicz <mina86@mina86.com> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/hugetlb.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) commit 1aa8aea535977f0e0b398f39d052e7befff81da6 Author: Andrew Morton <akpm@linux-foundation.org> Date: Thu May 19 17:12:00 2016 -0700 mm: uninline page_mapped() It's huge. Uninlining it saves 206 bytes per callsite. Shaves 4924 bytes from the x86_64 allmodconfig vmlinux. [akpm@linux-foundation.org: coding-style fixes] Cc: Steve Capper <steve.capper@arm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm.h | 21 +-------------------- mm/util.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 20 deletions(-) commit 29f9cb53d25cd9916537b44b0af7f0b95a2e4438 Author: Chanho Min <chanho.min@lge.com> Date: Thu May 19 17:11:57 2016 -0700 mm/highmem: simplify is_highmem() is_highmem() can be simplified by use of is_highmem_idx(). This patch removes redundant code and will make it easier to maintain if the zone policy is changed or a new zone is added. (akpm: saves me 25 bytes of text per is_highmem() callsite) Signed-off-by: Chanho Min <chanho.min@lge.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com> Cc: Michal Hocko <mhocko@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mmzone.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit fdd048e12c9a46d058f69822cb15641adae181e1 Author: Vlastimil Babka <vbabka@suse.cz> Date: Thu May 19 17:11:55 2016 -0700 mm, compaction: skip blocks where isolation fails in async direct compaction The goal of direct compaction is to quickly make a high-order page available for the pending allocation. Within an aligned block of pages of desired order, a single allocated page that cannot be isolated for migration means that the block cannot fully merge to a buddy page that would satisfy the allocation request. Therefore we can reduce the allocation stall by skipping the rest of the block immediately on isolation failure. For async compaction, this also means a higher chance of succeeding until it detects contention. We however shouldn't completely sacrifice the second objective of compaction, which is to reduce overal long-term memory fragmentation. As a compromise, perform the eager skipping only in direct async compaction, while sync compaction (including kcompactd) remains thorough. Testing was done using stress-highalloc from mmtests, configured for order-4 GFP_KERNEL allocations: 4.6-rc1 4.6-rc1 before after Success 1 Min 24.00 ( 0.00%) 27.00 (-12.50%) Success 1 Mean 30.20 ( 0.00%) 31.60 ( -4.64%) Success 1 Max 37.00 ( 0.00%) 35.00 ( 5.41%) Success 2 Min 42.00 ( 0.00%) 32.00 ( 23.81%) Success 2 Mean 44.00 ( 0.00%) 44.80 ( -1.82%) Success 2 Max 48.00 ( 0.00%) 52.00 ( -8.33%) Success 3 Min 91.00 ( 0.00%) 92.00 ( -1.10%) Success 3 Mean 92.20 ( 0.00%) 92.80 ( -0.65%) Success 3 Max 94.00 ( 0.00%) 93.00 ( 1.06%) We can see that success rates are unaffected by the skipping. 4.6-rc1 4.6-rc1 before after User 2587.42 2566.53 System 482.89 471.20 Elapsed 1395.68 1382.00 Times are not so useful metric for this benchmark as main portion is the interfering kernel builds, but results do hint at reduced system times. 4.6-rc1 4.6-rc1 before after Direct pages scanned 163614 159608 Kswapd pages scanned 2070139 2078790 Kswapd pages reclaimed 2061707 2069757 Direct pages reclaimed 163354 159505 Reduced direct reclaim was unintended, but could be explained by more successful first attempt at (async) direct compaction, which is attempted before the first reclaim attempt in __alloc_pages_slowpath(). Compaction stalls 33052 39853 Compaction success 12121 19773 Compaction failures 20931 20079 Compaction is indeed more successful, and thus less likely to get deferred, so there are also more direct compaction stalls. Page migrate success 3781876 3326819 Page migrate failure 45817 41774 Compaction pages isolated 7868232 6941457 Compaction migrate scanned 168160492 127269354 Compaction migrate prescanned 0 0 Compaction free scanned 2522142582 2326342620 Compaction free direct alloc 0 0 Compaction free dir. all. miss 0 0 Compaction cost 5252 4476 The patch reduces migration scanned pages by 25% thanks to the eager skipping. [hughd@google.com: prevent nr_isolated_* from going negative] Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Hugh Dickins <hughd@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Rik van Riel <riel@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/compaction.c | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 80 insertions(+), 9 deletions(-) commit a34753d275576896b06af9baa6f54bee258368c2 Author: Vlastimil Babka <vbabka@suse.cz> Date: Thu May 19 17:11:51 2016 -0700 mm, compaction: reduce spurious pcplist drains Compaction drains the local pcplists each time migration scanner moves away from a cc->order aligned block where it isolated pages for migration, so that the pages freed by migrations can merge into higher orders. The detection is currently coarser than it could be. The cc->last_migrated_pfn variable should track the lowest pfn that was isolated for migration. But it is set to the pfn where isolate_migratepages_block() starts scanning, which is typically the first pfn of the pageblock. There, the scanner might fail to isolate several order-aligned blocks, and then isolate COMPACT_CLUSTER_MAX in another block. This would cause the pcplists drain to be performed, although the scanner didn't yet finish the block where it isolated from. This patch thus makes cc->last_migrated_pfn handling more accurate by setting it to the pfn of an actually isolated page in isolate_migratepages_block(). Although practical effects of this patch are likely low, it arguably makes the intent of the code more obvious. Also the next patch will make async direct compaction skip blocks more aggressively, and draining pcplists due to skipped blocks is wasteful. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Rik van Riel <riel@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/compaction.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) commit 06b6640a3902d6d50c1bb4fb1f29a46b207dbf08 Author: Vlastimil Babka <vbabka@suse.cz> Date: Thu May 19 17:11:48 2016 -0700 mm, compaction: wrap calculating first and last pfn of pageblock Compaction code has accumulated numerous instances of manual calculations of the first (inclusive) and last (exclusive) pfn of a pageblock (or a smaller block of given order), given a pfn within the pageblock. Wrap these calculations by introducing pageblock_start_pfn(pfn) and pageblock_end_pfn(pfn) macros. [vbabka@suse.cz: fix crash in get_pfnblock_flags_mask() from isolate_freepages():] Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Rik van Riel <riel@redhat.com> Cc: David Rientjes <rientjes@google.com> Cc: Minchan Kim <minchan@kernel.org> Cc: Michal Hocko <mhocko@suse.com> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/compaction.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) commit e4c5800a3991f0c6a766983535dfc10d51802cf6 Author: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Date: Thu May 19 17:11:46 2016 -0700 mm/rmap: replace BUG_ON(anon_vma->degree) with VM_WARN_ON This check effectively catches anon vma hierarchy inconsistence and some vma corruptions. It was effective for catching corner cases in anon vma reusing logic. For now this code seems stable so check could be hidden under CONFIG_DEBUG_VM and replaced with WARN because it's not so fatal. Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru> Suggested-by: Vasily Averin <vvs@virtuozzo.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/rmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fee83b3aba4b7ddb0cb1497a04ddebcaa43f236e Author: Andrew Morton <akpm@linux-foundation.org> Date: Thu May 19 17:11:43 2016 -0700 mm/mempolicy.c:offset_il_node() document and clarify This code was pretty obscure and was relying upon obscure side-effects of next_node(-1, ...) and was relying upon NUMA_NO_NODE being equal to -1. Clean that all up and document the function's intent. Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Xishi Qiu <qiuxishi@huawei.com> Cc: Joonsoo Kim <js1304@gmail.com> Cc: David Rientjes <rientjes@google.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Laura Abbott <lauraa@codeaurora.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/mempolicy.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 54f18d35263334ebcc6bf409fee3c0c8c22e5588 Author: Andrew Morton <akpm@linux-foundation.org> Date: Thu May 19 17:11:40 2016 -0700 mm/hugetlb.c: use first_memory_node Instead of open-coding it. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/hugetlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 949698a31af3b3808b0ff0cca26f36e68953bd1f Author: Li Zhang <zhlcindy@linux.vnet.ibm.com> Date: Thu May 19 17:11:37 2016 -0700 mm/page_alloc: Remove useless parameter of __free_pages_boot_core __free_pages_boot_core has parameter pfn which is not used at all. Remove it. Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com> Reviewed-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/page_alloc.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit fda3d69be9fe7a24ad32b840cb2ed7c30b6ba1c9 Author: Michal Hocko <mhocko@kernel.org> Date: Thu May 19 17:11:34 2016 -0700 mm/memcontrol.c:mem_cgroup_select_victim_node(): clarify comment > The comment seems to have not much to do with the code? I guess the comment tries to say that the code path is triggered when we charge the page which happens _before_ it is added to the LRU list and so last_scanned_node might contain the stale data. Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/memcontrol.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 4ee815be1d34a6f254b3d09bdebcb27f294f2bd3 Author: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Date: Thu May 19 17:11:32 2016 -0700 mm/mempolicy.c: vma_migratable() can return bool Make vma_migratable() return bool due to this particular function only using either one or zero as its return value. Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mempolicy.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit bb00a789e565b96c52b2224c2280f7ac83175bec Author: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Date: Thu May 19 17:11:29 2016 -0700 mm/vmalloc.c: is_vmalloc_addr() can return bool Make is_vmalloc_addr() return bool to improve readability due to this particular function only using either one or zero as its return value. Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/mm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c98940f6fa3d06fa8fec75aa2362b25227573d06 Author: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Date: Thu May 19 17:11:26 2016 -0700 mm/memory_hotplug: is_mem_section_removable() can return bool Make is_mem_section_removable() return bool to improve readability due to this particular function only using either one or zero as its return value. Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/memory_hotplug.h | 6 +++--- mm/memory_hotplug.c | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) commit 32f6271dbdc351dce96b11c5f3567bae8188004f Author: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Date: Thu May 19 17:11:23 2016 -0700 mm/hugetlb: is_vm_hugetlb_page() can return bool Make is_vm_hugetlb_page() return bool to improve readability due to this particular function only using either one or zero as its return value. Signed-off-by: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/hugetlb_inline.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2b18e5321f512aa85fd91db835a4c0dcdb2cd063 Author: Vaishali Thakkar <vaishali.thakkar@oracle.com> Date: Thu May 19 17:11:20 2016 -0700 x86: mm: use hugetlb_bad_size() Update setup_hugepagesz() to call hugetlb_bad_size() when unsupported hugepage size is found. Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Cc: Dominik Dingel <dingel@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/x86/mm/hugetlbpage.c | 1 + 1 file changed, 1 insertion(+) commit b3d424f1a534949bce27847aa871b3ce75c60f4d Author: Vaishali Thakkar <vaishali.thakkar@oracle.com> Date: Thu May 19 17:11:17 2016 -0700 tile: mm: use hugetlb_bad_size() Update setup_hugepagesz() to call hugetlb_bad_size() when unsupported hugepage size is found. Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Cc: Dominik Dingel <dingel@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: James Hogan <james.hogan@imgtec.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/tile/mm/hugetlbpage.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 71bf79cc3ff8e7be3e61399c6a9787d0c57c5cd1 Author: Vaishali Thakkar <vaishali.thakkar@oracle.com> Date: Thu May 19 17:11:14 2016 -0700 powerpc: mm: use hugetlb_bad_size() Update setup_hugepagesz() to call hugetlb_bad_size() when unsupported hugepage size is found. Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Cc: Dominik Dingel <dingel@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/powerpc/mm/hugetlbpage.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 9cc3387fa29fe7827ea6249a1e138ba2a5965082 Author: Vaishali Thakkar <vaishali.thakkar@oracle.com> Date: Thu May 19 17:11:11 2016 -0700 metag: mm: use hugetlb_bad_size() Update setup_hugepagesz() to call hugetlb_bad_size() when unsupported hugepage size is found. Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Cc: Dominik Dingel <dingel@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/metag/mm/hugetlbpage.c | 1 + 1 file changed, 1 insertion(+) commit d77e20cea7183145acff928f64b9cba4c825fd83 Author: Vaishali Thakkar <vaishali.thakkar@oracle.com> Date: Thu May 19 17:11:08 2016 -0700 arm64: mm: use hugetlb_bad_size() Update setup_hugepagesz() to call hugetlb_bad_size() when unsupported hugepage size is found. Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Cc: Dominik Dingel <dingel@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/arm64/mm/hugetlbpage.c | 1 + 1 file changed, 1 insertion(+) commit 9fee021d15ddd884d40d1540913474e8112313fe Author: Vaishali Thakkar <vaishali.thakkar@oracle.com> Date: Thu May 19 17:11:04 2016 -0700 mm/hugetlb: introduce hugetlb_bad_size() When any unsupported hugepage size is specified, 'hugepagesz=' and 'hugepages=' should be ignored during command line parsing until any supported hugepage size is found. But currently incorrect number of hugepages are allocated when unsupported size is specified as it fails to ignore the 'hugepages=' command. Test case: Note that this is specific to x86 architecture. Boot the kernel with command line option 'hugepagesz=256M hugepages=X'. After boot, dmesg output shows that X number of hugepages of the size 2M is pre-allocated instead of 0. So, to handle such command line options, introduce new routine hugetlb_bad_size. The routine hugetlb_bad_size sets the global variable parsed_valid_hugepagesz. We are using parsed_valid_hugepagesz to save the state when unsupported hugepagesize is found so that we can ignore the 'hugepages=' parameters after that and then reset the variable when supported hugepage size is found. The routine hugetlb_bad_size can be called while setting 'hugepagesz=' parameter in an architecture specific code. Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: Yaowei Bai <baiyaowei@cmss.chinamobile.com> Cc: Dominik Dingel <dingel@linux.vnet.ibm.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: James Hogan <james.hogan@imgtec.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/hugetlb.h | 1 + mm/hugetlb.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) commit 09a95e29cb30a3930db22d340ddd072a82b6b0db Author: Mike Kravetz <mike.kravetz@oracle.com> Date: Thu May 19 17:11:01 2016 -0700 mm/hugetlb: optimize minimum size (min_size) accounting It was observed that minimum size accounting associated with the hugetlbfs min_size mount option may not perform optimally and as expected. As huge pages/reservations are released from the filesystem and given back to the global pools, they are reserved for subsequent filesystem use as long as the subpool reserved count is less than subpool minimum size. It does not take into account used pages within the filesystem. The filesystem size limits are not exceeded and this is technically not a bug. However, better behavior would be to wait for the number of used pages/reservations associated with the filesystem to drop below the minimum size before taking reservations to satisfy minimum size. An optimization is also made to the hugepage_subpool_get_pages() routine which is called when pages/reservations are allocated. This does not change behavior, but simply avoids the accounting if all reservations have already been taken (subpool reserved count == 0). Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com> Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Hillf Danton <hillf.zj@alibaba-inc.com> Cc: David Rientjes <rientjes@google.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/hugetlb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 0edaf86cf1a6a97d811fc34765ddbcbc310de564 Author: Andrew Morton <akpm@linux-foundation.org> Date: Thu May 19 17:10:58 2016 -0700 include/linux/nodemask.h: create next_node_in() helper Lots of code does node = next_node(node, XXX); if (node == MAX_NUMNODES) node = first_node(XXX); so create next_node_in() to do this and use it in various places. [mhocko@suse.com: use next_node_in() helper] Acked-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: Michal Hocko <mhocko@kernel.org> Signed-off-by: Michal Hocko <mhocko@suse.com> Cc: Xishi Qiu <qiuxishi@huawei.com> Cc: Joonsoo Kim <js1304@gmail.com> Cc: David Rientjes <rientjes@google.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: Laura Abbott <lauraa@codeaurora.org> Cc: Hui Zhu <zhuhui@xiaomi.com> Cc: Wang Xiaoqiang <wangxq10@lzu.edu.cn> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> arch/tile/kernel/setup.c | 4 +--- arch/x86/mm/numa.c | 4 +--- include/linux/nodemask.h | 11 ++++++++++- kernel/cpuset.c | 8 +------- lib/Makefile | 2 +- lib/nodemask.c | 30 ++++++++++++++++++++++++++++++ mm/hugetlb.c | 4 +--- mm/memcontrol.c | 4 +--- mm/mempolicy.c | 24 ++---------------------- mm/page_isolation.c | 9 +++------ mm/slab.c | 13 +++---------- 11 files changed, 54 insertions(+), 59 deletions(-) commit 48a270554a3251681ae11173f2fd6389d943e183 Author: Rasmus Villemoes <linux@rasmusvillemoes.dk> Date: Thu May 19 17:10:55 2016 -0700 include/linux: apply __malloc attribute Attach the malloc attribute to a few allocation functions. This helps gcc generate better code by telling it that the return value doesn't alias any existing pointers (which is even more valuable given the pessimizations implied by -fno-strict-aliasing). A simple example of what this allows gcc to do can be seen by looking at the last part of drm_atomic_helper_plane_reset: plane->state = kzalloc(sizeof(*plane->state), GFP_KERNEL); if (plane->state) { plane->state->plane = plane; plane->state->rotation = BIT(DRM_ROTATE_0); } which compiles to e8 99 bf d6 ff callq ffffffff8116d540 <kmem_cache_alloc_trace> 48 85 c0 test %rax,%rax 48 89 83 40 02 00 00 mov %rax,0x240(%rbx) 74 11 je ffffffff814015c4 <drm_atomic_helper_plane_reset+0x64> 48 89 18 mov %rbx,(%rax) 48 8b 83 40 02 00 00 mov 0x240(%rbx),%rax [*] c7 40 40 01 00 00 00 movl $0x1,0x40(%rax) With this patch applied, the instruction at [*] is elided, since the store to plane->state->plane is known to not alter the value of plane->state. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/bootmem.h | 16 ++++++++-------- include/linux/device.h | 12 ++++++------ include/linux/kernel.h | 4 ++-- include/linux/mempool.h | 3 ++- include/linux/slab.h | 16 ++++++++-------- include/linux/string.h | 2 +- 6 files changed, 27 insertions(+), 26 deletions(-) commit d64e85d3e1c59c3664b9ec1183052ec4641ea1e2 Author: Rasmus Villemoes <linux@rasmusvillemoes.dk> Date: Thu May 19 17:10:52 2016 -0700 compiler.h: add support for malloc attribute gcc as far back as at least 3.04 documents the function attribute __malloc__. Add a shorthand for attaching that to a function declaration. This was also suggested by Andi Kleen way back in 2002 [1], but didn't get applied, perhaps because gcc at that time generated the exact same code with and without this attribute. This attribute tells the compiler that the return value (if non-NULL) can be assumed not to alias any other valid pointers at the time of the call. Please note that the documentation for a range of gcc versions (starting from around 4.7) contained a somewhat confusing and self-contradicting text: The malloc attribute is used to tell the compiler that a function may be treated as if any non-NULL pointer it returns cannot alias any other pointer valid when the function returns and *that the memory has undefined content*. [...] Standard functions with this property include malloc and *calloc*. (emphasis mine). The intended meaning has later been clarified [2]: This tells the compiler that a function is malloc-like, i.e., that the pointer P returned by the function cannot alias any other pointer valid when the function returns, and moreover no pointers to valid objects occur in any storage addressed by P. What this means is that we can apply the attribute to kmalloc and friends, and it is ok for the returned memory to have well-defined contents (__GFP_ZERO). But it is not ok to apply it to kmemdup(), nor to other functions which both allocate and possibly initialize the memory with existing pointers. So unless someone is doing something pretty perverted kstrdup() should also be a fine candidate. [1] http://thread.gmane.org/gmane.linux.kernel/57172 [2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56955 Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Andi Kleen <ak@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/compiler-gcc.h | 1 + include/linux/compiler.h | 4 ++++ 2 files changed, 5 insertions(+) commit 0139aa7b7fa12ceef095d99dc36606a5b10ab83a Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:49 2016 -0700 mm: rename _count, field of the struct page, to _refcount Many developers already know that field for reference count of the struct page is _count and atomic type. They would try to handle it directly and this could break the purpose of page reference count tracepoint. To prevent direct _count modification, this patch rename it to _refcount and add warning message on the code. After that, developer who need to handle reference count will find that field should not be accessed directly. [akpm@linux-foundation.org: fix comments, per Vlastimil] [akpm@linux-foundation.org: Documentation/vm/transhuge.txt too] [sfr@canb.auug.org.au: sync ethernet driver changes] Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Vlastimil Babka <vbabka@suse.cz> Cc: Hugh Dickins <hughd@google.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: "David S. Miller" <davem@davemloft.net> Cc: Sunil Goutham <sgoutham@cavium.com> Cc: Chris Metcalf <cmetcalf@mellanox.com> Cc: Manish Chopra <manish.chopra@qlogic.com> Cc: Yuval Mintz <yuval.mintz@qlogic.com> Cc: Tariq Toukan <tariqt@mellanox.com> Cc: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/vm/transhuge.txt | 10 +++++----- arch/tile/mm/init.c | 2 +- drivers/block/aoe/aoecmd.c | 2 +- drivers/hwtracing/intel_th/msu.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 20 +++++++++---------- drivers/net/ethernet/qlogic/qede/qede_main.c | 4 ++-- fs/proc/page.c | 2 +- include/linux/mm.h | 2 +- include/linux/mm_types.h | 14 ++++++++----- include/linux/page_ref.h | 26 ++++++++++++------------- include/linux/pagemap.h | 8 ++++---- kernel/kexec_core.c | 2 +- mm/huge_memory.c | 4 ++-- mm/internal.h | 2 +- mm/page_alloc.c | 4 ++-- mm/slub.c | 4 ++-- mm/vmscan.c | 4 ++-- 17 files changed, 58 insertions(+), 54 deletions(-) commit 6d061f9f6136d477932088c24ce155d7dc785746 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:46 2016 -0700 mm/page_ref: use page_ref helper instead of direct modification of _count page_reference manipulation functions are introduced to track down reference count change of the page. Use it instead of direct modification of _count. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Vlastimil Babka <vbabka@suse.cz> Cc: Hugh Dickins <hughd@google.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: "David S. Miller" <davem@davemloft.net> Cc: Sunil Goutham <sgoutham@cavium.com> Cc: Chris Metcalf <cmetcalf@mellanox.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 2 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 2 +- mm/filemap.c | 2 +- net/wireless/util.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 43efd3ea64f3cf8920e8793e6953321a466023e3 Author: Li Peng <lip@dtdream.com> Date: Thu May 19 17:10:43 2016 -0700 mm/slub.c: fix sysfs filename in comment /sys/kernel/slab/xx/defrag_ratio should be remote_node_defrag_ratio. Link: http://lkml.kernel.org/r/1463449242-5366-1-git-send-email-lip@dtdream.com Signed-off-by: Li Peng <lip@dtdream.com> Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slub.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit a3187e438bc6565d6e54a550a19073d1b453f041 Author: Yang Shi <yang.shi@linaro.org> Date: Thu May 19 17:10:41 2016 -0700 mm: slab: remove ZONE_DMA_FLAG Now we have IS_ENABLED helper to check if a Kconfig option is enabled or not, so ZONE_DMA_FLAG sounds no longer useful. And, the use of ZONE_DMA_FLAG in slab looks pointless according to the comment [1] from Johannes Weiner, so remove them and ORing passed in flags with the cache gfp flags has been done in kmem_getpages(). [1] https://lkml.org/lkml/2014/9/25/553 Link: http://lkml.kernel.org/r/1462381297-11009-1-git-send-email-yang.shi@linaro.org Signed-off-by: Yang Shi <yang.shi@linaro.org> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/Kconfig | 5 ----- mm/slab.c | 23 +---------------------- 2 files changed, 1 insertion(+), 27 deletions(-) commit c7ce4f60ac199fb3521c5fcd64da21cee801ec2b Author: Thomas Garnier <thgarnie@google.com> Date: Thu May 19 17:10:37 2016 -0700 mm: SLAB freelist randomization Provides an optional config (CONFIG_SLAB_FREELIST_RANDOM) to randomize the SLAB freelist. The list is randomized during initialization of a new set of pages. The order on different freelist sizes is pre-computed at boot for performance. Each kmem_cache has its own randomized freelist. Before pre-computed lists are available freelists are generated dynamically. This security feature reduces the predictability of the kernel SLAB allocator against heap overflows rendering attacks much less stable. For example this attack against SLUB (also applicable against SLAB) would be affected: https://jon.oberheide.org/blog/2010/09/10/linux-kernel-can-slub-overflow/ Also, since v4.6 the freelist was moved at the end of the SLAB. It means a controllable heap is opened to new attacks not yet publicly discussed. A kernel heap overflow can be transformed to multiple use-after-free. This feature makes this type of attack harder too. To generate entropy, we use get_random_bytes_arch because 0 bits of entropy is available in the boot stage. In the worse case this function will fallback to the get_random_bytes sub API. We also generate a shift random number to shift pre-computed freelist for each new set of pages. The config option name is not specific to the SLAB as this approach will be extended to other allocators like SLUB. Performance results highlighted no major changes: Hackbench (running 90 10 times): Before average: 0.0698 After average: 0.0663 (-5.01%) slab_test 1 run on boot. Difference only seen on the 2048 size test being the worse case scenario covered by freelist randomization. New slab pages are constantly being created on the 10000 allocations. Variance should be mainly due to getting new pages every few allocations. Before: Single thread testing ===================== 1. Kmalloc: Repeatedly allocate then free test 10000 times kmalloc(8) -> 99 cycles kfree -> 112 cycles 10000 times kmalloc(16) -> 109 cycles kfree -> 140 cycles 10000 times kmalloc(32) -> 129 cycles kfree -> 137 cycles 10000 times kmalloc(64) -> 141 cycles kfree -> 141 cycles 10000 times kmalloc(128) -> 152 cycles kfree -> 148 cycles 10000 times kmalloc(256) -> 195 cycles kfree -> 167 cycles 10000 times kmalloc(512) -> 257 cycles kfree -> 199 cycles 10000 times kmalloc(1024) -> 393 cycles kfree -> 251 cycles 10000 times kmalloc(2048) -> 649 cycles kfree -> 228 cycles 10000 times kmalloc(4096) -> 806 cycles kfree -> 370 cycles 10000 times kmalloc(8192) -> 814 cycles kfree -> 411 cycles 10000 times kmalloc(16384) -> 892 cycles kfree -> 455 cycles 2. Kmalloc: alloc/free test 10000 times kmalloc(8)/kfree -> 121 cycles 10000 times kmalloc(16)/kfree -> 121 cycles 10000 times kmalloc(32)/kfree -> 121 cycles 10000 times kmalloc(64)/kfree -> 121 cycles 10000 times kmalloc(128)/kfree -> 121 cycles 10000 times kmalloc(256)/kfree -> 119 cycles 10000 times kmalloc(512)/kfree -> 119 cycles 10000 times kmalloc(1024)/kfree -> 119 cycles 10000 times kmalloc(2048)/kfree -> 119 cycles 10000 times kmalloc(4096)/kfree -> 121 cycles 10000 times kmalloc(8192)/kfree -> 119 cycles 10000 times kmalloc(16384)/kfree -> 119 cycles After: Single thread testing ===================== 1. Kmalloc: Repeatedly allocate then free test 10000 times kmalloc(8) -> 130 cycles kfree -> 86 cycles 10000 times kmalloc(16) -> 118 cycles kfree -> 86 cycles 10000 times kmalloc(32) -> 121 cycles kfree -> 85 cycles 10000 times kmalloc(64) -> 176 cycles kfree -> 102 cycles 10000 times kmalloc(128) -> 178 cycles kfree -> 100 cycles 10000 times kmalloc(256) -> 205 cycles kfree -> 109 cycles 10000 times kmalloc(512) -> 262 cycles kfree -> 136 cycles 10000 times kmalloc(1024) -> 342 cycles kfree -> 157 cycles 10000 times kmalloc(2048) -> 701 cycles kfree -> 238 cycles 10000 times kmalloc(4096) -> 803 cycles kfree -> 364 cycles 10000 times kmalloc(8192) -> 835 cycles kfree -> 404 cycles 10000 times kmalloc(16384) -> 896 cycles kfree -> 441 cycles 2. Kmalloc: alloc/free test 10000 times kmalloc(8)/kfree -> 121 cycles 10000 times kmalloc(16)/kfree -> 121 cycles 10000 times kmalloc(32)/kfree -> 123 cycles 10000 times kmalloc(64)/kfree -> 142 cycles 10000 times kmalloc(128)/kfree -> 121 cycles 10000 times kmalloc(256)/kfree -> 119 cycles 10000 times kmalloc(512)/kfree -> 119 cycles 10000 times kmalloc(1024)/kfree -> 119 cycles 10000 times kmalloc(2048)/kfree -> 119 cycles 10000 times kmalloc(4096)/kfree -> 119 cycles 10000 times kmalloc(8192)/kfree -> 119 cycles 10000 times kmalloc(16384)/kfree -> 119 cycles [akpm@linux-foundation.org: propagate gfp_t into cache_random_seq_create()] Signed-off-by: Thomas Garnier <thgarnie@google.com> Acked-by: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Kees Cook <keescook@chromium.org> Cc: Greg Thelen <gthelen@google.com> Cc: Laura Abbott <labbott@fedoraproject.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/slab_def.h | 4 ++ init/Kconfig | 9 +++ mm/slab.c | 167 ++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 178 insertions(+), 2 deletions(-) commit 81ae6d03952c1bfb96e1a716809bd65e7cd14360 Author: Vladimir Davydov <vdavydov@virtuozzo.com> Date: Thu May 19 17:10:34 2016 -0700 mm/slub.c: replace kick_all_cpus_sync() with synchronize_sched() in kmem_cache_shrink() When we call __kmem_cache_shrink on memory cgroup removal, we need to synchronize kmem_cache->cpu_partial update with put_cpu_partial that might be running on other cpus. Currently, we achieve that by using kick_all_cpus_sync, which works as a system wide memory barrier. Though fast it is, this method has a flaw - it issues a lot of IPIs, which might hurt high performance or real-time workloads. To fix this, let's replace kick_all_cpus_sync with synchronize_sched. Although the latter one may take much longer to finish, it shouldn't be a problem in this particular case, because memory cgroups are destroyed asynchronously from a workqueue so that no user visible effects should be introduced. OTOH, it will save us from excessive IPIs when someone removes a cgroup. Anyway, even if using synchronize_sched turns out to take too long, we can always introduce a kind of __kmem_cache_shrink batching so that this method would only be called once per one cgroup destruction (not per each per memcg kmem cache as it is now). Signed-off-by: Vladimir Davydov <vdavydov@virtuozzo.com> Reported-by: Peter Zijlstra <peterz@infradead.org> Suggested-by: Peter Zijlstra <peterz@infradead.org> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Michal Hocko <mhocko@suse.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 801faf0db8947e01877920e848a4d338dd7a99e7 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:31 2016 -0700 mm/slab: lockless decision to grow cache To check whether free objects exist or not precisely, we need to grab a lock. But, accuracy isn't that important because race window would be even small and if there is too much free object, cache reaper would reap it. So, this patch makes the check for free object exisistence not to hold a lock. This will reduce lock contention in heavily allocation case. Note that until now, n->shared can be freed during the processing by writing slabinfo, but, with some trick in this patch, we can access it freely within interrupt disabled period. Below is the result of concurrent allocation/free in slab allocation benchmark made by Christoph a long time ago. I make the output simpler. The number shows cycle count during alloc/free respectively so less is better. * Before Kmalloc N*alloc N*free(32): Average=248/966 Kmalloc N*alloc N*free(64): Average=261/949 Kmalloc N*alloc N*free(128): Average=314/1016 Kmalloc N*alloc N*free(256): Average=741/1061 Kmalloc N*alloc N*free(512): Average=1246/1152 Kmalloc N*alloc N*free(1024): Average=2437/1259 Kmalloc N*alloc N*free(2048): Average=4980/1800 Kmalloc N*alloc N*free(4096): Average=9000/2078 * After Kmalloc N*alloc N*free(32): Average=344/792 Kmalloc N*alloc N*free(64): Average=347/882 Kmalloc N*alloc N*free(128): Average=390/959 Kmalloc N*alloc N*free(256): Average=393/1067 Kmalloc N*alloc N*free(512): Average=683/1229 Kmalloc N*alloc N*free(1024): Average=1295/1325 Kmalloc N*alloc N*free(2048): Average=2513/1664 Kmalloc N*alloc N*free(4096): Average=4742/2172 It shows that allocation performance decreases for the object size up to 128 and it may be due to extra checks in cache_alloc_refill(). But, with considering improvement of free performance, net result looks the same. Result for other size class looks very promising, roughly, 50% performance improvement. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) commit 213b46958c65c7adaaf3201102da16ce0264e9cf Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:29 2016 -0700 mm/slab: refill cpu cache through a new slab without holding a node lock Until now, cache growing makes a free slab on node's slab list and then we can allocate free objects from it. This necessarily requires to hold a node lock which is very contended. If we refill cpu cache before attaching it to node's slab list, we can avoid holding a node lock as much as possible because this newly allocated slab is only visible to the current task. This will reduce lock contention. Below is the result of concurrent allocation/free in slab allocation benchmark made by Christoph a long time ago. I make the output simpler. The number shows cycle count during alloc/free respectively so less is better. * Before Kmalloc N*alloc N*free(32): Average=355/750 Kmalloc N*alloc N*free(64): Average=452/812 Kmalloc N*alloc N*free(128): Average=559/1070 Kmalloc N*alloc N*free(256): Average=1176/980 Kmalloc N*alloc N*free(512): Average=1939/1189 Kmalloc N*alloc N*free(1024): Average=3521/1278 Kmalloc N*alloc N*free(2048): Average=7152/1838 Kmalloc N*alloc N*free(4096): Average=13438/2013 * After Kmalloc N*alloc N*free(32): Average=248/966 Kmalloc N*alloc N*free(64): Average=261/949 Kmalloc N*alloc N*free(128): Average=314/1016 Kmalloc N*alloc N*free(256): Average=741/1061 Kmalloc N*alloc N*free(512): Average=1246/1152 Kmalloc N*alloc N*free(1024): Average=2437/1259 Kmalloc N*alloc N*free(2048): Average=4980/1800 Kmalloc N*alloc N*free(4096): Average=9000/2078 It shows that contention is reduced for all the object sizes and performance increases by 30 ~ 40%. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 68 +++++++++++++++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 32 deletions(-) commit 76b342bdc71badea2cbac7bf6590aa86e895c507 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:26 2016 -0700 mm/slab: separate cache_grow() to two parts This is a preparation step to implement lockless allocation path when there is no free objects in kmem_cache. What we'd like to do here is to refill cpu cache without holding a node lock. To accomplish this purpose, refill should be done after new slab allocation but before attaching the slab to the management list. So, this patch separates cache_grow() to two parts, allocation and attaching to the list in order to add some code inbetween them in the following patch. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 74 ++++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 52 insertions(+), 22 deletions(-) commit 511e3a05881221a7fc63e36f3d604887040fc845 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:23 2016 -0700 mm/slab: make cache_grow() handle the page allocated on arbitrary node Currently, cache_grow() assumes that allocated page's nodeid would be same with parameter nodeid which is used for allocation request. If we discard this assumption, we can handle fallback_alloc() case gracefully. So, this patch makes cache_grow() handle the page allocated on arbitrary node and clean-up relevant code. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 60 +++++++++++++++++++++--------------------------------------- 1 file changed, 21 insertions(+), 39 deletions(-) commit 03d1d43a1262b347a9aa814980438fff8eb32edc Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:20 2016 -0700 mm/slab: racy access/modify the slab color Slab color isn't needed to be changed strictly. Because locking for changing slab color could cause more lock contention so this patch implements racy access/modify the slab color. This is a preparation step to implement lockless allocation path when there is no free objects in the kmem_cache. Below is the result of concurrent allocation/free in slab allocation benchmark made by Christoph a long time ago. I make the output simpler. The number shows cycle count during alloc/free respectively so less is better. * Before Kmalloc N*alloc N*free(32): Average=365/806 Kmalloc N*alloc N*free(64): Average=452/690 Kmalloc N*alloc N*free(128): Average=736/886 Kmalloc N*alloc N*free(256): Average=1167/985 Kmalloc N*alloc N*free(512): Average=2088/1125 Kmalloc N*alloc N*free(1024): Average=4115/1184 Kmalloc N*alloc N*free(2048): Average=8451/1748 Kmalloc N*alloc N*free(4096): Average=16024/2048 * After Kmalloc N*alloc N*free(32): Average=355/750 Kmalloc N*alloc N*free(64): Average=452/812 Kmalloc N*alloc N*free(128): Average=559/1070 Kmalloc N*alloc N*free(256): Average=1176/980 Kmalloc N*alloc N*free(512): Average=1939/1189 Kmalloc N*alloc N*free(1024): Average=3521/1278 Kmalloc N*alloc N*free(2048): Average=7152/1838 Kmalloc N*alloc N*free(4096): Average=13438/2013 It shows that contention is reduced for object size >= 1024 and performance increases by roughly 15%. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Christoph Lameter <cl@linux.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) commit 6052b7880a95554993898f7cac075c2669f1dd7c Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:17 2016 -0700 mm/slab: don't keep free slabs if free_objects exceeds free_limit Currently, determination to free a slab is done whenever each freed object is put into the slab. This has a following problem. Assume free_limit = 10 and nr_free = 9. Free happens as following sequence and nr_free changes as following. free(become a free slab) free(not become a free slab) nr_free: 9 -> 10 (at first free) -> 11 (at second free) If we try to check if we can free current slab or not on each object free, we can't free any slab in this situation because current slab isn't a free slab when nr_free exceed free_limit (at second free) even if there is a free slab. However, if we check it lastly, we can free 1 free slab. This problem would cause to keep too much memory in the slab subsystem. This patch try to fix it by checking number of free object after all free work is done. If there is free slab at that time, we can free slab as much as possible so we keep free slab as minimal. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit c3d332b6b2c11ddda9cce3e2f3135b68929d4b82 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:14 2016 -0700 mm/slab: clean-up kmem_cache_node setup There are mostly same code for setting up kmem_cache_node either in cpuup_prepare() or alloc_kmem_cache_node(). Factor out and clean-up them. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Tested-by: Nishanth Menon <nm@ti.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Christoph Lameter <cl@linux.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 168 +++++++++++++++++++++++++------------------------------------- 1 file changed, 68 insertions(+), 100 deletions(-) commit ded0ecf61118930988f0943e741056c8fd5d439c Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:11 2016 -0700 mm/slab: factor out kmem_cache_node initialization code It can be reused on other place, so factor out it. Following patch will use it. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Christoph Lameter <cl@linux.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 74 ++++++++++++++++++++++++++++++++++++++------------------------- 1 file changed, 45 insertions(+), 29 deletions(-) commit a5aa63a5f7352aa8991f64d46854dcb8d3788d55 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:08 2016 -0700 mm/slab: drain the free slab as much as possible slabs_tofree() implies freeing all free slab. We can do it with just providing INT_MAX. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Acked-by: Christoph Lameter <cl@linux.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) commit 8888177ea116d4d14ca0a2ba054d02f35b0dae29 Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:05 2016 -0700 mm/slab: remove BAD_ALIEN_MAGIC again Initial attemp to remove BAD_ALIEN_MAGIC is once reverted by 'commit edcad2509550 ("Revert "slab: remove BAD_ALIEN_MAGIC"")' because it causes a problem on m68k which has many node but !CONFIG_NUMA. In this case, although alien cache isn't used at all but to cope with some initialization path, garbage value is used and that is BAD_ALIEN_MAGIC. Now, this patch set use_alien_caches to 0 when !CONFIG_NUMA, there is no initialization path problem so we don't need BAD_ALIEN_MAGIC at all. So remove it. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Christoph Lameter <cl@linux.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 18726ca8b34bbfb3ab5a1c0a52a5d8dd392466ed Author: Joonsoo Kim <iamjoonsoo.kim@lge.com> Date: Thu May 19 17:10:02 2016 -0700 mm/slab: fix the theoretical race by holding proper lock While processing concurrent allocation, SLAB could be contended a lot because it did a lots of work with holding a lock. This patchset try to reduce the number of critical section to reduce lock contention. Major changes are lockless decision to allocate more slab and lockless cpu cache refill from the newly allocated slab. Below is the result of concurrent allocation/free in slab allocation benchmark made by Christoph a long time ago. I make the output simpler. The number shows cycle count during alloc/free respectively so less is better. * Before Kmalloc N*alloc N*free(32): Average=365/806 Kmalloc N*alloc N*free(64): Average=452/690 Kmalloc N*alloc N*free(128): Average=736/886 Kmalloc N*alloc N*free(256): Average=1167/985 Kmalloc N*alloc N*free(512): Average=2088/1125 Kmalloc N*alloc N*free(1024): Average=4115/1184 Kmalloc N*alloc N*free(2048): Average=8451/1748 Kmalloc N*alloc N*free(4096): Average=16024/2048 * After Kmalloc N*alloc N*free(32): Average=344/792 Kmalloc N*alloc N*free(64): Average=347/882 Kmalloc N*alloc N*free(128): Average=390/959 Kmalloc N*alloc N*free(256): Average=393/1067 Kmalloc N*alloc N*free(512): Average=683/1229 Kmalloc N*alloc N*free(1024): Average=1295/1325 Kmalloc N*alloc N*free(2048): Average=2513/1664 Kmalloc N*alloc N*free(4096): Average=4742/2172 It shows that performance improves greatly (roughly more than 50%) for the object class whose size is more than 128 bytes. This patch (of 11): If we don't hold neither the slab_mutex nor the node lock, node's shared array cache could be freed and re-populated. If __kmem_cache_shrink() is called at the same time, it will call drain_array() with n->shared without holding node lock so problem can happen. This patch fix the situation by holding the node lock before trying to drain the shared array. In addition, add a debug check to confirm that n->shared access race doesn't exist. Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Jesper Dangaard Brouer <brouer@redhat.com> Cc: Christoph Lameter <cl@linux.com> Cc: Pekka Enberg <penberg@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> mm/slab.c | 68 ++++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 23 deletions(-) commit 19d795b677bda354644cfb87a196b087fdc2a965 Author: Arnd Bergmann <arnd@arndb.de> Date: Thu May 19 17:09:59 2016 -0700 kernel/padata.c: hide unused functions A recent cleanup removed some exported functions that were not used anywhere, which in turn exposed the fact that some other functions in the same file are only used in some configurations. We now get a warning about them when CONFIG_HOTPLUG_CPU is disabled: kernel/padata.c:670:12: error: '__padata_remove_cpu' defined but not used [-Werror=unused-function] static int __padata_remove_cpu(struct padata_instance *pinst, int cpu) ^~~~~~~~~~~~~~~~~~~ kernel/padata.c:650:12: error: '__padata_add_cpu' defined but not used [-Werror=unused-function] static int __padata_add_cpu(struct padata_instance *pinst, int cpu) This rearranges the code so the __padata_remove_cpu/__padata_add_cpu functions are within the #ifdef that protects the code that calls them. [akpm@linux-foundation.org: coding-style fixes] Fixes: 4ba6d78c671e ("kernel/padata.c: removed unused code") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Richard Cochran <rcochran@linutronix.de> Cc: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/padata.c | 74 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit 815613da6a67c196d7458d0e6c278ea88e21933f Author: Richard Cochran <rcochran@linutronix.de> Date: Thu May 19 17:09:56 2016 -0700 kernel/padata.c: removed unused code By accident I stumbled across code that has never been used. This driver has EXPORT_SYMBOL functions, and the only user of the code is pcrypt.c, but this only uses a subset of the exported symbols. According to 'git log -G', the functions, padata_set_cpumasks, padata_add_cpu, and padata_remove_cpu have never been used since they were first introduced. This patch removes the unused code. On one 64 bit build, with CRYPTO_PCRYPT built in, the text is more than 4k smaller. kbuild_hp> size $KBUILD_OUTPUT/vmlinux text data bss dec hex filename 10566658 4678360 1122304 16367322 f9beda vmlinux 10561984 4678360 1122304 16362648 f9ac98 vmlinux On another config, 32 bit, the saving is about 0.5k bytes. kbuild_hp-x86> size $KBUILD_OUTPUT/vmlinux 6012005 2409513 2785280 11206798 ab008e vmlinux 6011491 2409513 2785280 11206284 aafe8c vmlinux Signed-off-by: Richard Cochran <rcochran@linutronix.de> Cc: Steffen Klassert <steffen.klassert@secunet.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/padata.h | 5 ---- kernel/padata.c | 64 -------------------------------------------------- 2 files changed, 69 deletions(-) commit 8f9b1802c20ace68a7d6603e1fd82a44fedb4078 Author: Guozhonghua <guozhonghua@h3c.com> Date: Thu May 19 17:09:53 2016 -0700 ocfs2: clean up an unneeded goto in ocfs2_put_slot() The goto is not useful in ocfs2_put_slot(), so delete it. Signed-off-by: Guozhonghua <guozhonghua@h3c.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/slot_map.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit aa6913dbd26af386e7703f6c0d4ed2a848b7a052 Author: Jun Piao <piaojun@huawei.com> Date: Thu May 19 17:09:50 2016 -0700 ocfs2: clean up unused parameter 'count' in o2hb_read_block_input() Clean up unused parameter 'count' in o2hb_read_block_input(). Signed-off-by: Jun Piao <piaojun@huawei.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/cluster/heartbeat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit c14688ea248c5ddfb6b8b97151de0a8620ba4a68 Author: piaojun <piaojun@huawei.com> Date: Thu May 19 17:09:47 2016 -0700 ocfs2: clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec Clean up an unused variable 'wants_rotate' in ocfs2_truncate_rec. Signed-off-by: Jun Piao <piaojun@huawei.com> Reviewed-by: Joseph Qi <joseph.qi@huawei.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 8ba442214c332a2a10ac90bc24ebb00aea4ae0ec Author: Guozhonghua <guozhonghua@h3c.com> Date: Thu May 19 17:09:44 2016 -0700 ocfs2: fix comment in struct ocfs2_extended_slot The comment in ocfs2_extended_slot has the offset wrong. Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joseph Qi <joseph.qi@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/ocfs2/ocfs2_fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b9fdac7f660609abb157500e468d2165b3c9cf08 Author: Du, Changbin <changbin.du@intel.com> Date: Thu May 19 17:09:41 2016 -0700 debugobjects: insulate non-fixup logic related to static obj from fixup callbacks When activating a static object we need make sure that the object is tracked in the object tracker. If it is a non-static object then the activation is illegal. In previous implementation, each subsystem need take care of this in their fixup callbacks. Actually we can put it into debugobjects core. Thus we can save duplicated code, and have *pure* fixup callbacks. To achieve this, a new callback "is_static_object" is introduced to let the type specific code decide whether a object is static or not. If yes, we take it into object tracker, otherwise give warning and invoke fixup callback. This change has paassed debugobjects selftest, and I also do some test with all debugobjects supports enabled. At last, I have a concern about the fixups that can it change the object which is in incorrect state on fixup? Because the 'addr' may not point to any valid object if a non-static object is not tracked. Then Change such object can overwrite someone's memory and cause unexpected behaviour. For example, the timer_fixup_activate bind timer to function stub_timer. Link: http://lkml.kernel.org/r/1462576157-14539-1-git-send-email-changbin.du@intel.com [changbin.du@intel.com: improve code comments where invoke the new is_static_object callback] Link: http://lkml.kernel.org/r/1462777431-8171-1-git-send-email-changbin.du@intel.com Signed-off-by: Du, Changbin <changbin.du@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Triplett <josh@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/debugobjects.h | 2 ++ kernel/rcu/update.c | 26 +++-------------------- kernel/time/hrtimer.c | 7 +------ kernel/time/timer.c | 43 +++++++++++++------------------------- kernel/workqueue.c | 42 ++++++++----------------------------- lib/debugobjects.c | 49 +++++++++++++++++++++++++++++--------------- 6 files changed, 60 insertions(+), 109 deletions(-) commit 8bad1cd0e1edd124c0f05f925762ef84e6047586 Author: Du, Changbin <changbin.du@intel.com> Date: Thu May 19 17:09:38 2016 -0700 Documentation: update debugobjects doc Update documentation creangponding to change(debugobjects: make fixup functions return bool instead of int). Signed-off-by: Du, Changbin <changbin.du@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Triplett <josh@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Documentation/DocBook/debugobjects.tmpl | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit d99b1d8912654c4bdeb51063d2e934afc2372cc2 Author: Du, Changbin <changbin.du@intel.com> Date: Thu May 19 17:09:35 2016 -0700 percpu_counter: update debugobjects fixup callbacks return type Update the return type to use bool instead of int, corresponding to cheange (debugobjects: make fixup functions return bool instead of int). Signed-off-by: Du, Changbin <changbin.du@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Triplett <josh@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/percpu_counter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3263d28eb5b93b3c1b024366df87b1d0c774228f Author: Du, Changbin <changbin.du@intel.com> Date: Thu May 19 17:09:32 2016 -0700 rcu: update debugobjects fixup callbacks return type Update the return type to use bool instead of int, corresponding to cheange (debugobjects: make fixup functions return bool instead of int). Signed-off-by: Du, Changbin <changbin.du@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Triplett <josh@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/rcu/update.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e3252464da222ef2c2ca52dff383a824080ea3d5 Author: Du, Changbin <changbin.du@intel.com> Date: Thu May 19 17:09:29 2016 -0700 timer: update debugobjects fixup callbacks return type Update the return type to use bool instead of int, corresponding to cheange (debugobjects: make fixup functions return bool instead of int). Signed-off-by: Du, Changbin <changbin.du@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Triplett <josh@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/time/hrtimer.c | 18 +++++++++--------- kernel/time/timer.c | 30 +++++++++++++++--------------- 2 files changed, 24 insertions(+), 24 deletions(-) commit 02a982a6ec631d871571f940ca13817551759884 Author: Du, Changbin <changbin.du@intel.com> Date: Thu May 19 17:09:26 2016 -0700 workqueue: update debugobjects fixup callbacks return type Update the return type to use bool instead of int, corresponding to change (debugobjects: make fixup functions return bool instead of int) Signed-off-by: Du, Changbin <changbin.du@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Triplett <josh@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> kernel/workqueue.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit e7a8e78bd4ad931660743bd2dbabd9170a715294 Author: Du, Changbin <changbin.du@intel.com> Date: Thu May 19 17:09:23 2016 -0700 debugobjects: correct the usage of fixup call results If debug_object_fixup() return non-zero when problem has been fixed. But the code got it backwards, it taks 0 as fixup successfully. So fix it. Signed-off-by: Du, Changbin <changbin.du@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Triplett <josh@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> lib/debugobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b1e4d9d82df8ab9097f80aa208c40eab6fc29858 Author: Du, Changbin <changbin.du@intel.com> Date: Thu May 19 17:09:20 2016 -0700 debugobjects: make fixup functions return bool instead of int I am going to introduce debugobjects infrastructure to USB subsystem. But before this, I found the code of debugobjects could be improved. This patchset will make fixup functions return bool type instead of int. Because fixup only need report success or no. boolean is the 'real' type. This patch (of 7): The object debugging infrastructure core provides some fixup callbacks for the subsystem who use it. These callbacks are called from the debug code whenever a problem in debug_object_init is detected. And debugobjects core suppose them returns 1 when the fixup was successful, otherwise 0. So the return type is boolean. A bad thing is that debug_object_fixup use the return value for arithmetic operation. It confused me that what is the reall return type. Reading over the whole code, I found some place do use the return value incorrectly(see next patch). So why use bool type instead? Signed-off-by: Du, Changbin <changbin.du@intel.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Josh Triplett <josh@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tejun Heo <tj@kernel.org> Cc: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/debugobjects.h | 15 ++++++++------- lib/debugobjects.c | 43 +++++++++++++++++++++---------------------- 2 files changed, 29 insertions(+), 29 deletions(-) commit b21e91c305bcebf55b7a34638e5885528f3fb453 Author: Vineet Gupta <Vineet.Gupta1@synopsys.com> Date: Thu May 19 17:09:17 2016 -0700 scripts/bloat-o-meter: print percent change This adds an additional line of output (to reduce the chances of breaking any existing output parsers) which prints the total size before and after and the relative difference. add/remove: 39/0 grow/shrink: 12408/55 up/down: 362227/-1430 (360797) function old new delta ext4_fill_super 10556 12590 +2034 _fpadd_parts - 1186 +1186 ntfs_fill_super 5340 6164 +824 ... ... __divdf3 752 386 -366 unlzma 3682 3274 -408 Total: Before=5023101, After=5383898, chg 7.000000% ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Link: http://lkml.kernel.org/r/1463124110-30314-1-git-send-email-vgupta@synopsys.com Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Josh Triplett <josh@joshtriplett.org> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/bloat-o-meter | 6 ++++++ 1 file changed, 6 insertions(+) commit bad7de742d8192e9759e7f462bd2055a7e7d71f3 Author: Kees Cook <keescook@chromium.org> Date: Thu May 19 17:09:14 2016 -0700 scripts/spelling.txt: add "fimware" misspelling A few instances of "fimware" instead of "firmware" were found. Fix these and add it to the spelling.txt file. Signed-off-by: Kees Cook <keescook@chromium.org> Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/media/usb/dvb-usb/dib0700_core.c | 2 +- drivers/scsi/bfa/bfi.h | 2 +- drivers/staging/comedi/drivers/daqboard2000.c | 2 +- scripts/spelling.txt | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) commit 310c6dd06a0b3c6e808067379cfb56c864e95ffc Author: Konstantin Khlebnikov <koct9i@gmail.com> Date: Thu May 19 17:09:11 2016 -0700 scripts/decode_stacktrace.sh: handle symbols in modules scripts/decode_stacktrace.sh presently displays module symbols as func+0x0ff/0x5153 [module] Add a third argument: the pathname of a directory where the script should look for the file module.ko so that the output appears as func (foo/bar.c:123) module Without the argument or if the module file isn't found the script prints such symbols as is without decoding. Signed-off-by: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> scripts/decode_stacktrace.sh | 55 +++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 16 deletions(-) commit 8e4f70e21877297577dce13cca97599a5864a91f Author: Deepa Dinamani <deepa.kernel@gmail.com> Date: Thu May 19 17:09:08 2016 -0700 time: remove timespec_add_safe() All references to timespec_add_safe() now use timespec64_add_safe(). The plan is to replace struct timespec references with struct timespec64 throughout the kernel as timespec is not y2038 safe. Drop timespec_add_safe() and use timespec64_add_safe() for all architectures. Link: http://lkml.kernel.org/r/1461947989-21926-4-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Acked-by: John Stultz <john.stultz@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/time64.h | 15 +++++++-------- kernel/time/time.c | 4 ---- 2 files changed, 7 insertions(+), 12 deletions(-) commit 766b9f928bd5b9b185d986d40355d1f143484136 Author: Deepa Dinamani <deepa.kernel@gmail.com> Date: Thu May 19 17:09:05 2016 -0700 fs: poll/select/recvmmsg: use timespec64 for timeout events struct timespec is not y2038 safe. Even though timespec might be sufficient to represent timeouts, use struct timespec64 here as the plan is to get rid of all timespec reference in the kernel. The patch transitions the common functions: poll_select_set_timeout() and select_estimate_accuracy() to use timespec64. And, all the syscalls that use these functions are transitioned in the same patch. The restart block parameters for poll uses monotonic time. Use timespec64 here as well to assign timeout value. This parameter in the restart block need not change because this only holds the monotonic timestamp at which timeout should occur. And, unsigned long data type should be big enough for this timestamp. The system call interfaces will be handled in a separate series. Compat interfaces need not change as timespec64 is an alias to struct timespec on a 64 bit system. Link: http://lkml.kernel.org/r/1461947989-21926-3-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Acked-by: John Stultz <john.stultz@linaro.org> Acked-by: David S. Miller <davem@davemloft.net> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/eventpoll.c | 12 +++++----- fs/select.c | 67 +++++++++++++++++++++++++++++----------------------- include/linux/poll.h | 11 +++++---- net/socket.c | 8 ++++--- 4 files changed, 54 insertions(+), 44 deletions(-) commit bc2c53e5f1a2bae69ae50ce3a592633da7fcf6d9 Author: Deepa Dinamani <deepa.kernel@gmail.com> Date: Thu May 19 17:09:02 2016 -0700 time: add missing implementation for timespec64_add_safe() timespec64_add_safe() has been defined in time64.h for 64 bit systems. But, 32 bit systems only have an extern function prototype defined. Provide a definition for the above function. The function will be necessary as part of y2038 changes. struct timespec is not y2038 safe. All references to timespec will be replaced by struct timespec64. The function is meant to be a replacement for timespec_add_safe(). The implementation is similar to timespec_add_safe(). Link: http://lkml.kernel.org/r/1461947989-21926-2-git-send-email-deepa.kernel@gmail.com Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com> Acked-by: John Stultz <john.stultz@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> include/linux/time64.h | 4 +--- kernel/time/time.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) commit 35e481761cdc688dbee0ef552a13f49af8eba6cc Author: Jan Kara <jack@suse.cz> Date: Thu May 19 17:08:59 2016 -0700 fsnotify: avoid spurious EMFILE errors from inotify_init() Inotify instance is destroyed when all references to it are dropped. That not only means that the corresponding file descriptor needs to be closed but also that all corresponding instance marks are freed (as each mark holds a reference to the inotify instance). However marks are freed only after SRCU period ends which can take some time and thus if user rapidly creates and frees inotify instances, number of existing inotify instances can exceed max_user_instances limit although from user point of view there is always at most one existing instance. Thus inotify_init() returns EMFILE error which is hard to justify from user point of view. This problem is exposed by LTP inotify06 testcase on some machines. We fix the problem by making sure all group marks are properly freed while destroying inotify instance. We wait for SRCU period to end in that path anyway since we have to make sure there is no event being added to the instance while we are tearing down the instance. So it takes only some plumbing to allow for marks to be destroyed in that path as well and not from a dedicated work item. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Jan Kara <jack@suse.cz> Reported-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com> Tested-by: Xiaoguang Wang <wangxg.fnst@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/notify/fsnotify.h | 7 ++++ fs/notify/group.c | 17 ++++++--- fs/notify/mark.c | 78 +++++++++++++++++++++++++++++++--------- include/linux/fsnotify_backend.h | 2 -- 4 files changed, 81 insertions(+), 23 deletions(-) commit 03b979dd0323ace8e29a0561cd5232f73a060c09 Merge: e9ad9b9 787ca32 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 18:14:49 2016 -0700 Merge tag 'please-pull-misc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux Pull ia64 updates from Tony Luck: "A bunch of cleanups from Matt and some dead code removal from Anna-Maria" * tag 'please-pull-misc-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux: ia64/unaligned: Silence another GCC warning about an uninitialised variable ia64/traps: Silence GCC warning about uninitialised variable ia64: Reduce stack usage by iterating over nodemask ia64/PCI: Remove unused 'addr' and fix build warning ia64/PCI: Fix incorrect PCI resource end address ia64: Remove superfluous SMP function call commit e9ad9b9bd3a3b95c89a29b2a197476e662db4233 Merge: 78975f2 9f80366 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 18:07:25 2016 -0700 Merge tag 'docs-for-linus' of git://git.lwn.net/linux Pull Documentation updates from Jon Corbet: "A bit busier this time around. The most interesting thing (IMO) this time around is some beginning infrastructural work to allow documents to be written using restructured text. Maybe someday, in a galaxy far far away, we'll be able to eliminate the DocBook dependency and have a much better integrated set of kernel docs. Someday. Beyond that, there's a new document on security hardening from Kees, the movement of some sample code over to samples/, a number of improvements to the serial docs from Geert, and the usual collection of corrections, typo fixes, etc" * tag 'docs-for-linus' of git://git.lwn.net/linux: (55 commits) doc: self-protection: provide initial details serial: doc: Use port->state instead of info serial: doc: Always refer to tty_port->mutex Documentation: vm: Spelling s/paltform/platform/g Documentation/memcg: update kmem limit doc as codes behavior docproc: print a comment about autogeneration for rst output docproc: add support for reStructuredText format via --rst option docproc: abstract terminating lines at first space docproc: abstract docproc directive detection docproc: reduce unnecessary indentation docproc: add variables for subcommand and filename kernel-doc: use rst C domain directives and references for types kernel-doc: produce RestructuredText output kernel-doc: rewrite usage description, remove duplicated comments Doc: correct the location of sysrq.c Documentation: fix common spelling mistakes samples: v4l: from Documentation to samples directory samples: connector: from Documentation to samples directory Documentation: xillybus: fix spelling mistake Documentation: x86: fix spelling mistakes ... commit 78975f23cba0cd195db01cdbd6eb48138a655890 Merge: feaa7cb 73e8b05 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 17:48:12 2016 -0700 Merge branch 'i2c/for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux Pull i2c updates from Wolfram Sang: - Peter Rosin did some major rework on the locking of i2c muxes by seperating parent-locked muxes and mux-locked muxes. This avoids deadlocks/workarounds when the mux itself needs i2c commands for muxing. And as a side-effect, other workarounds in the media layer could be eliminated. Also, Peter stepped up as the i2c mux maintainer and will keep an eye on these changes. - major updates to the octeon driver - add a helper to the core to generate the address+rw_bit octal and make drivers use it - quite a bunch of driver updates * 'i2c/for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (84 commits) i2c: rcar: add DMA support i2c: st: Implement bus clear i2c: only check scl functions when using generic recovery i2c: algo-bit: declare i2c_bit_quirk_no_clk_stretch as static i2c: tegra: disable clock before returning error [media] rtl2832: regmap is aware of lockdep, drop local locking hack [media] rtl2832_sdr: get rid of empty regmap wrappers [media] rtl2832: change the i2c gate to be mux-locked [media] si2168: change the i2c gate to be mux-locked iio: imu: inv_mpu6050: change the i2c gate to be mux-locked i2c: mux: document i2c muxes and elaborate on parent-/mux-locked muxes i2c: mux: relax locking of the top i2c adapter during mux-locked muxing i2c: muxes always lock the parent adapter i2c: allow adapter drivers to override the adapter locking i2c: uniphier: add "\n" at the end of error log i2c: mv64xxx: remove CONFIG_HAVE_CLK conditionals i2c: mv64xxx: use clk_{prepare_enable,disable_unprepare} i2c: mv64xxx: handle probe deferral for the clock i2c: mv64xxx: enable the driver on ARCH_MVEBU i2c: octeon: Add workaround for broken irqs on CN3860 ... commit 555b67e4e729ca544bb4028ab12e532c68b70ddb Merge: 544ad71 ad438c4 Author: Dave Chinner <david@fromorbit.com> Date: Fri May 20 10:34:00 2016 +1000 Merge branch 'xfs-4.7-inode-reclaim' into for-next commit 544ad71fc8e20fb3a6f50f00d487751492cd8409 Merge: 2a4ad58 e6b3bb7 Author: Dave Chinner <david@fromorbit.com> Date: Fri May 20 10:33:38 2016 +1000 Merge branch 'xfs-4.7-error-cfg' into for-next commit 2a4ad5894c819978dca5595396d54d51c3aca694 Merge: a7792aa 6e3e6d5 Author: Dave Chinner <david@fromorbit.com> Date: Fri May 20 10:33:17 2016 +1000 Merge branch 'xfs-4.7-misc-fixes' into for-next commit a7792aad644a259375002db8c9d9e03fd50bf509 Merge: 5b911354 3ab3ffc Author: Dave Chinner <david@fromorbit.com> Date: Fri May 20 10:32:35 2016 +1000 Merge branch 'xfs-4.7-cleanup-attr-listent' into for-next commit 5b9113547fedca92bb39b828f7f8cd11a153247b Merge: d6bd961 30ee052 Author: Dave Chinner <david@fromorbit.com> Date: Fri May 20 10:32:10 2016 +1000 Merge branch 'xfs-4.7-optimise-inline-symlinks' into for-next commit d6bd9615abdf89b147eb200ea4f63156af8a279e Merge: 8b7a242 710b1e2 Author: Dave Chinner <david@fromorbit.com> Date: Fri May 20 10:31:52 2016 +1000 Merge branch 'xfs-4.7-trans-type-cleanup' into for-next commit 8b7a242e53e20dc3f2a071ff4d3d8dfa063174dd Merge: ce5c767 690a787 Author: Dave Chinner <david@fromorbit.com> Date: Fri May 20 10:31:29 2016 +1000 Merge branch 'xfs-4.7-writeback-bio' into for-next commit 690a7871225b7f91f8fe13c465a79e183a61cfe3 Author: Christoph Hellwig <hch@lst.de> Date: Fri May 20 10:29:15 2016 +1000 xfs: fix warning in xfs_finish_page_writeback for non-debug builds blockmask is unused if ASSERTs are disabled. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de> fs/xfs/xfs_aops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit feaa7cb5c59416143432829b15826be76605b8fe Merge: e0fb1b3 1fa9a1a Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 17:25:13 2016 -0700 Merge tag 'md/4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md Pull MD updates from Shaohua Li: "Several patches from Guoqing fixing md-cluster bugs and several patches from Heinz fixing dm-raid bugs" * tag 'md/4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md: md-cluster: check the return value of process_recvd_msg md-cluster: gather resync infos and enable recv_thread after bitmap is ready md: set MD_CHANGE_PENDING in a atomic region md: raid5: add prerequisite to run underneath dm-raid md: raid10: add prerequisite to run underneath dm-raid md: md.c: fix oops in mddev_suspend for raid0 md-cluster: fix ifnullfree.cocci warnings md-cluster/bitmap: unplug bitmap to sync dirty pages to disk md-cluster/bitmap: fix wrong page num in bitmap_file_clear_bit and bitmap_file_set_bit md-cluster/bitmap: fix wrong calcuation of offset md-cluster: sync bitmap when node received RESYNCING msg md-cluster: always setup in-memory bitmap md-cluster: wakeup thread if activated a spare disk md-cluster: change array_sectors and update size are not supported md-cluster: fix locking when node joins cluster during message broadcast md-cluster: unregister thread if err happened md-cluster: wake up thread to continue recovery md-cluser: make resync_finish only called after pers->sync_request md-cluster: change resync lock from asynchronous to synchronous commit e0fb1b36398487475e0d2c50264e4ec1eaed3e11 Merge: f4c80d5 6c0b43d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 17:07:04 2016 -0700 Merge tag 'iommu-updates-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu Pull IOMMU updates from Joerg Roedel: "The updates include: - rate limiting for the VT-d fault handler - remove statistics code from the AMD IOMMU driver. It is unused and should be replaced by something more generic if needed - per-domain pagesize-bitmaps in IOMMU core code to support systems with different types of IOMMUs - support for ACPI devices in the AMD IOMMU driver - 4GB mode support for Mediatek IOMMU driver - ARM-SMMU updates from Will Deacon: - support for 64k pages with SMMUv1 implementations (e.g MMU-401) - remove open-coded 64-bit MMIO accessors - initial support for 16-bit VMIDs, as supported by some ThunderX SMMU implementations - a couple of errata workarounds for silicon in the field - various fixes here and there" * tag 'iommu-updates-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (44 commits) iommu/arm-smmu: Use per-domain page sizes. iommu/amd: Remove statistics code iommu/dma: Finish optimising higher-order allocations iommu: Allow selecting page sizes per domain iommu: of: enforce const-ness of struct iommu_ops iommu: remove unused priv field from struct iommu_ops iommu/dma: Implement scatterlist segment merging iommu/arm-smmu: Clear cache lock bit of ACR iommu/arm-smmu: Support SMMUv1 64KB supplement iommu/arm-smmu: Decouple context format from kernel config iommu/arm-smmu: Tidy up 64-bit/atomic I/O accesses io-64-nonatomic: Add relaxed accessor variants iommu/arm-smmu: Work around MMU-500 prefetch errata iommu/arm-smmu: Convert ThunderX workaround to new method iommu/arm-smmu: Differentiate specific implementations iommu/arm-smmu: Workaround for ThunderX erratum #27704 iommu/arm-smmu: Add support for 16 bit VMID iommu/amd: Move get_device_id() and friends to beginning of file iommu/amd: Don't use IS_ERR_VALUE to check integer values iommu/amd: Signedness bug in acpihid_device_group() ... commit 4d9a2c8746671efbb0c27d3ae28c7474597a7aad Author: Jan Kara <jack@suse.cz> Date: Thu May 12 18:29:20 2016 +0200 dax: Remove i_mmap_lock protection Currently faults are protected against truncate by filesystem specific i_mmap_sem and page lock in case of hole page. Cow faults are protected DAX radix tree entry locking. So there's no need for i_mmap_lock in DAX code. Remove it. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> fs/dax.c | 24 +++++------------------- mm/memory.c | 2 -- 2 files changed, 5 insertions(+), 21 deletions(-) commit bc2466e4257369d0ebee2b6265070d323343fa72 Author: Jan Kara <jack@suse.cz> Date: Thu May 12 18:29:19 2016 +0200 dax: Use radix tree entry lock to protect cow faults When doing cow faults, we cannot directly fill in PTE as we do for other faults as we rely on generic code to do proper accounting of the cowed page. We also have no page to lock to protect against races with truncate as other faults have and we need the protection to extend until the moment generic code inserts cowed page into PTE thus at that point we have no protection of fs-specific i_mmap_sem. So far we relied on using i_mmap_lock for the protection however that is completely special to cow faults. To make fault locking more uniform use DAX entry lock instead. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> fs/dax.c | 12 +++++------- include/linux/dax.h | 7 +++++++ include/linux/mm.h | 7 +++++++ mm/memory.c | 38 ++++++++++++++++++-------------------- 4 files changed, 37 insertions(+), 27 deletions(-) commit ac401cc782429cc8560ce4840b1405d603740917 Author: Jan Kara <jack@suse.cz> Date: Thu May 12 18:29:18 2016 +0200 dax: New fault locking Currently DAX page fault locking is racy. CPU0 (write fault) CPU1 (read fault) __dax_fault() __dax_fault() get_block(inode, block, &bh, 0) -> not mapped get_block(inode, block, &bh, 0) -> not mapped if (!buffer_mapped(&bh)) if (vmf->flags & FAULT_FLAG_WRITE) get_block(inode, block, &bh, 1) -> allocates blocks if (page) -> no if (!buffer_mapped(&bh)) if (vmf->flags & FAULT_FLAG_WRITE) { } else { dax_load_hole(); } dax_insert_mapping() And we are in a situation where we fail in dax_radix_entry() with -EIO. Another problem with the current DAX page fault locking is that there is no race-free way to clear dirty tag in the radix tree. We can always end up with clean radix tree and dirty data in CPU cache. We fix the first problem by introducing locking of exceptional radix tree entries in DAX mappings acting very similarly to page lock and thus synchronizing properly faults against the same mapping index. The same lock can later be used to avoid races when clearing radix tree dirty tag. Reviewed-by: NeilBrown <neilb@suse.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> fs/dax.c | 553 ++++++++++++++++++++++++++++++++++++++-------------- include/linux/dax.h | 3 + mm/filemap.c | 9 +- mm/truncate.c | 62 +++--- 4 files changed, 447 insertions(+), 180 deletions(-) commit 4f622938a5e2b7f1374ffb1e5fc212744898f513 Author: Jan Kara <jack@suse.cz> Date: Thu May 12 18:29:17 2016 +0200 dax: Allow DAX code to replace exceptional entries Currently we forbid page_cache_tree_insert() to replace exceptional radix tree entries for DAX inodes. However to make DAX faults race free we will lock radix tree entries and when hole is created, we need to replace such locked radix tree entry with a hole page. So modify page_cache_tree_insert() to allow that. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> include/linux/dax.h | 1 + mm/filemap.c | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) commit e804315dd0f574b56155c5a2406ab5e0318104f7 Author: Jan Kara <jack@suse.cz> Date: Thu May 12 18:29:16 2016 +0200 dax: Define DAX lock bit for radix tree exceptional entry We will use lowest available bit in the radix tree exceptional entry for locking of the entry. Define it. Also clean up definitions of DAX entry type bits in DAX exceptional entries to use defined constants instead of hardcoding numbers and cleanup checking of these bits to not rely on how other bits in the entry are set. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> fs/dax.c | 17 +++++++++++------ include/linux/dax.h | 3 +++ 2 files changed, 14 insertions(+), 6 deletions(-) commit 348e967ab07c96a9e7a6a194812254a8df2045c0 Author: Jan Kara <jack@suse.cz> Date: Thu May 12 18:29:15 2016 +0200 dax: Make huge page handling depend of CONFIG_BROKEN Currently the handling of huge pages for DAX is racy. For example the following can happen: CPU0 (THP write fault) CPU1 (normal read fault) __dax_pmd_fault() __dax_fault() get_block(inode, block, &bh, 0) -> not mapped get_block(inode, block, &bh, 0) -> not mapped if (!buffer_mapped(&bh) && write) get_block(inode, block, &bh, 1) -> allocates blocks truncate_pagecache_range(inode, lstart, lend); dax_load_hole(); This results in data corruption since process on CPU1 won't see changes into the file done by CPU0. The race can happen even if two normal faults race however with THP the situation is even worse because the two faults don't operate on the same entries in the radix tree and we want to use these entries for serialization. So make THP support in DAX code depend on CONFIG_BROKEN for now. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> fs/Kconfig | 1 + fs/dax.c | 2 +- include/linux/dax.h | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) commit b9953536c95fd0013695542bfa4694c7468673aa Author: Jan Kara <jack@suse.cz> Date: Thu May 12 18:29:14 2016 +0200 dax: Fix condition for filling of PMD holes Currently dax_pmd_fault() decides to fill a PMD-sized hole only if returned buffer has BH_Uptodate set. However that doesn't get set for any mapping buffer so that branch is actually a dead code. The BH_Uptodate check doesn't make any sense so just remove it. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com> fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef56b79b66faeeb0dc14213d3cc9e0534a960dee Author: Maxime Ripard <maxime.ripard@free-electrons.com> Date: Fri May 13 10:00:31 2016 +0200 clk: fix critical clock locking The critical clock handling in __clk_core_init isn't taking the enable lock before calling clk_core_enable, which in turns triggers the warning in the lockdep_assert_held call in that function when lockep is enabled. Add the calls to clk_enable_lock/unlock to make sure it doesn't happen. Fixes: 32b9b1096186 ("clk: Allow clocks to be marked as CRITICAL") Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> drivers/clk/clk.c | 5 +++++ 1 file changed, 5 insertions(+) commit f70552809419cd2abc0cc6469a07c9792a3aaa6c Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 14:11:52 2016 +1000 vfio_pci: Test for extended capabilities if config space > 256 bytes PCI-Express spec says that reading 4 bytes at offset 100h should return zero if there is no extended capability so VFIO reads this dword to know if there are extended capabilities. However it is not always possible to access the extended space so generic PCI code in pci_cfg_space_size_ext() checks if pci_read_config_dword() can read beyond 100h and if the check fails, it sets the config space size to 100h. VFIO does its own extended capabilities check by reading at offset 100h which may produce 0xffffffff which VFIO treats as the extended config space presense and calls vfio_ecap_init() which fails to parse capabilities (which is expected) but right before the exit, it writes zero at offset 100h which is beyond the buffer allocated for vdev->vconfig (which is 256 bytes) which leads to random memory corruption. This makes VFIO only check for the extended capabilities if the discovered config size is more than 256 bytes. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Alex Williamson <alex.williamson@redhat.com> drivers/vfio/pci/vfio_pci_config.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit f4c80d5a16eb4b08a0d9ade154af1ebdc63f5752 Merge: 7afd16f 17e1717 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 13:41:32 2016 -0700 Merge tag 'sound-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound Pull sound updates from Takashi Iwai: "This time was again a relatively calm development cycle; most of updates are about drivers, and no radical changes are seen in any core code. Here are some highlights: ALSA core: - Continued hardening of ALSA hrtimer - A few leak fixes in timer interface - Fix poll error handling in PCM and compress - Add error propagation in compress API - Removal of dead rtctimer driver HD-audio: - Native ELD notify support for i915 HDMI - Realtek ALC234 & co support - Code refactoring to standardize chmap support - Continued development for SKL HDMI core support Firewire: - Apply delayed card registration to all drivers - Improved / stabilized the handling of PCM stream start / stop - Add tracepoints to dump a part of isochronous packet data - Fixed incoming/outgoing packet parameter usages - Add support for M-Audio profire series USB-audio: - Fixes for UAC2 clock source - SS+ support - Workaround for oft-seen repeated sample rate read errors ASoC: - Further slow progress on the topology code - Substantial updates and improvements for the da7219, es8328, fsl-ssi, Intel and rcar drivers. - Compress error handling in WM ADSP driver" * tag 'sound-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (177 commits) ALSA: firewire-lib: change a member of event structure to suppress sparse wanings to bool type sound: oss: Use setup_timer and mod_timer. ASoC: hdac_hdmi: Remove the unused 'timeout' variable ASoC: fsl_ssi: Fix channel slipping on capture (or playback) restart in full duplex. ASoC: fsl_ssi: Fix channel slipping in Playback at startup ASoC: fsl_ssi: Fix samples being dropped at Playback startup ASoC: fsl_ssi: Save a dev reference for dev_err() purpose. ASoC: fsl_ssi: The IPG/5 limitation concerns the bitclk, not the sysclk. ASoC: fsl_ssi: Real hardware channels max number is 32 ASoC: pcm5102a: Add support for PCM5102A codec ASoC: hdac_hdmi: add link management ASoC: Intel: Skylake: add link management ALSA: hdac: add link pm and ref counting ALSA: au88x0: Fix zero clear of stream->resources ASoC: rt298: Add DMI match for Broxton-P reference platform ASoC: rt298: fix null deref on acpi driver data ASoC: dapm: deprecate MICBIAS widget type ALSA: firewire-lib: drop skip argument from helper functions to queue a packet ALSA: firewire-lib: add context information to tracepoints ALSA: firewire-lib: permit to flush queued packets only in process context for better PCM period granularity ... commit 7afd16f882887c9adc69cd1794f5e57777723217 Merge: a37571a e257ef5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 13:10:54 2016 -0700 Merge tag 'pci-v4.7-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI updates from Bjorn Helgaas: "Enumeration: - Refine PCI support check in pcibios_init() (Adrian-Ken Rueegsegger) - Provide common functions for ECAM mapping (Jayachandran C) - Allow all PCIe services on non-ACPI host bridges (Jon Derrick) - Remove return values from pcie_port_platform_notify() and relatives (Jon Derrick) - Widen portdrv service type from 4 bits to 8 bits (Keith Busch) - Add Downstream Port Containment portdrv service type (Keith Busch) - Add Downstream Port Containment driver (Keith Busch) Resource management: - Identify Enhanced Allocation (EA) BAR Equivalent resources in sysfs (Alex Williamson) - Supply CPU physical address (not bus address) to iomem_is_exclusive() (Bjorn Helgaas) - alpha: Call iomem_is_exclusive() for IORESOURCE_MEM, but not IORESOURCE_IO (Bjorn Helgaas) - Mark Broadwell-EP Home Agent 1 as having non-compliant BARs (Prarit Bhargava) - Disable all BAR sizing for devices with non-compliant BARs (Prarit Bhargava) - Move PCI I/O space management from OF to PCI core code (Tomasz Nowicki) PCI device hotplug: - acpiphp_ibm: Avoid uninitialized variable reference (Dan Carpenter) - Use cached copy of PCI_EXP_SLTCAP_HPC bit (Lukas Wunner) Virtualization: - Mark Intel i40e NIC INTx masking as broken (Alex Williamson) - Reverse standard ACS vs device-specific ACS enabling (Alex Williamson) - Work around Intel Sunrise Point PCH incorrect ACS capability (Alex Williamson) IOMMU: - Add pci_add_dma_alias() to abstract implementation (Bjorn Helgaas) - Move informational printk to pci_add_dma_alias() (Bjorn Helgaas) - Add support for multiple DMA aliases (Jacek Lawrynowicz) - Add DMA alias quirk for mic_x200_dma (Jacek Lawrynowicz) Thunderbolt: - Fix double free of drom buffer (Andreas Noever) - Add Intel Thunderbolt device IDs (Lukas Wunner) - Fix typos and magic number (Lukas Wunner) - Support 1st gen Light Ridge controller (Lukas Wunner) Generic host bridge driver: - Use generic ECAM API (Jayachandran C) Cavium ThunderX host bridge driver: - Don't clobber read-only bits in bridge config registers (David Daney) - Use generic ECAM API (Jayachandran C) Freescale i.MX6 host bridge driver: - Use enum instead of bool for variant indicator (Andrey Smirnov) - Implement reset sequence for i.MX6+ (Andrey Smirnov) - Factor out ref clock enable (Bjorn Helgaas) - Add initial imx6sx support (Christoph Fritz) - Add reset-gpio-active-high boolean property to DT (Petr Štetiar) - Add DT property for link gen, default to Gen1 (Tim Harvey) - dts: Specify imx6qp version of PCIe core (Andrey Smirnov) - dts: Fix PCIe reset GPIO polarity on Toradex Apalis Ixora (Petr Štetiar) Marvell Armada host bridge driver: - add DT binding for Marvell Armada 7K/8K PCIe controller (Thomas Petazzoni) - Add driver for Marvell Armada 7K/8K PCIe controller (Thomas Petazzoni) Marvell MVEBU host bridge driver: - Constify mvebu_pcie_pm_ops structure (Jisheng Zhang) - Use SET_NOIRQ_SYSTEM_SLEEP_PM_OPS for mvebu_pcie_pm_ops (Jisheng Zhang) Microsoft Hyper-V host bridge driver: - Report resources release after stopping the bus (Vitaly Kuznetsov) - Add explicit barriers to config space access (Vitaly Kuznetsov) Renesas R-Car host bridge driver: - Select PCI_MSI_IRQ_DOMAIN (Arnd Bergmann) Synopsys DesignWare host bridge driver: - Remove incorrect RC memory base/limit configuration (Gabriele Paoloni) - Move Root Complex setup code to dw_pcie_setup_rc() (Jisheng Zhang) TI Keystone host bridge driver: - Add error IRQ handler (Murali Karicheri) - Remove unnecessary goto statement (Murali Karicheri) Miscellaneous: - Fix spelling errors (Colin Ian King)" * tag 'pci-v4.7-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (48 commits) PCI: Disable all BAR sizing for devices with non-compliant BARs x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs PCI: Identify Enhanced Allocation (EA) BAR Equivalent resources in sysfs PCI, of: Move PCI I/O space management to PCI core code PCI: generic, thunder: Use generic ECAM API PCI: Provide common functions for ECAM mapping PCI: hv: Add explicit barriers to config space access PCI: Use cached copy of PCI_EXP_SLTCAP_HPC bit PCI: Add Downstream Port Containment driver PCI: Add Downstream Port Containment portdrv service type PCI: Widen portdrv service type from 4 bits to 8 bits PCI: designware: Remove incorrect RC memory base/limit configuration PCI: hv: Report resources release after stopping the bus ARM: dts: imx6qp: Specify imx6qp version of PCIe core PCI: imx6: Implement reset sequence for i.MX6+ PCI: imx6: Use enum instead of bool for variant indicator PCI: thunder: Don't clobber read-only bits in bridge config registers thunderbolt: Fix double free of drom buffer PCI: rcar: Select PCI_MSI_IRQ_DOMAIN PCI: armada: Add driver for Marvell Armada 7K/8K PCIe controller ... commit a37571a29eca963562ff5a9233db4a5c73c72cf9 Merge: a0d3c7c 0d53583 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 12:50:56 2016 -0700 Merge tag 'pinctrl-v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control updates from Linus Walleij: "This kernel cycle was quite calm when it comes to pin control and there is really just one major change, and that is the introduction of devm_pinctrl_register() managed resources. Apart from that linear development, details below. Core changes: - Add the devm_pinctrl_register() API and switch all applicable drivers to use it, saving lots of lines of code all over the place. New drivers: - driver for the Broadcom NS2 SoC - subdriver for the PXA25x SoCs - subdriver for the AMLogic Meson GXBB SoC Driver improvements: - the Intel Baytrail driver now properly supports pin control - Nomadik, Rockchip, Broadcom BCM2835 support the .get_direction() callback in the GPIO portions - continued development and stabilization of several SH-PFC SoC subdrivers: r8a7795, r8a7790, r8a7794 etc" * tag 'pinctrl-v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: (85 commits) Revert "pinctrl: tegra: avoid parked_reg and parked_bank" pinctrl: meson: Fix eth_tx_en bit index pinctrl: tegra: avoid parked_reg and parked_bank pinctrl: tegra: Correctly check the supported configuration pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC pinctrl: rockchip: fix pull setting error for rk3399 pinctrl: stm32: Implement .pin_config_dbg_show() pinctrl: nomadik: hide nmk_gpio_get_mode when unused pinctrl: ns2: rename pinctrl_utils_dt_free_map pinctrl: at91: Merge clk_prepare and clk_enable into clk_prepare_enable pinctrl: at91: Make at91_gpio_template const pinctrl: baytrail: fix some error handling in debugfs pinctrl: ns2: add pinmux driver support for Broadcom NS2 SoC pinctrl: sirf/atlas7: trivial fix of spelling mistake on flagged pinctrl: sh-pfc: Kill unused variable in sh_pfc_remove() pinctrl: nomadik: implement .get_direction() pinctrl: nomadik: use BIT() with offsets consequently pinctrl: exynos5440: Use off-stack memory for pinctrl_gpio_range pinctrl: zynq: Use devm_pinctrl_register() for pinctrl registration pinctrl: u300: Use devm_pinctrl_register() for pinctrl registration ... commit e22cb5e787623a98e22a2660041b455a2c138b02 Merge: 6104503 ebe24ce Author: David S. Miller <davem@davemloft.net> Date: Thu May 19 11:51:14 2016 -0700 Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge Antonio Quartulli says: ==================== During the Wireless Battle Mesh v9 in Porto (PT) at the beginning of May, we managed to uncover and fix some important bugs in our new B.A.T.M.A.N. V algorithm. These are the fixes we came up with together with others that I collected in the past weeks: - avoid potential crash due to NULL pointer dereference in B.A.T.M.A.N. V routine when a neigh_ifinfo object is not found, by Sven Eckelmann - avoid use-after-free of skb when counting outgoing bytes, by Florian Westphal - fix neigh_ifinfo object reference counting imbalance when using B.A.T.M.A.N. V, by Sven Eckelmann. Such imbalance may lead to the impossibility of releasing the related netdev object on shutdown - avoid invalid memory access in case of error while allocating bcast_own_sum when a new hard-interface is added, by Sven Eckelmann - ensure originator address is updated in OMG/ELP packet content upon primary interface address change, by Antonio Quartulli - fix integer overflow when computing TQ metric (B.A.T.M.A.N. IV), by Sven Eckelmann - avoid race condition while adding new neigh_node which would result in having two objects mapping to the same physical neighbour, by Linus Lüssing - ensure originator address is initialized in ELP packet content on secondary interfaces, by Marek Lindner ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 6104503cddbbaf341c091fa900d93488d6342ad6 Author: Amit Ghadge <amitg.b14@gmail.com> Date: Wed May 18 06:46:30 2016 +0530 net: Fix coding style warnings and errors. This is a patch to clean checkpatch warnings and errors in the Space.c file. Clean up the following warnings and errors. WARNING : * Block comments use * on subsequent lines * Missing a blank line after declarations * networking block comments don't use an empty /* line, use /* * please, no space before tabs * please, no spaces at the start of a line * line over 80 characters ERROR : * code indent should use tabs where possible * space prohibited after that open parenthesis '(' Signed-off-by: Amit Ghadge <amitg.b14@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/Space.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) commit a0d3c7c5c07cfbe00ab89438ddf82482f5a99422 Merge: ec67b14 f9114a5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 11:47:18 2016 -0700 Merge tag 'dmaengine-4.7-rc1' of git://git.infradead.org/users/vkoul/slave-dma Pull dmaengine updates from Vinod Koul: "This time round the update brings in following changes: - new tegra driver for ADMA device - support for Xilinx AXI Direct Memory Access Engine and Xilinx AXI Central Direct Memory Access Engine and few updates to this driver - new cyclic capability to sun6i and few updates - slave-sg support in bcm2835 - updates to many drivers like designware, hsu, mv_xor, pxa, edma, qcom_hidma & bam" * tag 'dmaengine-4.7-rc1' of git://git.infradead.org/users/vkoul/slave-dma: (84 commits) dmaengine: ioatdma: disable relaxed ordering for ioatdma dmaengine: of_dma: approximate an average distribution dmaengine: core: Use IS_ENABLED() instead of checking for built-in or module dmaengine: edma: Re-evaluate errors when ccerr is triggered w/o error event dmaengine: qcom_hidma: add support for object hierarchy dmaengine: qcom_hidma: add debugfs hooks dmaengine: qcom_hidma: implement lower level hardware interface dmaengine: vdma: Add clock support Documentation: DT: vdma: Add clock support for dmas dmaengine: vdma: Add config structure to differentiate dmas MAINTAINERS: Update Tegra DMA maintainers dmaengine: tegra-adma: Add support for Tegra210 ADMA Documentation: DT: Add binding documentation for NVIDIA ADMA dmaengine: vdma: Add Support for Xilinx AXI Central Direct Memory Access Engine Documentation: DT: vdma: update binding doc for AXI CDMA dmaengine: vdma: Add Support for Xilinx AXI Direct Memory Access Engine Documentation: DT: vdma: update binding doc for AXI DMA dmaengine: vdma: Rename xilinx_vdma_ prefix to xilinx_dma dmaengine: slave means at least one of DMA_SLAVE, DMA_CYCLIC dmaengine: mv_xor: Allow selecting mv_xor for mvebu only compatible SoC ... commit 87553aa5212f43d3d14b9b5d1dfba89f1a6e6f21 Merge: e00be9e b91083a Author: David S. Miller <davem@davemloft.net> Date: Thu May 19 11:36:50 2016 -0700 Merge branch 'tcp_bh_fixes' Eric Dumazet says: ==================== net: block BH in TCP callbacks Four layers using TCP stack were assuming sk_callback_lock could be locked using read_lock() in their handlers because TCP stack was running with BH disabled. This is no longer the case. Since presumably the rest could also depend on BH being disabled, just use read_lock_bh(). Then each layer might consider switching to RCU protection and no longer depend on BH. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit b91083a45e4c41b8c952cf02ceb0ce16f0b1b9b1 Author: Eric Dumazet <edumazet@google.com> Date: Tue May 17 17:44:09 2016 -0700 tipc: block BH in TCP callbacks TCP stack can now run from process context. Use read_lock_bh(&sk->sk_callback_lock) variant to restore previous assumption. Fixes: 5413d1babe8f ("net: do not block BH while processing socket backlog") Fixes: d41a69f1d390 ("tcp: make tcp_sendmsg() aware of socket backlog") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Jon Maloy <jon.maloy@ericsson.com> Cc: Ying Xue <ying.xue@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/tipc/server.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 38036629cded6b96a9f9689758a88d067c4d4d44 Author: Eric Dumazet <edumazet@google.com> Date: Tue May 17 17:44:08 2016 -0700 rds: tcp: block BH in TCP callbacks TCP stack can now run from process context. Use read_lock_bh(&sk->sk_callback_lock) variant to restore previous assumption. Fixes: 5413d1babe8f ("net: do not block BH while processing socket backlog") Fixes: d41a69f1d390 ("tcp: make tcp_sendmsg() aware of socket backlog") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/rds/tcp_connect.c | 4 ++-- net/rds/tcp_listen.c | 4 ++-- net/rds/tcp_recv.c | 4 ++-- net/rds/tcp_send.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) commit e1daca289a36965d923ec26647b5668e023eb0ac Author: Eric Dumazet <edumazet@google.com> Date: Tue May 17 17:44:07 2016 -0700 ocfs2/cluster: block BH in TCP callbacks TCP stack can now run from process context. Use read_lock_bh() variant to restore previous assumption. Fixes: 5413d1babe8f ("net: do not block BH while processing socket backlog") Fixes: d41a69f1d390 ("tcp: make tcp_sendmsg() aware of socket backlog") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> fs/ocfs2/cluster/tcp.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) commit 7cb001d4c4fa7e1cc1a55388a9544e160dddc610 Author: Eric Dumazet <edumazet@google.com> Date: Tue May 17 17:44:06 2016 -0700 scsi_tcp: block BH in TCP callbacks iscsi_sw_tcp_data_ready() and iscsi_sw_tcp_state_change() were using read_lock(&sk->sk_callback_lock) which is fine if caller disabled BH. TCP stack no longer has this requirement and can run from process context. Use read_lock_bh() variant to restore previous assumption. Ideally this code could use RCU instead... Fixes: 5413d1babe8f ("net: do not block BH while processing socket backlog") Fixes: d41a69f1d390 ("tcp: make tcp_sendmsg() aware of socket backlog") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Mike Christie <michaelc@cs.wisc.edu> Cc: Venkatesh Srinivas <venkateshs@google.com> Acked-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/scsi/iscsi_tcp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit ec67b14c1be4ebe4cf08f06746a8d0313ab85432 Merge: 7beaa24 5bcba79 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 11:36:26 2016 -0700 Merge tag 'localmodconfig-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig Pull localmodconfig updates from Steven Rostedt. "Benjamin Poirier added some minor fixes and clean ups to localmodconfig. One is a fix for making sure that module signing still works when coming from a different environment. If original keys are not found it will warn and reset the keys to their default value" * tag 'localmodconfig-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig: localmodconfig: Fix whitespace repeat count after "tristate" localmodconfig: Reset certificate paths localmodconfig: Add missing $ to reference a variable localmodconfig: Fix parsing of "help" text localmodconfig: Recognize more keywords that end a menu entry localmodconfig: Fix parsing of Kconfig "source" statements commit e00be9e4d0ffcc0121606229f0aa4b246d6881d7 Author: xypron.glpk@gmx.de <xypron.glpk@gmx.de> Date: Wed May 18 02:13:30 2016 +0200 net: pegasus: remove dead coding (!count || count < 4) is always true. So let's remove the coding which is dead at least since 2005. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/usb/pegasus.c | 53 ----------------------------------------------- 1 file changed, 53 deletions(-) commit 074ba1e232f5a562ddd87e6ed0b342faae0aeb9b Author: xypron.glpk@gmx.de <xypron.glpk@gmx.de> Date: Wed May 18 01:58:45 2016 +0200 net: au1000 eth: simplify logical expression (a && a > 0) is equivalent to (a > 0). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/amd/au1000_eth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 30119059703f94e9e4936477bc33e918fb41e9c8 Author: xypron.glpk@gmx.de <xypron.glpk@gmx.de> Date: Wed May 18 00:06:02 2016 +0200 net: irda: avoid null pointer dereference Only dereference variable self after checking it is not NULL. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/irda/nsc-ircc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit d113412859e49620ce8fe67d5ff9f34fe5006f99 Author: xypron.glpk@gmx.de <xypron.glpk@gmx.de> Date: Tue May 17 23:58:40 2016 +0200 net: ieee802154/adf7242: syntax error ifdef DEBUG If DEBUG is defined, a superfluous closing brace is introduced. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ieee802154/adf7242.c | 1 - 1 file changed, 1 deletion(-) commit 7beaa24ba49717419e24d1f6321e8b3c265a719c Merge: 07b7526 9842df6 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 11:27:09 2016 -0700 Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm Pull KVM updates from Paolo Bonzini: "Small release overall. x86: - miscellaneous fixes - AVIC support (local APIC virtualization, AMD version) s390: - polling for interrupts after a VCPU goes to halted state is now enabled for s390 - use hardware provided information about facility bits that do not need any hypervisor activity, and other fixes for cpu models and facilities - improve perf output - floating interrupt controller improvements. MIPS: - miscellaneous fixes PPC: - bugfixes only ARM: - 16K page size support - generic firmware probing layer for timer and GIC Christoffer Dall (KVM-ARM maintainer) says: "There are a few changes in this pull request touching things outside KVM, but they should all carry the necessary acks and it made the merge process much easier to do it this way." though actually the irqchip maintainers' acks didn't make it into the patches. Marc Zyngier, who is both irqchip and KVM-ARM maintainer, later acked at http://mid.gmane.org/573351D1.4060303@arm.com ('more formally and for documentation purposes')" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (82 commits) KVM: MTRR: remove MSR 0x2f8 KVM: x86: make hwapic_isr_update and hwapic_irr_update look the same svm: Manage vcpu load/unload when enable AVIC svm: Do not intercept CR8 when enable AVIC svm: Do not expose x2APIC when enable AVIC KVM: x86: Introducing kvm_x86_ops.apicv_post_state_restore svm: Add VMEXIT handlers for AVIC svm: Add interrupt injection via AVIC KVM: x86: Detect and Initialize AVIC support svm: Introduce new AVIC VMCB registers KVM: split kvm_vcpu_wake_up from kvm_vcpu_kick KVM: x86: Introducing kvm_x86_ops VCPU blocking/unblocking hooks KVM: x86: Introducing kvm_x86_ops VM init/destroy hooks KVM: x86: Rename kvm_apic_get_reg to kvm_lapic_get_reg KVM: x86: Misc LAPIC changes to expose helper functions KVM: shrink halt polling even more for invalid wakeups KVM: s390: set halt polling to 80 microseconds KVM: halt_polling: provide a way to qualify wakeups during poll KVM: PPC: Book3S HV: Re-enable XICS fast path for irqfd-generated interrupts kvm: Conditionally register IRQ bypass consumer ... commit f1971a2e0393a86464caa77aa52168b731960dfa Author: WANG Cong <xiyou.wangcong@gmail.com> Date: Tue May 17 14:05:49 2016 -0700 kcm: fix a signedness in kcm_splice_read() skb_splice_bits() returns int, kcm_splice_read() returns ssize_t, both are signed. We may need another patch to make them all ssize_t, but that deserves a separated patch. Fixes: 91687355b927 ("kcm: Splice support") Reported-by: David Binderman <linuxdev.baldrick@gmail.com> Cc: Tom Herbert <tom@herbertland.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/kcm/kcmsock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1740c29a46b30a2f157afc473156f157e599d4c2 Author: xypron.glpk@gmx.de <xypron.glpk@gmx.de> Date: Tue May 17 22:28:54 2016 +0200 net: ehea: avoid null pointer dereference ehea_get_port may return NULL. Do not dereference NULL value. Fixes: 8c4877a4128e ("ehea: Use the standard logging functions") Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@debian.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/ibm/ehea/ehea_main.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 099a728d5819da80ff9fff3df980ea6e89a01e60 Author: xypron.glpk@gmx.de <xypron.glpk@gmx.de> Date: Tue May 17 21:40:38 2016 +0200 net: thunderx: avoid null pointer dereference In function bgx_lmac_handler only use a member of lmac after checking it is not null. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: David Daney <david.daney@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/cavium/thunder/thunder_bgx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 07b75260ebc2c789724c594d7eaf0194fa47b3be Merge: 0efacbb 6e4ad1b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 10:02:26 2016 -0700 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus Pull MIPS updates from Ralf Baechle: "This is the main pull request for MIPS for 4.7. Here's the summary of the changes: - ATH79: Support for DTB passuing using the UHI boot protocol - ATH79: Remove support for builtin DTB. - ATH79: Add zboot debug serial support. - ATH79: Add initial support for Dragino MS14 (Dragine 2), Onion Omega and DPT-Module. - ATH79: Update devicetree clock support for AR9132 and AR9331. - ATH79: Cleanup the DT code. - ATH79: Support newer SOCs in ath79_ddr_ctrl_init. - ATH79: Fix regression in PCI window initialization. - BCM47xx: Move SPROM driver to drivers/firmware/ - BCM63xx: Enable partition parser in defconfig. - BMIPS: BMIPS5000 has I cache filing from D cache - BMIPS: BMIPS: Add cpu-feature-overrides.h - BMIPS: Add Whirlwind support - BMIPS: Adjust mips-hpt-frequency for BCM7435 - BMIPS: Remove maxcpus from BCM97435SVMB DTS - BMIPS: Add missing 7038 L1 register cells to BCM7435 - BMIPS: Various tweaks to initialization code. - BMIPS: Enable partition parser in defconfig. - BMIPS: Cache tweaks. - BMIPS: Add UART, I2C and SATA devices to DT. - BMIPS: Add BCM6358 and BCM63268support - BMIPS: Add device tree example for BCM6358. - BMIPS: Improve Improve BCM6328 and BCM6368 device trees - Lantiq: Add support for device tree file from boot loader - Lantiq: Allow build with no built-in DT. - Loongson 3: Reserve 32MB for RS780E integrated GPU. - Loongson 3: Fix build error after ld-version.sh modification - Loongson 3: Move chipset ACPI code from drivers to arch. - Loongson 3: Speedup irq processing. - Loongson 3: Add basic Loongson 3A support. - Loongson 3: Set cache flush handlers to nop. - Loongson 3: Invalidate special TLBs when needed. - Loongson 3: Fast TLB refill handler. - MT7620: Fallback strategy for invalid syscfg0. - Netlogic: Fix CP0_EBASE redefinition warnings - Octeon: Initialization fixes - Octeon: Add DTS files for the D-Link DSR-1000N and EdgeRouter Lite - Octeon: Enable add Octeon-drivers in cavium_octeon_defconfig - Octeon: Correctly handle endian-swapped initramfs images. - Octeon: Support CN73xx, CN75xx and CN78xx. - Octeon: Remove dead code from cvmx-sysinfo. - Octeon: Extend number of supported CPUs past 32. - Octeon: Remove some code limiting NR_IRQS to 255. - Octeon: Simplify octeon_irq_ciu_gpio_set_type. - Octeon: Mark some functions __init in smp.c - Octeon: Octeon: Add Octeon III CN7xxx interface detection - PIC32: Add serial driver and bindings for it. - PIC32: Add PIC32 deadman timer driver and bindings. - PIC32: Add PIC32 clock timer driver and bindings. - Pistachio: Determine SoC revision during boot - Sibyte: Fix Kconfig dependencies of SIBYTE_BUS_WATCHER. - Sibyte: Strip redundant comments from bcm1480_regs.h. - Panic immediately if panic_on_oops is set. - module: fix incorrect IS_ERR_VALUE macro usage. - module: Make consistent use of pr_* - Remove no longer needed work_on_cpu() call. - Remove CONFIG_IPV6_PRIVACY from defconfigs. - Fix registers of non-crashing CPUs in dumps. - Handle MIPSisms in new vmcore_elf32_check_arch. - Select CONFIG_HANDLE_DOMAIN_IRQ and make it work. - Allow RIXI to be used on non-R2 or R6 cores. - Reserve nosave data for hibernation - Fix siginfo.h to use strict POSIX types. - Don't unwind user mode with EVA. - Fix watchpoint restoration - Ptrace watchpoints for R6. - Sync icache when it fills from dcache - I6400 I-cache fills from dcache. - Various MSA fixes. - Cleanup MIPS_CPU_* definitions. - Signal: Move generic copy_siginfo to signal.h - Signal: Fix uapi include in exported asm/siginfo.h - Timer fixes for sake of KVM. - XPA TLB refill fixes. - Treat perf counter feature - Update John Crispin's email address - Add PIC32 watchdog and bindings. - Handle R10000 LL/SC bug in set_pte() - cpufreq: Various fixes for Longson1. - R6: Fix R2 emulation. - mathemu: Cosmetic fix to ADDIUPC emulation, plenty of other small fixes - ELF: ABI and FP fixes. - Allow for relocatable kernel and use that to support KASLR. - Fix CPC_BASE_ADDR mask - Plenty fo smp-cps, CM, R6 and M6250 fixes. - Make reset_control_ops const. - Fix kernel command line handling of leading whitespace. - Cleanups to cache handling. - Add brcm, bcm6345-l1-intc device tree bindings. - Use generic clkdev.h header - Remove CLK_IS_ROOT usage. - Misc small cleanups. - CM: Fix compilation error when !MIPS_CM - oprofile: Fix a preemption issue - Detect DSP ASE v3 support:1" * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (275 commits) MIPS: pic32mzda: fix getting timer clock rate. MIPS: ath79: fix regression in PCI window initialization MIPS: ath79: make ath79_ddr_ctrl_init() compatible for newer SoCs MIPS: Fix VZ probe gas errors with binutils <2.24 MIPS: perf: Fix I6400 event numbers MIPS: DEC: Export `ioasic_ssr_lock' to modules MIPS: MSA: Fix a link error on `_init_msa_upper' with older GCC MIPS: CM: Fix compilation error when !MIPS_CM MIPS: Fix genvdso error on rebuild USB: ohci-jz4740: Remove obsolete driver MIPS: JZ4740: Probe OHCI platform device via DT MIPS: JZ4740: Qi LB60: Remove support for AVT2 variant MIPS: pistachio: Determine SoC revision during boot MIPS: BMIPS: Adjust mips-hpt-frequency for BCM7435 mips: mt7620: fallback to SDRAM when syscfg0 does not have a valid value for the memory type MIPS: Prevent "restoration" of MSA context in non-MSA kernels MIPS: cevt-r4k: Dynamically calculate min_delta_ns MIPS: malta-time: Take seconds into account MIPS: malta-time: Start GIC count before syncing to RTC MIPS: Force CPUs to lose FP context during mode switches ... commit 0efacbbaee1e94e9942da0912f5b46ffd45a74bd Merge: f4f27d0 776d7f1 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 09:46:18 2016 -0700 Merge tag 'arc-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc Pull ARC updates from Vineet Gupta: "We have a relatively big changeset for ARC for 4.7. The highlight is support for EZChip (now Mellanox) NPS-400 network processor, a 400-Gb throughput C-programmable packet processor based on ARC700 cores from Synopsys. See http://www.mellanox.com/related-docs/prod_npu/PB_NPS-400.pdf Also present are irqchip and clocksource drivers for NPS as agreed with respective maintainers to go via ARC tree due to an soc header dependency. I have the needed ACKs from Jason, Marc, Daniel. You might run into a trivial merge conflict in drivers/irqchip/* This EZChip platform support required some deep changes in ARC architecture code and also opportunity to cleanup past sins (legacy irq domains, missing irq domain lookup, hard coded timer irqs...) Summary: - Support for EZChip (now Mellanox) NPS-400 Network processor based on ARC700 - NPS interrupt controller and clocksource drivers - ARC timers probed off DT - ARC iqrchips switching to linear domain (upgrade from legacy domains)" * tag 'arc-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc: (37 commits) arc: axs103_smp: Fix CPU frequency to 100MHz for dual-core arc: axs10x: Add DT bindings for I2S PLL Clock ARC: pae: STRICT_MM_TYPECHECKS was broken ARC: Add eznps platform to Kconfig and Makefile ARC: [plat-eznps] Use dedicated COMMAND_LINE_SIZE ARC: [plat-eznps] Use dedicated cpu_relax() ARC: [plat-eznps] Use dedicated identity auxiliary register. ARC: [plat-eznps] Use dedicated SMP barriers ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg ARC: [plat-eznps] Use dedicated user stack top ARC: [plat-eznps] Add eznps platform ARC: [plat-eznps] Add eznps board defconfig and dts ARC: Mark secondary cpu online only after all HW setup is done ARC: rwlock: disable interrupts in !LLSC variant ARC: Make vmalloc size configurable ARC: clean out UAPI byteorder.h clean off Kconfig symbol irqchip: add nps Internal and external irqchips clocksource: Add NPS400 timers driver soc: Support for EZchip SoC Documentation: Add EZchip vendor to binding list ... commit f4f27d0028aabce57e44c16c2fdefccd6310d2f3 Merge: 2600a46 b937190 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Thu May 19 09:21:36 2016 -0700 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security Pull security subsystem updates from James Morris: "Highlights: - A new LSM, "LoadPin", from Kees Cook is added, which allows forcing of modules and firmware to be loaded from a specific device (this is from ChromeOS, where the device as a whole is verified cryptographically via dm-verity). This is disabled by default but can be configured to be enabled by default (don't do this if you don't know what you're doing). - Keys: allow authentication data to be stored in an asymmetric key. Lots of general fixes and updates. - SELinux: add restrictions for loading of kernel modules via finit_module(). Distinguish non-init user namespace capability checks. Apply execstack check on thread stacks" * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (48 commits) LSM: LoadPin: provide enablement CONFIG Yama: use atomic allocations when reporting seccomp: Fix comment typo ima: add support for creating files using the mknodat syscall ima: fix ima_inode_post_setattr vfs: forbid write access when reading a file into memory fs: fix over-zealous use of "const" selinux: apply execstack check on thread stacks selinux: distinguish non-init user namespace capability checks LSM: LoadPin for kernel file loading restrictions fs: define a string representation of the kernel_read_file_id enumeration Yama: consolidate error reporting string_helpers: add kstrdup_quotable_file string_helpers: add kstrdup_quotable_cmdline string_helpers: add kstrdup_quotable selinux: check ss_initialized before revalidating an inode label selinux: delay inode label lookup as long as possible selinux: don't revalidate an inode's label when explicitly setting it selinux: Change bool variable name to index. KEYS: Add KEYCTL_DH_COMPUTE command ... commit c688c641c514933aa82c9707c99a6fff8831e103 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Thu May 19 16:45:28 2016 +0530 drm/amd/powerplay/hwmgr: use kmemdup Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 510e65dfb0e1817ef48c43839b8789131800a6f6 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Thu May 19 16:45:29 2016 +0530 drm/amd/powerplay/hwmgr: use kmemdup Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 761de5f9da8306c80c75883e0cbaa78f0244c1a0 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Thu May 19 16:45:27 2016 +0530 drm/amd/powerplay/hwmgr: use kmemdup Use kmemdup when some other buffer is immediately copied into allocated region. It replaces call to allocation followed by memcpy, by a single call to kmemdup. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit f2c27767af0a91cbdc3d832231f953110473e853 Author: Marek Vasut <marek.vasut@gmail.com> Date: Sun May 8 22:33:22 2016 +0200 devicetree: Add Creative Technology vendor id Add vendor ID for Creative technology. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Antony Pavlov <antonynpavlov@gmail.com> Cc: Rob Herring <robh@kernel.org> Cc: devicetree@vger.kernel.org Signed-off-by: Rob Herring <robh@kernel.org> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 9a0d440427bfd1716410b13dea5feb6eb7cd7277 Author: Christian Lamparter <chunkeey@googlemail.com> Date: Thu May 12 00:07:48 2016 +0200 gpio: dt-bindings: add ibm,ppc4xx-gpio binding This patch adds binding information for IBM/AMCC/APM GPIO Controllers of the PowerPC 4XX series and compatible SoCs. The "PowerPC 405EP Embedded Processor Data Sheet" has the following to say about the GPIO controllers: " - Controller functions and GPIO registers are programmed and accessed via memory-mapped OPB bus master accesses - All GPIOs are pin-shared with other functions. DCRs control whether a particular pin that has GPIO capabilities acts as a GPIO or is used for another purpose. - Each GPIO outputs is separately programmable to emulate an open-drain driver (i.e. drives to zero, threestated if output bit is 1) " The ppc4xx_gpio.c driver is part of the platform/sysdev drivers in arch/powerpc/sysdev. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Rob Herring <robh@kernel.org> .../devicetree/bindings/gpio/ibm,ppc4xx-gpio.txt | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 27f4ec1443fb71127ed6fc8b43d6195d9473b049 Author: Javier Martinez Canillas <javier@osg.samsung.com> Date: Wed May 11 16:26:18 2016 -0400 of/unittest: Remove unnecessary module.h header inclusion The OF_UNITTEST Kconfig symbol is bool so this unittest can only be built-in and not build as a module. Also, nothing defined in this header file used so is not necessary to include it. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/unittest.c | 1 - 1 file changed, 1 deletion(-) commit dddc33e50a074152d0ba447dcaa6184b19dffab2 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Fri May 13 21:31:39 2016 +1000 drivers/of: Fix build warning in populate_node() Function populate_node() is used to unflatten FDT blob to device tree. It supports maximal 64 level of device nodes. There is one array @fpsizes[64] tracking the full name length of last unflattened device node in the corresponding level (index of element in the array - 1). Build warning is seen with CONFIG_FRAME_WARN=1024 like below on ARM64 as Geert reported. The issue can be reproduced on PPC64 as well. $ make drivers/of/fdt.o drivers/of/fdt.c:443:1: warning: the frame size of 1136 bytes is \ larger than 1024 bytes [-Wframe-larger-than=] This changes the data type of @fpsizes[i] from "unsigned long" to "unsigned int" to avoid the build warning. The return value type of populate_node() and its @fpsize argument is adjusted accordingly. With this applied, 256 bytes saved from the stack frame on ARM64 and PPC64 platforms and the above warning isn't seen. Fixes: 50800082f176 ("drivers/of: Avoid recursively calling unflatten_dt_node()") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/fdt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 78c44d910d3e5f96dc6b3695fc1e4efd7c46a455 Author: Rhyland Klein <rklein@nvidia.com> Date: Wed May 11 13:36:57 2016 -0400 drivers/of: Fix depth when unflattening devicetree When the implementation for unflatten_dt_node() changed from being recursive to being non-recursive, it had a side effect of increasing the depth passed to fdt_next_node() by 1. This is fine most of the time, but it seems that when the end of the dtb is being parsed, it will cause the FDT_END condition in fdt_next_node() to return a different value (returning nextoffset instead of -FDT_ERR_NOTFOUND). This ends up passing an FDT_ERR_TRUNCATED error back to the unflatten_dt_node() which then sees that and complains "Error -8 processing FDT" causing boot to fail. This patch simply avoids incrementing depth and uses modified accesses for local array indices so that the depth is the same as it was before the change as far as fdt_next_node() is concerned. This problem was discovered trying to boot Tegra210-Smaug platforms. Fixes: 50800082f176 ("drivers/of: Avoid recursively calling unflatten_dt_node()") Signed-off-by: Rhyland Klein <rklein@nvidia.com> [robh: squashed in KASAN fix from Rhyland] Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/fdt.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 7f058c0a4a0441044f96fcc863533004bc82cf65 Author: Arnd Bergmann <arnd@arndb.de> Date: Thu May 12 14:28:14 2016 +0200 soc: mtk-pmic-wrap: avoid integer overflow warning On ARM64, the mtk-pmic-wrap driver causes a harmless warning: mtk-pmic-wrap.c:1062:16: warning: large integer implicitly truncated to unsigned type [-Woverflow] mtk-pmic-wrap.c:1074:16: warning: large integer implicitly truncated to unsigned type [-Woverflow] mtk-pmic-wrap.c:1086:16: warning: large integer implicitly truncated to unsigned type [-Woverflow] .int_en_all = ~(BIT(31) | BIT(1)), The problem is that the result of the BIT() macro is an 'unsigned long', so taking the bitwise NOT operation of that results in an integer with the upper 32 bits all set and that cannot be assigned to a 'u32' variable without loss of information. This is harmless because we were never interested in the upper bits here anyway, so we can shut up the warning by adding a simple cast to 'u32'. Signed-off-by: Arnd Bergmann <arnd@arndb.de> drivers/soc/mediatek/mtk-pmic-wrap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit b0a434fb7412937d55f15b8897c5646c81497bbe Author: Peter Zijlstra <peterz@infradead.org> Date: Thu May 19 12:30:19 2016 +0200 perf: Update MAINTAINERS for x86 move The move of the x86 perf implementation forgot to update the MAINTAINERS F(ile) pattern. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Borislav Petkov <bp@suse.de> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: fa9cbf320e99 ("perf/x86: Move perf_event.c ............... => x86/events/core.c") Link: http://lkml.kernel.org/r/20160519103019.GJ3206@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 7888824b0b1c9c3753d2aedf1d00e7a1c20c18af Author: Alden Tondettar <alden.tondettar@gmail.com> Date: Wed May 18 14:09:19 2016 -0700 udf: Use correct partition reference number for metadata UDF/OSTA terminology is confusing. Partition Numbers (PNs) are arbitrary 16-bit values, one for each physical partition in the volume. Partition Reference Numbers (PRNs) are indices into the the Partition Map Table and do not necessarily equal the PN of the mapped partition. The current metadata code mistakenly uses the PN instead of the PRN when mapping metadata blocks to physical/sparable blocks. Windows-created UDF 2.5 discs for some reason use large, arbitrary PNs, resulting in mount failure and KASAN read warnings in udf_read_inode(). For example, a NetBSD UDF 2.5 partition might look like this: PRN PN Type --- -- ---- 0 0 Sparable 1 0 Metadata Since PRN == PN, we are fine. But Windows could gives us: PRN PN Type --- ---- ---- 0 8192 Sparable 1 8192 Metadata So udf_read_inode() will start out by checking the partition length in sbi->s_partmaps[8192], which is obviously out of bounds. Fix this by creating a new field (s_phys_partition_ref) in struct udf_meta_data, referencing whatever physical or sparable map has the same partition number as the metadata partition. [JK: Add comment about s_phys_partition_ref, change its name] Signed-off-by: Alden Tondettar <alden.tondettar@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> fs/udf/partition.c | 6 ++++-- fs/udf/super.c | 22 ++++++++++++---------- fs/udf/udf_sb.h | 5 +++++ 3 files changed, 21 insertions(+), 12 deletions(-) commit bad6a185b4d6f81d0ed2b6e4c16307969f160b95 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 18 16:55:56 2016 +0200 crypto: public_key: select CRYPTO_AKCIPHER In some rare randconfig builds, we can end up with ASYMMETRIC_PUBLIC_KEY_SUBTYPE enabled but CRYPTO_AKCIPHER disabled, which fails to link because of the reference to crypto_alloc_akcipher: crypto/built-in.o: In function `public_key_verify_signature': :(.text+0x110e4): undefined reference to `crypto_alloc_akcipher' This adds a Kconfig 'select' statement to ensure the dependency is always there. Cc: <stable@vger.kernel.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> crypto/asymmetric_keys/Kconfig | 1 + 1 file changed, 1 insertion(+) commit d462e32259810aaaf13440b033b99e1aad33eccd Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Wed May 18 13:39:05 2016 +0300 crypto: omap-sham - potential Oops on error in probe This if statement is reversed so we end up either leaking or Oopsing on error. Fixes: dbe246209bc1 ('crypto: omap-sham - Use dma_request_chan() for requesting DMA channel') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/omap-sham.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3743a03e72b73b6234768bce06d7bf5a57c47285 Author: Alden Tondettar <alden.tondettar@gmail.com> Date: Wed May 18 14:09:18 2016 -0700 udf: Use IS_ERR when loading metadata mirror file entry Currently when udf_get_pblock_meta25() fails to map a block using the primary metadata file, it will attempt to load the mirror file entry by calling udf_find_metadata_inode_efe(). That function will return a ERR_PTR if it fails, but the return value is only checked against NULL. Test the return value using IS_ERR() and change it to NULL if needed. Signed-off-by: Alden Tondettar <alden.tondettar@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> fs/udf/partition.c | 2 ++ 1 file changed, 2 insertions(+) commit 585d70006f6e30f42e96d56c6c0933671c516c7b Author: Alden Tondettar <alden.tondettar@gmail.com> Date: Wed May 18 14:09:17 2016 -0700 udf: Don't BUG on missing metadata partition descriptor Currently, if a metadata partition map is missing its partition descriptor, then udf_get_pblock_meta25() will BUG() out the first time it is called. This is rather drastic for a corrupted filesystem, so just treat this case as an invalid mapping instead. Signed-off-by: Alden Tondettar <alden.tondettar@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> fs/udf/partition.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 5632a9fbcd451892332d45553ce8b831d5143691 Merge: a41980f e31db4c 07a7056 6427a84 Author: Russell King <rmk+kernel@armlinux.org.uk> Date: Thu May 19 10:31:35 2016 +0100 Merge branches 'amba', 'devel-stable', 'kexec-for-next' and 'misc' into for-linus commit 2552a39facb6609007a02eeda5d5edee4fcaca30 Author: Kees Cook <keescook@chromium.org> Date: Mon May 16 05:55:58 2016 -0700 coccicheck: Fix missing 0 index in kill loop By default, "seq" counts from 1, but processes were starting counting from 0, so when interrupted, coccicheck would leave the 0th process running. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Nicolas Palix <nicolas.palix@imag.fr> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Michal Marek <mmarek@suse.com> scripts/coccicheck | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 138a076496e61c68ebc1dcccc088705826bbe26d Merge: 1d4e89c 1eef33b Author: Michael Ellerman <mpe@ellerman.id.au> Date: Thu May 19 17:43:20 2016 +1000 Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/scottwood/linux into next Freescale updates from Scott: "Contains include 86xx fixes, minor device tree fixes, an erratum workaround, and a kconfig dependency fix." commit 6edf0aa4f8bbdfbb4d6d786892fa02728d05dc36 Author: Michael Holzheu <holzheu@linux.vnet.ibm.com> Date: Wed May 11 21:13:13 2016 +0200 s390/bpf: fix recache skb->data/hlen for skb_vlan_push/pop In case of usage of skb_vlan_push/pop, in the prologue we store the SKB pointer on the stack and restore it after BPF_JMP_CALL to skb_vlan_push/pop. Unfortunately currently there are two bugs in the code: 1) The wrong stack slot (offset 170 instead of 176) is used 2) The wrong register (W1 instead of B1) is saved So fix this and use correct stack slot and register. Fixes: 9db7f2b81880 ("s390/bpf: recache skb->data/hlen for skb_vlan_push/pop") Cc: stable@vger.kernel.org # 4.3+ Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/net/bpf_jit.h | 4 ++-- arch/s390/net/bpf_jit_comp.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 0fa963553a5c28d8f8aabd8878326d3f782045fc Author: Michael Holzheu <holzheu@linux.vnet.ibm.com> Date: Thu May 12 18:10:48 2016 +0200 s390/bpf: reduce maximum program size to 64 KB The s390 BFP compiler currently uses relative branch instructions that only support jumps up to 64 KB. Examples are "j", "jnz", "cgrj", etc. Currently the maximum size of s390 BPF programs is set to 0x7ffff. If branches over 64 KB are generated the, kernel can crash due to incorrect code. So fix this an reduce the maximum size to 64 KB. Programs larger than that will be interpreted. Fixes: ce2b6ad9c185 ("s390/bpf: increase BPF_SIZE_MAX") Cc: stable@vger.kernel.org # 4.3+ Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/net/bpf_jit_comp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d4bf7078c43e11097e0d6f04d3fb999bf92c4fb0 Author: Josh Poimboeuf <jpoimboe@redhat.com> Date: Tue May 17 13:06:06 2016 -0500 x86/entry/64: Fix stack return address retrieval in thunk With CONFIG_FRAME_POINTER enabled, a thunk can pass a bad return address value to the called function. '9*8(%rsp)' actually gets the frame pointer, not the return address. The only users of the 'put_ret_addr_in_rdi' option are two functions which trace the enabling and disabling of interrupts, so this bug can result in bad debug or tracing information with CONFIG_IRQSOFF_TRACER or CONFIG_PROVE_LOCKING. Fix this by implementing the suggestion of Linus: explicitly push the frame pointer all the time and constify the stack offsets that way. This is both correct and easier to read. Reported-by: Matt Fleming <matt@codeblueprint.co.uk> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> [ Extended the changelog a bit. ] Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alex Thorlton <athorlton@sgi.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: 058fb73274f9 ("x86/asm/entry: Create stack frames in thunk functions") Link: http://lkml.kernel.org/r/20160517180606.v5o7wcgdni7443ol@treble Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/entry/thunk_64.S | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 2600a46ee0ed57c0e0a382c2a37ebac64d374d20 Merge: 03e1aa1 0fc1b09 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 18:55:19 2016 -0700 Merge tag 'trace-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing updates from Steven Rostedt: "This includes two new updates for the ftrace infrastructure. - With the changing of the code for filtering events by pid, from a list of pids to a bitmask, we can now easily implement following forks. With a new tracing option "event-fork" which, when set, will have tasks with pids in set_event_pid, when they fork, to have their child pids added to set_event_pid and the child will be traced as well. Note, if "event-fork" is set and a task with its pid in set_event_pid exits, its pid will be removed from set_event_pid - The addition of Tom Zanussi's hist triggers. This includes a very thorough documentatino on how to use the hist triggers with events. This introduces a quick and easy way to get histogram data from events and their fields. Some other cleanups and updates were added as well. Like Masami Hiramatsu added test cases for the event trigger and hist triggers. Also I added a speed up of filtering by using a temp buffer when filters are set" * tag 'trace-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (45 commits) tracing: Use temp buffer when filtering events tracing: Remove TRACE_EVENT_FL_USE_CALL_FILTER logic tracing: Remove unused function trace_current_buffer_lock_reserve() tracing: Remove one use of trace_current_buffer_lock_reserve() tracing: Have trace_buffer_unlock_commit() call the _regs version with NULL tracing: Remove unused function trace_current_buffer_discard_commit() tracing: Move trace_buffer_unlock_commit{_regs}() to local header tracing: Fold filter_check_discard() into its only user tracing: Make filter_check_discard() local tracing: Move event_trigger_unlock_commit{_regs}() to local header tracing: Don't use the address of the buffer array name in copy_from_user tracing: Handle tracing_map_alloc_elts() error path correctly tracing: Add check for NULL event field when creating hist field tracing: checking for NULL instead of IS_ERR() tracing: Do not inherit event-fork option for instances tracing: Fix unsigned comparison to zero in hist trigger code kselftests/ftrace: Add a test for log2 modifier of hist trigger tracing: Add hist trigger 'log2' modifier kselftests/ftrace: Add hist trigger testcases kselftests/ftrace : Add event trigger testcases ... commit 03e1aa1cbb65d8fb214d82a98933362d1c115a4f Merge: 97f0090 188e3c5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 18:46:55 2016 -0700 Merge branch 'stable-4.7' of git://git.infradead.org/users/pcmoore/audit Pull audit updates from Paul Moore: "Four small audit patches for 4.7. Two are simple cleanups around the audit thread management code, one adds a tty field to AUDIT_LOGIN events, and the final patch makes tty_name() usable regardless of CONFIG_TTY. Nothing controversial, and it all passes our regression test" * 'stable-4.7' of git://git.infradead.org/users/pcmoore/audit: tty: provide tty_name() even without CONFIG_TTY audit: add tty field to LOGIN event audit: we don't need to __set_current_state(TASK_RUNNING) audit: cleanup prune_tree_thread commit 9fa78f63a8921ce37252be34ef8eea2f4bfbb13f Author: Marek Vasut <marex@denx.de> Date: Thu May 19 09:05:38 2016 +0800 nios2: Add order-only DTC dependency to %.dtb target The dtc dependency is missing, thus dtc is not built before it's invoked, resulting in the following problem: linux-2.6$ make 10m50_defconfig && make 10m50_devboard.dtb [...] scripts/kconfig/conf --silentoldconfig Kconfig DTC arch/nios2/boot/10m50_devboard.dtb /bin/sh: 1: ./scripts/dtc/dtc: not found arch/nios2/boot/Makefile:52: recipe for target 'arch/nios2/boot/10m50_devboard.dtb' failed make[1]: *** [arch/nios2/boot/10m50_devboard.dtb] Error 127 arch/nios2/Makefile:57: recipe for target '10m50_devboard.dtb' failed make: *** [10m50_devboard.dtb] Error 2 Signed-off-by: Marek Vasut <marex@denx.de> Cc: Ley Foon Tan <lftan@altera.com> Cc: Romain Perier <romain.perier@free-electrons.com> Acked-by: Ley Foon Tan <lftan@altera.com> arch/nios2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 97f00905ec98472050d65c46629237b299f29035 Merge: 676d973 b3d3903 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 17:22:19 2016 -0700 Merge tag 'rproc-v4.7' of git://github.com/andersson/remoteproc Pull remoteproc updates from Bjorn Andersson: "Introduce a synchronization point between the async firmware loading and clients requesting the remote processor to boot, as well as support for remote processors that are not interested in the resource table information" * tag 'rproc-v4.7' of git://github.com/andersson/remoteproc: remoteproc: Add additional crash reasons remoteproc: core: Make the loaded resource table optional remoteproc: core: Task sync during rproc_fw_boot() commit 676d9735cd010fc439566e2b6e9b6adc3e1179ef Merge: 888dae5 b4f7825 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 17:17:20 2016 -0700 Merge tag 'rpmsg-v4.7' of git://github.com/andersson/remoteproc Pull rpmsg updates from Bjorn Andersson: "Refactor rpmsg module registration to follow other subsystems; by introduction of module_rpmsg_driver and hiding of THIS_MODULE from clients" * tag 'rpmsg-v4.7' of git://github.com/andersson/remoteproc: rpmsg: use module_rpmsg_driver in existing drivers and examples rpmsg: add helper macro module_rpmsg_driver rpmsg: drop owner assignment from rpmsg_drivers rpmsg: add THIS_MODULE to rpmsg_driver in rpmsg core commit 888dae5361e605efc553b645a7c95bbcc5e904db Merge: 19c5abc 23ea596 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 17:12:23 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input updates from Dmitry Torokhov: "First round of updates for the input subsystem. No new drivers here, just some driver fixes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: rotary-encoder - fix bare use of 'unsigned' Input: cm109 - spin_lock in complete() cleanup Input: cm109 - fix handling of volume and mute buttons Input: byd - don't wipe dynamically allocated memory twice Input: twl4030 - fix unsafe macro definition Input: twl6040-vibra - remove mutex Input: bcm_iproc_tsc - DT spelling s/clock-name/clock-names/ Input: bcm_iproc_tsc - use syscon to access shared registers Input: ti_am335x_tsc - use SIMPLE_DEV_PM_OPS Input: omap-keypad - remove set_col_gpio_val() and get_row_gpio_val() Input: omap-keypad - drop empty PM stubs Input: omap-keypad - remove adjusting of scan delay Input: gpio-keys - clean up device tree binding example Input: kbtab - stop saving struct usb_device Input: gtco - stop saving struct usb_device Input: aiptek - stop saving struct usb_device Input: acecad - stop saving struct usb_device commit 19c5abcb74b712a7824ae7c55862932534e7dfec Merge: 675e065 aff093d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 17:03:51 2016 -0700 Merge tag 'media/v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media updates from Mauro Carvalho Chehab: - added support for Intersil/Techwell TW686x-based video capture cards - v4l PCI skeleton driver moved to samples directory - Documentation cleanups and improvements - RC: reduced the memory footprint for IR raw events - tpg: Export the tpg code from vivid as a module - adv7180: Add device tree binding documentation - lots of driver improvements and fixes * tag 'media/v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (173 commits) [media] exynos-gsc: avoid build warning without CONFIG_OF [media] samples: v4l: from Documentation to samples directory [media] dib0700: add USB ID for another STK8096-PVR ref design based card [media] tvp5150: propagate I2C write error in .s_register callback [media] tvp5150: return I2C write operation failure to callers [media] em28xx: add support for Hauppauge WinTV-dualHD DVB tuner [media] em28xx: add missing USB IDs [media] update cx23885 and em28xx cardlists [media] media: au0828 fix au0828_v4l2_device_register() to not unlock and free [media] c8sectpfe: Rework firmware loading mechanism [media] c8sectpfe: Demote print to dev_dbg [media] c8sectpfe: Fix broken circular buffer wp management [media] media-device: Simplify compat32 logic [media] media: i2c: ths7303: remove redundant assignment on bt [media] dvb-usb: hide unused functions [media] xilinx-vipp: remove unnecessary of_node_put [media] drivers/media/media-devnode: clear private_data before put_device() [media] drivers/media/media-device: move debug log before _devnode_unregister() [media] drivers/media/rc: postpone kfree(rc_dev) [media] media/dvb-core: forward media_create_pad_links() return value ... commit 675e0655c12209ba1f40af0dff7cd76b17a1315c Merge: d974f09 e7ca7f9 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 16:38:59 2016 -0700 Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI updates from James Bottomley: "First round of SCSI updates for the 4.6+ merge window. This batch includes the usual quota of driver updates (bnx2fc, mp3sas, hpsa, ncr5380, lpfc, hisi_sas, snic, aacraid, megaraid_sas). There's also a multiqueue update for scsi_debug, assorted bug fixes and a few other minor updates (refactor of scsi_sg_pools into generic code, alua and VPD updates, and struct timeval conversions)" * tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (138 commits) mpt3sas: Used "synchronize_irq()"API to synchronize timed-out IO & TMs mpt3sas: Set maximum transfer length per IO to 4MB for VDs mpt3sas: Updating mpt3sas driver version to 13.100.00.00 mpt3sas: Fix initial Reference tag field for 4K PI drives. mpt3sas: Handle active cable exception event mpt3sas: Update MPI header to 2.00.42 Revert "lpfc: Delete unnecessary checks before the function call mempool_destroy" eata_pio: missing break statement hpsa: Fix type ZBC conditional checks scsi_lib: Decode T10 vendor IDs scsi_dh_alua: do not fail for unknown VPD identification scsi_debug: use locally assigned naa scsi_debug: uuid for lu name scsi_debug: vpd and mode page work scsi_debug: add multiple queue support bfa: fix bfa_fcb_itnim_alloc() error handling megaraid_sas: Downgrade two success messages to info cxlflash: Fix to resolve dead-lock during EEH recovery scsi_debug: rework resp_report_luns scsi_debug: use pdt constants ... commit 60f05e86cf3e8c5f379fe5ba94634fcec17dd67e Author: Viresh Kumar <viresh.kumar@linaro.org> Date: Wed May 18 17:55:28 2016 +0530 cpufreq: schedutil: Improve prints messages with pr_fmt Prefix print messages with KBUILD_MODNAME, i.e 'cpufreq_schedutil: '. This helps to keep similar formatting for all the print messages particular to a file and identify those easily in kernel logs. Its already done this way for rest of the governors. Along with that, remove the (now) redundant bits from a print message. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> kernel/sched/cpufreq_schedutil.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit d974f09ea4970d0299a8267111312b80adbd20e6 Merge: 4a5219e b3c8eb5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 15:30:04 2016 -0700 Merge branch 'stable/for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft Pull iscsi_ibft updates from Konrad Rzeszutek Wilk: "The pull has two features - both of them expand the SysFS entries: - 'prefix-len' - which is subnet_mask_prefix of the iBFT header. - 'acpi_header' dir with: 'iBFT', OEM-ID (whatever it extracts from the iBFT header) and OEM_TABLE_ID (also whatever it extracts from the iBFT header). This is to help NIC drivers to figure out during bootup how to deal with BIOS created iBFT tables (like by TianoCore UEFI implemenation)" * 'stable/for-linus-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/ibft: ibft: Expose iBFT acpi header via sysfs iscsi_ibft: Add prefix-len attr and display netmask commit b8bef79df709533416a278c4c3aef3577cefa61a Author: Tiezhu Yang <kernelpatch@126.com> Date: Wed May 18 08:02:25 2016 +0800 f2fs: make exit_f2fs_fs more clear init_f2fs_fs does: 1) f2fs_build_trace_ios 2) init_inodecache 3) create_node_manager_caches 4) create_segment_manager_caches 5) create_checkpoint_caches 6) create_extent_cache 7) kset_create_and_add 8) kobject_init_and_add 9) register_shrinker 10) register_filesystem 11) f2fs_create_root_stats 12) proc_mkdir exit_f2fs_fs should do cleanup in the reverse order to make the code more clear. Signed-off-by: Tiezhu Yang <kernelpatch@126.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/super.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 513c5f3735a9bd0bd8b58b6cdafbad5ef19f2159 Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Mon May 16 11:42:32 2016 -0700 f2fs: use percpu_counter for total_valid_inode_count This patch uses percpu_counter to avoid stat_lock. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/f2fs.h | 18 +++++++----------- fs/f2fs/super.c | 11 ++++++++--- 2 files changed, 15 insertions(+), 14 deletions(-) commit 41382ec43255b502321c3c27f1347efeb3279290 Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Mon May 16 11:06:50 2016 -0700 f2fs: use percpu_counter for alloc_valid_block_count This patch uses percpu_count for sbi->alloc_valid_block_count. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/checkpoint.c | 2 +- fs/f2fs/f2fs.h | 8 +++++--- fs/f2fs/recovery.c | 5 +++-- fs/f2fs/super.c | 7 +++++-- 4 files changed, 14 insertions(+), 8 deletions(-) commit 1beba1b3a953107c3ff5448ab4e4297db4619c76 Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Fri May 13 12:47:11 2016 -0700 f2fs: use percpu_counter for # of dirty pages in inode This patch adds percpu_counter for # of dirty pages in inode. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/f2fs.h | 10 +++++----- fs/f2fs/file.c | 2 +- fs/f2fs/super.c | 7 ++++++- 3 files changed, 12 insertions(+), 7 deletions(-) commit 523be8a6b3418eb7e0f0f042fe0490345eb5d516 Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Fri May 13 12:36:58 2016 -0700 f2fs: use percpu_counter for page counters This patch substitutes percpu_counter for atomic_counter when counting various types of pages. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/debug.c | 11 ++++++----- fs/f2fs/f2fs.h | 24 ++++++++++++++---------- fs/f2fs/super.c | 31 +++++++++++++++++++++++++++---- include/trace/events/f2fs.h | 10 +++++----- 4 files changed, 52 insertions(+), 24 deletions(-) commit f573018491fd823e909d587cfe16758f3dd9e6d6 Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Tue May 17 16:23:36 2016 -0700 f2fs: use bio count instead of F2FS_WRITEBACK page count This can reduce page counting overhead. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/checkpoint.c | 2 +- fs/f2fs/data.c | 26 +++++++++++++++----------- fs/f2fs/debug.c | 6 +++--- fs/f2fs/f2fs.h | 4 ++-- fs/f2fs/super.c | 3 +-- 5 files changed, 22 insertions(+), 19 deletions(-) commit 24e04d72eb43d36d28fa7908f9f8d506d1cb06e7 Merge: 7c10ddf c6740c9 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 19 06:48:29 2016 +1000 Merge tag 'topic/drm-misc-2016-05-18' of git://anongit.freedesktop.org/drm-intel into drm-next Update drm-misc pull with a few more fixes included, plus the two from Arnd for the fallout from the drm_gem_object_lookup() refactor that I failed to spot :( * tag 'topic/drm-misc-2016-05-18' of git://anongit.freedesktop.org/drm-intel: drm: remove unused dev variables drm: mediatek: fixup drm_gem_object_lookup API change drm/tegra: Fix crash caused by reference count imbalance drm: Fix error handling in drm_connector_register drm: Avoid connector reference imbalance on error path drm/fb_helper: Fix references to dev->mode_config.num_connector drm/i915/fbdev: Fix num_connector references in intel_fb_initial_config() qxl: catch qxlfb_create_pinned_object failures drm/exynos/hdmi: add a missing tab drm/fb-cma-helper: Add function drm_fb_cma_create_with_funcs() drm/fb-cma-helper: Use const for drm_framebuffer_funcs argument drm: Drop connector argument from __drm_atomic_helper_connector_destroy_state drm: Drop plane argument from __drm_atomic_helper_plane_destroy_state drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_state drm: Remove unused drm_device from drm_gem_object_lookup() commit 4a5219edcdae52bfb5eea0dfc2a7bd575961dad7 Merge: 9797f6b 5420f9f Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 13:14:02 2016 -0700 Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC driver updates from Arnd Bergmann: "Driver updates for ARM SoCs, these contain various things that touch the drivers/ directory but got merged through arm-soc for practical reasons. For the most part, this is now related to power management controllers, which have not yet been abstracted into a separate subsystem, and typically require some code in drivers/soc or arch/arm to control the power domains. Another large chunk here is a rework of the NVIDIA Tegra USB3.0 support, which was surprisingly tricky and took a long time to get done. Finally, reset controller handling as always gets merged through here as well" * tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (97 commits) arm-ccn: Enable building as module soc/tegra: pmc: Add generic PM domain support usb: xhci: tegra: Add Tegra210 support usb: xhci: Add NVIDIA Tegra XUSB controller driver dt-bindings: usb: xhci-tegra: Add Tegra210 XUSB controller support dt-bindings: usb: Add NVIDIA Tegra XUSB controller binding PCI: tegra: Support per-lane PHYs dt-bindings: pci: tegra: Update for per-lane PHYs phy: tegra: Add Tegra210 support phy: Add Tegra XUSB pad controller support dt-bindings: phy: tegra-xusb-padctl: Add Tegra210 support dt-bindings: phy: Add NVIDIA Tegra XUSB pad controller binding phy: core: Allow children node to be overridden clk: tegra: Add interface to enable hardware control of SATA/XUSB PLLs drivers: firmware: psci: make two helper functions inline soc: renesas: rcar-sysc: Add support for R-Car H3 power areas soc: renesas: rcar-sysc: Add support for R-Car E2 power areas soc: renesas: rcar-sysc: Add support for R-Car M2-N power areas soc: renesas: rcar-sysc: Add support for R-Car M2-W power areas soc: renesas: rcar-sysc: Add support for R-Car H2 power areas ... commit 9797f6b0504122e4ad9ff047a3d0521ad6706386 Merge: 2ec3240 0ef659a Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 13:07:57 2016 -0700 Merge tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC defconfig updates from Arnd Bergmann: "As usual, a bunch of commits, mostly adding drivers and other options to defconfigs. We are adding three new defconfig files for the newly added 32-bit machines (aspeed and mps2), the rest is mainly housekeeping. The changes outside of arch/arm/config/ are for a Kconfig symbol that got renamed" * tag 'armsoc-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (63 commits) ARM: aspeed: adapt defconfigs for new CONFIG_PRINTK_TIME ARM: u8500_defconfig: update sensor config ARM: u8500_defconfig: remove staging from defconfig ARM: multi_v7_defconfig: Remove unused Kconfig option MACH_UX500_DT ARM: at91/defconfig: sama5: add CONFIG_FHANDLE arm/configs: Add Aspeed defconfig arm/configs/multi_v5: Add Aspeed ast2400 ARM: at91: sama5: Update defconfig ARM: imx_v6_v7_defconfig: add CONFIG_MICREL_PHY ARM: imx_v6_v7_defconfig: add CONFIG_I2C_GPIO ARM: multi_v7: Enable Tegra XUSB controller in defconfig ARM: tegra: Enable XUSB controller in defconfig ARM: omap2plus_defconfig: Enable PWM and ir-rx51 as loadable modules ARM: multi_v7_defconfig: add the Atmel sama5d2-compatible ADC driver ARM: multi_v7_defconfig: add the Atmel Audio microphone interface PDMIC ARM: multi_v7_defconfig: add Atmel ISI (Image Sensor Interface) driver ARM: multi_v7_defconfig: add Atmel watchdog timers ARM: multi_v7_defconfig: add HLCDC drivers as modules ARM: at91/defconfig: add PDMIC driver to sama5_defconfig ARM: at91/defconfig: add HLCDC driver to sama5_defconfig ... commit 2ec3240fd7956fe9525c336947b4473f7276f2b1 Merge: f7df9be 9910f5b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 12:58:39 2016 -0700 Merge tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM 64-bit DT updates from Arnd Bergmann: "We continue ramping up platform support for 64-bit ARM machines, with 111 individual non-merge changesets touching 21 platforms. The LG1312 platform is completely new and is the first ARM platform by LG that we support in the mainline kernel. Two other SoCs got added that are updated versions of existing SoC families, so the port mainly consists of new dts files: - The Hisilicon Hip06/D03 is the latest server platform from Huawei/Hisilicon, and follows the Hip05/D02 platform. - Rockchip RK3399 follows the 32-bit RK3288 that is popular in low-end Chromebooks and the 64-bit RK3368 that is mainly found in chinese Android TV boxes. The 96Boards HiKey based on the Hisilicon Hi6220 (Kirin 620) gets a long-awaited overhaul with a lot of devices enabled in the DT, so it should be much more usable with a mainline kernel now. See also https://plus.google.com/111524780435806926688/posts/PeGb2VsNhJd A lot of work went into enabling new device drivers on existing machines, but we also have a couple of new commercially available machines: - Google Pixel C laptop based on Tegra210 - Hardkernel Odroid C2 Based on Amlogic Meson GXBB (S905) - Geekbuying GeekBox based on Rockchip RK3368 And finally, a couple of reference or development platforms that are not end-user platforms but are used for trying out the respective SoC platforms: - Amlogic Meson GXBB P200 and P201 development systems - NXP Layerscape 1043A QDS development board - Hisilicon Hip06 D03 server board, as mentioned above - LG1312 Reference Design - RK3399 Evaluation Board" * tag 'armsoc-dt64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (104 commits) arm64: dts: marvell: add XOR node for Armada 3700 SoC dt-bindings: document rockchip rk3399-evb board arm64: dts: rockchip: add dts file for RK3399 evaluation board arm64: dts: rockchip: add core dtsi file for RK3399 SoCs dt-bindings: rockchip-dw-mshc: add description for rk3399 arm64: dts: marvell: Use a SoC-specific compatible for xHCI on Armada37xx arm64: dts: marvell: Rename armada-37xx USB node arm64: dts: marvell: Clean up armada-3720-db Documentation: arm64: Add Hisilicon Hip06 D03 dts binding arm64: dts: Add initial dts for Hisilicon Hip06 D03 board arm64: dts: hip05: Add nor flash support arm64: dts: hip05: fix its node without msi-cells arm64: dts: r8a7795: Don't disable referenced optional clocks arm64: dts: salvator-x: populate EXTALR arm64: dts: r8a7795: enable PCIe on Salvator-X arm64: dts: r8a7795: Add PCIe nodes arm64: tegra: Add IOMMU node to GM20B on Tegra210 arm64: tegra: Add reference clock to GM20B on Tegra210 dt-bindings: Add documentation for GM20B GPU dt-bindings: gk20a: Document iommus property ... commit f7df9be067160eef52f04bd2f137a20683fb1c12 Merge: 9f8f202 ec42083 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 12:48:46 2016 -0700 Merge tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM DT updates from Arnd Bergmann: "These are all the updates to device tree files for 32-bit platforms, which as usual makes up the bulk of the ARM SoC changes: 462 non-merge changesets, 450 files changed, 23340 insertions, 5216 deletions. The three platforms that are added with the "soc" branch are here as well, and we add some related machine files: - For Aspeed AST2400/AST2500, we get the evaluation platform and the Tyan Palmetto POWER8 mainboard that uses the AST2400 BMC - For Oxnas 810SE, the Western Digital "My Book World Edition" is added as the only platform at the moment. - For ARM MPS2, the AN385 (Cortex-M3) and AN399 (Cortex-M7) are supported On the ARM Realview development platform, we now support all machines with device tree, previously only the board files were supported, which in turn will likely be removed soon. Qualcomm IPQ4019 is the second generation ARM based "Internet Processor", following the IPQ806x that is used in many high-end WiFi routers. This one integrates two ath10k wifi radios that were previously on separate chips. Other boards that got added for existing chips are: Ti OMAP family: - Amazon Kindle Fire, first generation, tablet and ebook reader - OnRISC Baltos iR 2110 and 3220 embedded industrial PCs - TI AM5728 IDK, TI AM3359 ICE-V2, and TI DRA722 Rev C EVM development systems Samsung EXYNOS platform: - Samsung ARTIK5 evaluation board, see https://www.artik.io/modules/overview/artik-5/ NXP i.MX platforms: - Ka-Ro electronics TX6S-8034, TX6S-8035, TX6U-8033, TX6U-81xx, TX6Q-1036, TX6Q-1110/-1130, TXUL-0010 and TXUL-0011 industrial SoM modules - Embest MarS Board i.MX6Dual DIY platform - Boundary Devices i.MX6 Quad Plus Nitrogen6_MAX and SoloX Nitrogen6sx embedded boards - Technexion Pico i.MX6UL compute module - ZII VF610 Development Board Marvell embedded (mvebu, orion, kirkwood) platforms: - Linksys Viper (E4200v2 / EA4500) WiFi router - Buffalo Kurobox Pro NAS Qualcomm Snapdragon: - Arrow DragonBoard 600c (96boards) with APQ8064 Snapdragon 600 Rockchips platform: - mqmaker MiQi single-board computer Altera SoCFPGA: - samtec VIN|ING 1000 vehicle communication interface Allwinner Sunxi platforms: - Dserve DSRV9703C tablet - Difrnce DIT4350 tablet - Colorfly E708 Q1 tablet - Polaroid MID2809PXE04 tablet - Olimex A20 OLinuXino LIME2 single board computer - Xunlong Orange Pi 2, Orange Pi One, and Orange Pi PC single board computers Across many platforms, bug fixes went in to address warnings that dtc now emits with 'make dtbs W=1'. Further changes for device enablement went into Ti OMAP, bcm283x (Raspberry Pi), bcm47xx (wifi router), Ti Davinci, Samsung EXYNOS, Marvell mvebu/kirkwood/orion, NXP i.MX/Vybrid NXP LPC18xx, NXP LPC32xx, Renesas shmobile/r-mobile/r-car, Rockchips rk3xxx, ST Ux500, ST STi, Atmel AT91/SAMA5, Altera SoCFPGA, Allwinner Sunxi, Sigma Designs Tango, NVIDIA Tegra, Socionext Uniphier and ARM Versatile Express" * tag 'armsoc-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (458 commits) ARM: dts: tango4: Import watchdog node ARM: dts: tango4: Update cpus node for cpufreq ARM: dts: tango4: Update DT to match clk driver ARM: dts: tango4: Initial thermal support arm/dst: Add Aspeed ast2500 device tree arm/dts: Add Aspeed ast2400 device tree ARM: sun7i: dt: Add pll3 and pll7 clocks ARM: dts: sunxi: Add a olinuxino-lime2-emmc ARM: dts: at91: sama5d4: add trng node ARM: dts: at91: sama5d3: add trng node ARM: dts: at91: sama5d2: add trng node ARM: dts: at91: at91sam9g45 family: reduce the trng register map size ARM: sun4i: dt: Add pll3 and pll7 clocks ARM: sun5i: chip: Enable the TV Encoder ARM: sun5i: r8: Add display blocks to the DTSI ARM: sun5i: a13: Add display and TCON clocks ARM: dts: ux500: configure the accelerometers open drain ARM: mx5: dts: Enable USB OTG on M53EVK ARM: dts: imx6ul-14x14-evk: Add audio support ARM: dts: imx6qdl: Remove unneeded unit-addresses ... commit 9f8f2022786dae0bd48ba35006d6c3ed1ffb469d Merge: 9896c7b da4a95d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 12:43:08 2016 -0700 Merge tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC 64-bit changes from Arnd Bergmann: "One new platform gets added this time: The Cortex-A53 based LG Electronics LG1K platform used in digital TVs. The other changes are mostly smaller updates to the defconfig files, to enable additional platform specific drivers, as they get merged through the subsystem trees" * tag 'armsoc-arm64' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: arm64: configs: add options useful for Armada 7K/8K support arm64: defconfig: Add Juno SATA controller arm64: defconfig: enable freescale/nxp config options arm64: defconfig: enable 48-bit virtual addresses arm64: defconfig: cleanup the defconfig MAINTAINERS: update entry for Marvell ARM platform maintainers arm64: marvell: enable AP806 and CP110 syscon driver arm64: Kconfig: select sp804 timer for ARCH_HISI arm64: defconfig: enable configs for WLAN and TI WL1835 as modules arm64: defconfig: enable several common USB network adapters arm64: defconfig: add CONFIG_SPI_SPIDEV as module arm64: defconfig: Enable the PMIC and regulator for Hi6220 and 96boards HiKey arm64: defconfig: Add Renesas R-Car USB 3.0 driver support MAINTAINERS: add Chanho Min as ARM/LG1K maintainer arm64: defconfig: enable ARCH_LG1K arm64: add Kconfig entry for LG1K SoC family arm64: defconfig: Enable PL330 DMA controller arm64: defconfig: enable basic boot for Amlogic meson commit 9896c7b57e9d67948f1f52f903efae5ec6c74321 Merge: f2b1e0f b54891b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 12:35:46 2016 -0700 Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC platform updates from Arnd Bergmann: "We get support for three new 32-bit SoC platforms this time. The amount of changes in arch/arm for any of them is miniscule, as all the interesting code is in device driver subsystems (irqchip, clk, pinctrl, ...) these days. I'm listing them here, as the addition of the Kconfig statement is the main relevant milestone for a new platform. In each case, some drivers are are shared with existing platforms, while other drivers are added for v4.7 as well, or come in a later release. - The Aspeed platform is probably the most interesting one, this is what most whitebox servers use as their baseboard management controller. We get support for the very common ast2400 and ast2500 SoCs. The OpenBMC project focuses on this chip, and the LWN article about their ELC 2016 presentation at https://lwn.net/Articles/683320/ triggered the submission, but the code comes from IBM's OpenPOWER team rather than the team at Facebook. There are still a lot more drivers that need to get added over time, and I hope both teams can work together on that. - OXNAS is an old platform for Network Attached Storage devices from Oxford Semiconductor. There are models with ARM10 (!) and ARM11MPCore cores, but for now, we only support the original ARM9 based versions. The product lineup was subsequently part of PLX, Avago and now the new Broadcom Ltd. https://wiki.openwrt.org/doc/hardware/soc/soc.oxnas has some more information. - V2M-MPS2 is a prototyping platform from ARM for their Cortex-M cores and is related to the existing Realview / Versatile Express lineup, but without MMU. We now support various NOMMU platforms, so adding a new one is fairly straightforward. http://infocenter.arm.com/help/topic/com.arm.doc.100112_0100_03_en/ has detailed information about the platform. Other noteworthy updates: - Work on LPC32xx has resumed, and Vladimir Zapolskiy and Sylvain Lemieux are now maintaining the platform. This is an older ARM9 based platform from NXP (not Freescale), but it remains in use in embedded markets. - Kevin Hilman is now co-maintaining the Amlogic Meson platform for both 32-bit and 64-bit ARM, and started contributing some patches. - As is often the case, work on the OMAP platforms makes up the bulk of the actual SoC code changes in arch/arm, but there isn't a lot of that either" * tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (42 commits) MAINTAINERS: ARM/Amlogic: add co-maintainer, misc. updates MAINTAINERS: add ARM/NXP LPC32XX SoC specific drivers to the section MAINTAINERS: add new maintainers of NXP LPC32xx SoC MAINTAINERS: move ARM/NXP LPC32xx record to ARM section arm: Add Aspeed machine ARM: lpc32xx: remove duplicate const on lpc32xx_auxdata_lookup ARM: lpc32xx: remove leftovers of legacy clock source and provider drivers ARM: lpc32xx: remove reboot header file ARM: dove: Remove CLK_IS_ROOT ARM: orion5x: Remove CLK_IS_ROOT ARM: mv78xx0: Remove CLK_IS_ROOT ARM: davinci: da850: use clk->set_parent for async3 ARM: davinci: Move clock init after ioremap. MAINTAINERS: Update ARM Versatile Express platform entry ARM: vexpress/mps2: introduce MPS2 platform MAINTAINERS: add maintainer entry for ARM/OXNAS platform ARM: Add new mach-oxnas irqchip: versatile-fpga: add new compatible for OX810SE SoC ARM: uniphier: correct the call order of of_node_put() MAINTAINERS: fix stale TI DaVinci entries ... commit f2b1e0f6385d4487a81871eb47809a1375af527f Merge: f61a657 2e629eb Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 12:28:29 2016 -0700 Merge tag 'armsoc-cleanups-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC cleanups and fixes from Arnd Bergmann: "Traditionally we've had two separate branches for cleanups and non-critical bug fixes, but both of these got smaller with each release and the differences are rather unclear now, so it seems more appropriate to have a combined branch. The most notable change is for OMAP, which gets a small rework to simplify handling of the AUXDATA mechanism used on machines that are not completely DT based yet, along with other work that is used as preparation for dropping the legacy board files" * tag 'armsoc-cleanups-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: ARM: dts: exynos: Add interrupt line to MAX8997 PMIC on exynos4210-trats ARM: dts: exynos: Fix regulator name to avoid forbidden character on exynos4210-trats ARM: dts: exynos: Add MFC memory banks for Peach boards ARM: OMAP2+: n900 needs MMC slot names for legacy user space ARM: OMAP2+: Add more functions to pwm pdata for ir-rx51 ARM: debug: remove extraneous DEBUG_HI3716_UART option ARM: OMAP2+: Simplify auxdata by using the generic match of/platform: Allow secondary compatible match in of_dev_lookup ARM: davinci: use IRQCHIP_DECLARE for cp_intc ARM: davinci: remove unused DA8XX_NUM_UARTS ARM: davinci: simplify call to of populate ARM: DaVinci USB: removed deprecated properties from MUSB config ARM: rockchip: Fix use of plain integer as NULL pointer ARM: realview: hide unused 'pmu_device' object soc: versatile: dynamically detect RealView HBI numbers commit f61a657fdf221403d99e6f0d4c6d24762920d4a9 Merge: 0e034f5 c53db52 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 12:17:16 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 updates from Martin Schwidefsky: "The s390 patches for the 4.7 merge window have the usual bug fixes and cleanups, and the following new features: - An interface for dasd driver to query if a volume is online to another operating system - A new ioctl for the dasd driver to verify the format for a range of tracks - Following the example of x86 the struct fpu is now allocated with the task_struct - The 'report_error' interface for the PCI bus to send an adapter-error notification from user space to the service element of the machine" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (29 commits) s390/vmem: remove unused function parameter s390/vmem: fix identity mapping s390: add missing include statements s390: add missing declarations s390: make couple of variables and functions static s390/cache: remove superfluous locking s390/cpuinfo: simplify locking and skip offline cpus early s390/3270: hangup the 3270 tty after a disconnect s390/3270: handle reconnect of a tty with a different size s390/3270: avoid endless I/O loop with disconnected 3270 terminals s390/3270: fix garbled output on 3270 tty view s390/3270: fix view reference counting s390/3270: add missing tty_kref_put s390/dumpstack: implement and use return_address() s390/cpum_sf: Remove superfluous SMP function call s390/cpum_cf: Remove superfluous SMP function call s390/Kconfig: make z196 the default processor type s390/sclp: avoid compile warning in sclp_pci_report s390/fpu: allocate 'struct fpu' with the task_struct s390/crypto: cleanup and move the header with the cpacf definitions ... commit 0e034f5c4bc408c943f9c4a06244415d75d7108c Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 11:51:25 2016 -0700 iwlwifi: fix mis-merge that breaks the driver My laptop that uses the intel 7680 iwlwifi module would no longer connects to the network. It would fail with a "Microcode SW error detected." and spew out register state over and over again without ever connecting to the network. The cause is mis-merge in commit 909b27f70643, where David seems to have lost some of the changes to iwl_mvm_set_tx_cmd() from commit 5c08b0f5026f ("iwlwifi: mvm: don't override the rate with the AMSDU len"). The reason seems to be a conflict with commit d8fe484470dd ("iwlwifi: mvm: add support for new TX CMD API"), which touched a line adjacent to the changes in 909b27f70643. David missed the fact that "info->driver_data[0]" had become "skb_info->driver_data[0]". Then he removed the skb_info because it was unused. This just re-updates iwl_mvm_set_tx_cmd() with the lost two lines. Reported-and-tested-by: Linus Torvalds <torvalds@linux-foundation.org> Reported-by: Reinoud Koornstra <reinoudkoornstra@gmail.com> Cc: Luciano Coelho <luciano.coelho@intel.com> Cc: Kalle Valo <kvalo@codeaurora.org> Cc: David Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 9e17632c0a146891c90a4353a160cfcf71f34b8f Merge: 6937047 2c4cb04 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 11:51:59 2016 -0700 Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull misc vfs cleanups from Al Viro: "Assorted cleanups and fixes all over the place" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: coredump: only charge written data against RLIMIT_CORE coredump: get rid of coredump_params->written ecryptfs_lookup(): try either only encrypted or plaintext name ecryptfs: avoid multiple aliases for directories bpf: reject invalid names right in ->lookup() __d_alloc(): treat NULL name as QSTR("/", 1) mtd: switch ubi_open_volume_path() to vfs_stat() mtd: switch open_mtd_by_chdev() to use of vfs_stat() commit 69370471d0b2fc3020c60f5473b1eef5977d165a Merge: e34df33 dd254f5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 11:46:23 2016 -0700 Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull iov_iter cleanups from Al Viro. * 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fold checks into iterate_and_advance() rw_verify_area(): saner calling conventions aio: remove a pointless assignment commit 40543f62cbdce42633e3fe10923099feee272e1f Author: Vishal Verma <vishal.l.verma@intel.com> Date: Thu Apr 21 16:45:56 2016 -0400 dax: fix a comment in dax_zero_page_range and dax_truncate_page The distinction between PAGE_SIZE and PAGE_CACHE_SIZE was removed in 09cbfea mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros The comments for the above functions described a distinction between those, that is now redundant, so remove those paragraphs Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/dax.c | 12 ------------ 1 file changed, 12 deletions(-) commit 4b0228fa1d753f77fe0e6cf4c41398ec77dfbd2a Author: Vishal Verma <vishal.l.verma@intel.com> Date: Thu Apr 21 15:13:46 2016 -0400 dax: for truncate/hole-punch, do zeroing through the driver if possible In the truncate or hole-punch path in dax, we clear out sub-page ranges. If these sub-page ranges are sector aligned and sized, we can do the zeroing through the driver instead so that error-clearing is handled automatically. For sub-sector ranges, we still have to rely on clear_pmem and have the possibility of tripping over errors. Cc: Dan Williams <dan.j.williams@intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Dave Chinner <david@fromorbit.com> Cc: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Documentation/filesystems/dax.txt | 32 ++++++++++++++++++++++++++++++++ fs/dax.c | 30 +++++++++++++++++++++++++----- 2 files changed, 57 insertions(+), 5 deletions(-) commit 679c8bd3b29428e736eabb7fc66a978f312f0c86 Author: Christoph Hellwig <hch@lst.de> Date: Mon May 9 10:47:04 2016 +0200 dax: export a low-level __dax_zero_page_range helper This allows XFS to perform zeroing using the iomap infrastructure and avoid buffer heads. Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christoph Hellwig <hch@lst.de> [vishal: fix conflicts with dax-error-handling] Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/dax.c | 35 ++++++++++++++++++++--------------- include/linux/dax.h | 7 +++++++ 2 files changed, 27 insertions(+), 15 deletions(-) commit 3dc29161070ab14d065554c0ad58988ab77a7bfd Author: Matthew Wilcox <matthew.r.wilcox@intel.com> Date: Tue Mar 15 11:20:41 2016 -0600 dax: use sb_issue_zerout instead of calling dax_clear_sectors dax_clear_sectors() cannot handle poisoned blocks. These must be zeroed using the BIO interface instead. Convert ext2 and XFS to use only sb_issue_zerout(). Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com> [vishal: Also remove the dax_clear_sectors function entirely] Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/dax.c | 32 -------------------------------- fs/ext2/inode.c | 8 ++++---- fs/xfs/xfs_bmap_util.c | 15 ++++----------- include/linux/dax.h | 1 - 4 files changed, 8 insertions(+), 48 deletions(-) commit 0a70bd43053331d99881211e1d09f32de531432f Author: Dan Williams <dan.j.williams@intel.com> Date: Wed Feb 24 14:02:11 2016 -0800 dax: enable dax in the presence of known media errors (badblocks) 1/ If a mapping overlaps a bad sector fail the request. 2/ Do not opportunistically report more dax-capable capacity than is requested when errors present. Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com> [vishal: fix a conflict with system RAM collision patches] [vishal: add a 'size' parameter to ->direct_access] [vishal: fix a conflict with DAX alignment check patches] Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> arch/powerpc/sysdev/axonram.c | 2 +- drivers/block/brd.c | 2 +- drivers/nvdimm/pmem.c | 10 +++++++++- drivers/s390/block/dcssblk.c | 4 ++-- fs/block_dev.c | 13 +------------ include/linux/blkdev.h | 2 +- 6 files changed, 15 insertions(+), 18 deletions(-) commit d3030d11961a8c103cf07aed59905276ddfc06c2 Author: Mark Brown <broonie@kernel.org> Date: Wed May 18 18:30:39 2016 +0100 ASoC: ak4642: Enable cache usage to fix crashes on resume The ak4642 driver is using a regmap cache sync to restore the configuration of the chip on resume but (as Peter observed) does not actually define a register cache which means that the resume is never going to work and we trigger asserts in regmap. Fix this by enabling caching. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Reported-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org sound/soc/codecs/ak4642.c | 3 +++ 1 file changed, 3 insertions(+) commit e34df3344d7b6f284e958147d7225faa340a1f39 Merge: 442c9ac 9f54180 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 10:28:45 2016 -0700 Merge branch 'work.lookups' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull parallel lookup fixups from Al Viro: "Fix for xfs parallel readdir (turns out the cxfs exposure was not enough to catch all problems), and a reversion of btrfs back to ->iterate() until the fs/btrfs/delayed-inode.c gets fixed" * 'work.lookups' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: xfs: concurrent readdir hangs on data buffer locks Revert "btrfs: switch to ->iterate_shared()" commit 9f5418010940236b2c39ea53b99055ca26ff1279 Author: Dave Chinner <david@fromorbit.com> Date: Thu May 19 00:17:26 2016 +1000 xfs: concurrent readdir hangs on data buffer locks There's a three-process deadlock involving shared/exclusive barriers and inverted lock orders in the directory readdir implementation. It's a pre-existing problem with lock ordering, exposed by the VFS parallelisation code. process 1 process 2 process 3 --------- --------- --------- readdir iolock(shared) get_leaf_dents iterate entries ilock(shared) map, lock and read buffer iunlock(shared) process entries in buffer ..... readdir iolock(shared) get_leaf_dents iterate entries ilock(shared) map, lock buffer <blocks> finish ->iterate_shared file_accessed() ->update_time start transaction ilock(excl) <blocks> ..... finishes processing buffer get next buffer ilock(shared) <blocks> And that's the deadlock. Fix this by dropping the current buffer lock in process 1 before trying to map the next buffer. This means we keep the lock order of ilock -> buffer lock intact and hence will allow process 3 to make progress and drop it's ilock(shared) once it is done. Reported-by: Xiong Zhou <xzhou@redhat.com> Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/xfs/xfs_dir2_readdir.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) commit fe742fd4f90fa53cf31296bc5131ae1cdd6d84bb Author: Al Viro <viro@zeniv.linux.org.uk> Date: Wed May 18 13:15:05 2016 -0400 Revert "btrfs: switch to ->iterate_shared()" This reverts commit 972b241f8441dc37a3f89dcd7e71d7f013873d13. Quoth Chris: didn't take the delayed inode stuff into account it got an rbtree of items and it pulls things out so in shared mode, its hugely racey sorry, lets revert and fix it for real inside of btrfs Signed-off-by: Chris Mason <clm@fb.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 442c9ac989d71599ebc39f4ea4d5b0e64996904b Merge: ba5a265 7133566 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 10:17:56 2016 -0700 Merge branch 'sendmsg.cifs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull cifs iovec cleanups from Al Viro. * 'sendmsg.cifs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: cifs: don't bother with kmap on read_pages side cifs_readv_receive: use cifs_read_from_socket() cifs: no need to wank with copying and advancing iovec on recvmsg side either cifs: quit playing games with draining iovecs cifs: merge the hash calculation helpers commit c6740c9c9e914742fd2ec159142c40701f7df966 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 18 18:07:33 2016 +0200 drm: remove unused dev variables After drm_gem_object_lookup() was changed along with all its callers, we have several drivers that have unused variables: drm/armada/armada_crtc.c: In function 'armada_drm_crtc_cursor_set': drm/armada/armada_crtc.c:900:21: error: unused variable 'dev' [-Werror=unused-variable] drm/nouveau/nouveau_gem.c: In function 'validate_init': drm/nouveau/nouveau_gem.c:371:21: error: unused variable 'dev' [-Werror=unused-variable] drm/nouveau/nv50_display.c: In function 'nv50_crtc_cursor_set': drm/nouveau/nv50_display.c:1308:21: error: unused variable 'dev' [-Werror=unused-variable] drm/radeon/radeon_cs.c: In function 'radeon_cs_parser_relocs': drm/radeon/radeon_cs.c:77:21: error: unused variable 'ddev' [-Werror=unused-variable] This fixes all the instances I found with ARM randconfig builds so far. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: a8ad0bd84f98 ("drm: Remove unused drm_device from drm_gem_object_lookup()") Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463587653-3035181-6-git-send-email-arnd@arndb.de drivers/gpu/drm/armada/armada_crtc.c | 1 - drivers/gpu/drm/nouveau/nouveau_gem.c | 1 - drivers/gpu/drm/nouveau/nv50_display.c | 1 - drivers/gpu/drm/radeon/radeon_cs.c | 1 - 4 files changed, 4 deletions(-) commit de4ae068ebf599f46ddfc5f8541a302226230267 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 18 18:07:31 2016 +0200 drm: mediatek: fixup drm_gem_object_lookup API change The drm_gem_object_lookup() function prototype changed while this driver was added, so it fails to build now: drivers/gpu/drm/mediatek/mtk_drm_gem.c: In function 'mtk_drm_gem_dumb_map_offset': drivers/gpu/drm/mediatek/mtk_drm_gem.c:142:30: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types] obj = drm_gem_object_lookup(dev, file_priv, handle); This fixes the new caller as well. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: a8ad0bd84f98 ("drm: Remove unused drm_device from drm_gem_object_lookup()") Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463587653-3035181-4-git-send-email-arnd@arndb.de drivers/gpu/drm/mediatek/mtk_drm_fb.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit ba5a2655c270f59dea2d9b4d764aec2f6e7f5f41 Merge: 8908c94 e0d46f5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 10:08:45 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull remaining vfs xattr work from Al Viro: "The rest of work.xattr (non-cifs conversions)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: btrfs: Switch to generic xattr handlers ubifs: Switch to generic xattr handlers jfs: Switch to generic xattr handlers jfs: Clean up xattr name mapping gfs2: Switch to generic xattr handlers ceph: kill __ceph_removexattr() ceph: Switch to generic xattr handlers ceph: Get rid of d_find_alias in ceph_set_acl commit 1b982baf75e7d9585967fcfccd05b77bf9054010 Merge: 1f716d0 6ca7208 Author: Dan Williams <dan.j.williams@intel.com> Date: Wed May 18 10:07:19 2016 -0700 Merge branch 'for-4.7/acpi6.1' into libnvdimm-for-next commit 1f716d05f8daee4f393dc568ea7a53c7ecfd0bfc Merge: 2159669 a94e3fb Author: Dan Williams <dan.j.williams@intel.com> Date: Wed May 18 10:06:59 2016 -0700 Merge branch 'for-4.7/dsm' into libnvdimm-for-next commit 2159669f581917c4d197d3ea183d3d85b47faf66 Merge: 594d6d9 9dec489 Author: Dan Williams <dan.j.williams@intel.com> Date: Wed May 18 10:06:48 2016 -0700 Merge branch 'for-4.7/libnvdimm' into libnvdimm-for-next commit 8908c94d6cd7513ba4512295abc945a6ff7f979c Merge: 0b7962a 897fba1 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Wed May 18 10:01:47 2016 -0700 Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 Pull cifs updates from Steve French: "Various small CIFS and SMB3 fixes (including some for stable)" * 'for-next' of git://git.samba.org/sfrench/cifs-2.6: remove directory incorrectly tries to set delete on close on non-empty directories Update cifs.ko version to 2.09 fs/cifs: correctly to anonymous authentication for the NTLM(v2) authentication fs/cifs: correctly to anonymous authentication for the NTLM(v1) authentication fs/cifs: correctly to anonymous authentication for the LANMAN authentication fs/cifs: correctly to anonymous authentication via NTLMSSP cifs: remove any preceding delimiter from prefix_path cifs: Use file_dentry() commit 594d6d96ea042366878aa7dc7f5711b8c245db5a Merge: 1b8d2af 45a0dac Author: Dan Williams <dan.j.williams@intel.com> Date: Wed May 18 09:59:34 2016 -0700 Merge branch 'for-4.7/dax' into libnvdimm-for-next commit 45c04704e467fffe3525205454d9627325dae308 Author: Peter Ujfalusi <peter.ujfalusi@ti.com> Date: Wed May 18 16:19:01 2016 +0300 ASoC: twl6040: Disconnect AUX output pads on digital mute Disconnect also the path to AUXL from the HF path during digital_mute to avoid pop noise leakage to Line-out pads. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> include/linux/mfd/twl6040.h | 1 + sound/soc/codecs/twl6040.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) commit 6cf9c5babd980ec1959e0dd45e3036474c6a294f Author: Dan Williams <dan.j.williams@intel.com> Date: Wed May 18 09:13:13 2016 -0700 libnvdimm: stop requiring a driver ->remove() method The dax_pmem driver was implementing an empty ->remove() method to satisfy the nvdimm bus driver that unconditionally calls ->remove(). Teach the core bus driver to check if ->remove() is NULL to remove that requirement. Reported-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/nvdimm/bus.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9842df62004f366b9fed2423e24df10542ee0dc5 Author: Andy Honig <ahonig@google.com> Date: Tue May 17 17:41:47 2016 +0200 KVM: MTRR: remove MSR 0x2f8 MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support was introduced by 9ba075a664df ("KVM: MTRR support"). 0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8, which made access to index 124 out of bounds. The surrounding code only WARNs in this situation, thus the guest gained a limited read/write access to struct kvm_arch_vcpu. 0x2f8 is not a valid VR MTRR MSR, because KVM has/advertises only 16 VR MTRR MSRs, 0x200-0x20f. Every VR MTRR is set up using two MSRs, 0x2f8 was treated as a PHYSBASE and 0x2f9 would be its PHYSMASK, but 0x2f9 was not implemented in KVM, therefore 0x2f8 could never do anything useful and getting rid of it is safe. This fixes CVE-2016-3713. Fixes: 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") Cc: stable@vger.kernel.org Reported-by: David Matlack <dmatlack@google.com> Signed-off-by: Andy Honig <ahonig@google.com> Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/mtrr.c | 2 -- 1 file changed, 2 deletions(-) commit 67c9dddc95ac16a09db996e8e4dcacfd94cf2306 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Tue May 10 17:01:23 2016 +0200 KVM: x86: make hwapic_isr_update and hwapic_irr_update look the same Neither APICv nor AVIC actually need the first argument of hwapic_isr_update, but the vCPU makes more sense than passing the pointer to the whole virtual machine! In fact in the APICv case it's just happening that the vCPU is used implicitly, through the loaded VMCS. The second argument instead is named differently, make it consistent. Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 2 +- arch/x86/kvm/lapic.c | 6 +++--- arch/x86/kvm/svm.c | 2 +- arch/x86/kvm/vmx.c | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) commit 8221c13700561b36fb1bfda583888cbb43b572f0 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Wed May 4 14:09:52 2016 -0500 svm: Manage vcpu load/unload when enable AVIC When a vcpu is loaded/unloaded to a physical core, we need to update host physical APIC ID information in the Physical APIC-ID table accordingly. Also, when vCPU is blocking/un-blocking (due to halt instruction), we need to make sure that the is-running bit in set accordingly in the physical APIC-ID table. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> [Return void from new functions, add WARN_ON when they returned negative errno; split load and put into separate function as they have almost nothing in common. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/svm.c | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit 3bbf3565f48ce3999b5a12cde946f81bd4475312 Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Date: Wed May 4 14:09:51 2016 -0500 svm: Do not intercept CR8 when enable AVIC When enable AVIC: * Do not intercept CR8 since this should be handled by AVIC HW. * Also, we don't need to sync cr8/V_TPR and APIC backing page. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> [Rename svm_in_nested_interrupt_shadow to svm_nested_virtualize_tpr. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/svm.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit 46781eae2e3210153476958ea023ce7b44825963 Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Wed May 4 14:09:50 2016 -0500 svm: Do not expose x2APIC when enable AVIC Since AVIC only virtualizes xAPIC hardware for the guest, this patch disable x2APIC support in guest CPUID. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/svm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit be8ca170edf342cc45ae4a6431ef192e5cbe211e Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Date: Wed May 4 14:09:49 2016 -0500 KVM: x86: Introducing kvm_x86_ops.apicv_post_state_restore Adding kvm_x86_ops hooks to allow APICv to do post state restore. This is required to support VM save and restore feature. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/lapic.c | 2 ++ arch/x86/kvm/svm.c | 10 ++++++++++ 3 files changed, 13 insertions(+) commit 18f40c53e10f8d1267dc47cce4487664eececd6d Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Wed May 4 14:09:48 2016 -0500 svm: Add VMEXIT handlers for AVIC This patch introduces VMEXIT handlers, avic_incomplete_ipi_interception() and avic_unaccelerated_access_interception() along with two trace points (trace_kvm_avic_incomplete_ipi and trace_kvm_avic_unaccelerated_access). Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 1 + arch/x86/include/uapi/asm/svm.h | 9 +- arch/x86/kvm/lapic.h | 3 + arch/x86/kvm/svm.c | 279 ++++++++++++++++++++++++++++++++++++++++ arch/x86/kvm/trace.h | 57 ++++++++ arch/x86/kvm/x86.c | 2 + 6 files changed, 350 insertions(+), 1 deletion(-) commit 340d3bc3664e5d3fb922fe6e3ae2d901d4900d88 Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Date: Wed May 4 14:09:47 2016 -0500 svm: Add interrupt injection via AVIC This patch introduces a new mechanism to inject interrupt using AVIC. Since VINTR is not supported when enable AVIC, we need to inject interrupt via APIC backing page instead. This patch also adds support for AVIC doorbell, which is used by KVM to signal a running vcpu to check IRR for injected interrupts. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/svm.c | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) commit 44a95dae1d229a4967bbfcc56fb2116a9b4fe942 Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Date: Wed May 4 14:09:46 2016 -0500 KVM: x86: Detect and Initialize AVIC support This patch introduces AVIC-related data structure, and AVIC initialization code. There are three main data structures for AVIC: * Virtual APIC (vAPIC) backing page (per-VCPU) * Physical APIC ID table (per-VM) * Logical APIC ID table (per-VM) Currently, AVIC is disabled by default. Users can manually enable AVIC via kernel boot option kvm-amd.avic=1 or during kvm-amd module loading with parameter avic=1. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> [Avoid extra indentation (Boris). - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 4 + arch/x86/include/asm/svm.h | 3 + arch/x86/kvm/svm.c | 225 +++++++++++++++++++++++++++++++++++++++- 3 files changed, 231 insertions(+), 1 deletion(-) commit 3d5615e5342781453633af7107d72afd601b36a7 Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Date: Wed May 4 14:09:45 2016 -0500 svm: Introduce new AVIC VMCB registers Introduce new AVIC VMCB registers. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/svm.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit dd1a4cc1fbdf516bb38ca31b65c76e720d414d0d Author: Radim Krčmář <rkrcmar@redhat.com> Date: Wed May 4 14:09:44 2016 -0500 KVM: split kvm_vcpu_wake_up from kvm_vcpu_kick AVIC has a use for kvm_vcpu_wake_up. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> include/linux/kvm_host.h | 1 + virt/kvm/kvm_main.c | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) commit d1ed092f77ef562edcc1b45ae331ff1683f50295 Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Date: Wed May 4 14:09:43 2016 -0500 KVM: x86: Introducing kvm_x86_ops VCPU blocking/unblocking hooks Adding new function pointer in struct kvm_x86_ops, and calling them from the kvm_arch_vcpu[blocking/unblocking]. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) commit 03543133cea646406307870823343912c1ef0a3a Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Date: Wed May 4 14:09:42 2016 -0500 KVM: x86: Introducing kvm_x86_ops VM init/destroy hooks Adding function pointers in struct kvm_x86_ops for processor-specific layer to provide hooks for when KVM initialize and destroy VM. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/include/asm/kvm_host.h | 3 +++ arch/x86/kvm/x86.c | 5 +++++ 2 files changed, 8 insertions(+) commit dfb9595429c65f72656551b9e1ad20126486badb Author: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Date: Wed May 4 14:09:41 2016 -0500 KVM: x86: Rename kvm_apic_get_reg to kvm_lapic_get_reg Rename kvm_apic_get_reg to kvm_lapic_get_reg to be consistent with the existing kvm_lapic_set_reg counterpart. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/ioapic.c | 2 +- arch/x86/kvm/lapic.c | 58 +++++++++++++++++++++++++-------------------------- arch/x86/kvm/lapic.h | 6 +++--- 3 files changed, 33 insertions(+), 33 deletions(-) commit 1e6e2755b635e85ce0b1ce827b7c375b6a0a890c Author: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Date: Wed May 4 14:09:40 2016 -0500 KVM: x86: Misc LAPIC changes to expose helper functions Exporting LAPIC utility functions and macros for re-use in SVM code. Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/lapic.c | 127 +++++++++++++++++++++------------------------------ arch/x86/kvm/lapic.h | 29 ++++++++++++ 2 files changed, 82 insertions(+), 74 deletions(-) commit 2086d3200dc9966c96a6c319a1214a94f00223f8 Author: Christian Borntraeger <borntraeger@de.ibm.com> Date: Tue May 17 10:49:22 2016 +0200 KVM: shrink halt polling even more for invalid wakeups commit 3491caf2755e ("KVM: halt_polling: provide a way to qualify wakeups during poll") added more aggressive shrinking of the polling interval if the wakeup did not match some criteria. This still allows to keep polling enabled if the polling time was smaller that the current max poll time (block_ns <= vcpu->halt_poll_ns). Performance measurement shows that even more aggressive shrinking (shrink polling on any invalid wakeup) reduces absolute and relative (to the workload) CPU usage even further. Cc: David Matlack <dmatlack@google.com> Cc: Wanpeng Li <kernellwp@gmail.com> Cc: Radim Krčmář <rkrcmar@redhat.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> virt/kvm/kvm_main.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 280dc0e145b2b04fd1b414e512118ce6eb9b93e8 Author: Jon Hunter <jonathanh@nvidia.com> Date: Wed May 18 16:37:36 2016 +0100 drm/tegra: Fix crash caused by reference count imbalance Commit d2307dea14a4 ("drm/atomic: use connector references (v3)") added reference counting for DRM connectors and this caused a crash when exercising system suspend on Tegra114 Dalmore. The Tegra DSI driver implements a Tegra specific function, tegra_dsi_connector_duplicate_state(), to duplicate the connector state and destroys the state using the generic helper function, drm_atomic_helper_connector_destroy_state(). Following commit d2307dea14a4 ("drm/atomic: use connector references (v3)") there is now an imbalance in the connector reference count because the Tegra function to duplicate state does not take a reference when duplicating the state information. However, the generic helper function to destroy the state information assumes a reference has been taken and during system suspend, when the connector state is destroyed, this leads to a crash because we attempt to put the reference for an object that has already been freed. Fix this by calling __drm_atomic_helper_connector_duplicate_state() from tegra_dsi_connector_duplicate_state() to ensure that we take a reference on a connector if crtc is set. Note that this will also copy the connector state a 2nd time, but this should be harmless. By fixing tegra_dsi_connector_duplicate_state() to take a reference, although a crash was no longer seen, it was then observed that after each system suspend-resume cycle, the reference would be one greater than before the suspend-resume cycle. Following commit d2307dea14a4 ("drm/atomic: use connector references (v3)"), it was found that we also need to put the reference when calling the function tegra_dsi_connector_reset() before freeing the state. Fix this by updating tegra_dsi_connector_reset() to call the function __drm_atomic_helper_connector_destroy_state() in order to put the reference for the connector. Fixes: d2307dea14a4 ("drm/atomic: use connector references (v3)") Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463585856-16606-1-git-send-email-jonathanh@nvidia.com drivers/gpu/drm/tegra/dsi.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 8a6f71ccb6c39ca5ae442d1478d3a076e2b1361e Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 18 16:17:36 2016 +0200 ARM: exynos: don't select keyboard driver The samsung-keypad driver is implicitly selected by ARCH_EXYNOS4 (why?), but this fails if CONFIG_INPUT is a loadable module: drivers/input/built-in.o: In function `samsung_keypad_remove': drivers/input/keyboard/samsung-keypad.c:461: undefined reference to `input_unregister_device' drivers/input/built-in.o: In function `samsung_keypad_irq': drivers/input/keyboard/samsung-keypad.c:137: undefined reference to `input_event' drivers/input/built-in.o: In function `samsung_keypad_irq': include/linux/input.h:389: undefined reference to `input_event' drivers/input/built-in.o: In function `samsung_keypad_probe': drivers/input/keyboard/samsung-keypad.c:358: undefined reference to `devm_input_allocate_device' drivers/input/built-in.o:(.debug_addr+0x34): undefined reference to `input_set_capability' This removes the 'select' as suggested by Krzysztof Kozlowski and instead enables the driver from the defconfig files. The problem does not happen on mainline kernels, as we don't normally build built-in input drivers when CONFIG_INPUT=m, but I am experimenting with a patch to change this, and the samsung keypad driver showed up as one example that was silently broken before. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lkml.org/lkml/2016/2/14/55 Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> arch/arm/configs/exynos_defconfig | 1 + arch/arm/configs/multi_v7_defconfig | 1 + arch/arm/mach-exynos/Kconfig | 1 - 3 files changed, 2 insertions(+), 1 deletion(-) commit 4cb54493ab2003568222e6ad7449747354f22ce3 Author: Arnd Bergmann <arnd@arndb.de> Date: Thu May 12 10:38:31 2016 +0200 ARM: samsung: improve static dma_mask definition When no DMA master devices are part of the kernel configuration, we get a warning about the unused dma mask definition: arch/arm/plat-samsung/devs.c:71:12: error: 'samsung_device_dma_mask' defined but not used [-Werror=unused-variable] static u64 samsung_device_dma_mask = DMA_BIT_MASK(32); We could simply mark this as __maybe_unused to shut up that warning, but a nicer solution seems to be to have a separate mask for each device. The advantage is that a driver that happens to call dma_set_mask() on one device doesn't implicitly change the mask for the other devices as well. This is more of a theoretical problem, as obviously nothing does it for the devices in this file (or they would have always been broken), but it feels cleaner that way. The definition works by creating an array in place so we can take the address of it and let the compiler generate a hidden symbol for it at compile time. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> arch/arm/plat-samsung/devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c16d2750a08c8ccaf98d65f287a8aec91bb9610d Author: Matan Barak <matanb@mellanox.com> Date: Sun Apr 17 17:08:41 2016 +0300 IB/mlx5: Fire the CQ completion handler from tasklet Previously, mlx5_ib_cq_comp was executed from interrupt context. Under heavy load, this could cause the CPU core to be in an interrupt context too long. Instead of executing the handler from the interrupt context we execute it from a much friendly tasklet context. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/mlx5/cq.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 94c6825e0ff75829207af6246782811b7c7af2c0 Author: Matan Barak <matanb@mellanox.com> Date: Sun Apr 17 17:08:40 2016 +0300 net/mlx5_core: Use tasklet for user-space CQ completion events Previously, we've fired all our completion callbacks straight from our ISR. Some of those callbacks were lightweight (for example, mlx5 Ethernet napi callbacks), but some of them did more work (for example, the user-space RDMA stack uverbs' completion handler). Besides that, doing more than the minimal work in ISR is generally considered wrong, it could even lead to a hard lockup of the system. Since when a lot of completion events are generated by the hardware, the loop over those events could be so long, that we'll get into a hard lockup by the system watchdog. In order to avoid that, add a new way of invoking completion events callbacks. In the interrupt itself, we add the CQs which receive completion event to a per-EQ list and schedule a tasklet. In the tasklet context we loop over all the CQs in the list and invoke the user callback. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/net/ethernet/mellanox/mlx5/core/cq.c | 59 ++++++++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/eq.c | 12 ++++- drivers/net/ethernet/mellanox/mlx5/core/main.c | 17 +++++++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 2 + include/linux/mlx5/cq.h | 5 ++ include/linux/mlx5/driver.h | 10 ++++ 6 files changed, 104 insertions(+), 1 deletion(-) commit 17e1717c11a34f9b0956e33e0c4a4e4ae8c51a57 Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Wed May 18 22:27:43 2016 +0900 ALSA: firewire-lib: change a member of event structure to suppress sparse wanings to bool type Commit a9c4284bf5a9 ("ALSA: firewire-lib: add context information to tracepoints") adds new members to tracepoint events of this module, to represent context information. One of the members is bool type and this causes sparse warnings. 16:1: warning: expression using sizeof bool 60:1: warning: expression using sizeof bool 16:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) 60:1: warning: odd constant _Bool cast (ffffffffffffffff becomes 1) This commit suppresses the warnings, by changing type of the member to 'unsigned int'. Additionally, this commit applies '!!' idiom to get 0/1 from 'in_interrupt()'. Fixes: a9c4284bf5a9 ("ALSA: firewire-lib: add context information to tracepoints") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/amdtp-stream-trace.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit e3b6d8cf8de6d07af9a27c86861edfa5b3290cb6 Author: Christoph Lameter <cl@linux.com> Date: Fri May 13 10:52:26 2016 -0500 IB/core: Do not require CAP_NET_ADMIN for packet sniffing In the Ethernet/TCP world, CAP_NET_RAW is sufficient to allow a program to listen to all incoming packets on a specific interface, and the higher CAP_NET_ADMIN is required to set the interface into promiscuous mode. We want to emulate that same basic division of privilege in the RDMA stack, so when dealing with Raw Ethernet QPs, allow apps with CAP_NET_RAW to listen to all incoming flows (and direct them as they see fit in their own listen stream). Do not require CAP_NET_ADMIN just to listen to traffic already incoming. Reserve CAP_NET_ADMIN if we attempt to set promiscuous mode. Signed-off-by: Christoph Lameter <cl@linux.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/uverbs_cmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 04ef0f1a0169a14b8e653af1178524ab4390133f Author: shamir rabinovitch <shamir.rabinovitch@oracle.com> Date: Wed May 18 06:18:10 2016 -0400 IB/mlx4: Fix unaligned access in send_reply_to_slave The problem is that the function 'send_reply_to_slave' gets the 'req_sa_mad' as a pointer whose address is only aliged to 4 bytes but is 8 bytes in size. This can result in unaligned access faults on certain architectures. Sowmini Varadhan pointed to this reply from Dave Miller that say that memcpy should not be used to solve alignment issues: https://lkml.org/lkml/2015/10/21/352 Optimization of memcpy to 'ldx' instruction can only happen if the compiler knows that the size of the data we are copying is 8 bytes and it assumes it is aligned to 8 bytes. If the compiler know the type is not aligned to 8 it must not optimize the 8 byte copy. Defining the data type as aligned to 4 forces the compiler to treat all accesses as though they aren't aligned and avoids the 'ldx' optimization. Full credit for the idea goes to Jason Gunthorpe <jgunthorpe@obsidianresearch.com>. Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@oracle.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/mlx4/mcg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ef3f00a4d38e01ec0e7ad1b1c8edc2f5667aaa32 Author: Jiri Olsa <jolsa@redhat.com> Date: Wed May 18 08:16:10 2016 +0200 perf/x86/intel/uncore: Remove WARN_ON_ONCE in uncore_pci_probe When booting with nr_cpus=1, uncore_pci_probe tries to init the PCI/uncore also for the other packages and fails with warning when they are not found. The warning is bogus because it's correct to fail here for packages which are not initialized. Remove it and return silently. Fixes: cf6d445f6897 "perf/x86/uncore: Track packages, not per CPU data" Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: stable@vger.kernel.org Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> arch/x86/events/intel/uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3b59c344ab6e2d00b0f4ad946024572618c87502 Author: Eric Huang <JinHuiEric.Huang@amd.com> Date: Fri May 13 17:07:59 2016 -0400 drm/amd/powerplay: fix bugs of checking if dpm is running on Tonga Fixes OD failures on Tonga. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b9934878fdbabd7eea5dbc953b66d74decdf5fbd Author: Flora Cui <Flora.Cui@amd.com> Date: Tue May 17 09:52:22 2016 +0800 drm/amdgpu: update Polaris11 golden setting Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) commit 35621b80085b371d1e9bb9b6de58bf173d12f31e Author: Flora Cui <Flora.Cui@amd.com> Date: Tue May 17 09:52:02 2016 +0800 drm/amdgpu: Add more Polaris 11 PCI IDs Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d4ab989fc39897e9b6b24c4c5dd0eea288daee7e Author: Flora Cui <Flora.Cui@amd.com> Date: Mon May 16 17:18:17 2016 +0800 drm/amdgpu: update Polaris10 golden setting Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) commit 1dcf480167cdba271df73a48460d60ad0f5e3845 Author: Flora Cui <Flora.Cui@amd.com> Date: Mon May 16 17:17:41 2016 +0800 drm/amdgpu: add more Polaris10 DID Signed-off-by: Flora Cui <Flora.Cui@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 2f46b2a5c74c35f785c10fe910621662e3188682 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Tue May 17 15:12:47 2016 +0530 drm/amd/amdgpu : Remove unused variable Remove unused variable 'ret', and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit a280a42aa351bab5eaf8e253f172487a6785f62e Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Tue May 17 15:12:46 2016 +0530 drm/amd/amdgpu : Remove unused variable Remove unused variable 'ret', and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 0e2b854ed4ce764e7de781901b49aedd3f7a3dfa Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Tue May 17 15:12:45 2016 +0530 drm/amd/amdgpu : Remove unused variable Remove unused variable 'ret', and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/cz_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit d05f2c7aeb5ec6ef6066992517d4a9af40729913 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Tue May 17 15:12:44 2016 +0530 drm/amd/amdgpu/cz_dpm: Remove unused variable Remove unused variable 'ret' from functions where it was not used anyway, and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 734711b71d3339045141a7e934f1c53d98ad0b98 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Tue May 17 15:12:43 2016 +0530 drm/amd/amdgpu : Remove unused variable Remove unused variable 'ret', and directly return 0. Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/cik_ih.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit fdf2c85f26a656df3c9ef2114ff508a4be26bbff Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Fri May 6 14:55:02 2016 +0200 drm: Fix error handling in drm_connector_register When debugfs or sysfs registration failed, we failed to clean up the idr registration. Reorder to fix this. Cc: Dave Airlie <airlied@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462539302-27764-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e2d800a3ce1b16a9c25fc6ca91f26df5509ca11d Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Fri May 6 12:47:45 2016 +0100 drm: Avoid connector reference imbalance on error path Whilst looking at the fallout from using connector references for atomic, I noticed that there is an early return buried in drm_atomic_set_crtc_for_connector() that if hit could cause us to leak a reference on the connector. Fixes: d2307dea14 (drm/atomic: use connector references (v3)) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Daniel Stone <daniels@collabora.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462535265-13058-1-git-send-email-chris@chris-wilson.co.uk drivers/gpu/drm/drm_atomic.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) commit 88ac99063e6e38bf9577e75f0d65dd02e2326d58 Merge: 191b075 5af897e 431c30f Author: Zhang Rui <rui.zhang@intel.com> Date: Wed May 18 15:37:08 2016 +0800 Merge branches 'thermal-core', 'thermal-intel' and 'thermal-soc' into next commit b52207ef4ea56f8c22288ec3387399aac72c26cf Author: Chen Feng <puck.chen@hisilicon.com> Date: Sun Feb 14 14:29:21 2016 +0800 mfd: hi655x: Add MFD driver for hi655x Add PMIC MFD driver to support hisilicon hi665x. Signed-off-by: Chen Feng <puck.chen@hisilicon.com> Signed-off-by: Fei Wang <w.f@huawei.com> Signed-off-by: Xinwei Kong <kong.kongxinwei@hisilicon.com> Reviewed-by: Haojian Zhuang <haojian.zhuang@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> drivers/mfd/Kconfig | 10 +++ drivers/mfd/Makefile | 1 + drivers/mfd/hi655x-pmic.c | 162 ++++++++++++++++++++++++++++++++++++++++ include/linux/mfd/hi655x-pmic.h | 55 ++++++++++++++ 4 files changed, 228 insertions(+) commit 776d7f1694a7d678291354a05f0243965708306a Author: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Date: Mon May 16 12:57:43 2016 +0300 arc: axs103_smp: Fix CPU frequency to 100MHz for dual-core The most recent release of AXS103 [v1.1] is proven to work at 100 MHz in dual-core mode so this change uses mentioned feature. For that we: * Update axc003_idu.dtsi with mention of really-used CPU clock freq * Remove clock override in AXS platform code for dual-core HW Note we're still leaving a hack for clock "downgrade" on early boot for quad-core hardware. Also note this change will break functionality of AXS103 v1.0 hardware. That means all users of AXS103 __must__ upgrade their boards with the most recent firmware. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> arch/arc/boot/dts/axc003_idu.dtsi | 2 +- arch/arc/plat-axs10x/axs10x.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) commit ad438c4038968e5ca5248f851212634e474983e8 Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 14:20:08 2016 +1000 xfs: move reclaim tagging functions Rearrange the inode tagging functions so that they are higher up in xfs_cache.c and so there is no need for forward prototypes to be defined. This is purely code movement, no other change. Signed-off-by: Dave Chinner <dchinner@redhat.com> fs/xfs/xfs_icache.c | 234 ++++++++++++++++++++++++++-------------------------- 1 file changed, 116 insertions(+), 118 deletions(-) commit 545c0889d26d47e1139c527002eb131343d13b63 Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 14:11:41 2016 +1000 xfs: simplify inode reclaim tagging interfaces Inode radix tree tagging for reclaim passes a lot of unnecessary variables around. Over time the xfs-perag has grown a xfs_mount backpointer, and an internal agno so we don't need to pass other variables into the tagging functions to supply this information. Rework the functions to pass the minimal variable set required and simplify the internal logic and flow. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_icache.c | 98 +++++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 48 deletions(-) commit 194293631d009254348f43710a7673bbb84a4172 Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 14:09:46 2016 +1000 xfs: rename variables in xfs_iflush_cluster for clarity The cluster inode variable uses unconventional naming - iq - which makes it hard to distinguish it between the inode passed into the function - ip - and that is a vector for mistakes to be made. Rename all the cluster inode variables to use a more conventional prefixes to reduce potential future confusion (cilist, cilist_size, cip). Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_inode.c | 74 +++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) commit 5a90e53e8124d3ebe4b2a6309fa3c3225c23a62a Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 14:09:13 2016 +1000 xfs: xfs_iflush_cluster has range issues xfs_iflush_cluster() does a gang lookup on the radix tree, meaning it can find inodes beyond the current cluster if there is sparse cache population. gang lookups return results in ascending index order, so stop trying to cluster inodes once the first inode outside the cluster mask is detected. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_inode.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 8a17d7ddedb4d9031f046ae0e97c40b46aa69db5 Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 14:09:12 2016 +1000 xfs: mark reclaimed inodes invalid earlier The last thing we do before using call_rcu() on an xfs_inode to be freed is mark it as invalid. This means there is a window between when we know for certain that the inode is going to be freed and when we do actually mark it as "freed". This is important in the context of RCU lookups - we can look up the inode, find that it is valid, and then use it as such not realising that it is in the final stages of being freed. As such, mark the inode as being invalid the moment we know it is going to be reclaimed. This can be done while we still hold the XFS_ILOCK_EXCL and the flush lock in xfs_inode_reclaim, meaning that it occurs well before we remove it from the radix tree, and that the i_flags_lock, the XFS_ILOCK and the inode flush lock all act as synchronisation points for detecting that an inode is about to go away. For defensive purposes, this allows us to add a further check to xfs_iflush_cluster to ensure we skip inodes that are being freed after we grab the XFS_ILOCK_SHARED and the flush lock - we know that if the inode number if valid while we have these locks held we know that it has not progressed through reclaim to the point where it is clean and is about to be freed. [bfoster: fixed __xfs_inode_clear_reclaim() using ip->i_ino after it had already been zeroed.] Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_icache.c | 46 ++++++++++++++++++++++++++++++++++------------ fs/xfs/xfs_inode.c | 13 +++++++++++++ 2 files changed, 47 insertions(+), 12 deletions(-) commit 1f2dcfe89edac4e3bf5b76c56f745191f921fd2a Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 14:01:53 2016 +1000 xfs: xfs_inode_free() isn't RCU safe The xfs_inode freed in xfs_inode_free() has multiple allocated structures attached to it. We free these in xfs_inode_free() before we mark the inode as invalid, and before we run call_rcu() to queue the structure for freeing. Unfortunately, this freeing can race with other accesses that are in the RCU current grace period that have found the inode in the radix tree with a valid state. This includes xfs_iflush_cluster(), which calls xfs_inode_clean(), and that accesses the inode log item on the xfs_inode. The log item structure is freed in xfs_inode_free(), so there is the possibility we can be accessing freed memory in xfs_iflush_cluster() after validating the xfs_inode structure as being valid for this RCU context. Hence we can get spuriously incorrect clean state returned from such checks. This can lead to use thinking the inode is dirty when it is, in fact, clean, and so incorrectly attaching it to the buffer for IO and completion processing. This then leads to use-after-free situations on the xfs_inode itself if the IO completes after the current RCU grace period expires. The buffer callbacks will access the xfs_inode and try to do all sorts of things it shouldn't with freed memory. IOWs, xfs_iflush_cluster() only works correctly when racing with inode reclaim if the inode log item is present and correctly stating the inode is clean. If the inode is being freed, then reclaim has already made sure the inode is clean, and hence xfs_iflush_cluster can skip it. However, we are accessing the inode inode under RCU read lock protection and so also must ensure that all dynamically allocated memory we reference in this context is not freed until the RCU grace period expires. To fix this, move all the potential memory freeing into xfs_inode_free_callback() so that we are guarantee RCU protected lookup code will always have the memory structures it needs available during the RCU grace period that lookup races can occur in. Discovered-by: Brain Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_icache.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 32b43ab6fb983e5a117048443e628c235cd2c5bd Author: Alex Lyakas <alex@zadarastorage.com> Date: Wed May 18 14:01:52 2016 +1000 xfs: optimise xfs_iext_destroy When unmounting XFS, we call: xfs_inode_free => xfs_idestroy_fork => xfs_iext_destroy This goes over the whole indirection array and calls xfs_iext_irec_remove for each one of the erps (from the last one to the first one). As a result, we keep shrinking (reallocating actually) the indirection array until we shrink out all of its elements. When we have files with huge numbers of extents, umount takes 30-80 sec, depending on the amount of files that XFS loaded and the amount of indirection entries of each file. The unmount stack looks like: [<ffffffffc0b6d200>] xfs_iext_realloc_indirect+0x40/0x60 [xfs] [<ffffffffc0b6cd8e>] xfs_iext_irec_remove+0xee/0xf0 [xfs] [<ffffffffc0b6cdcd>] xfs_iext_destroy+0x3d/0xb0 [xfs] [<ffffffffc0b6cef6>] xfs_idestroy_fork+0xb6/0xf0 [xfs] [<ffffffffc0b87002>] xfs_inode_free+0xb2/0xc0 [xfs] [<ffffffffc0b87260>] xfs_reclaim_inode+0x250/0x340 [xfs] [<ffffffffc0b87583>] xfs_reclaim_inodes_ag+0x233/0x370 [xfs] [<ffffffffc0b8823d>] xfs_reclaim_inodes+0x1d/0x20 [xfs] [<ffffffffc0b96feb>] xfs_unmountfs+0x7b/0x1a0 [xfs] [<ffffffffc0b98e4d>] xfs_fs_put_super+0x2d/0x70 [xfs] [<ffffffff811e9e36>] generic_shutdown_super+0x76/0x100 [<ffffffff811ea207>] kill_block_super+0x27/0x70 [<ffffffff811ea519>] deactivate_locked_super+0x49/0x60 [<ffffffff811eaaee>] deactivate_super+0x4e/0x70 [<ffffffff81207593>] cleanup_mnt+0x43/0x90 [<ffffffff81207632>] __cleanup_mnt+0x12/0x20 [<ffffffff8108f8e7>] task_work_run+0xa7/0xe0 [<ffffffff81014ff7>] do_notify_resume+0x97/0xb0 [<ffffffff81717c6f>] int_signal+0x12/0x17 Further, this reallocation prevents us from freeing the extent list from a RCU callback as allocation can block. Hence if the extent list is in indirect format, optimise the freeing of the extent list to only use kmem_free calls by freeing entire extent buffer pages at a time, rather than extent by extent. [dchinner: simplified freeing loop based on Christoph's suggestion] Signed-off-by: Alex Lyakas <alex@zadarastorage.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/libxfs/xfs_inode_fork.c | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) commit 7d3aa7fe970791f1a674b14572a411accf2f4d4e Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 13:54:23 2016 +1000 xfs: skip stale inodes in xfs_iflush_cluster We don't write back stale inodes so we should skip them in xfs_iflush_cluster, too. cc: <stable@vger.kernel.org> # 3.10.x- Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_inode.c | 1 + 1 file changed, 1 insertion(+) commit 51b07f30a71c27405259a0248206ed4e22adbee2 Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 13:54:22 2016 +1000 xfs: fix inode validity check in xfs_iflush_cluster Some careless idiot(*) wrote crap code in commit 1a3e8f3 ("xfs: convert inode cache lookups to use RCU locking") back in late 2010, and so xfs_iflush_cluster checks the wrong inode for whether it is still valid under RCU protection. Fix it to lock and check the correct inode. (*) Careless-idiot: Dave Chinner <dchinner@redhat.com> cc: <stable@vger.kernel.org> # 3.10.x- Discovered-by: Brain Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b1438f477934f5a4d5a44df26f3079a7575d5946 Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 13:53:42 2016 +1000 xfs: xfs_iflush_cluster fails to abort on error When a failure due to an inode buffer occurs, the error handling fails to abort the inode writeback correctly. This can result in the inode being reclaimed whilst still in the AIL, leading to use-after-free situations as well as filesystems that cannot be unmounted as the inode log items left in the AIL never get removed. Fix this by ensuring fatal errors from xfs_imap_to_bp() result in the inode flush being aborted correctly. cc: <stable@vger.kernel.org> # 3.10.x- Reported-by: Shyam Kaushik <shyam@zadarastorage.com> Diagnosed-by: Shyam Kaushik <shyam@zadarastorage.com> Tested-by: Shyam Kaushik <shyam@zadarastorage.com> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_inode.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit 8179c03629de67f515d3ab825b5a9428687d4b85 Author: Dave Chinner <dchinner@redhat.com> Date: Wed May 18 13:52:42 2016 +1000 xfs: remove xfs_fs_evict_inode() Joe Lawrence reported a list_add corruption with 4.6-rc1 when testing some custom md administration code that made it's own block device nodes for the md array. The simple test loop of: for i in {0..100}; do mknod --mode=0600 $tmp/tmp_node b $MAJOR $MINOR mdadm --detail --export $tmp/tmp_node > /dev/null rm -f $tmp/tmp_node done Would produce this warning in bd_acquire() when mdadm opened the device node: list_add double add: new=ffff88043831c7b8, prev=ffff8804380287d8, next=ffff88043831c7b8. And then produce this from bd_forget from kdevtmpfs evicting a block dev inode: list_del corruption. prev->next should be ffff8800bb83eb10, but was ffff88043831c7b8 This is a regression caused by commit c19b3b05 ("xfs: mode di_mode to vfs inode"). The issue is that xfs_inactive() frees the unlinked inode, and the above commit meant that this freeing zeroed the mode in the struct inode. The problem is that after evict() has called ->evict_inode, it expects the i_mode to be intact so that it can call bd_forget() or cd_forget() to drop the reference to the block device inode attached to the XFS inode. In reality, the only thing we do in xfs_fs_evict_inode() that is not generic is call xfs_inactive(). We can move the xfs_inactive() call to xfs_fs_destroy_inode() without any problems at all, and this will leave the VFS inode intact until it is completely done with it. So, remove xfs_fs_evict_inode(), and do the work it used to do in ->destroy_inode instead. cc: <stable@vger.kernel.org> # 4.6 Reported-by: Joe Lawrence <joe.lawrence@stratus.com> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_super.c | 28 +++++++--------------------- 1 file changed, 7 insertions(+), 21 deletions(-) commit ebe24cea95ab969f76f2922032f6c390fdc816f2 Author: Marek Lindner <mareklindner@neomailbox.ch> Date: Sat May 7 19:54:17 2016 +0800 batman-adv: initialize ELP orig address on secondary interfaces This fix prevents nodes to wrongly create a 00:00:00:00:00:00 originator which can potentially interfere with the rest of the neighbor statistics. Fixes: d6f94d91f766 ("batman-adv: ELP - adding basic infrastructure") Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bat_v.c | 10 ++++++++++ net/batman-adv/bat_v_elp.c | 31 ++++++++++++++++++++++--------- net/batman-adv/bat_v_elp.h | 2 ++ 3 files changed, 34 insertions(+), 9 deletions(-) commit e123705e58bf171be8c6eb0902ebfb5d6ed255ad Author: Linus Lüssing <linus.luessing@c0d3.blue> Date: Thu Jan 7 08:11:12 2016 +0100 batman-adv: Avoid duplicate neigh_node additions Two parallel calls to batadv_neigh_node_new() might race for creating and adding the same neig_node. Fix this by including the check for any already existing, identical neigh_node within the spin-lock. This fixes splats like the following: [ 739.535069] ------------[ cut here ]------------ [ 739.535079] WARNING: CPU: 0 PID: 0 at /usr/src/batman-adv/git/batman-adv/net/batman-adv/bat_iv_ogm.c:1004 batadv_iv_ogm_process_per_outif+0xe3f/0xe60 [batman_adv]() [ 739.535092] too many matching neigh_nodes [ 739.535094] Modules linked in: dm_mod tun ip6table_filter ip6table_mangle ip6table_nat nf_nat_ipv6 ip6_tables xt_nat iptable_nat nf_nat_ipv4 nf_nat xt_TCPMSS xt_mark iptable_mangle xt_tcpudp xt_conntrack iptable_filter ip_tables x_tables ip_gre ip_tunnel gre bridge stp llc thermal_sys kvm_intel kvm crct10dif_pclmul crc32_pclmul sha256_ssse3 sha256_generic hmac drbg ansi_cprng aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd evdev pcspkr ip6_gre ip6_tunnel tunnel6 batman_adv(O) libcrc32c nf_conntrack_ipv6 nf_defrag_ipv6 nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack autofs4 ext4 crc16 mbcache jbd2 xen_netfront xen_blkfront crc32c_intel [ 739.535177] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W O 4.2.0-0.bpo.1-amd64 #1 Debian 4.2.6-3~bpo8+2 [ 739.535186] 0000000000000000 ffffffffa013b050 ffffffff81554521 ffff88007d003c18 [ 739.535201] ffffffff8106fa01 0000000000000000 ffff8800047a087a ffff880079c3a000 [ 739.735602] ffff88007b82bf40 ffff88007bc2d1c0 ffffffff8106fa7a ffffffffa013aa8e [ 739.735624] Call Trace: [ 739.735639] <IRQ> [<ffffffff81554521>] ? dump_stack+0x40/0x50 [ 739.735677] [<ffffffff8106fa01>] ? warn_slowpath_common+0x81/0xb0 [ 739.735692] [<ffffffff8106fa7a>] ? warn_slowpath_fmt+0x4a/0x50 [ 739.735715] [<ffffffffa012448f>] ? batadv_iv_ogm_process_per_outif+0xe3f/0xe60 [batman_adv] [ 739.735740] [<ffffffffa0124813>] ? batadv_iv_ogm_receive+0x363/0x380 [batman_adv] [ 739.735762] [<ffffffffa0124813>] ? batadv_iv_ogm_receive+0x363/0x380 [batman_adv] [ 739.735783] [<ffffffff810b0841>] ? __raw_callee_save___pv_queued_spin_unlock+0x11/0x20 [ 739.735804] [<ffffffffa012cb39>] ? batadv_batman_skb_recv+0xc9/0x110 [batman_adv] [ 739.735825] [<ffffffff81464891>] ? __netif_receive_skb_core+0x841/0x9a0 [ 739.735838] [<ffffffff810b0841>] ? __raw_callee_save___pv_queued_spin_unlock+0x11/0x20 [ 739.735853] [<ffffffff81465681>] ? process_backlog+0xa1/0x140 [ 739.735864] [<ffffffff81464f1a>] ? net_rx_action+0x20a/0x320 [ 739.735878] [<ffffffff81073aa7>] ? __do_softirq+0x107/0x270 [ 739.735891] [<ffffffff81073d82>] ? irq_exit+0x92/0xa0 [ 739.735905] [<ffffffff8137e0d1>] ? xen_evtchn_do_upcall+0x31/0x40 [ 739.735924] [<ffffffff8155b8fe>] ? xen_do_hypervisor_callback+0x1e/0x40 [ 739.735939] <EOI> [<ffffffff810013aa>] ? xen_hypercall_sched_op+0xa/0x20 [ 739.735965] [<ffffffff810013aa>] ? xen_hypercall_sched_op+0xa/0x20 [ 739.735979] [<ffffffff8100a39c>] ? xen_safe_halt+0xc/0x20 [ 739.735991] [<ffffffff8101da6c>] ? default_idle+0x1c/0xa0 [ 739.736004] [<ffffffff810abf6b>] ? cpu_startup_entry+0x2eb/0x350 [ 739.736019] [<ffffffff81b2af5e>] ? start_kernel+0x480/0x48b [ 739.736032] [<ffffffff81b2d116>] ? xen_start_kernel+0x507/0x511 [ 739.736048] ---[ end trace c106bb901244bc8c ]--- Fixes: f987ed6ebd99 ("batman-adv: protect neighbor list with rcu locks") Reported-by: Martin Weinelt <martin@darmstadt.freifunk.net> Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/originator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit d285f52cc0f23564fd61976d43fd5b991b4828f6 Author: Sven Eckelmann <sven.eckelmann@open-mesh.com> Date: Tue Feb 16 10:47:07 2016 +0100 batman-adv: Fix integer overflow in batadv_iv_ogm_calc_tq The undefined behavior sanatizer detected an signed integer overflow in a setup with near perfect link quality UBSAN: Undefined behaviour in net/batman-adv/bat_iv_ogm.c:1246:25 signed integer overflow: 8713350 * 255 cannot be represented in type 'int' The problems happens because the calculation of mixed unsigned and signed integers resulted in an integer multiplication. batadv_ogm_packet::tq (u8 255) * tq_own (u8 255) * tq_asym_penalty (int 134; max 255) * tq_iface_penalty (int 255; max 255) The tq_iface_penalty, tq_asym_penalty and inv_asym_penalty can just be changed to unsigned int because they are not expected to become negative. Fixes: c039876892e3 ("batman-adv: add WiFi penalty") Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bat_iv_ogm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 1653f61d656516aae7130db19561258a847d1e94 Author: Antonio Quartulli <a@unstable.cc> Date: Mon May 2 01:14:40 2016 +0800 batman-adv: make sure ELP/OGM orig MAC is updated on address change When the MAC address of the primary interface is changed, update the originator address in the ELP and OGM skb buffers as well in order to reflect the change. Fixes: d6f94d91f766 ("batman-adv: ELP - adding basic infrastructure") Reported-by: Marek Lindner <marek@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bat_v.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) commit f7dcdf5fdbe8fec7670d8f65a5db595c98e0ecab Author: Sven Eckelmann <sven@narfation.org> Date: Mon Feb 22 22:56:33 2016 +0100 batman-adv: Fix unexpected free of bcast_own on add_if error The function batadv_iv_ogm_orig_add_if allocates new buffers for bcast_own and bcast_own_sum. It is expected that these buffers are unchanged in case either bcast_own or bcast_own_sum couldn't be resized. But the error handling of this function frees the already resized buffer for bcast_own when the allocation of the new bcast_own_sum buffer failed. This will lead to an invalid memory access when some code will try to access bcast_own. Instead the resized new bcast_own buffer has to be kept. This will not lead to problems because the size of the buffer was only increased and therefore no user of the buffer will try to access bytes outside of the new buffer. Fixes: d0015fdd3d2c ("batman-adv: provide orig_node routing API") Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bat_iv_ogm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 71f9d27daa2cbcca7159c27f0c0c381cc2dd1053 Author: Sven Eckelmann <sven@narfation.org> Date: Fri May 6 11:43:39 2016 +0200 batman-adv: Fix refcnt leak in batadv_v_neigh_* The functions batadv_neigh_ifinfo_get increase the reference counter of the batadv_neigh_ifinfo. These have to be reduced again when the reference is not used anymore to correctly free the objects. Fixes: 9786906022eb ("batman-adv: B.A.T.M.A.N. V - implement neighbor comparison API calls") Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bat_v.c | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) commit a45e932a3c58eac11a7458c6888910e23f615077 Author: Sven Eckelmann <sven@narfation.org> Date: Fri May 6 11:43:38 2016 +0200 batman-adv: Avoid nullptr derefence in batadv_v_neigh_is_sob batadv_neigh_ifinfo_get can return NULL when it cannot find (even when only temporarily) anymore the neigh_ifinfo in the list neigh->ifinfo_list. This has to be checked to avoid kernel Oopses when the ifinfo is dereferenced. This a situation which isn't expected but is already handled by functions like batadv_v_neigh_cmp. The same kind of warning is therefore used before the function returns without dereferencing the pointers. Fixes: 9786906022eb ("batman-adv: B.A.T.M.A.N. V - implement neighbor comparison API calls") Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bat_v.c | 4 ++++ 1 file changed, 4 insertions(+) commit 63d443efe8be2c1d02b30d7e4edeb9aa085352b3 Author: Florian Westphal <fw@strlen.de> Date: Tue May 10 23:17:59 2016 +0200 batman-adv: fix skb deref after free batadv_send_skb_to_orig() calls dev_queue_xmit() so we can't use skb->len. Fixes: 953324776d6d ("batman-adv: network coding - buffer unicast packets before forward") Signed-off-by: Florian Westphal <fw@strlen.de> Reviewed-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/routing.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e7ca7f9fa2cda220ba807620c992ce77c33a32ea Merge: 5f0dfb7 d65c8ff Author: James Bottomley <James.Bottomley@HansenPartnership.com> Date: Tue May 17 21:12:50 2016 -0400 Merge branch 'fixes' into misc commit e6b3bb78962e65c4ad125598755cfbf2a8779e86 Author: Carlos Maiolino <cmaiolino@redhat.com> Date: Wed May 18 11:11:27 2016 +1000 xfs: add "fail at unmount" error handling configuration If we take "retry forever" literally on metadata IO errors, we can hang at unmount, once it retries those writes forever. This is the default behavior, unfortunately. Add an error configuration option for this behavior and default it to "fail" so that an unmount will trigger actuall errors, a shutdown and allow the unmount to succeed. It will be noisy, though, as it will log the errors and shutdown that occurs. To fix this, we need to mark the filesystem as being in the process of unmounting. Do this with a mount flag that is added at the appropriate time (i.e. before the blocking AIL sync). We also need to add this flag if mount fails after the initial phase of log recovery has been run. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_buf_item.c | 4 ++++ fs/xfs/xfs_mount.c | 12 ++++++++++++ fs/xfs/xfs_mount.h | 2 ++ fs/xfs/xfs_sysfs.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+) commit e0a431b3a3cc3d0a4c38ccfca8c7320fde40efb6 Author: Carlos Maiolino <cmaiolino@redhat.com> Date: Wed May 18 11:09:28 2016 +1000 xfs: add configuration handlers for specific errors now most of the infrastructure is in place, we can start adding support for configuring specific errors such as ENODEV, ENOSPC, EIO, etc. Add these error configurations and configure them all to have appropriate behaviours. That is, all will be configured to retry forever by default, except for ENODEV, which is an unrecoverable error, so it will be configured to not retry on error Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_mount.h | 3 +++ fs/xfs/xfs_sysfs.c | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) commit a5ea70d25d76950e11690110b526374307d05d81 Author: Carlos Maiolino <cmaiolino@redhat.com> Date: Wed May 18 11:08:15 2016 +1000 xfs: add configuration of error failure speed On reception of an error, we can fail immediately, perform some bound amount of retries or retry indefinitely. The current behaviour we have is to retry forever. However, we'd like the ability to choose how long the filesystem should try after an error, it can either fail immediately, retry a few times, or retry forever. This is implemented by using max_retries sysfs attribute, to hold the amount of times we allow the filesystem to retry after an error. Being -1 a special case where the filesystem will retry indefinitely. Add both a maximum retry count and a retry timeout so that we can bound by time and/or physical IO attempts. Finally, plumb these into xfs_buf_iodone error processing so that the error behaviour follows the selected configuration. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_buf.h | 21 ++++++++++++- fs/xfs/xfs_buf_item.c | 13 +++++++-- fs/xfs/xfs_mount.h | 3 ++ fs/xfs/xfs_sysfs.c | 81 ++++++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 111 insertions(+), 7 deletions(-) commit ef6a50fbb1bba7951aa23adcfb40e99ca72dc51c Author: Carlos Maiolino <cmaiolino@redhat.com> Date: Wed May 18 11:06:44 2016 +1000 xfs: introduce table-based init for error behaviors Before we start expanding the number of error classes and errors we can configure behaviour for, we need a simple and clear way to define the default behaviour that we initialized each mount with. Introduce a table based method for keeping the initial configuration in, and apply that to the existing initialization code. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_sysfs.c | 72 +++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 60 insertions(+), 12 deletions(-) commit df3093907ccc718459c54c99da29dd774af41186 Author: Carlos Maiolino <cmaiolino@redhat.com> Date: Wed May 18 11:05:33 2016 +1000 xfs: add configurable error support to metadata buffers With the error configuration handle for async metadata write errors in place, we can now add initial support to the IO error processing in xfs_buf_iodone_error(). Add an infrastructure function to look up the configuration handle, and rearrange the error handling to prepare the way for different error handling conigurations to be used. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_buf.h | 1 + fs/xfs/xfs_buf_item.c | 112 ++++++++++++++++++++++++++++++-------------------- fs/xfs/xfs_mount.h | 3 ++ fs/xfs/xfs_sysfs.c | 17 ++++++++ fs/xfs/xfs_trace.h | 1 - 5 files changed, 88 insertions(+), 46 deletions(-) commit ffd40ef697dfd3e06f44b1bb5fea93079de8c77d Author: Carlos Maiolino <cmaiolino@redhat.com> Date: Wed May 18 11:01:00 2016 +1000 xfs: introduce metadata IO error class Now we have the basic infrastructure, add the first error class so we can build up the infrastructure in a meaningful way. Add the metadata async write IO error class and sysfs entry, and introduce a default configuration that matches the existing "retry forever" behavior for async write metadata buffers. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_mount.h | 3 +++ fs/xfs/xfs_sysfs.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) commit 0b7962a6c4a37ef3cbb25d976af7b9ec4ce8ad01 Merge: 6f88b5b f8d1a93 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 18:00:39 2016 -0700 Merge branch 'for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata Pull libata updates from Tejun Heo: "Trivial changes except for special case timeout bumping. I have two more libata branches which depend on SCSI and dmaengine tree respectively. I'll send pull requests for them once the prerequisite trees are pulled in" * 'for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata: libata-scsi: use %*ph to dump small buffers treewide: Fix typos in libata.xml libata-core: Allow longer timeout for drive spinup from PUIS libata: Fixup awkward whitespace in warning by removing line continuation. commit 192852be8b5fb14268c2133fe9ce5312e4745963 Author: Carlos Maiolino <cmaiolino@redhat.com> Date: Wed May 18 10:58:51 2016 +1000 xfs: configurable error behavior via sysfs We need to be able to change the way XFS behaviours in error conditions depending on the type of underlying storage. This is necessary for handling non-traditional block devices with extended error cases, such as thin provisioned devices that can return ENOSPC as an IO error. Introduce the basic sysfs infrastructure needed to define and configure error behaviours. This is done to be generic enough to extend to configuring behaviour in other error conditions, such as ENOMEM, which also has different desired behaviours according to machine configuration. Signed-off-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_mount.c | 10 +++++++++- fs/xfs/xfs_mount.h | 20 ++++++++++++++++++++ fs/xfs/xfs_sysfs.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++- fs/xfs/xfs_sysfs.h | 3 +++ 4 files changed, 84 insertions(+), 2 deletions(-) commit 9bdd9bd69b826875531bb1b2efb6aeb8d70e6f72 Author: Brian Foster <bfoster@redhat.com> Date: Wed May 18 10:56:41 2016 +1000 xfs: buffer ->bi_end_io function requires irq-safe lock Reports have surfaced of a lockdep splat complaining about an irq-safe -> irq-unsafe locking order in the xfs_buf_bio_end_io() bio completion handler. This only occurs when I/O errors are present because bp->b_lock is only acquired in this context to protect setting an error on the buffer. The problem is that this lock can be acquired with the (request_queue) q->queue_lock held. See scsi_end_request() or ata_qc_schedule_eh(), for example. Replace the locked test/set of b_io_error with a cmpxchg() call. This eliminates the need for the lock and thus the lock ordering problem goes away. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com> fs/xfs/xfs_buf.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit e7387da52028b072489c45efeb7a916c0205ebd2 Author: Daniel Lezcano <daniel.lezcano@linaro.org> Date: Tue May 17 16:54:00 2016 +0200 cpuidle: Fix cpuidle_state_is_coupled() argument in cpuidle_enter() Commit 0b89e9aa2856 (cpuidle: delay enabling interrupts until all coupled CPUs leave idle) rightfully fixed a regression by letting the coupled idle state framework to handle local interrupt enabling when the CPU is exiting an idle state. The current code checks if the idle state is coupled and, if so, it will let the coupled code to enable interrupts. This way, it can decrement the ready-count before handling the interrupt. This mechanism prevents the other CPUs from waiting for a CPU which is handling interrupts. But the check is done against the state index returned by the back end driver's ->enter functions which could be different from the initial index passed as parameter to the cpuidle_enter_state() function. entered_state = target_state->enter(dev, drv, index); [ ... ] if (!cpuidle_state_is_coupled(drv, entered_state)) local_irq_enable(); [ ... ] If the 'index' is referring to a coupled idle state but the 'entered_state' is *not* coupled, then the interrupts are enabled again. All CPUs blocked on the sync barrier may busy loop longer if the CPU has interrupts to handle before decrementing the ready-count. That's consuming more energy than saving. Fixes: 0b89e9aa2856 (cpuidle: delay enabling interrupts until all coupled CPUs leave idle) Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: 3.15+ <stable@vger.kernel.org> # 3.15+ [ rjw: Subject & changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpuidle/cpuidle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f88b5be84985f751746d313b8d2a4e18494a602 Merge: 1eccc6e ec4c436 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 17:47:31 2016 -0700 Merge tag 'regulator-fix-can-change-voltage' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fix from Mark Brown: "Fix build warnings from regulator_can_change_voltage() Cut down on noise for mainstream users of the API and people doing build testing by dropping the deprecated flag from regulator_can_change_voltage() as it triggers even on the EXPORT_SYMBOL_GPL() which affects all builds rather than just the remaining drivers with calls to it (for which fixes are currently pending). The function remains deprecated and is expected to be removed entirely in v4.8" * tag 'regulator-fix-can-change-voltage' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: Silence build warnings from regulator_can_change_voltage() commit 1eccc6e1529ec7ad1cebbd2c97ceb2a1a39f7d76 Merge: dcc4c2f d30a2b4 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 17:39:42 2016 -0700 Merge tag 'gpio-v4.7-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 kernel cycle v4.7: Core infrastructural changes: - Support for natively single-ended GPIO driver stages. This means that if the hardware has registers to configure open drain or open source configuration, we use that rather than (as we did before) try to emulate it by switching the line to an input to get high impedance. This is also documented throughly in Documentation/gpio/driver.txt for those of you who did not understand one word of what I just wrote. - Start to do away with the unnecessarily complex and unitelligible ARCH_REQUIRE_GPIOLIB and ARCH_WANT_OPTIONAL_GPIOLIB, another evolutional artifact from the time when the GPIO subsystem was unmaintained. Archs can now just select GPIOLIB and be done with it, cleanups to arches will trickle in for the next kernel. Some minor archs ACKed the changes immediately so these are included in this pull request. - Advancing the use of the data pointer inside the GPIO device for storing driver data by switching the PowerPC, Super-H Unicore and a few other subarches or subsystem drivers in ALSA SoC, Input, serial, SSB, staging etc to use it. - The initialization now reads the input/output state of the GPIO lines, so that each GPIO descriptor knows - if this callback is implemented - whether the line is input or output. This also reflects nicely in userspace "lsgpio". - It is now possible to name GPIO producer names, line names, from the device tree. (Platform data has been supported for a while). I bet we will get a similar mechanism for ACPI one of those days. This makes is possible to get sensible producer names for e.g. GPIO rails in "lsgpio" in userspace. New drivers: - New driver for the Loongson1. - The XLP driver now supports Broadcom Vulcan ARM64. - The IT87 driver now supports IT8620 and IT8628. - The PCA953X driver now supports Galileo Gen2. Driver improvements: - MCP23S08 was switched to use the gpiolib irqchip helpers and now also suppors level-triggered interrupts. - 74x164 and RCAR now supports the .set_multiple() callback - AMDPT was converted to use generic GPIO. - TC3589x, TPS65218, SX150X, F7188X, MENZ127, VX855, WM831X, WM8994 support the new single ended callback for open drain and in some cases open source. - Implement the .get_direction() callback for a few more drivers like PL061, Xgene. Cleanups: - Paul Gortmaker combed through the drivers and de-modularized those who are not really modules. - Move the GPIO poweroff DT bindings to the power subdir where they belong. - Rename gpio-generic.c to gpio-mmio.c, which is much more to the point. That's what it is handling, nothing more, nothing less" * tag 'gpio-v4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (126 commits) MIPS: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB gpio: zevio: make it explicitly non-modular gpio: timberdale: make it explicitly non-modular gpio: stmpe: make it explicitly non-modular gpio: sodaville: make it explicitly non-modular pinctrl: sh-pfc: Let gpio_chip.to_irq() return zero on error gpio: dwapb: Add ACPI device ID for DWAPB GPIO controller on X-Gene platforms gpio: dt-bindings: add wd,mbl-gpio bindings gpio: of: make it possible to name GPIO lines gpio: make gpiod_to_irq() return negative for NO_IRQ gpio: xgene: implement .get_direction() gpio: xgene: Enable ACPI support for X-Gene GFC GPIO driver gpio: tegra: Implement gpio_get_direction callback gpio: set up initial state from .get_direction() gpio: rename gpio-generic.c into gpio-mmio.c gpio: generic: fix GPIO_GENERIC_PLATFORM is set to module case gpio: dwapb: add gpio-signaled acpi event support gpio: dwapb: convert device node to fwnode gpio: dwapb: remove name from dwapb_port_property gpio/qoriq: select IRQ_DOMAIN ... commit 3834abb4e64483af7af7500e54c0a5f957a52b1b Author: Pankaj Gupta <Pankaj.Gupta@spreadtrum.com> Date: Mon May 16 11:07:19 2016 +0000 cpufreq: simplified goto out in cpufreq_register_driver() simplified goto out in cpufreq_register_driver for increasing code readability Signed-off-by: Pankaj Gupta <pankaj.gupta@spreadtrum.com> Signed-off-by: Sanjeev Yadav <sanjeev.yadav@spreadtrum.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/cpufreq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit dcc4c2f61cdc7e0ab61b25b8d28205302497a8c4 Merge: 0b86c75 66bc5ba Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 17:34:33 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid Pull HID updates from Jiri Kosina: "No biggies this time: - micro-optimization of implement() in HID core parses, from Dmitry Torokhov - thingm driver cleanups from Heiner Kallweit - fine-graining detection of distance and tilt axes in wacom driver from Jason Gerecke - New hid-asus driver, currently supporting X205TA and VivoBook E200HA, from Yusuke Fujimaki" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: HID: wacom: Add fuzz factor to distance and tilt axes HID: usbhid: quirks for Corsair RGB keyboard & mice (K70R, K95RGB, M65RGB, K70RGB, K65RGB) HID: thingm: remove not needed error message HID: thingm: set new flag LED_HW_PLUGGABLE HID: thingm: factor out duplicated code to thingm_init_led HID: simplify implement() a bit HID: asus: add support for VivoBook E200HA HID: hidraw: silence an uninitialized variable warning HID: roccat: silence an uninitialized variable warning HID: Asus X205TA keyboard driver HID: hidraw: switch to using memdup_user commit 45482c703b8c7e86e339e92f186cadd9a735fd0e Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Thu May 12 15:14:12 2016 +0200 cpufreq: governor: CPUFREQ_GOV_STOP never fails None of the cpufreq governors currently in the tree will ever fail an invocation of the ->governor() callback with the event argument equal to CPUFREQ_GOV_STOP (unless invoked with incorrect arguments which doesn't matter anyway) and it is rather difficult to imagine a valid reason for such a failure. Accordingly, rearrange the code in the core to make it clear that this call never fails. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/cpufreq.c | 40 +++++++++++----------------------------- 1 file changed, 11 insertions(+), 29 deletions(-) commit 36be3418eb769c66bc16eb1c9b402591cf1219b7 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Thu May 12 15:13:35 2016 +0200 cpufreq: governor: CPUFREQ_GOV_POLICY_EXIT never fails None of the cpufreq governors currently in the tree will ever fail an invocation of the ->governor() callback with the event argument equal to CPUFREQ_GOV_POLICY_EXIT (unless invoked with incorrect arguments which doesn't matter anyway) and it wouldn't really make sense to fail it, because the caller won't be able to handle that failure in a meaningful way. Accordingly, rearrange the code in the core to make it clear that this call never fails. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> drivers/cpufreq/cpufreq.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) commit c749c64f45fa07d20e11af2e3f3caa9d7650d341 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Thu May 12 00:46:45 2016 +0200 intel_pstate: Simplify conditional in intel_pstate_set_policy() One of the if () statements in intel_pstate_set_policy() causes another if () to be evaluated if the condition is true and it doesn't do anything else, so merge the two if () statements into one. No functional changes. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> drivers/cpufreq/intel_pstate.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 0b86c75db6e7f68c22ac5d0dae0f551c4897cdf5 Merge: 16bf834 be69f70 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 17:11:27 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching Pull livepatching updates from Jiri Kosina: - remove of our own implementation of architecture-specific relocation code and leveraging existing code in the module loader to perform arch-dependent work, from Jessica Yu. The relevant patches have been acked by Rusty (for module.c) and Heiko (for s390). - live patching support for ppc64le, which is a joint work of Michael Ellerman and Torsten Duwe. This is coming from topic branch that is share between livepatching.git and ppc tree. - addition of livepatching documentation from Petr Mladek * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/livepatching: livepatch: make object/func-walking helpers more robust livepatch: Add some basic livepatch documentation powerpc/livepatch: Add live patching support on ppc64le powerpc/livepatch: Add livepatch stack to struct thread_info powerpc/livepatch: Add livepatch header livepatch: Allow architectures to specify an alternate ftrace location ftrace: Make ftrace_location_range() global livepatch: robustify klp_register_patch() API error checking Documentation: livepatch: outline Elf format and requirements for patch modules livepatch: reuse module loader code to write relocations module: s390: keep mod_arch_specific for livepatch modules module: preserve Elf information for livepatch modules Elf: add livepatch-specific Elf constants commit 16bf8348055fe4615bd08ef50f9874f5dcc10268 Merge: a7fd20d 52bbe14 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 17:05:30 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (21 commits) gitignore: fix wording mfd: ab8500-debugfs: fix "between" in printk memstick: trivial fix of spelling mistake on management cpupowerutils: bench: fix "average" treewide: Fix typos in printk IB/mlx4: printk fix pinctrl: sirf/atlas7: fix printk spelling serial: mctrl_gpio: Grammar s/lines GPIOs/line GPIOs/, /sets/set/ w1: comment spelling s/minmum/minimum/ Blackfin: comment spelling s/divsor/divisor/ metag: Fix misspellings in comments. ia64: Fix misspellings in comments. hexagon: Fix misspellings in comments. tools/perf: Fix misspellings in comments. cris: Fix misspellings in comments. c6x: Fix misspellings in comments. blackfin: Fix misspelling of 'register' in comment. avr32: Fix misspelling of 'definitions' in comment. treewide: Fix typos in printk Doc: treewide : Fix typos in DocBook/filesystem.xml ... commit a7fd20d1c476af4563e66865213474a2f9f473a4 Merge: b80fed9 917fa53 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 16:26:30 2016 -0700 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next Pull networking updates from David Miller: "Highlights: 1) Support SPI based w5100 devices, from Akinobu Mita. 2) Partial Segmentation Offload, from Alexander Duyck. 3) Add GMAC4 support to stmmac driver, from Alexandre TORGUE. 4) Allow cls_flower stats offload, from Amir Vadai. 5) Implement bpf blinding, from Daniel Borkmann. 6) Optimize _ASYNC_ bit twiddling on sockets, unless the socket is actually using FASYNC these atomics are superfluous. From Eric Dumazet. 7) Run TCP more preemptibly, also from Eric Dumazet. 8) Support LED blinking, EEPROM dumps, and rxvlan offloading in mlx5e driver, from Gal Pressman. 9) Allow creating ppp devices via rtnetlink, from Guillaume Nault. 10) Improve BPF usage documentation, from Jesper Dangaard Brouer. 11) Support tunneling offloads in qed, from Manish Chopra. 12) aRFS offloading in mlx5e, from Maor Gottlieb. 13) Add RFS and RPS support to SCTP protocol, from Marcelo Ricardo Leitner. 14) Add MSG_EOR support to TCP, this allows controlling packet coalescing on application record boundaries for more accurate socket timestamp sampling. From Martin KaFai Lau. 15) Fix alignment of 64-bit netlink attributes across the board, from Nicolas Dichtel. 16) Per-vlan stats in bridging, from Nikolay Aleksandrov. 17) Several conversions of drivers to ethtool ksettings, from Philippe Reynes. 18) Checksum neutral ILA in ipv6, from Tom Herbert. 19) Factorize all of the various marvell dsa drivers into one, from Vivien Didelot 20) Add VF support to qed driver, from Yuval Mintz" * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1649 commits) Revert "phy dp83867: Fix compilation with CONFIG_OF_MDIO=m" Revert "phy dp83867: Make rgmii parameters optional" r8169: default to 64-bit DMA on recent PCIe chips phy dp83867: Make rgmii parameters optional phy dp83867: Fix compilation with CONFIG_OF_MDIO=m bpf: arm64: remove callee-save registers use for tmp registers asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions switchdev: pass pointer to fib_info instead of copy net_sched: close another race condition in tcf_mirred_release() tipc: fix nametable publication field in nl compat drivers: net: Don't print unpopulated net_device name qed: add support for dcbx. ravb: Add missing free_irq() calls to ravb_close() qed: Remove a stray tab net: ethernet: fec-mpc52xx: use phy_ethtool_{get|set}_link_ksettings net: ethernet: fec-mpc52xx: use phydev from struct net_device bpf, doc: fix typo on bpf_asm descriptions stmmac: hardware TX COE doesn't work when force_thresh_dma_mode is set net: ethernet: fs-enet: use phy_ethtool_{get|set}_link_ksettings net: ethernet: fs-enet: use phydev from struct net_device ... commit e0d46f5c6e0ba3a79e64cd60e62b7b7191ed93f3 Author: Andreas Gruenbacher <agruenba@redhat.com> Date: Fri Apr 22 22:36:44 2016 +0200 btrfs: Switch to generic xattr handlers The btrfs_{set,remove}xattr inode operations check for a read-only root (btrfs_root_readonly) before calling into generic_{set,remove}xattr. If this check is moved into __btrfs_setxattr, we can get rid of btrfs_{set,remove}xattr. This patch applies to mainline, I would like to keep it together with the other xattr cleanups if possible, though. Could you please review? Thanks, Andreas Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/btrfs/inode.c | 16 ++++++++-------- fs/btrfs/xattr.c | 22 +++------------------- fs/btrfs/xattr.h | 3 --- 3 files changed, 11 insertions(+), 30 deletions(-) commit 2b88fc21cae91e925bc5e361e6ea67467b471da5 Author: Andreas Gruenbacher <agruenba@redhat.com> Date: Fri Apr 22 19:14:00 2016 +0200 ubifs: Switch to generic xattr handlers Ubifs internally uses special inodes for storing xattrs. Those inodes had NULL {get,set,remove}xattr inode operations before this change, so xattr operations on them would fail. The super block's s_xattr field would also apply to those special inodes. However, the inodes are not visible outside of ubifs, and so no xattr operations will ever be carried out on them anyway. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Reviewed-by: Richard Weinberger <richard@nod.at> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/ubifs/dir.c | 6 +-- fs/ubifs/file.c | 12 ++--- fs/ubifs/super.c | 1 + fs/ubifs/ubifs.h | 7 +-- fs/ubifs/xattr.c | 143 ++++++++++++++++++++++++++----------------------------- 5 files changed, 79 insertions(+), 90 deletions(-) commit ba36c21b0cd8b55fd7f010e9052656c2c03d9e5e Author: Nicholas Bellinger <nab@linux-iscsi.org> Date: Sat Apr 9 03:04:42 2016 +0000 nvme/host: Add missing blk_integrity tag_size + flags assignments While doing recent bring-up of nvme/host with target-core T10-PI, I noticed /sys/block/nvme*/integrity/device_is_integrity_capable was false, and /sys/block/nvme*/integrity/tag_size contained a bogus value. AFAICT outside of blk_integrity_compare() for DM + MD these are informational values, but go ahead and add the missing assignments for nvme/host to match what SCSI does within sd_dif_config_host() for consistency's sake. Cc: Keith Busch <keith.busch@intel.com> Cc: Jay Freyensee <james.p.freyensee@intel.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Cc: Sagi Grimberg <sagig@grimberg.me> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Reviewed-by: Sagi Grimberg <sagi at grimberg.me> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/nvme/host/core.c | 4 ++++ 1 file changed, 4 insertions(+) commit 99466e708ddce8904c8635c213f2deb523ef4fb9 Author: Keith Busch <keith.busch@intel.com> Date: Mon May 2 15:14:24 2016 -0600 NVMe: Add device ID's with stripe quirk Adds two Intel controllers that have the "stripe" quirk. Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/nvme/host/pci.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0ff9d4e1a284a9282a049bf064f123e27f838907 Author: Keith Busch <keith.busch@intel.com> Date: Thu May 12 08:37:14 2016 -0600 NVMe: Short-cut removal on surprise hot-unplug This patch adds a new state that when set has the core automatically kill request queues prior to removing namespaces. If PCI device is not present at the time the nvme driver's remove is called, we can kill all IO queues immediately instead of waiting for the watchdog thread to do that at its polling interval. This improves scenarios where multiple hot plug events occur at the same time since it doesn't block the pci enumeration for as long. Signed-off-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/nvme/host/core.c | 18 ++++++++++++++++++ drivers/nvme/host/nvme.h | 1 + drivers/nvme/host/pci.c | 4 ++++ 3 files changed, 23 insertions(+) commit 9ec3bb2f994bda9c8817856fdcbfaebe8f62fbd3 Author: Keith Busch <keith.busch@intel.com> Date: Fri Apr 29 15:45:18 2016 -0600 NVMe: Allow user initiated rescan This exposes ioctl and sysfs methods a user can invoke to request the driver rescan a controller and its namespaces. This is less harsh than doing a controller reset, which temporarilly halts all IO, just to surface a newly attached namespace. This is mainly useful for controllers that implement the namespace management command, but do not support the namespace notify change asynchronous event notification. Signed-off-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/nvme/host/core.c | 15 +++++++++++++++ include/uapi/linux/nvme_ioctl.h | 1 + 2 files changed, 16 insertions(+) commit d011fb3164e8694d7839f10a497f8ab6c660149a Author: Keith Busch <keith.busch@intel.com> Date: Mon Apr 4 15:07:41 2016 -0600 NVMe: Reduce driver log spamming Reduce error logging when no corrective action is required. Suggessted-by: Chris Petersen <cpetersen@fb.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/nvme/host/pci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 921920ab32f290dafdb0359024d4587897712728 Author: Keith Busch <keith.busch@intel.com> Date: Mon Mar 28 16:03:21 2016 -0600 NVMe: Unbind driver on failure Instead of removing the PCI device from the kernel's topology on controller failure, this patch simply requests unbinding the device from the driver. This avoids concurrently running pci removal with the hot plug event, which has been reported to be problematic when multiple surprise events occur near simultaneously. The other benefit is that we will have PCI config and memory space available to poke around for debugging a failed controller, assuming the device was not physically removed. The down side occurs if the platform and/or kernel do not support any type of surprise hot removal. The device will remain visible through sysfs (and therefore lspci), and some manual work is necessary to get the logical topology corrected. But if your platform and/or kernel don't support surprise removal, you probably shouldn't be doing that anyway. Signed-off-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 014a0d609eb4721d1e416cf10da2d5602f9b34d5 Author: Keith Busch <keith.busch@intel.com> Date: Fri May 6 11:50:52 2016 -0600 NVMe: Delete only created queues Use the online queue count instead of the number of allocated queues. The controller should just return an invalid queue identifier error to the commands if a queue wasn't created. While it's not harmful, it's still not correct. Reported-by: Saar Gross <saar@annapurnalabs.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/nvme/host/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2800b8e7d9dfca1fd9d044dcf7a046b5de5a7239 Author: Keith Busch <keith.busch@intel.com> Date: Fri May 13 12:38:09 2016 -0600 NVMe: Allocate queues only for online cpus The driver previously requested allocating queues for the total possible number of CPUs so that blk-mq could rebalance these if CPUs were added after initialization. The number of hardware contexts can now be changed at runtime, so we only need to allocate the number of online queues since we can add more later. Suggested-by: Jeff Lien <jeff.lien@hgst.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Jens Axboe <axboe@fb.com> drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b80fed9595513384424cd141923c9161c4b5021b Merge: 24b9f0c 202bae5 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 16:13:00 2016 -0700 Merge tag 'dm-4.7-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm Pull device mapper updates from Mike Snitzer: - based on Jens' 'for-4.7/core' to have DM thinp's discard support use bio_inc_remaining() and the block core's new async __blkdev_issue_discard() interface - make DM multipath's fast code-paths lockless, using lockless_deference, to significantly improve large NUMA performance when using blk-mq. The m->lock spinlock contention was a serious bottleneck. - a few other small code cleanups and Documentation fixes * tag 'dm-4.7-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm: dm thin: unroll issue_discard() to create longer discard bio chains dm thin: use __blkdev_issue_discard for async discard support dm thin: remove __bio_inc_remaining() and switch to using bio_inc_remaining() dm raid: make sure no feature flags are set in metadata dm ioctl: drop use of __GFP_REPEAT in copy_params()'s __vmalloc() call dm stats: fix spelling mistake in Documentation dm cache: update cache-policies.txt now that mq is an alias for smq dm mpath: eliminate use of spinlock in IO fast-paths dm mpath: move trigger_event member to the end of 'struct multipath' dm mpath: use atomic_t for counting members of 'struct multipath' dm mpath: switch to using bitops for state flags dm thin: Remove return statement from void function dm: remove unused mapped_device argument from free_tio() commit 24b9f0cf00c8e8df29a4ddfec8c139ad62753113 Merge: a4d1dbe 116f7d4 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 16:03:32 2016 -0700 Merge branch 'for-4.7/drivers' of git://git.kernel.dk/linux-block Pull block driver updates from Jens Axboe: "On top of the core pull request, this is the drivers pull request for this merge window. This contains: - Switch drivers to the new write back cache API, and kill off the flush flags. From me. - Kill the discard support for the STEC pci-e flash driver. It's trivially broken, and apparently unmaintained, so it's safer to just remove it. From Jeff Moyer. - A set of lightnvm updates from the usual suspects (Matias/Javier, and Simon), and fixes from Arnd, Jeff Mahoney, Sagi, and Wenwei Tao. - A set of updates for NVMe: - Turn the controller state management into a proper state machine. From Christoph. - Shuffling of code in preparation for NVMe-over-fabrics, also from Christoph. - Cleanup of the command prep part from Ming Lin. - Rewrite of the discard support from Ming Lin. - Deadlock fix for namespace removal from Ming Lin. - Use the now exported blk-mq tag helper for IO termination. From Sagi. - Various little fixes from Christoph, Guilherme, Keith, Ming Lin, Wang Sheng-Hui. - Convert mtip32xx to use the now exported blk-mq tag iter function, from Keith" * 'for-4.7/drivers' of git://git.kernel.dk/linux-block: (74 commits) lightnvm: reserved space calculation incorrect lightnvm: rename nr_pages to nr_ppas on nvm_rq lightnvm: add is_cached entry to struct ppa_addr lightnvm: expose gennvm_mark_blk to targets lightnvm: remove mgt targets on mgt removal lightnvm: pass dma address to hardware rather than pointer lightnvm: do not assume sequential lun alloc. nvme/lightnvm: Log using the ctrl named device lightnvm: rename dma helper functions lightnvm: enable metadata to be sent to device lightnvm: do not free unused metadata on rrpc lightnvm: fix out of bound ppa lun id on bb tbl lightnvm: refactor set_bb_tbl for accepting ppa list lightnvm: move responsibility for bad blk mgmt to target lightnvm: make nvm_set_rqd_ppalist() aware of vblks lightnvm: remove struct factory_blks lightnvm: refactor device ops->get_bb_tbl() lightnvm: introduce nvm_for_each_lun_ppa() macro lightnvm: refactor dev->online_target to global nvm_targets lightnvm: rename nvm_targets to nvm_tgt_type ... commit a4d1dbed0e27030b3c3ca2d1d5c33a1b45bc53d2 Merge: c2e7b20 b3a834b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 15:29:49 2016 -0700 Merge branch 'for-4.7/core' of git://git.kernel.dk/linux-block Pull core block layer updates from Jens Axboe: "This is the core block IO changes for this merge window. Nothing earth shattering in here, it's mostly just fixes. In detail: - Fix for a long standing issue where wrong ordering in blk-mq caused order_to_size() to spew a warning. From Bart. - Async discard support from Christoph. Basically just splitting our sync interface into a submit + wait part. - Add a cleaner interface for flagging whether a device has a write back cache or not. We've previously overloaded blk_queue_flush() with this, but let's make it more explicit. Drivers cleaned up and updated in the drivers pull request. From me. - Fix for a double check for whether IO accounting is enabled or not. From Michael Callahan. - Fix for the async discard from Mike Snitzer, reinstating the early EOPNOTSUPP return if the device doesn't support discards. - Also from Mike, export bio_inc_remaining() so dm can drop it's private copy of it. - From Ming Lin, add support for passing in an offset for request payloads. - Tag function export from Sagi, which will be used in NVMe in the drivers pull. - Two blktrace related fixes from Shaohua. - Propagate NOMERGE flag when making a request from a bio, also from Shaohua. - An optimization to not parse cgroup paths in blk-throttle, if we don't need to. From Shaohua" * 'for-4.7/core' of git://git.kernel.dk/linux-block: blk-mq: fix undefined behaviour in order_to_size() blk-throttle: don't parse cgroup path if trace isn't enabled blktrace: add missed mask name blktrace: delete garbage for message trace block: make bio_inc_remaining() interface accessible again block: reinstate early return of -EOPNOTSUPP from blkdev_issue_discard block: Minor blk_account_io_start usage cleanup block: add __blkdev_issue_discard block: remove struct bio_batch block: copy NOMERGE flag from bio to request block: add ability to flag write back caching on a device blk-mq: Export tagset iter function block: add offset in blk_add_request_payload() writeback: Fix performance regression in wb_over_bg_thresh() commit 9f8036643dd9609b329aa1b89c9a95981e9ba62f Author: Kees Cook <keescook@chromium.org> Date: Mon May 16 19:27:28 2016 -0700 doc: self-protection: provide initial details This document attempts to codify the intent around kernel self-protection along with discussion of both existing and desired technologies, with attention given to the rationale behind them, and the expectations of their usage. Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> [jc: applied fixes suggested by Randy] Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Documentation/security/self-protection.txt | 261 +++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) commit c2e7b207058d4ff6a9010430763fb561f307eb67 Merge: c52b761 24368aa Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 15:05:23 2016 -0700 Merge branch 'work.preadv2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull vfs cleanups from Al Viro: "More cleanups from Christoph" * 'work.preadv2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: nfsd: use RWF_SYNC fs: add RWF_DSYNC aand RWF_SYNC ceph: use generic_write_sync fs: simplify the generic_write_sync prototype fs: add IOCB_SYNC and IOCB_DSYNC direct-io: remove the offset argument to dio_complete direct-io: eliminate the offset argument to ->direct_IO xfs: eliminate the pos variable in xfs_file_dio_aio_write filemap: remove the pos argument to generic_file_direct_write filemap: remove pos variables in generic_file_read_iter commit c315ef8d9db7f1a0ebd023a395ebdfde1c68057e Merge: a88336d 5f9a8a5 Author: Chris Mason <clm@fb.com> Date: Tue May 17 14:43:19 2016 -0700 Merge branch 'for-chris-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/fdmanana/linux into for-linus-4.7 Signed-off-by: Chris Mason <clm@fb.com> commit c52b76185b7a1b300e5f15ff871c8f45ced3dee9 Merge: 681750c 81cd889 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 14:41:03 2016 -0700 Merge branch 'work.const-path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull 'struct path' constification update from Al Viro: "'struct path' is passed by reference to a bunch of Linux security methods; in theory, there's nothing to stop them from modifying the damn thing and LSM community being what it is, sooner or later some enterprising soul is going to decide that it's a good idea. Let's remove the temptation and constify all of those..." * 'work.const-path' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: constify ima_d_path() constify security_sb_pivotroot() constify security_path_chroot() constify security_path_{link,rename} apparmor: remove useless checks for NULL ->mnt constify security_path_{mkdir,mknod,symlink} constify security_path_{unlink,rmdir} apparmor: constify common_perm_...() apparmor: constify aa_path_link() apparmor: new helper - common_path_perm() constify chmod_common/security_path_chmod constify security_sb_mount() constify chown_common/security_path_chown tomoyo: constify assorted struct path * apparmor_path_truncate(): path->mnt is never NULL constify vfs_truncate() constify security_path_truncate() [apparmor] constify struct path * in a bunch of helpers commit 681750c0468185f92acb8080c13f26a19cb4ee0d Merge: 820c687 a9ae008 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 14:35:45 2016 -0700 Merge branch 'for-cifs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull cifs xattr updates from Al Viro: "This is the remaining parts of the xattr work - the cifs bits" * 'for-cifs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: cifs: Switch to generic xattr handlers cifs: Fix removexattr for os2.* xattrs cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT cifs: Fix xattr name checks commit 820c687b70ae2c72972240b83c053cb7c85ddbc3 Merge: dba1e98 2a28900 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 14:25:02 2016 -0700 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull UDF fixes from Jan Kara: "A fix for UDF crash on corrupted media and one UDF header fixup" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: Export superblock magic to userspace udf: Prevent stack overflow on corrupted filesystem mount commit a88336d13c66fc171f336c6332fcb67339894e08 Merge: 02da2d7 680834c Author: Chris Mason <clm@fb.com> Date: Tue May 17 14:24:44 2016 -0700 Merge branch 'for-chris-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.7 commit dba1e987312ed318dfd46d4684e9e97b2223f2e8 Merge: cb6fd68 6ed71e9 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 14:15:18 2016 -0700 Merge tag 'jfs-4.7' of git://github.com/kleikamp/linux-shaggy Pull jfs updates from Dave Kleikamp: "Some jfs logging cleanups from Joe Perches" * tag 'jfs-4.7' of git://github.com/kleikamp/linux-shaggy: jfs: Coalesce some formats jfs: Remove unnecessary line continuations and terminating newlines jfs: Remove terminating newlines from jfs_info, jfs_warn, jfs_err uses commit cb6fd68fdd4a94880a99ad8515844c7a25e50d3e Author: Kees Cook <keescook@chromium.org> Date: Tue May 17 12:14:39 2016 -0700 exec: clarify reasoning for euid/egid reset This section of code initially looks redundant, but is required. This improves the comment to explain more clearly why the reset is needed. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/exec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 1b3c6d07e29515064aca8a9f86efaea7da4da027 Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:48 2016 -0400 pnfs: make pnfs_layout_process more robust It can return NULL if layoutgets are blocked currently. Fix it to return -EAGAIN in that case, so we can properly handle it in pnfs_update_layout. Also, clean up and simplify the error handling -- eliminate "status" and just use "lseg". Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/pnfs.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 183d9e7b112aaed0d19c16ffcf0f8c3a86dc71e0 Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:47 2016 -0400 pnfs: rework LAYOUTGET retry handling There are several problems in the way a stateid is selected for a LAYOUTGET operation: We pick a stateid to use in the RPC prepare op, but that makes it difficult to serialize LAYOUTGETs that use the open stateid. That serialization is done in pnfs_update_layout, which occurs well before the rpc_prepare operation. Between those two events, the i_lock is dropped and reacquired. pnfs_update_layout can find that the list has lsegs in it and not do any serialization, but then later pnfs_choose_layoutget_stateid ends up choosing the open stateid. This patch changes the client to select the stateid to use in the LAYOUTGET earlier, when we're searching for a usable layout segment. This way we can do it all while holding the i_lock the first time, and ensure that we serialize any LAYOUTGET call that uses a non-layout stateid. This also means a rework of how LAYOUTGET replies are handled, as we must now get the latest stateid if we want to retransmit in response to a retryable error. Most of those errors boil down to the fact that the layout state has changed in some fashion. Thus, what we really want to do is to re-search for a layout when it fails with a retryable error, so that we can avoid reissuing the RPC at all if possible. While the LAYOUTGET RPC is async, the initiating thread always waits for it to complete, so it's effectively synchronous anyway. Currently, when we need to retry a LAYOUTGET because of an error, we drive that retry via the rpc state machine. This means that once the call has been submitted, it runs until it completes. So, we must move the error handling for this RPC out of the rpc_call_done operation and into the caller. In order to handle errors like NFS4ERR_DELAY properly, we must also pass a pointer to the sliding timeout, which is now moved to the stack in pnfs_update_layout. The complicating errors are -NFS4ERR_RECALLCONFLICT and -NFS4ERR_LAYOUTTRYLATER, as those involve a timeout after which we give up and return NULL back to the caller. So, there is some special handling for those errors to ensure that the layers driving the retries can handle that appropriately. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/nfs4proc.c | 115 ++++++++++++++++---------------------- fs/nfs/nfs4trace.h | 10 +++- fs/nfs/pnfs.c | 144 +++++++++++++++++++++++++----------------------- fs/nfs/pnfs.h | 6 +- include/linux/errno.h | 1 + include/linux/nfs4.h | 2 + include/linux/nfs_xdr.h | 2 - 7 files changed, 136 insertions(+), 144 deletions(-) commit 83026d80a16ea6a4e4f06a994fc7831b1d8d6375 Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:46 2016 -0400 pnfs: lift retry logic from send_layoutget to pnfs_update_layout If we get back something like NFS4ERR_OLD_STATEID, that will be translated into -EAGAIN, and the do/while loop in send_layoutget will drive the call again. This is not quite what we want, I think. An error like that is a sign that something has changed. That something could have been a concurrent LAYOUTGET that would give us a usable lseg. Lift the retry logic into pnfs_update_layout instead. That allows us to redo the layout search, and may spare us from having to issue an RPC. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/pnfs.c | 72 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 36 insertions(+), 36 deletions(-) commit d03ab29dbbe905c6c7c5abd78e02547fa954ec07 Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:45 2016 -0400 pnfs: fix bad error handling in send_layoutget Currently, the code will clear the fail bit if we get back a fatal error. I don't think that's correct -- we want to clear that bit if we do not get a fatal error. Fixes: 0bcbf039f6 (nfs: handle request add failure properly) Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/pnfs.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 95e2b7e95d43c5c95620b12355a90713268376d3 Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:44 2016 -0400 flexfiles: add kerneldoc header to nfs4_ff_layout_prepare_ds Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/flexfilelayout/flexfilelayoutdev.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) commit 094069f1d96f691637b5c335f5eb79566d2457ff Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:43 2016 -0400 flexfiles: remove pointless setting of NFS_LAYOUT_RETURN_REQUESTED Setting just the NFS_LAYOUT_RETURN_REQUESTED flag doesn't do anything, unless there are lsegs that are also being marked for return. At the point where that happens this flag is also set, so these set_bit calls don't do anything useful. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/flexfilelayout/flexfilelayout.c | 2 -- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) commit 6d597e1750126a2c6fd99e4b2cc176955bb9972e Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:42 2016 -0400 pnfs: only tear down lsegs that precede seqid in LAYOUTRETURN args LAYOUTRETURN is "special" in that servers and clients are expected to work with old stateids. When the client sends a LAYOUTRETURN with an old stateid in it then the server is expected to only tear down layout segments that were present when that seqid was current. Ensure that the client handles its accounting accordingly. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/callback_proc.c | 3 ++- fs/nfs/nfs42proc.c | 2 +- fs/nfs/nfs4proc.c | 5 ++-- fs/nfs/pnfs.c | 64 +++++++++++++++++++++++++++++++++----------------- fs/nfs/pnfs.h | 6 +++-- 5 files changed, 52 insertions(+), 28 deletions(-) commit 3982a6a2d0e64441c938f4e7f93985aff37d8fb3 Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:41 2016 -0400 pnfs: keep track of the return sequence number in pnfs_layout_hdr When we want to selectively do a LAYOUTRETURN, we need to specify a stateid that represents most recent layout acquisition that is to be returned. When we mark a layout stateid to be returned, we update the return sequence number in the layout header with that value, if it's newer than the existing one. Then, when we go to do a LAYOUTRETURN on layout header put, we overwrite the seqid in the stateid with the saved one, and then zero it out. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/pnfs.c | 11 ++++++++--- fs/nfs/pnfs.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) commit 6675528380f8b7fffa82047211d8352dc6797321 Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:40 2016 -0400 pnfs: record sequence in pnfs_layout_segment when it's created In later patches, we're going to teach the client to be more selective about how it returns layouts. This means keeping a record of what the stateid's seqid was at the time that the server handed out a layout segment. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/pnfs.c | 1 + fs/nfs/pnfs.h | 1 + 2 files changed, 2 insertions(+) commit ee26bdd680aa10df628499fe95a7b88345574248 Author: Jeff Layton <jlayton@poochiereds.net> Date: Tue May 17 12:28:39 2016 -0400 pnfs: don't merge new ff lsegs with ones that have LAYOUTRETURN bit set Otherwise, we'll end up returning layouts that we've just received if the client issues a new LAYOUTGET prior to the LAYOUTRETURN. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/flexfilelayout/flexfilelayout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 446ca2195303c550b1cec7dcf9a478910dc84672 Author: Tom Haynes <loghyr@primarydata.com> Date: Tue May 17 12:28:38 2016 -0400 pNFS/flexfiles: When initing reads or writes, we might have to retry connecting to DSes If we are initializing reads or writes and can not connect to a DS, then check whether or not IO is allowed through the MDS. If it is allowed, reset to the MDS. Else, fail the layout segment and force a retry of a new layout segment. Signed-off-by: Tom Haynes <loghyr@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/flexfilelayout/flexfilelayout.c | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) commit 3b13b4b311a508a5899070936a873e30fcc96a2f Author: Tom Haynes <loghyr@primarydata.com> Date: Tue May 17 12:28:37 2016 -0400 pNFS/flexfiles: When checking for available DSes, conditionally check for MDS io Whenever we check to see if we have the needed number of DSes for the action, we may also have to check to see whether IO is allowed to go to the MDS or not. [jlayton: fix merge conflict due to lack of localio patches here] Signed-off-by: Tom Haynes <loghyr@primarydata.com> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/flexfilelayout/flexfilelayout.c | 5 ++--- fs/nfs/flexfilelayout/flexfilelayout.h | 1 + fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) commit 75bf47ebf6b5349d875fdffe7d64b0fc4e936170 Author: Trond Myklebust <trond.myklebust@primarydata.com> Date: Tue May 17 12:28:36 2016 -0400 pNFS/flexfile: Fix erroneous fall back to read/write through the MDS This patch fixes a problem whereby the pNFS client falls back to doing reads and writes through the metadata server even when the layout flag FF_FLAGS_NO_IO_THRU_MDS is set. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/flexfilelayout/flexfilelayout.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) commit cca588d6c835e21fd7a3e02a964ce5fe09fdad26 Author: Trond Myklebust <trond.myklebust@primarydata.com> Date: Mon May 16 17:42:45 2016 -0400 NFS: Reclaim writes via writepage are opportunistic No need to make them a priority any more, or to make them succeed. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/write.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit abf4e13cc1e16ed83ec8363d44f76149034b2851 Author: Trond Myklebust <trond.myklebust@primarydata.com> Date: Mon May 16 17:42:44 2016 -0400 NFSv4: Use the right stateid for delegations in setattr, read and write When we're using a delegation to represent our open state, we should ensure that we use the stateid that was used to create that delegation. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/delegation.c | 9 ++++++--- fs/nfs/delegation.h | 2 +- fs/nfs/nfs4_fs.h | 5 +++-- fs/nfs/nfs4proc.c | 13 +++++++++---- fs/nfs/nfs4state.c | 13 +++++++++---- 5 files changed, 28 insertions(+), 14 deletions(-) commit 93b717fd81bf6b9a73c3702e9b079b4de8148b34 Author: Trond Myklebust <trond.myklebust@primarydata.com> Date: Mon May 16 17:42:43 2016 -0400 NFSv4: Label stateids with the type In order to more easily distinguish what kind of stateid we are dealing with, introduce a type that can be used to label the stateid structure. The label will be useful both for debugging, but also when dealing with operations like SETATTR, READ and WRITE that can take several different types of stateid as arguments. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/callback_xdr.c | 17 ++++++++++--- fs/nfs/flexfilelayout/flexfilelayout.c | 7 +++--- fs/nfs/flexfilelayout/flexfilelayoutdev.c | 3 ++- fs/nfs/nfs4_fs.h | 7 ++++-- fs/nfs/nfs4proc.c | 3 +++ fs/nfs/nfs4state.c | 5 +++- fs/nfs/nfs4xdr.c | 42 ++++++++++++++++++++++++------- include/linux/nfs4.h | 25 ++++++++++++++---- 8 files changed, 85 insertions(+), 24 deletions(-) commit 9a8f6b5ea275ff01fc8ef3b8630a3d4ed6b0a362 Author: Trond Myklebust <trond.myklebust@primarydata.com> Date: Mon May 16 17:42:42 2016 -0400 SUNRPC: Ensure get_rpccred() and put_rpccred() can take NULL arguments Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> include/linux/sunrpc/auth.h | 3 ++- net/sunrpc/auth.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) commit f538d0ba5be39c52addff01c7ec31f0b90e57dfc Author: Trond Myklebust <trond.myklebust@primarydata.com> Date: Mon May 16 14:41:14 2016 -0400 pNFS: Fix a leaked layoutstats flag Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/pnfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6e14a92c363e1f42c6e1339da8413fcfbe1bdc3a Author: Chuck Lever <chuck.lever@oracle.com> Date: Wed May 4 10:41:48 2016 -0400 xprtrdma: Remove qplock Clean up. After "xprtrdma: Remove ro_unmap() from all registration modes", there are no longer any sites that take rpcrdma_ia::qplock for read. The one site that takes it for write is always single-threaded. It is safe to remove it. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/verbs.c | 3 --- net/sunrpc/xprtrdma/xprt_rdma.h | 1 - 2 files changed, 4 deletions(-) commit b2dde94bfa374b9e851756ab8191209f1a604e0a Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:43:03 2016 -0400 xprtrdma: Faster server reboot recovery In a cluster failover scenario, it is desirable for the client to attempt to reconnect quickly, as an alternate NFS server is already waiting to take over for the down server. The client can't see that a server IP address has moved to a new server until the existing connection is gone. For fabrics and devices where it is meaningful, set a definite upper bound on the amount of time before it is determined that a connection is no longer valid. This allows the RPC client to detect connection loss in a timely matter, then perform a fresh resolution of the server GUID in case it has changed (cluster failover). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/verbs.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 0b043b9fb5dabcb6f187136cc685b26a7f8bcdb1 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:42:54 2016 -0400 xprtrdma: Remove ro_unmap() from all registration modes Clean up: The ro_unmap method is no longer used. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/fmr_ops.c | 31 --------------------------- net/sunrpc/xprtrdma/frwr_ops.c | 43 -------------------------------------- net/sunrpc/xprtrdma/physical_ops.c | 12 ----------- net/sunrpc/xprtrdma/xprt_rdma.h | 2 -- 4 files changed, 88 deletions(-) commit ead3f26e359e12ac8d90baff8ed399b85e82fe5b Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:42:46 2016 -0400 xprtrdma: Add ro_unmap_safe memreg method There needs to be a safe method of releasing registered memory resources when an RPC terminates. Safe can mean a number of things: + Doesn't have to sleep + Doesn't rely on having a QP in RTS ro_unmap_safe will be that safe method. It can be used in cases where synchronous memory invalidation can deadlock, or needs to have an active QP. The important case is fencing an RPC's memory regions after it is signaled (^C) and before it exits. If this is not done, there is a window where the server can write an RPC reply into memory that the client has released and re-used for some other purpose. Note that this is a full solution for FRWR, but FMR and physical still have some gaps where a particularly bad server can wreak some havoc on the client. These gaps are not made worse by this patch and are expected to be exceptionally rare and timing-based. They are noted in documenting comments. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/fmr_ops.c | 105 +++++++++++++++++++++++++++++++++---- net/sunrpc/xprtrdma/frwr_ops.c | 27 ++++++++++ net/sunrpc/xprtrdma/physical_ops.c | 20 +++++++ net/sunrpc/xprtrdma/rpc_rdma.c | 5 +- net/sunrpc/xprtrdma/transport.c | 9 ++-- net/sunrpc/xprtrdma/xprt_rdma.h | 3 ++ 6 files changed, 150 insertions(+), 19 deletions(-) commit 763bc230b63c9106fd0b0a75ba5052fe3d68b786 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:42:38 2016 -0400 xprtrdma: Refactor __fmr_dma_unmap() Separate the DMA unmap operation from freeing the MW. In a subsequent patch they will not always be done at the same time, and they are not related operations (except by order; freeing the MW must be the last step during invalidation). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/fmr_ops.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 766656b022a629201b6e183c7837160cd0919286 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:42:29 2016 -0400 xprtrdma: Move fr_xprt and fr_worker to struct rpcrdma_mw In a subsequent patch, the fr_xprt and fr_worker fields will be needed by another memory registration mode. Move them into the generic rpcrdma_mw structure that wraps struct rpcrdma_frmr. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/frwr_ops.c | 10 +++++----- net/sunrpc/xprtrdma/xprt_rdma.h | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) commit 660bb497d0ae0c9e6be5beaff7ba17bfa5c9718c Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:42:21 2016 -0400 xprtrdma: Refactor the FRWR recovery worker Maintain the order of invalidation and DMA unmapping when doing a background MR reset. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/frwr_ops.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) commit d7a21c1bed54adcf96e1713019a6ad87e90fbbc3 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:42:12 2016 -0400 xprtrdma: Reset MRs in frwr_op_unmap_sync() frwr_op_unmap_sync() is now invoked in a workqueue context, the same as __frwr_queue_recovery(). There's no need to defer MR reset if posting LOCAL_INV MRs fails. This means that even when ib_post_send() fails (which should occur very rarely) the invalidation and DMA unmapping steps are still done in the correct order. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/frwr_ops.c | 98 ++++++++++++++++++++++++++---------------- 1 file changed, 60 insertions(+), 38 deletions(-) commit a3aa8b2b84a59ddd5f624aae9ee0f8b3333793e8 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:42:04 2016 -0400 xprtrdma: Save I/O direction in struct rpcrdma_frwr Move the the I/O direction field from rpcrdma_mr_seg into the rpcrdma_frmr. This makes it possible to DMA-unmap the frwr long after an RPC has exited and its rpcrdma_mr_seg array has been released and re-used. This might occur if an RPC times out while waiting for a new connection to be established. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/frwr_ops.c | 6 +++--- net/sunrpc/xprtrdma/xprt_rdma.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit 55fdfce101a0afe7bb9da17b4edbee049ae1c18d Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:41:56 2016 -0400 xprtrdma: Rename rpcrdma_frwr::sg and sg_nents Clean up: Follow same naming convention as other fields in struct rpcrdma_frwr. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/frwr_ops.c | 36 ++++++++++++++++++------------------ net/sunrpc/xprtrdma/xprt_rdma.h | 4 ++-- 2 files changed, 20 insertions(+), 20 deletions(-) commit 550d7502cf66ccc38bfa4c99f6526e402f918d98 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:41:47 2016 -0400 xprtrdma: Use core ib_drain_qp() API Clean up: Replace rpcrdma_flush_cqs() and rpcrdma_clean_cqs() with the new ib_drain_qp() API. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-By: Leon Romanovsky <leonro@mellanox.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/verbs.c | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) commit 3c19409b3d5173cf13adcf53b6423dc139994fc3 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:41:39 2016 -0400 xprtrdma: Remove rpcrdma_create_chunks() rpcrdma_create_chunks() has been replaced, and can be removed. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/rpc_rdma.c | 151 ----------------------------------------- 1 file changed, 151 deletions(-) commit 94f58c58c0b4315542036ce7703adeeaf4764940 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:41:30 2016 -0400 xprtrdma: Allow Read list and Reply chunk simultaneously rpcrdma_marshal_req() makes a simplifying assumption: that NFS operations with large Call messages have small Reply messages, and vice versa. Therefore with RPC-over-RDMA, only one chunk type is ever needed for each Call/Reply pair, because one direction needs chunks, the other direction will always fit inline. In fact, this assumption is asserted in the code: if (rtype != rpcrdma_noch && wtype != rpcrdma_noch) { dprintk("RPC: %s: cannot marshal multiple chunk lists\n", __func__); return -EIO; } But RPCGSS_SEC breaks this assumption. Because krb5i and krb5p perform data transformation on RPC messages before they are transmitted, direct data placement techniques cannot be used, thus RPC messages must be sent via a Long call in both directions. All such calls are sent with a Position Zero Read chunk, and all such replies are handled with a Reply chunk. Thus the client must provide every Call/Reply pair with both a Read list and a Reply chunk. Without any special security in effect, NFSv4 WRITEs may now also use the Read list and provide a Reply chunk. The marshal_req logic was preventing that, meaning an NFSv4 WRITE with a large payload that included a GETATTR result larger than the inline threshold would fail. The code that encodes each chunk list is now completely contained in its own function. There is some code duplication, but the trade-off is that the overall logic should be more clear. Note that all three chunk lists now share the rl_segments array. Some additional per-req accounting is necessary to track this usage. For the same reasons that the above simplifying assumption has held true for so long, I don't expect more array elements are needed at this time. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/rpc_rdma.c | 327 ++++++++++++++++++++++++++++++++-------- net/sunrpc/xprtrdma/xprt_rdma.h | 5 +- 2 files changed, 272 insertions(+), 60 deletions(-) commit 88b18a120332cada6ff4adb9b5b7b6e4bbb653e5 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:41:22 2016 -0400 xprtrdma: Update comments in rpcrdma_marshal_req() Update documenting comments to reflect code changes over the past year. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/rpc_rdma.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) commit cce6deeb56aa8aad1d3154d70ea419cf25967f5c Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:41:14 2016 -0400 xprtrdma: Avoid using Write list for small NFS READ requests Avoid the latency and interrupt overhead of registering a Write chunk when handling NFS READ requests of a few hundred bytes or less. This change does not interoperate with Linux NFS/RDMA servers that do not have commit 9d11b51ce7c1 ('svcrdma: Fix send_reply() scatter/gather set-up'). Commit 9d11b51ce7c1 was introduced in v4.3, and is included in 4.2.y, 4.1.y, and 3.18.y. Oracle bug 22925946 has been filed to request that the above fix be included in the Oracle Linux UEK4 NFS/RDMA server. Red Hat bugzillas 1327280 and 1327554 have been filed to request that RHEL NFS/RDMA server backports include the above fix. Workaround: Replace the "proto=rdma,port=20049" mount options with "proto=tcp" until commit 9d11b51ce7c1 is applied to your NFS server. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/rpc_rdma.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 302d3deb20682a076e1ab551821cacfdc81c5e4f Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:41:05 2016 -0400 xprtrdma: Prevent inline overflow When deciding whether to send a Call inline, rpcrdma_marshal_req doesn't take into account header bytes consumed by chunk lists. This results in Call messages on the wire that are sometimes larger than the inline threshold. Likewise, when a Write list or Reply chunk is in play, the server's reply has to emit an RDMA Send that includes a larger-than-minimal RPC-over-RDMA header. The actual size of a Call message cannot be estimated until after the chunk lists have been registered. Thus the size of each RPC-over-RDMA header can be estimated only after chunks are registered; but the decision to register chunks is based on the size of that header. Chicken, meet egg. The best a client can do is estimate header size based on the largest header that might occur, and then ensure that inline content is always smaller than that. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/fmr_ops.c | 3 ++ net/sunrpc/xprtrdma/frwr_ops.c | 3 ++ net/sunrpc/xprtrdma/physical_ops.c | 5 ++- net/sunrpc/xprtrdma/rpc_rdma.c | 85 +++++++++++++++++++++++++++++++++----- net/sunrpc/xprtrdma/xprt_rdma.h | 5 +++ 5 files changed, 90 insertions(+), 11 deletions(-) commit 949317464bc2baca0ccc69e35a7b5cd3715633a6 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:40:56 2016 -0400 xprtrdma: Limit number of RDMA segments in RPC-over-RDMA headers Send buffer space is shared between the RPC-over-RDMA header and an RPC message. A large RPC-over-RDMA header means less space is available for the associated RPC message, which then has to be moved via an RDMA Read or Write. As more segments are added to the chunk lists, the header increases in size. Typical modern hardware needs only a few segments to convey the maximum payload size, but some devices and registration modes may need a lot of segments to convey data payload. Sometimes so many are needed that the remaining space in the Send buffer is not enough for the RPC message. Sending such a message usually fails. To ensure a transport can always make forward progress, cap the number of RDMA segments that are allowed in chunk lists. This prevents less-capable devices and memory registrations from consuming a large portion of the Send buffer by reducing the maximum data payload that can be conveyed with such devices. For now I choose an arbitrary maximum of 8 RDMA segments. This allows a maximum size RPC-over-RDMA header to fit nicely in the current 1024 byte inline threshold with over 700 bytes remaining for an inline RPC message. The current maximum data payload of NFS READ or WRITE requests is one megabyte. To convey that payload on a client with 4KB pages, each chunk segment would need to handle 32 or more data pages. This is well within the capabilities of FMR. For physical registration, the maximum payload size on platforms with 4KB pages is reduced to 32KB. For FRWR, a device's maximum page list depth would need to be at least 34 to support the maximum 1MB payload. A device with a smaller maximum page list depth means the maximum data payload is reduced when using that device. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> net/sunrpc/xprtrdma/fmr_ops.c | 2 +- net/sunrpc/xprtrdma/frwr_ops.c | 2 +- net/sunrpc/xprtrdma/physical_ops.c | 2 +- net/sunrpc/xprtrdma/verbs.c | 22 ---------------------- net/sunrpc/xprtrdma/xprt_rdma.h | 21 ++++++++++++++++++++- 5 files changed, 23 insertions(+), 26 deletions(-) commit 29c554227aeec48cde5c22f911e51763f096e125 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:40:48 2016 -0400 xprtrdma: Bound the inline threshold values Currently the sysctls that allow setting the inline threshold allow any value to be set. Small values only make the transport run slower. The default 1KB setting is as low as is reasonable. And the logic that decides how to divide a Send buffer between RPC-over-RDMA header and RPC message assumes (but does not check) that the lower bound is not crazy (say, 57 bytes). Send and receive buffers share a page with some control information. Values larger than about 3KB can't be supported, currently. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> include/linux/sunrpc/xprtrdma.h | 4 +++- net/sunrpc/xprtrdma/transport.c | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) commit 6b26cc8c8ead3636a18bfd9489984983f4ddd6f4 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:40:40 2016 -0400 sunrpc: Advertise maximum backchannel payload size RPC-over-RDMA transports have a limit on how large a backward direction (backchannel) RPC message can be. Ensure that the NFSv4.x CREATE_SESSION operation advertises this limit to servers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/nfs4proc.c | 10 ++++++---- include/linux/sunrpc/clnt.h | 1 + include/linux/sunrpc/xprt.h | 1 + net/sunrpc/clnt.c | 17 +++++++++++++++++ net/sunrpc/xprtrdma/backchannel.c | 16 ++++++++++++++++ net/sunrpc/xprtrdma/transport.c | 1 + net/sunrpc/xprtrdma/xprt_rdma.h | 1 + net/sunrpc/xprtsock.c | 6 ++++++ 8 files changed, 49 insertions(+), 4 deletions(-) commit 4b9c7f9db9a003f5c342184dc4401c1b7f2efb39 Author: Chuck Lever <chuck.lever@oracle.com> Date: Mon May 2 14:40:31 2016 -0400 sunrpc: Update RPCBIND_MAXNETIDLEN Commit 176e21ee2ec8 ("SUNRPC: Support for RPC over AF_LOCAL transports") added a 5-character netid, but did not bump RPCBIND_MAXNETIDLEN from 4 to 5. Fixes: 176e21ee2ec8 ("SUNRPC: Support for RPC over AF_LOCAL ...") Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> include/linux/sunrpc/msg_prot.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 181342c5ebe8cc31f75b80ace18ae8a89a0c145a Author: Shirley Ma <shirley.ma@oracle.com> Date: Mon May 2 14:40:23 2016 -0400 xprtrdma: Add rdma6 option to support NFS/RDMA IPv6 RFC 5666: The "rdma" netid is to be used when IPv4 addressing is employed by the underlying transport, and "rdma6" for IPv6 addressing. Add mount -o proto=rdma6 option to support NFS/RDMA IPv6 addressing. Changes from v2: - Integrated comments from Chuck Level, Anna Schumaker, Trodt Myklebust - Add a little more to the patch description to describe NFS/RDMA IPv6 suggested by Chuck Level and Anna Schumaker - Removed duplicated rdma6 define - Remove Opt_xprt_rdma mountfamily since it doesn't support Signed-off-by: Shirley Ma <shirley.ma@oracle.com> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/super.c | 4 ++++ 1 file changed, 4 insertions(+) commit a1d1c4f11adf8a0036cd40a643543047fc952eb6 Author: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Date: Thu May 12 11:16:38 2016 +0200 nfs4: client: do not send empty SETATTR after OPEN_CREATE OPEN_CREATE with EXCLUSIVE4_1 sends initial file permission. Ignoring fact, that server have indicated that file mod is set, client will send yet another SETATTR request, but, as mode is already set, new SETATTR will be empty. This is not a problem, nevertheless an extra roundtrip and slow open on high latency networks. This change is aims to skip extra setattr after open if there are no attributes to be set. Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/nfs4proc.c | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) commit 2e72448b07dc3ff1b7593e9bfff91db182262857 Author: Anna Schumaker <Anna.Schumaker@netapp.com> Date: Tue May 21 16:53:03 2013 -0400 NFS: Add COPY nfs operation This adds the copy_range file_ops function pointer used by the sys_copy_range() function call. This patch only implements sync copies, so if an async copy happens we decode the stateid and ignore it. Signed-off-by: Anna Schumaker <bjschuma@netapp.com> fs/nfs/nfs42.h | 1 + fs/nfs/nfs42proc.c | 105 +++++++++++++++++++++++++++++++++ fs/nfs/nfs42xdr.c | 146 ++++++++++++++++++++++++++++++++++++++++++++++ fs/nfs/nfs4file.c | 23 ++++++++ fs/nfs/nfs4proc.c | 1 + fs/nfs/nfs4xdr.c | 1 + include/linux/nfs4.h | 1 + include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_xdr.h | 26 +++++++++ 9 files changed, 305 insertions(+) commit 67911c8f18b595040f5c2df0550c69a7c9397891 Author: Anna Schumaker <Anna.Schumaker@Netapp.com> Date: Tue Jan 19 14:37:30 2016 -0500 NFS: Add nfs_commit_file() Copy will use this to set up a commit request for a generic range. I don't want to allocate a new pagecache entry for the file, so I needed to change parts of the commit path to handle requests with a null wb_page. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/internal.h | 1 + fs/nfs/pagelist.c | 6 ++++-- fs/nfs/write.c | 41 +++++++++++++++++++++++++++++++++++++---- 3 files changed, 42 insertions(+), 6 deletions(-) commit c2985d001d2fb77357aeae675545893b61c50044 Author: Olga Kornievskaia <kolga@netapp.com> Date: Tue May 10 16:57:41 2016 -0400 Fixing oops in callback path Commit 80f9642724af5 ("NFSv4.x: Enforce the ca_maxreponsesize_cached on the back channel") causes an oops when it receives a callback with cachethis=yes. [ 109.667378] BUG: unable to handle kernel NULL pointer dereference at 00000000000002c8 [ 109.669476] IP: [<ffffffffa08a3e68>] nfs4_callback_compound+0x4f8/0x690 [nfsv4] [ 109.671216] PGD 0 [ 109.671736] Oops: 0000 [#1] SMP [ 109.705427] CPU: 1 PID: 3579 Comm: nfsv4.1-svc Not tainted 4.5.0-rc1+ #1 [ 109.706987] Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 05/20/2014 [ 109.709468] task: ffff8800b4408000 ti: ffff88008448c000 task.ti: ffff88008448c000 [ 109.711207] RIP: 0010:[<ffffffffa08a3e68>] [<ffffffffa08a3e68>] nfs4_callback_compound+0x4f8/0x690 [nfsv4] [ 109.713521] RSP: 0018:ffff88008448fca0 EFLAGS: 00010286 [ 109.714762] RAX: ffff880081ee202c RBX: ffff8800b7b5b600 RCX: 0000000000000001 [ 109.716427] RDX: 0000000000000008 RSI: 0000000000000008 RDI: 0000000000000000 [ 109.718091] RBP: ffff88008448fda8 R08: 0000000000000000 R09: 000000000b000000 [ 109.719757] R10: ffff880137786000 R11: ffff8800b7b5b600 R12: 0000000001000000 [ 109.721415] R13: 0000000000000002 R14: 0000000053270000 R15: 000000000000000b [ 109.723061] FS: 0000000000000000(0000) GS:ffff880139640000(0000) knlGS:0000000000000000 [ 109.724931] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 109.726278] CR2: 00000000000002c8 CR3: 0000000034d50000 CR4: 00000000001406e0 [ 109.727972] Stack: [ 109.728465] ffff880081ee202c ffff880081ee201c 000000008448fcc0 ffff8800baccb800 [ 109.730349] ffff8800baccc800 ffffffffa08d0380 0000000000000000 0000000000000000 [ 109.732211] ffff8800b7b5b600 0000000000000001 ffffffff81d073c0 ffff880081ee3090 [ 109.734056] Call Trace: [ 109.734657] [<ffffffffa03795d4>] svc_process_common+0x5c4/0x6c0 [sunrpc] [ 109.736267] [<ffffffffa0379a4c>] bc_svc_process+0x1fc/0x360 [sunrpc] [ 109.737775] [<ffffffffa08a2c2c>] nfs41_callback_svc+0x10c/0x1d0 [nfsv4] [ 109.739335] [<ffffffff810cb380>] ? prepare_to_wait_event+0xf0/0xf0 [ 109.740799] [<ffffffffa08a2b20>] ? nfs4_callback_svc+0x50/0x50 [nfsv4] [ 109.742349] [<ffffffff810a6998>] kthread+0xd8/0xf0 [ 109.743495] [<ffffffff810a68c0>] ? kthread_park+0x60/0x60 [ 109.744776] [<ffffffff816abc4f>] ret_from_fork+0x3f/0x70 [ 109.746037] [<ffffffff810a68c0>] ? kthread_park+0x60/0x60 [ 109.747324] Code: cc 45 31 f6 48 8b 85 00 ff ff ff 44 89 30 48 8b 85 f8 fe ff ff 44 89 20 48 8b 9d 38 ff ff ff 48 8b bd 30 ff ff ff 48 85 db 74 4c <4c> 8b af c8 02 00 00 4d 8d a5 08 02 00 00 49 81 c5 98 02 00 00 [ 109.754361] RIP [<ffffffffa08a3e68>] nfs4_callback_compound+0x4f8/0x690 [nfsv4] [ 109.756123] RSP <ffff88008448fca0> [ 109.756951] CR2: 00000000000002c8 [ 109.757738] ---[ end trace 2b8555511ab5dfb4 ]--- [ 109.758819] Kernel panic - not syncing: Fatal exception [ 109.760126] Kernel Offset: disabled [ 118.938934] ---[ end Kernel panic - not syncing: Fatal exception It doesn't unlock the table nor does it set the cps->clp pointer which is later needed by nfs4_cb_free_slot(). Fixes: 80f9642724af5 ("NFSv4.x: Enforce the ca_maxresponsesize_cached ...") CC: stable@vger.kernel.org Signed-off-by: Olga Kornievskaia <kolga@netapp.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> fs/nfs/callback_proc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit e257ef55ce51d7ec399193ee85acda8b8759d930 Merge: 45604e6 c5076cf bdd7444 Author: Bjorn Helgaas <bhelgaas@google.com> Date: Tue May 17 14:35:46 2016 -0500 Merge branches 'pci/arm64' and 'pci/host-hv' into next * pci/arm64: PCI, of: Move PCI I/O space management to PCI core code PCI: generic, thunder: Use generic ECAM API PCI: Provide common functions for ECAM mapping * pci/host-hv: PCI: hv: Add explicit barriers to config space access commit 45604e68ed7acf23e6c4cbac9930c61df19220c8 Merge: d9322d2 f841522 ad67b43 Author: Bjorn Helgaas <bhelgaas@google.com> Date: Tue May 17 14:35:38 2016 -0500 Merge branches 'pci/hotplug' and 'pci/resource' into next * pci/hotplug: PCI: Use cached copy of PCI_EXP_SLTCAP_HPC bit * pci/resource: PCI: Disable all BAR sizing for devices with non-compliant BARs x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs PCI: Identify Enhanced Allocation (EA) BAR Equivalent resources in sysfs commit 897fba1172d637d344f009d700f7eb8a1fa262f1 Author: Steve French <smfrench@gmail.com> Date: Thu May 12 21:20:36 2016 -0500 remove directory incorrectly tries to set delete on close on non-empty directories Wrong return code was being returned on SMB3 rmdir of non-empty directory. For SMB3 (unlike for cifs), we attempt to delete a directory by set of delete on close flag on the open. Windows clients set this flag via a set info (SET_FILE_DISPOSITION to set this flag) which properly checks if the directory is empty. With this patch on smb3 mounts we correctly return "DIRECTORY NOT EMPTY" on attempts to remove a non-empty directory. Signed-off-by: Steve French <steve.french@primarydata.com> CC: Stable <stable@vger.kernel.org> Acked-by: Sachin Prabhu <sprabhu@redhat.com> fs/cifs/smb2glob.h | 1 + fs/cifs/smb2inode.c | 8 ++++++-- fs/cifs/smb2pdu.c | 16 ++++++++++++++++ fs/cifs/smb2proto.h | 2 ++ 4 files changed, 25 insertions(+), 2 deletions(-) commit 5a4f7e8e7ff5e81f57b08797cca41d307878dfc7 Author: Steve French <smfrench@gmail.com> Date: Tue May 10 08:24:05 2016 -0500 Update cifs.ko version to 2.09 Signed-off-by: Steven French <steve.french@primarydata.com> fs/cifs/cifsfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a967d6c9b39c226be1b45f13acd4d8a5ab3dc44 Author: Stefan Metzmacher <metze@samba.org> Date: Tue May 3 10:52:30 2016 +0200 fs/cifs: correctly to anonymous authentication for the NTLM(v2) authentication Only server which map unknown users to guest will allow access using a non-null NTLMv2_Response. For Samba it's the "map to guest = bad user" option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913 Signed-off-by: Stefan Metzmacher <metze@samba.org> CC: Stable <stable@vger.kernel.org> Signed-off-by: Steve French <smfrench@gmail.com> fs/cifs/sess.c | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) commit 777f69b8d26bf35ade4a76b08f203c11e048365d Author: Stefan Metzmacher <metze@samba.org> Date: Tue May 3 10:52:30 2016 +0200 fs/cifs: correctly to anonymous authentication for the NTLM(v1) authentication Only server which map unknown users to guest will allow access using a non-null NTChallengeResponse. For Samba it's the "map to guest = bad user" option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913 Signed-off-by: Stefan Metzmacher <metze@samba.org> CC: Stable <stable@vger.kernel.org> Signed-off-by: Steve French <smfrench@gmail.com> fs/cifs/sess.c | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) commit fa8f3a354bb775ec586e4475bcb07f7dece97e0c Author: Stefan Metzmacher <metze@samba.org> Date: Tue May 3 10:52:30 2016 +0200 fs/cifs: correctly to anonymous authentication for the LANMAN authentication Only server which map unknown users to guest will allow access using a non-null LMChallengeResponse. For Samba it's the "map to guest = bad user" option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913 Signed-off-by: Stefan Metzmacher <metze@samba.org> CC: Stable <stable@vger.kernel.org> Signed-off-by: Steve French <smfrench@gmail.com> fs/cifs/sess.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) commit cfda35d98298131bf38fbad3ce4cd5ecb3cf18db Author: Stefan Metzmacher <metze@samba.org> Date: Tue May 3 10:52:30 2016 +0200 fs/cifs: correctly to anonymous authentication via NTLMSSP See [MS-NLMP] 3.2.5.1.2 Server Receives an AUTHENTICATE_MESSAGE from the Client: ... Set NullSession to FALSE If (AUTHENTICATE_MESSAGE.UserNameLen == 0 AND AUTHENTICATE_MESSAGE.NtChallengeResponse.Length == 0 AND (AUTHENTICATE_MESSAGE.LmChallengeResponse == Z(1) OR AUTHENTICATE_MESSAGE.LmChallengeResponse.Length == 0)) -- Special case: client requested anonymous authentication Set NullSession to TRUE ... Only server which map unknown users to guest will allow access using a non-null NTChallengeResponse. For Samba it's the "map to guest = bad user" option. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11913 CC: Stable <stable@vger.kernel.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <smfrench@gmail.com> fs/cifs/sess.c | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) commit 11e31647c9263185cfd990db656dbb7f06697faf Author: Sachin Prabhu <sprabhu@redhat.com> Date: Mon Feb 8 13:44:01 2016 +0530 cifs: remove any preceding delimiter from prefix_path We currently do not check if any delimiter exists before the prefix path in cifs_compose_mount_options(). Consequently when building the devname using cifs_build_devname() we can end up with multiple delimiters separating the UNC and the prefix path. An issue was reported by the customer mounting a folder within a DFS share from a Netapp server which uses McAfee antivirus. We have narrowed down the cause to the use of double backslashes in the file name used to open the file. This was determined to be caused because of additional delimiters as a result of the bug. In addition to changes in cifs_build_devname(), we also fix cifs_parse_devname() to ignore any preceding delimiter for the prefix path. The problem was originally reported on RHEL 6 in RHEL bz 1252721. This is the upstream version of the fix. The fix was confirmed by looking at the packet capture of a DFS mount. Signed-off-by: Sachin Prabhu <sprabhu@redhat.com> Signed-off-by: Steve French <smfrench@gmail.com> fs/cifs/cifs_dfs_ref.c | 6 +++++- fs/cifs/connect.c | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) commit 1f1735cb75ab31ed948a7fce65beaaa6c0ed4ed4 Author: Goldwyn Rodrigues <rgoldwyn@suse.com> Date: Mon Apr 18 06:41:52 2016 -0500 cifs: Use file_dentry() CIFS may be used as lower layer of overlayfs and accessing f_path.dentry can lead to a crash. Fix by replacing direct access of file->f_path.dentry with the file_dentry() accessor, which will always return a native object. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Acked-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com> fs/cifs/file.c | 4 ++-- fs/cifs/readdir.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 917fa5353da05e8a0045b8acacba8d50400d5b12 Author: David S. Miller <davem@davemloft.net> Date: Tue May 17 14:49:55 2016 -0400 Revert "phy dp83867: Fix compilation with CONFIG_OF_MDIO=m" This reverts commit 7f32541c2fdaa84af418c3e1431bbd066ab44d09. This needs reverting too, as per requests. Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c606b4999b8b11600baabab6a18fb02d296569a3 Author: David S. Miller <davem@davemloft.net> Date: Tue May 17 14:49:24 2016 -0400 Revert "phy dp83867: Make rgmii parameters optional" This reverts commit 81003bc924bac0a99bfdc2869f5dff5a87aa4a3d. Developers have asked me to revert this for now. Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/dp83867.c | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) commit 27896c83fe94e2190f121a2fdbffffbf1d83d573 Author: Ard Biesheuvel <ard.biesheuvel@linaro.org> Date: Sat May 14 22:40:15 2016 +0200 r8169: default to 64-bit DMA on recent PCIe chips The current logic around the 'use_dac' module parameter prevents the r81969 driver from being loadable on 64-bit systems without any RAM below 4 GB when the parameter is left at its default value. So introduce a new default value -1 which indicates that 64-bit DMA should be enabled on sufficiently recent PCIe chips, i.e., versions RTL_GIGA_MAC_VER_18 or later. Explicit param values of 0 or 1 retain the existing behavior of unconditionally enabling/disabling 64-bit DMA on 64-bit architectures (i.e., regardless of the type and version of the chip) Since PCIe chips do not need to CPlusCmd Dual Address Cycle to be set, make that conditional on the device type as well. Cc: Realtek linux nic maintainers <nic_swsd@realtek.com> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/realtek/r8169.c | 44 ++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 19 deletions(-) commit 81003bc924bac0a99bfdc2869f5dff5a87aa4a3d Author: Alexander Graf <agraf@suse.de> Date: Mon May 16 20:52:43 2016 +0200 phy dp83867: Make rgmii parameters optional If you compile without OF_MDIO support in an RGMII configuration, we fail to configure the dp83867 phy today by writing garbage into its configuration registers. On the other hand if you do compile with OF_MDIO and the phy gets loaded via device tree, you have to have the properties set in the device tree, otherwise we fail to load the driver and don't even attach the generic phy driver to the interface anymore. To make things slightly more consistent, make the rgmii configuration properties optional and allow a user to omit them in their device tree. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/dp83867.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) commit 7f32541c2fdaa84af418c3e1431bbd066ab44d09 Author: Alexander Graf <agraf@suse.de> Date: Mon May 16 20:52:42 2016 +0200 phy dp83867: Fix compilation with CONFIG_OF_MDIO=m When CONFIG_OF_MDIO is configured as module, the #define for it really is CONFIG_OF_MDIO_MODULE, not CONFIG_OF_MDIO. So if we are compiling it as module, the dp83867 doesn't see that OF_MDIO was selected and doesn't read the dt rgmii parameters. The fix is simple: Use IS_ENABLED(). It checks for both - module as well as compiled in code. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/dp83867.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 08a6ee5807711c4dfa0726e315864a408aa6c13c Merge: 4c1cd4f f79a917 Author: David S. Miller <davem@davemloft.net> Date: Tue May 17 14:11:19 2016 -0400 Merge tag 'net-next-qcom-soc-4.7-2-merge' of git://github.com/andersson/kernel Merge tag 'qcom-soc-for-4.7-2' into net-next This merges the Qualcomm SOC tree with the net-next, solving the merge conflict in the SMD API between the two. commit 4c1cd4fdfd14ecd417962f8c2166506132697f7c Author: Yang Shi <yang.shi@linaro.org> Date: Mon May 16 16:36:26 2016 -0700 bpf: arm64: remove callee-save registers use for tmp registers In the current implementation of ARM64 eBPF JIT, R23 and R24 are used for tmp registers, which are callee-saved registers. This leads to variable size of JIT prologue and epilogue. The latest blinding constant change prefers to constant size of prologue and epilogue. AAPCS reserves R9 ~ R15 for temp registers which not need to be saved/restored during function call. So, replace R23 and R24 to R10 and R11, and remove tmp_used flag to save 2 instructions for some jited BPF program. CC: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Zi Shen Lim <zlim.lnx@gmail.com> Signed-off-by: Yang Shi <yang.shi@linaro.org> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: David S. Miller <davem@davemloft.net> arch/arm64/net/bpf_jit_comp.c | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) commit cd9e2e5d3ff148be9ea210f622ce3e8e8292fcd6 Author: John Stultz <john.stultz@linaro.org> Date: Mon May 16 20:36:15 2016 -0700 asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions In testing with HiKey, we found that since commit 3f30b158eba5 ("asix: On RX avoid creating bad Ethernet frames"), we're seeing lots of noise during network transfers: [ 239.027993] asix 1-1.1:1.0 eth0: asix_rx_fixup() Data Header synchronisation was lost, remaining 988 [ 239.037310] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0x54ebb5ec, offset 4 [ 239.045519] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0xcdffe7a2, offset 4 [ 239.275044] asix 1-1.1:1.0 eth0: asix_rx_fixup() Data Header synchronisation was lost, remaining 988 [ 239.284355] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0x1d36f59d, offset 4 [ 239.292541] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0xaef3c1e9, offset 4 [ 239.518996] asix 1-1.1:1.0 eth0: asix_rx_fixup() Data Header synchronisation was lost, remaining 988 [ 239.528300] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0x2881912, offset 4 [ 239.536413] asix 1-1.1:1.0 eth0: asix_rx_fixup() Bad Header Length 0x5638f7e2, offset 4 And network throughput ends up being pretty bursty and slow with a overall throughput of at best ~30kB/s (where as previously we got 1.1MB/s with the slower USB1.1 "full speed" host). We found the issue also was reproducible on a x86_64 system, using a "high-speed" USB2.0 port but the throughput did not measurably drop (possibly due to the scp transfer being cpu bound on my slow test hardware). After lots of debugging, I found the check added in the problematic commit seems to be calculating the offset incorrectly. In the normal case, in the main loop of the function, we do: (where offset is zero, or set to "offset += (copy_length + 1) & 0xfffe" in the previous loop) rx->header = get_unaligned_le32(skb->data + offset); offset += sizeof(u32); But the problematic patch calculates: offset = ((rx->remaining + 1) & 0xfffe) + sizeof(u32); rx->header = get_unaligned_le32(skb->data + offset); Adding some debug logic to check those offset calculation used to find rx->header, the one in problematic code is always too large by sizeof(u32). Thus, this patch removes the incorrect " + sizeof(u32)" addition in the problematic calculation, and resolves the issue. Cc: Dean Jenkins <Dean_Jenkins@mentor.com> Cc: "David B. Robins" <linux@davidrobins.net> Cc: Mark Craske <Mark_Craske@mentor.com> Cc: Emil Goode <emilgoode@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: YongQin Liu <yongqin.liu@linaro.org> Cc: Guodong Xu <guodong.xu@linaro.org> Cc: Ivan Vecera <ivecera@redhat.com> Cc: linux-usb@vger.kernel.org Cc: netdev@vger.kernel.org Cc: stable <stable@vger.kernel.org> #4.4+ Reported-by: Yongqin Liu <yongqin.liu@linaro.org> Signed-off-by: John Stultz <john.stultz@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/usb/asix_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f427d3a6029331304f91ef4d7cf646f054216d2 Merge: ede4090 0e0162b Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 11:01:31 2016 -0700 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull parallel filesystem directory handling update from Al Viro. This is the main parallel directory work by Al that makes the vfs layer able to do lookup and readdir in parallel within a single directory. That's a big change, since this used to be all protected by the directory inode mutex. The inode mutex is replaced by an rwsem, and serialization of lookups of a single name is done by a "in-progress" dentry marker. The series begins with xattr cleanups, and then ends with switching filesystems over to actually doing the readdir in parallel (switching to the "iterate_shared()" that only takes the read lock). A more detailed explanation of the process from Al Viro: "The xattr work starts with some acl fixes, then switches ->getxattr to passing inode and dentry separately. This is the point where the things start to get tricky - that got merged into the very beginning of the -rc3-based #work.lookups, to allow untangling the security_d_instantiate() mess. The xattr work itself proceeds to switch a lot of filesystems to generic_...xattr(); no complications there. After that initial xattr work, the series then does the following: - untangle security_d_instantiate() - convert a bunch of open-coded lookup_one_len_unlocked() to calls of that thing; one such place (in overlayfs) actually yields a trivial conflict with overlayfs fixes later in the cycle - overlayfs ended up switching to a variant of lookup_one_len_unlocked() sans the permission checks. I would've dropped that commit (it gets overridden on merge from #ovl-fixes in #for-next; proper resolution is to use the variant in mainline fs/overlayfs/super.c), but I didn't want to rebase the damn thing - it was fairly late in the cycle... - some filesystems had managed to depend on lookup/lookup exclusion for *fs-internal* data structures in a way that would break if we relaxed the VFS exclusion. Fixing hadn't been hard, fortunately. - core of that series - parallel lookup machinery, replacing ->i_mutex with rwsem, making lookup_slow() take it only shared. At that point lookups happen in parallel; lookups on the same name wait for the in-progress one to be done with that dentry. Surprisingly little code, at that - almost all of it is in fs/dcache.c, with fs/namei.c changes limited to lookup_slow() - making it use the new primitive and actually switching to locking shared. - parallel readdir stuff - first of all, we provide the exclusion on per-struct file basis, same as we do for read() vs lseek() for regular files. That takes care of most of the needed exclusion in readdir/readdir; however, these guys are trickier than lookups, so I went for switching them one-by-one. To do that, a new method '->iterate_shared()' is added and filesystems are switched to it as they are either confirmed to be OK with shared lock on directory or fixed to be OK with that. I hope to kill the original method come next cycle (almost all in-tree filesystems are switched already), but it's still not quite finished. - several filesystems get switched to parallel readdir. The interesting part here is dealing with dcache preseeding by readdir; that needs minor adjustment to be safe with directory locked only shared. Most of the filesystems doing that got switched to in those commits. Important exception: NFS. Turns out that NFS folks, with their, er, insistence on VFS getting the fuck out of the way of the Smart Filesystem Code That Knows How And What To Lock(tm) have grown the locking of their own. They had their own homegrown rwsem, with lookup/readdir/atomic_open being *writers* (sillyunlink is the reader there). Of course, with VFS getting the fuck out of the way, as requested, the actual smarts of the smart filesystem code etc. had become exposed... - do_last/lookup_open/atomic_open cleanups. As the result, open() without O_CREAT locks the directory only shared. Including the ->atomic_open() case. Backmerge from #for-linus in the middle of that - atomic_open() fix got brought in. - then comes NFS switch to saner (VFS-based ;-) locking, killing the homegrown "lookup and readdir are writers" kinda-sorta rwsem. All exclusion for sillyunlink/lookup is done by the parallel lookups mechanism. Exclusion between sillyunlink and rmdir is a real rwsem now - rmdir being the writer. Result: NFS lookups/readdirs/O_CREAT-less opens happen in parallel now. - the rest of the series consists of switching a lot of filesystems to parallel readdir; in a lot of cases ->llseek() gets simplified as well. One backmerge in there (again, #for-linus - rockridge fix)" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (74 commits) ext4: switch to ->iterate_shared() hfs: switch to ->iterate_shared() hfsplus: switch to ->iterate_shared() hostfs: switch to ->iterate_shared() hpfs: switch to ->iterate_shared() hpfs: handle allocation failures in hpfs_add_pos() gfs2: switch to ->iterate_shared() f2fs: switch to ->iterate_shared() afs: switch to ->iterate_shared() befs: switch to ->iterate_shared() befs: constify stuff a bit isofs: switch to ->iterate_shared() get_acorn_filename(): deobfuscate a bit btrfs: switch to ->iterate_shared() logfs: no need to lock directory in lseek switch ecryptfs to ->iterate_shared 9p: switch to ->iterate_shared() fat: switch to ->iterate_shared() romfs, squashfs: switch to ->iterate_shared() more trivial ->iterate_shared conversions ... commit da4ed55165d41b1073f9a476f1c18493e9bf8c8e Author: Jiri Pirko <jiri@mellanox.com> Date: Tue May 17 18:58:08 2016 +0200 switchdev: pass pointer to fib_info instead of copy The problem is that fib_info->nh is [0] so the struct fib_info allocation size depends on number of nexthops. If we just copy fib_info, we do not copy the nexthops info and driver accesses memory which is not ours. Given the fact that fib4 does not defer operations and therefore it does not need copy, just pass the pointer down to drivers as it was done before. Fixes: 850d0cbc91 ("switchdev: remove pointers from switchdev objects") Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/rocker/rocker_ofdpa.c | 4 ++-- include/net/switchdev.h | 2 +- net/switchdev/switchdev.c | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) commit ede40902cf80714ece199977b308e2ee437cae0b Merge: 91e8d0c 0097852 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 10:27:29 2016 -0700 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull irq updates from Thomas Gleixner: "This update delivers: - Yet another interrupt chip diver (LPC32xx) - Core functions to handle partitioned per-cpu interrupts - Enhancements to the IPI core - Proper handling of irq type configuration - A large set of ARM GIC enhancements - The usual pile of small fixes, cleanups and enhancements" * 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (31 commits) irqchip/bcm2836: Use a more generic memory barrier call irqchip/bcm2836: Fix compiler warning on 64-bit build irqchip/bcm2836: Drop smp_set_ops on arm64 builds irqchip/gic: Add helper functions for GIC setup and teardown irqchip/gic: Store GIC configuration parameters irqchip/gic: Pass GIC pointer to save/restore functions irqchip/gic: Return an error if GIC initialisation fails irqchip/gic: Remove static irq_chip definition for eoimode1 irqchip/gic: Don't initialise chip if mapping IO space fails irqchip/gic: WARN if setting the interrupt type for a PPI fails irqchip/gic: Don't unnecessarily write the IRQ configuration irqchip: Mask the non-type/sense bits when translating an IRQ genirq: Ensure IRQ descriptor is valid when setting-up the IRQ irqchip/gic-v3: Configure all interrupts as non-secure Group-1 irqchip/gic-v2m: Add workaround for Broadcom NS2 GICv2m erratum irqchip/irq-alpine-msi: Don't use <asm-generic/msi.h> irqchip/mbigen: Checking for IS_ERR() instead of NULL irqchip/gic-v3: Remove inexistant register definition irqchip/gicv3-its: Don't allow devices whose ID is outside range irqchip: Add LPC32xx interrupt controller driver ... commit ec4c436652cfdf5dcad60f553020ee99596b937b Author: Mark Brown <broonie@kernel.org> Date: Tue May 17 18:06:18 2016 +0100 regulator: Silence build warnings from regulator_can_change_voltage() Cut down on noise for mainstream users of the API and people doing build testing by dropping the deprecated flag from regulator_can_change_voltage() as it triggers even on the EXPORT_SYMBOL_GPL() which affects all builds rather than just the remaining drivers with calls to it (for which fixes are currently pending). The function remains deprecated and is expected to be removed entirely in v4.8. Signed-off-by: Mark Brown <broonie@kernel.org> include/linux/regulator/consumer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 91e8d0cbc94f81f110e508c3105dd93fb146d6b5 Merge: 2fe2edf 9999c5f Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 09:49:28 2016 -0700 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull timer updates from Thomas Gleixner: "A rather small set of patches from the timer departement: - Some more y2038 work - Yet another new clocksource driver - The usual set of small fixes, cleanups and enhancements" * 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: clocksource/drivers/tegra: Remove unused suspend/resume code clockevents/driversi/mps2: add MPS2 Timer driver dt-bindings: document the MPS2 timer bindings clocksource/drivers/mtk_timer: Add __init attribute clockevents/drivers/dw_apb_timer: Implement ->set_state_oneshot_stopped() time: Introduce do_sys_settimeofday64() security: Introduce security_settime64() clocksource: Add missing include of of.h. commit 2fe2edf85ffe51fddb800bb0b332c7ae454a6db3 Merge: 9a07a79 59643d1 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 09:42:58 2016 -0700 Merge tag 'trace-fixes-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace Pull tracing ring-buffer fixes from Steven Rostedt: "Hao Qin reported an integer overflow possibility with signed and unsigned numbers in the ring-buffer code. https://bugzilla.kernel.org/show_bug.cgi?id=118001 At first I did not think this was too much of an issue, because the overflow would be caught later when either too much data was allocated or it would trigger RB_WARN_ON() which shuts down the ring buffer. But looking closer into it, I found that the right settings could bypass the checks and crash the kernel. Luckily, this is only accessible by root. The first fix is to convert all the variables into long, such that we don't get into issues between 32 bit variables being assigned 64 bit ones. This fixes the RB_WARN_ON() triggering. The next fix is to get rid of a duplicate DIV_ROUND_UP() that when called twice with the right value, can cause a kernel crash. The first DIV_ROUND_UP() is to normalize the input and it is checked against the minimum allowable value. But then DIV_ROUND_UP() is called again, which can overflow due to the (a + b - 1)/b, logic. The first called upped the value, the second can overflow (with the +b part). The second call to DIV_ROUND_UP() came in via a second change a while ago and the code is cleaned up to remove it" * tag 'trace-fixes-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: ring-buffer: Prevent overflow of size in ring_buffer_resize() ring-buffer: Use long for nr_pages to avoid overflow failures commit dc327f8931cb9d66191f489eb9a852fc04530546 Author: WANG Cong <xiyou.wangcong@gmail.com> Date: Mon May 16 15:11:18 2016 -0700 net_sched: close another race condition in tcf_mirred_release() We saw the following extra refcount release on veth device: kernel: [7957821.463992] unregister_netdevice: waiting for mesos50284 to become free. Usage count = -1 Since we heavily use mirred action to redirect packets to veth, I think this is caused by the following race condition: CPU0: tcf_mirred_release(): (in RCU callback) struct net_device *dev = rcu_dereference_protected(m->tcfm_dev, 1); CPU1: mirred_device_event(): spin_lock_bh(&mirred_list_lock); list_for_each_entry(m, &mirred_list, tcfm_list) { if (rcu_access_pointer(m->tcfm_dev) == dev) { dev_put(dev); /* Note : no rcu grace period necessary, as * net_device are already rcu protected. */ RCU_INIT_POINTER(m->tcfm_dev, NULL); } } spin_unlock_bh(&mirred_list_lock); CPU0: tcf_mirred_release(): spin_lock_bh(&mirred_list_lock); list_del(&m->tcfm_list); spin_unlock_bh(&mirred_list_lock); if (dev) // <======== Stil refers to the old m->tcfm_dev dev_put(dev); // <======== dev_put() is called on it again The action init code path is good because it is impossible to modify an action that is being removed. So, fix this by moving everything under the spinlock. Fixes: 2ee22a90c7af ("net_sched: act_mirred: remove spinlock in fast path") Fixes: 6bd00b850635 ("act_mirred: fix a race condition on mirred_list") Cc: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/sched/act_mirred.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 03aaaa9b941e136757b55c4cf775aab6068dfd94 Author: Richard Alpe <richard.alpe@ericsson.com> Date: Tue May 17 16:57:37 2016 +0200 tipc: fix nametable publication field in nl compat The publication field of the old netlink API should contain the publication key and not the publication reference. Fixes: 44a8ae94fd55 (tipc: convert legacy nl name table dump to nl compat) Signed-off-by: Richard Alpe <richard.alpe@ericsson.com> Acked-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/tipc/netlink_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9a07a7968407e20fe87ed6b5eb6a6000e4819492 Merge: 1649098 256b1cf Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Tue May 17 09:33:39 2016 -0700 Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 Pull crypto update from Herbert Xu: "API: - Crypto self tests can now be disabled at boot/run time. - Add async support to algif_aead. Algorithms: - A large number of fixes to MPI from Nicolai Stange. - Performance improvement for HMAC DRBG. Drivers: - Use generic crypto engine in omap-des. - Merge ppc4xx-rng and crypto4xx drivers. - Fix lockups in sun4i-ss driver by disabling IRQs. - Add DMA engine support to ccp. - Reenable talitos hash algorithms. - Add support for Hisilicon SoC RNG. - Add basic crypto driver for the MXC SCC. Others: - Do not allocate crypto hash tfm in NORECLAIM context in ecryptfs" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: (77 commits) crypto: qat - change the adf_ctl_stop_devices to void crypto: caam - fix caam_jr_alloc() ret code crypto: vmx - comply with ABIs that specify vrsave as reserved. crypto: testmgr - Add a flag allowing the self-tests to be disabled at runtime. crypto: ccp - constify ccp_actions structure crypto: marvell/cesa - Use dma_pool_zalloc crypto: qat - make adf_vf_isr.c dependant on IOV config crypto: qat - Fix typo in comments lib: asn1_decoder - add MODULE_LICENSE("GPL") crypto: omap-sham - Use dma_request_chan() for requesting DMA channel crypto: omap-des - Use dma_request_chan() for requesting DMA channel crypto: omap-aes - Use dma_request_chan() for requesting DMA channel crypto: omap-des - Integrate with the crypto engine framework crypto: s5p-sss - fix incorrect usage of scatterlists api crypto: s5p-sss - Fix missed interrupts when working with 8 kB blocks crypto: s5p-sss - Use common BIT macro crypto: mxc-scc - fix unwinding in mxc_scc_crypto_register() crypto: mxc-scc - signedness bugs in mxc_scc_ablkcipher_req_init() crypto: talitos - fix ahash algorithms registration crypto: ccp - Ensure all dependencies are specified ... commit 3274940bd3d87043c74aa444ff3b0dff56b3e9ea Author: Harvey Hunt <harvey.hunt@imgtec.com> Date: Tue May 17 14:33:27 2016 +0100 drivers: net: Don't print unpopulated net_device name For ethernet devices, net_device.name will be eth%d before register_netdev() is called. Don't print the net_device name until the format string is replaced. Signed-off-by: Harvey Hunt <harvey.hunt@imgtec.com> Cc: Marcel Ziswiler <marcel@ziswiler.com> Cc: Robert Jarzmik <robert.jarzmik@free.fr> Cc: Barry Song <Baohua.Song@csr.com> Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/davicom/dm9000.c | 11 +++++++---- drivers/net/ethernet/micrel/ks8695net.c | 7 +++++-- drivers/net/ethernet/netx-eth.c | 12 ++++++++---- 3 files changed, 20 insertions(+), 10 deletions(-) commit 39651abd28146fff2bfac63d68a7a56250a4aead Author: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> Date: Tue May 17 06:44:26 2016 -0400 qed: add support for dcbx. This patch adds the necessary driver support for Management Firmware to configure the device/firmware with the dcbx results. Management Firmware is responsible for communicating the DCBX and driving the negotiation, but the driver has responsibility of receiving async notification and configuring the results in hw/fw. This patch also adds the dcbx support for future protocols (e.g., FCoE) as preparation to their imminent submission. Signed-off-by: Sudarsana Reddy Kalluru <sudarsana.kalluru@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/Makefile | 2 +- drivers/net/ethernet/qlogic/qed/qed.h | 2 + drivers/net/ethernet/qlogic/qed/qed_cxt.h | 10 + drivers/net/ethernet/qlogic/qed/qed_dcbx.c | 562 ++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_dcbx.h | 80 +++ drivers/net/ethernet/qlogic/qed/qed_dev.c | 105 +++- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 21 +- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 13 + drivers/net/ethernet/qlogic/qed/qed_sp.h | 13 + drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 25 + include/linux/qed/qed_if.h | 9 + 11 files changed, 834 insertions(+), 8 deletions(-) commit ccf928249c92b04ec9527e97a7c6b2cd8cd9dc10 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue May 17 11:05:34 2016 +0200 ravb: Add missing free_irq() calls to ravb_close() When reopening the network device on ra7795/salvator-x, e.g. after a DHCP timeout: IP-Config: Reopening network devices... genirq: Flags mismatch irq 139. 00000000 (eth0:ch0:rx_be) vs. 00000000 (ravb e6800000.ethernet eth0: cannot request IRQ eth0:ch0:rx_be IP-Config: Failed to open eth0 IP-Config: No network devices available The "mismatch" is due to requesting an IRQ that is already in use, while IRQF_PROBE_SHARED wasn't set. However, the real cause is that ravb_close() doesn't release any of the R-Car Gen3-specific secondary IRQs. Add the missing free_irq() calls to fix this. Fixes: f51bdc236b6c5835 ("ravb: Add dma queue interrupt support") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/renesas/ravb_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit f82731b454a953b6ff2aa1f601f65dec52551600 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Tue May 17 11:09:20 2016 +0300 qed: Remove a stray tab This line was indented more than it should be. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2cc632dbc75d72f64bc3c966929c77306bd46a05 Merge: b172542 5eee87c Author: David S. Miller <davem@davemloft.net> Date: Tue May 17 12:18:27 2016 -0400 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 10GbE Intel Wired LAN Driver Updates 2016-05-16 This series contains 2 fixes to ixgbe only. Emil fixes transmit hangs when enabling SRIOV by swapping the parameters in GENMASK in order to generate the correct mask. Alex fixes his previous patch b83e30104bd9 ("ixgbe/ixgbevf: Add support for GSO partial") where he somehow transposed the location of setting the VLAN features in netdev->features and the configuration of the vlan_features. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit c7c5856b6f6f30de622bf87947363890b286553f Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Sun May 15 16:26:51 2016 +0530 sound: oss: Use setup_timer and mod_timer. The function setup_timer combines the initialization of a timer with the initialization of the timer's function and data fields. The mulitiline code for timer initialization is now replaced with function setup_timer. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer() and mod_timer() to setup and arm a timer, making the code compact and aid readablity. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/oss/waveartist.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 57da0c042f4af52614f4bd1a148155a299ae5cd8 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Wed May 4 14:38:13 2016 +0300 mmc: block: Pause re-tuning while switched to the RPMB partition Re-tuning is not possible when switched to the RPMB partition. However re-tuning should not be needed if re-tuning is done immediately before switching, a small set of operations is done, and then we immediately switch back to the main partition. A previous patch ensured that we immediately switch back to the main partition. This patch uses the new facility to "pause" re-tuning before switching to the RPMB partition, and to "unpause" it after switching from the RPMB partition. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/card/block.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 3c866568aff7dcfc0bbd5ffc7fcc34fa8f100f67 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Wed May 4 14:38:12 2016 +0300 mmc: block: Always switch back to main area after RPMB access In preparation to support the use of the RPMB partition with transfer modes that might require re-tuning, always switch back to the main area after RPMB access. RPMB is accessible only via IOCTL so only those paths are affected. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/card/block.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7ff2760999a86e4d2b1af93dcf0f0d336c309571 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Mon May 16 15:35:24 2016 +0300 mmc: core: Add a facility to "pause" re-tuning Re-tuning is not possible when switched to the RPMB partition. However re-tuning should not be needed if re-tuning is done immediately before switching, a small set of operations is done, and then we immediately switch back to the main partition. To ensure that re-tuning can't be done for a short while, add a facility to "pause" re-tuning. The existing facility to hold / release re-tuning is used but it also flags re-tuning as needed to cause re-tuning before the next command (which will be the switch to RPMB). We also need to "unpause" in the recovery path, which is catered for by adding it to mmc_retune_disable(). Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/core/host.c | 24 ++++++++++++++++++++++++ include/linux/mmc/host.h | 4 ++++ 2 files changed, 28 insertions(+) commit 431c30f74cdffba6456b52742e80f9b629228940 Author: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Date: Tue May 3 17:40:08 2016 +0200 thermal: tango: initialize TEMPSI_CFG TEMPSI_CFG is not equal to 0 at reset. It must be initialized. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tango_thermal.c | 1 + 1 file changed, 1 insertion(+) commit 2fe5c1b0453c445f8a19e1a53f8297b21c2cba4c Author: Caesar Wang <wxt@rock-chips.com> Date: Tue May 3 10:23:50 2016 +0800 thermal: rockchip: use the usleep_range instead of udelay Documentation/timers/timers-howto.txt recommends to use usleep_range on delays > 10usec. The usleep_range indeed reduces CPU load, since the udelay will busy wait for enough loop cycles to achieve the desired delay. Fixes commit b06c52db39fd ("thermal: rockchip: handle the power sequence for tsadc controller"). Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Suggested-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/rockchip_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 678065d5b786763cb9f5d97673409ae32ead2314 Author: Caesar Wang <wxt@rock-chips.com> Date: Mon Apr 18 11:35:58 2016 +0800 thermal: rockchip: add the notes for better reading To update the notes for keeping in mind that quickly in case someone re-read this driver in the future. Signed-off-by: Caesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/rockchip_thermal.c | 74 +++++++++++++++++++++++++++----------- 1 file changed, 53 insertions(+), 21 deletions(-) commit 1cd602693740fafcf6e5e9ed3aa93f11924275cb Author: Elaine Zhang <zhangqing@rock-chips.com> Date: Mon Apr 18 11:35:57 2016 +0800 thermal: rockchip: Support RK3366 SoCs in the thermal driver The RK3366 SoCs have two Temperature Sensors, channel 0 is for CPU channel 1 is for GPU. Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/rockchip_thermal.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) commit b948476327d8162e179b1b7fe73e68b48bbe4481 Author: Caesar Wang <wxt@rock-chips.com> Date: Mon Apr 18 11:35:56 2016 +0800 thermal: rockchip: handle the power sequence for tsadc controller This adds the grf property to handle the tsadc power sequence on rockchip some SoCs. Verified on rk3399 can work with this patch on now. while true; do grep "" /sys/class/thermal/thermal_zone[0-1]/temp sleep .5; done /sys/class/thermal/thermal_zone0/temp:40555 /sys/class/thermal/thermal_zone1/temp:41111 /sys/class/thermal/thermal_zone0/temp:40555 /sys/class/thermal/thermal_zone1/temp:41111 /sys/class/thermal/thermal_zone0/temp:40555 /sys/class/thermal/thermal_zone1/temp:41666 /sys/class/thermal/thermal_zone0/temp:40555 /sys/class/thermal/thermal_zone1/temp:41111 /sys/class/thermal/thermal_zone0/temp:40555 /sys/class/thermal/thermal_zone1/temp:41111 /sys/class/thermal/thermal_zone0/temp:40555 Signed-off-by: Caesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/rockchip_thermal.c | 87 +++++++++++++++++++++++++++++++++++--- 1 file changed, 82 insertions(+), 5 deletions(-) commit f762a35d89cd6f62b4b8180983c91f46f7aecb7e Author: Caesar Wang <wxt@rock-chips.com> Date: Mon Apr 18 11:35:55 2016 +0800 thermal: rockchip: update the tsadc table for rk3399 This patch fixes the incorrect conversion table. The Code to Temperature mapping is updated based on sillcon results. Fixes commit b0d70338bca22cb14 ("thermal: rockchip: Support the RK3399 SoCs in thermal driver"). Signed-off-by: Caesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/rockchip_thermal.c | 68 +++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 34 deletions(-) commit a87dd79761764accbb5f66a6ff089701fbac4b32 Author: Caesar Wang <wxt@rock-chips.com> Date: Mon Apr 18 11:35:54 2016 +0800 thermal: rockchip: fixes the code_to_temp for tsadc driver We should judge the table.id[mid].code insearch algorithm on matter the adc value increment or decrement. Or otherwise, the temperature return the incorrect value in some cases. [ 1.438589] adc_val=402,temp=-40000 [ 1.438903] adc_val=403,temp=-39375 [ 1.439217] adc_val=404,temp=-38750 ... [ 1.441102] adc_val=410,temp=-40000 [ 1.441416] adc_val=411,temp=-34445 [ 1.441737] adc_val=412,temp=-33889 ... Let's fix it right now. Fixes commit 020ba95dbbbe ("thermal: rockchip: Add the sort mode for adc value increment or decrement"). Reported-by: Rocky Hao <rocky.hao@rock-chips.com> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/rockchip_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ab5b52f1606f3a83e541102adf5d50e7a9bfdef5 Author: Shawn Lin <shawn.lin@rock-chips.com> Date: Mon Apr 18 11:35:53 2016 +0800 thermal: rockchip: disable thermal->clk in err case Disable thermal->clk when enabling pclk fails in resume routine. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/rockchip_thermal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 44cb6a7df13d3f6e663262e8c264a46cf84aa679 Author: Wei Ni <wni@nvidia.com> Date: Wed Apr 27 11:25:46 2016 +0800 thermal: tegra: add Tegra132 specific SOC_THERM driver add Tegra132 specific SOC_THERM driver. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/Makefile | 1 + drivers/thermal/tegra/soctherm.c | 6 + drivers/thermal/tegra/soctherm.h | 4 + drivers/thermal/tegra/tegra132-soctherm.c | 196 ++++++++++++++++++++++++++++++ 4 files changed, 207 insertions(+) commit bba07c133f668d64378d92e1f536df618e640ba6 Author: kbuild test robot <fengguang.wu@intel.com> Date: Thu Apr 21 09:04:01 2016 +0800 thermal: fix ptr_ret.cocci warnings drivers/thermal/tango_thermal.c:86: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: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tango_thermal.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit d29016034e5b2bb55fd370e3545685a8536f5474 Author: Dawei Chien <dawei.chien@mediatek.com> Date: Wed Dec 16 21:29:14 2015 +0800 thermal: mediatek: Add cpu dynamic power cooling model. MT8173 cpufreq driver select of_cpufreq_power_cooling_register registering cooling devices with dynamic power coefficient. Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Dawei Chien <dawei.chien@mediatek.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/cpufreq/mt8173-cpufreq.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) commit b3aef78f76959b94e6df54f80040669a11cc4897 Author: Laxman Dewangan <ldewangan@nvidia.com> Date: Tue Apr 19 12:52:01 2016 +0530 thermal: generic-adc: Add ADC based thermal sensor driver In some of platform, thermal sensors like NCT thermistors are connected to the one of ADC channel. The temperature is read by reading the voltage across the sensor resistance via ADC. Lookup table for ADC read value to temperature is referred to get temperature. ADC is read via IIO framework. Add support for thermal sensor driver which read the voltage across sensor resistance from ADC through IIO framework. Acked-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/Kconfig | 10 ++ drivers/thermal/Makefile | 1 + drivers/thermal/thermal-generic-adc.c | 182 ++++++++++++++++++++++++++++++++++ 3 files changed, 193 insertions(+) commit 9e389e383b30c5d63de67e7a0cfa39c527a98bbc Author: Laxman Dewangan <ldewangan@nvidia.com> Date: Tue Apr 19 12:52:00 2016 +0530 thermal: generic-adc: Add DT binding for ADC based thermal sensor Sometimes, thermal sensors like NCT thermistors are connected to the ADC channel. The temperature is read by reading the voltage across the sensor resistance via ADC and referring the lookup table for ADC value to temperature. Add DT binding doc for the ADC based thermal sensor driver to detail the DT property and provide the example for how to use it. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Rob Herring <rob@kernel.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> .../bindings/thermal/thermal-generic-adc.txt | 89 ++++++++++++++++++++++ 1 file changed, 89 insertions(+) commit f350098070e36e1f51f925264146eff18a4e42dd Author: Wei Ni <wni@nvidia.com> Date: Wed Apr 6 17:48:04 2016 +0800 thermal: tegra: fix static checker warning There has a static checker warning: warn: variable dereferenced before check 'dev' (see line 222) Since check 'dev' is unnecessary, so remove this check. Fixes: ee6d79f202a4 ("thermal: tegra: add thermtrip function") Signed-off-by: Wei Ni <wni@nvidia.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/soctherm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit a977c41ec65bbdc5000a130372adba1f85c86833 Author: Arnd Bergmann <arnd@arndb.de> Date: Sat Apr 16 22:19:33 2016 +0200 thermal: tegra: mark PM functions __maybe_unused After the PM support has been added to this driver, we get a harmless warning when that support is disabled at compile time: drivers/thermal/tegra/soctherm.c:641:12: error: 'soctherm_resume' defined but not used [-Werror=unused-function] static int soctherm_resume(struct device *dev) This marks the two PM functions as __maybe_unused to shut up the warning. This is preferred over adding an #ifdef around them, as it is harder to get wrong, and provides better compile-time coverage. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: a134b4143b65 ("thermal: tegra: add PM support") Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/soctherm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0b58c08b593d082858e74503bdf553ea01f9f15a Author: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Date: Tue Apr 19 16:21:16 2016 +0200 thermal: add temperature sensor support for tango SoC The Tango thermal driver provides support for the primitive temperature sensor embedded in Tango chips since the SMP8758. This sensor only generates a 1-bit signal to indicate whether the die temperature exceeds a programmable threshold. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> .../devicetree/bindings/thermal/tango-thermal.txt | 17 ++++ drivers/thermal/Kconfig | 9 ++ drivers/thermal/Makefile | 1 + drivers/thermal/tango_thermal.c | 111 +++++++++++++++++++++ 4 files changed, 138 insertions(+) commit 469ace07c29310b1401316e5e910c157c7544af3 Author: Leo Yan <leo.yan@linaro.org> Date: Tue Mar 29 19:27:13 2016 +0800 thermal: hisilicon: fix IRQ imbalance enabling When register sensors into thermal zone during initialization phase, it reports error for IRQ imbalance enabling: [ 2.040713] WARNING: at kernel/irq/manage.c:513 [ 2.040719] Modules linked in: [ 2.040721] [ 2.040729] CPU: 1 PID: 804 Comm: irq/33-hisi_the Not tainted 4.5.0-rc4+ #505 [ 2.040732] Hardware name: HiKey Development Board (DT) [ 2.040736] task: ffffffc03ae82580 ti: ffffffc0379c8000 task.ti: ffffffc0379c8000 [ 2.040745] PC is at __enable_irq+0x74/0x84 [ 2.040749] LR is at __enable_irq+0x74/0x84 This warning is for IRQ imbalance enabling, which is caused by enable_irq() twice. During sensor's initialization it tries to enable IRQ, the driver will call thermal_zone_of_sensor_register() to bind sensors and read sensor's temperature. But at this moment the flag "data->irq_enabled" has been not initialized as correct state, so it finally introduces the function enabled_irq() to be called twice. In essentially this is caused by the flag "data->irq_enabled" is inconsistent with real hardware IRQ enabling state. So this patch is to fix this issue, firstly init "irq_enabled" flag before binding sensors to thermal zone. Also change to use the function irq_get_irqchip_state() to read back real interrupt line state. Signed-off-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/hisi_thermal.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 439dc96811739ad5440143140fe92df5140daf11 Author: Leo Yan <leo.yan@linaro.org> Date: Tue Mar 29 19:27:12 2016 +0800 thermal: hisilicon: support to use any sensor In current code sensor driver registers all 4 sensors together and if any of them has not bound to thermal zone successfully then driver will return failure for driver's initialization. As a result, if DT binds thermal zone with only one sensor, then the thermal driver will not work well anymore. So this patch is to fix this issue. It allows the thermal sensor driver can register any number sensors at initialization phase, and fix up code for other related code to skip related sensor's accessing if the sensor has not been enabled in initialization phase. Signed-off-by: Leo Yan <leo.yan@linaro.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/hisi_thermal.c | 33 ++++++++++++++++++++------------- 1 file changed, 20 insertions(+), 13 deletions(-) commit 13849883475408272aaddcea00052bd9f4d9b4ca Author: Simon Horman <horms+renesas@verge.net.au> Date: Tue Mar 29 14:07:45 2016 +0900 thermal: rcar: Remove binding docs for r8a7794 The latest information that I have is that there is no thermal IP block present on the r8a7794 SoC so remove the corresponding binding. Cc: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Documentation/devicetree/bindings/thermal/rcar-thermal.txt | 1 - 1 file changed, 1 deletion(-) commit f09d698494289cdf1f0afc0baddbac8db30f195d Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:22 2016 +0800 thermal: tegra: add PM support Add suspend/resume function in soctherm driver. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/soctherm.c | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) commit 1ed895c2a27ebc862241926945f4adcbc88c6cd6 Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:21 2016 +0800 thermal: tegra: handle HW initialization in one funcotion Handle HW initialization in one function soctherm_init(), so that the codes are more clear. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/soctherm.c | 85 +++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 41 deletions(-) commit 8de2ab023598bcb874e2182ab6ea7355bbf33af6 Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:20 2016 +0800 thermal: tegra: handle clocks in one function Handle clock enable/disable codes in one function soctherm_clk_enable(), so that the codes are more clear. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/soctherm.c | 51 ++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 15 deletions(-) commit 2a895871f27fdc82ac7b365d3f94e2c7b3467898 Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:19 2016 +0800 thermal: tegra: add thermtrip function Add support for hardware critical thermal limits to the SOC_THERM driver. It use the Linux thermal framework to create critical trip temp, and set it to SOC_THERM hardware. If these limits are breached, the chip will reset, and if appropriately configured, will turn off the PMIC. This support is critical for safe usage of the chip. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/soctherm.c | 166 +++++++++++++++++++++++++++++- drivers/thermal/tegra/soctherm.h | 7 ++ drivers/thermal/tegra/tegra124-soctherm.c | 24 +++++ drivers/thermal/tegra/tegra210-soctherm.c | 24 +++++ 4 files changed, 216 insertions(+), 5 deletions(-) commit 4d44cd4ae96ed3744d26d9615ea103df5afc3ed7 Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:18 2016 +0800 of: add notes of critical trips for soctherm The "critical" type trip in thermal zone can be set to SOC_THERM hardware, it can trigger shut down or reset event from hardware. Signed-off-by: Wei Ni <wni@nvidia.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Documentation/devicetree/bindings/thermal/tegra-soctherm.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit c35095215a80b13af2f521e1ab1c727a5224e53b Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:17 2016 +0800 thermal: of-thermal: allow setting trip_temp on hardware In current of-thermal, the .set_trip_temp only support to set trip_temp for SW. But some sensors support to set trip_temp on hardware, so that can trigger interrupt, shutdown or any other events. This patch adds .set_trip_temp() callback in thermal_zone_of_device_ops{}, so that the sensor device can use it to set trip_temp on hardware. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/of-thermal.c | 8 ++++++++ include/linux/thermal.h | 1 + 2 files changed, 9 insertions(+) commit d753b22d8b2d500377bc85c4909cc0d6f199d1c8 Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:16 2016 +0800 thermal: tegra: add a debugfs to show registers Add a debugfs interface to show register contents for debug. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/soctherm.c | 146 ++++++++++++++++++++++++++++++++++++++- drivers/thermal/tegra/soctherm.h | 2 + 2 files changed, 145 insertions(+), 3 deletions(-) commit 8204104f3598b6f29a8858df16c15c156014b863 Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:15 2016 +0800 thermal: tegra: add Tegra210 specific SOC_THERM driver Add Tegra210 specific SOC_THERM driver. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/Makefile | 1 + drivers/thermal/tegra/soctherm-fuse.c | 11 ++ drivers/thermal/tegra/soctherm.c | 6 ++ drivers/thermal/tegra/soctherm.h | 4 + drivers/thermal/tegra/tegra210-soctherm.c | 173 ++++++++++++++++++++++++++++++ 5 files changed, 195 insertions(+) commit 65b6d57c24ed0aff1fc571e42d8f51bdfcce9a8e Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:14 2016 +0800 thermal: tegra: split tegra_soctherm driver Split most of the Tegra124 data and code into a Tegra124-specific file. Split most of the fuse-related code into a fuse-related source file. This is in preparation for adding a Tegra210-specific driver in a future patch. Beyond the maintainability improvements, this is intended to separate chip-specific ATE and characterization-related hacks into chip-specific files, in the hopes that they won't pollute code for other chips. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/Kconfig | 2 +- drivers/thermal/tegra/Makefile | 3 + drivers/thermal/tegra/soctherm-fuse.c | 158 +++++++++ drivers/thermal/tegra/soctherm.c | 310 ++++++++++++++++ drivers/thermal/tegra/soctherm.h | 110 ++++++ drivers/thermal/tegra/tegra-soctherm.c | 565 ------------------------------ drivers/thermal/tegra/tegra124-soctherm.c | 172 +++++++++ 7 files changed, 754 insertions(+), 566 deletions(-) commit 1c3bdc1627c331b4925a95453f7b61226077bebe Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:13 2016 +0800 thermal: tegra: get rid of PDIV/HOTSPOT hack Get rid of T124-specific PDIV/HOTSPOT hack. tegra-soctherm.c contained a hack to set the SENSOR_PDIV and SENSOR_HOTSPOT_OFFSET registers - it just did two writes of T124-specific opaque values. Convert these into a form that can be substituted on a per-chip basis, and into structure fields that have at least some independent meaning. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/tegra-soctherm.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) commit 6f7e0d9d08c7fa3847b1380b16dff7e14523933c Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:12 2016 +0800 thermal: tegra: combine sensor group-related data Combine sensor group-related data structures into struct tegra_tsensor_group. This provides a single location for sensor group data storage. More sensor group data will be added in subsequent patches. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra/tegra-soctherm.c | 145 +++++++++++++++++++----- include/dt-bindings/thermal/tegra124-soctherm.h | 1 + 2 files changed, 119 insertions(+), 27 deletions(-) commit a4dff94ffde7df6aeeb11cd548e53b22bdabd04e Author: Wei Ni <wni@nvidia.com> Date: Tue Mar 29 18:29:11 2016 +0800 thermal: tegra: move tegra thermal files into tegra directory Move Tegra soctherm driver to tegra directory, it's easy to maintain and add more new function support for Tegra platforms. This will also help to split soctherm driver into common parts and chip specific data related parts. Signed-off-by: Wei Ni <wni@nvidia.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/Kconfig | 12 +- drivers/thermal/Makefile | 2 +- drivers/thermal/tegra/Kconfig | 13 + drivers/thermal/tegra/Makefile | 1 + drivers/thermal/tegra/tegra-soctherm.c | 463 +++++++++++++++++++++++++++++++++ drivers/thermal/tegra_soctherm.c | 463 --------------------------------- 6 files changed, 480 insertions(+), 474 deletions(-) commit 3982204cc9baab0c28ac48e859acf7692c6159e6 Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:12:52 2016 -0800 thermal: convert ti-thermal to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org Tested-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 71ca46eeeff3273f6641ab3e30292d3d36f1d3be Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:12:13 2016 -0800 thermal: convert tegra_thermal to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Stephen Warren <swarren@wwwdotorg.org> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-tegra@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/tegra_soctherm.c | 31 +++++++++---------------------- 1 file changed, 9 insertions(+), 22 deletions(-) commit 2633ad19137760e3d2313e492704843a6751b3d1 Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:10:28 2016 -0800 thermal: convert rockchip_thermal to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: linux-kernel@vger.kernel.org Tested-by: Caesar Wang <wxt@rock-chips.com> Reviewed-by: Caesar Wang <wxt@rock-chips.com> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/rockchip_thermal.c | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) commit 5e325868aa59d3c743aa1c9526f386f30c234cd7 Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:09:43 2016 -0800 thermal: convert rcar_thermal to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/rcar_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e936491e5c005620951fe5d67e441b936f583702 Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:08:48 2016 -0800 thermal: convert qcom-spmi to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/qcom-spmi-temp-alarm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit c417bdedb14c12671a199bb5d4f3b78b438598b3 Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:08:14 2016 -0800 thermal: convert mtk_thermal to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/mtk_thermal.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 44a520d81e70eac35833b0c2dc24d8daa371f557 Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:07:13 2016 -0800 thermal: convert hisi_thermal to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Zhang Rui <rui.zhang@intel.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/hisi_thermal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit e28d0c9cd381e115c2270bf1d6fe4de95289234a Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:05:42 2016 -0800 input: convert sun4i-ts to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Chen-Yu Tsai <wens@csie.org> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Jens Thiele <karme@karme.de> Cc: linux-input@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/input/touchscreen/sun4i-ts.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) commit d7817ff27b06bf15902ef021d0f55a678a4afd34 Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:03:17 2016 -0800 hwmon: convert scpi-hwmon to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: lm-sensors@lm-sensors.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/hwmon/scpi-hwmon.c | 48 +++++++++------------------------------------- 1 file changed, 9 insertions(+), 39 deletions(-) commit 51b77fd7b17f03114bb1809e35be0b434d89cb76 Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:02:54 2016 -0800 hwmon: convert tmp102 to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: lm-sensors@lm-sensors.org Cc: linux-kernel@vger.kernel.org Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/hwmon/tmp102.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 0e058bc3acc03d6b028f2bc4fd67486238b10bec Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 13:02:22 2016 -0800 hwmon: convert ntc_thermistor to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: lm-sensors@lm-sensors.org Cc: linux-kernel@vger.kernel.org Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/hwmon/ntc_thermistor.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 2a48802f376bbb56a68c530255dfc3dc744b3e97 Author: Eduardo Valentin <edubezval@gmail.com> Date: Wed Mar 9 12:39:58 2016 -0800 hwmon: convert lm75 to use devm_thermal_zone_of_sensor_register This changes the driver to use the devm_ version of thermal_zone_of_sensor_register and cleans up the local points and unregister calls. Cc: Jean Delvare <jdelvare@suse.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: lm-sensors@lm-sensors.org Cc: linux-kernel@vger.kernel.org Acked-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/hwmon/lm75.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit ef41be8168b6ceaa6220d5ca5430b960194ea94f Author: Keerthy <j-keerthy@ti.com> Date: Wed Mar 16 11:42:58 2016 +0530 MAINTAINERS: ti-soc-thermal: add a co-maintainer and update the entry Add myself as a co-maintainer for ti-soc-thermal Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 1cd91c1820801267b5579fa65842cdf843c73c4d Author: Ulises Brindis <brindisu@lab126.com> Date: Fri Mar 25 12:55:41 2016 -0700 thermal: of: fix cleanup when building a thermal zone of_node_put is iterating through all terms in the tbps array even though the bind has failed. We need to only iterate through the terms that have already passed the binding step. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ulises Brindis <brindisu@lab126.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> drivers/thermal/of-thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c212ed912b73f804d5f897ec0a84f58dfd3da9e1 Author: Andy Champ <andycham@amazon.com> Date: Tue Mar 22 12:37:25 2016 +0000 thermal: Syntactic and factual errors in the API document There are several places where the English in the document is syntactically invalid, or unclear. There are also one or two factual errors. Reviewed-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Andy Champ <andycham@amazon.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com> Documentation/thermal/sysfs-api.txt | 44 ++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 22 deletions(-) commit 255f0e7c418ad95a4baeda017ae6182ba9b3c423 Author: Lyude <cpaul@redhat.com> Date: Thu May 12 10:56:59 2016 -0400 drm/fb_helper: Fix references to dev->mode_config.num_connector During boot, MST hotplugs are generally expected (even if no physical hotplugging occurs) and result in DRM's connector topology changing. This means that using num_connector from the current mode configuration can lead to the number of connectors changing under us. This can lead to some nasty scenarios in fbcon: - We allocate an array to the size of dev->mode_config.num_connectors. - MST hotplug occurs, dev->mode_config.num_connectors gets incremented. - We try to loop through each element in the array using the new value of dev->mode_config.num_connectors, and end up going out of bounds since dev->mode_config.num_connectors is now larger then the array we allocated. fb_helper->connector_count however, will always remain consistent while we do a modeset in fb_helper. Note: This is just polish for 4.7, Dave Airlie's drm_connector refcounting fixed these bugs for real. But it's good enough duct-tape for stable kernel backporting, since backporting the refcounting changes is way too invasive. Cc: stable@vger.kernel.org Signed-off-by: Lyude <cpaul@redhat.com> [danvet: Clarify why we need this. Also remove the now unused "dev" local variable to appease gcc.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463065021-18280-3-git-send-email-cpaul@redhat.com drivers/gpu/drm/drm_fb_helper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 14a3842a1d5945067d1dd0788f314e14d5b18e5b Author: Lyude <cpaul@redhat.com> Date: Thu May 12 10:56:58 2016 -0400 drm/i915/fbdev: Fix num_connector references in intel_fb_initial_config() During boot time, MST devices usually send a ton of hotplug events irregardless of whether or not any physical hotplugs actually occurred. Hotplugs mean connectors being created/destroyed, and the number of DRM connectors changing under us. This isn't a problem if we use fb_helper->connector_count since we only set it once in the code, however if we use num_connector from struct drm_mode_config we risk it's value changing under us. On top of that, there's even a chance that dev->mode_config.num_connector != fb_helper->connector_count. If the number of connectors happens to increase under us, we'll end up using the wrong array size for memcpy and start writing beyond the actual length of the array, occasionally resulting in kernel panics. Note: This is just polish for 4.7, Dave Airlie's drm_connector refcounting fixed these bugs for real. But it's good enough duct-tape for stable kernel backporting, since backporting the refcounting changes is way too invasive. Cc: stable@vger.kernel.org Signed-off-by: Lyude <cpaul@redhat.com> [danvet: Clarify why we need this.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463065021-18280-2-git-send-email-cpaul@redhat.com drivers/gpu/drm/i915/intel_fbdev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2e629ebc24d463ffb6c17b15daf908e6f968a1de Merge: 3b9d78a ff628a4 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 17 15:06:31 2016 +0200 Merge branches 'next/cleanup' and 'next/fixes-non-critical' into next/cleanups-fixes This is a merge of the cleanup and fixes-non-critical branches for the 4.7 merge window. It seems more appropriate to send a single pull request for these than two separate ones, as both branches really contain both fixes and cleanups. * next/cleanup: ARM: debug: remove extraneous DEBUG_HI3716_UART option ARM: davinci: use IRQCHIP_DECLARE for cp_intc ARM: davinci: remove unused DA8XX_NUM_UARTS ARM: davinci: simplify call to of populate ARM: DaVinci USB: removed deprecated properties from MUSB config ARM: rockchip: Fix use of plain integer as NULL pointer ARM: realview: hide unused 'pmu_device' object soc: versatile: dynamically detect RealView HBI numbers * next/fixes-non-critical: ARM: dts: exynos: Add interrupt line to MAX8997 PMIC on exynos4210-trats ARM: dts: exynos: Fix regulator name to avoid forbidden character on exynos4210-trats ARM: dts: exynos: Add MFC memory banks for Peach boards ARM: OMAP2+: n900 needs MMC slot names for legacy user space ARM: OMAP2+: Add more functions to pwm pdata for ir-rx51 ARM: EXYNOS: Properly skip unitialized parent clock in power domain on ARM: OMAP2+: Simplify auxdata by using the generic match of/platform: Allow secondary compatible match in of_dev_lookup commit 18c588786c08458f5d965d8735ab48f9e51e0b4b Merge: d2a3f20 23e3523 Author: Thierry Reding <thierry.reding@gmail.com> Date: Tue May 17 14:57:58 2016 +0200 Merge branch 'for-4.7/pwm-atomic' into for-next commit d2a3f206846b4b140aa1fe5be29499e9191fb1fe Merge: bf5dd9a 8c12ad8 Author: Thierry Reding <thierry.reding@gmail.com> Date: Tue May 17 14:57:53 2016 +0200 Merge branch 'for-4.7/pwm-regulator' into for-next commit bf5dd9abcb4443bbab8cb63b9d82b96a4a45c802 Merge: c3499f0 fbd45a1 Author: Thierry Reding <thierry.reding@gmail.com> Date: Tue May 17 14:57:47 2016 +0200 Merge branch 'for-4.7/pwm-args' into for-next commit c3499f0bc38d6db78f119f8f95d5d471e026ef88 Merge: f55532a 2907f8a Author: Thierry Reding <thierry.reding@gmail.com> Date: Tue May 17 14:57:35 2016 +0200 Merge branch 'for-4.7/pwm-cleanup' into for-next commit 23e3523f5d3a980edf7f189743cf4bb9490400a9 Author: Heiko Stübner <heiko@sntech.de> Date: Thu Apr 14 21:17:44 2016 +0200 pwm: Add information about polarity, duty cycle and period to debugfs The PWM states make it possible to also output the polarity, duty cycle and period information in the debugfs summary output. This simplifies gathering information about PWMs without needing to walk through the sysfs attributes of every PWM. Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [thierry.reding@gmail.com: use more spaces in debugfs output] Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/core.c | 5 +++++ 1 file changed, 5 insertions(+) commit 39100ceea79ff2efeb2fb094baf120c73d5ccf47 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:43 2016 +0200 pwm: Switch to the atomic API Replace legacy pwm_get/set_xxx() and pwm_config/enable/disable() calls by pwm_get/apply_state(). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/core.c | 5 ++++- drivers/pwm/sysfs.c | 48 +++++++++++++++++++++++++++++++++++++----------- 2 files changed, 41 insertions(+), 12 deletions(-) commit a07136fdcf12281781142caf1f78c6696721accd Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:42 2016 +0200 pwm: Update documentation Update the PWM subsystem documentation to reflect the atomic PWM changes. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> Documentation/pwm.txt | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 5ec803edcb703fe379836f13560b79dfac79b01d Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:41 2016 +0200 pwm: Add core infrastructure to allow atomic updates Add an ->apply() method to the pwm_ops struct to allow PWM drivers to implement atomic updates. This method is preferred over the ->enable(), ->disable() and ->config() methods if available. Add the pwm_apply_state() function to the PWM user API. Note that the pwm_apply_state() does not guarantee the atomicity of the update operation, it all depends on the availability and implementation of the ->apply() method. pwm_enable/disable/set_polarity/config() are now implemented as wrappers around the pwm_apply_state() function. pwm_adjust_config() is allowing smooth handover between the bootloader and the kernel. This function tries to adapt the current PWM state to the PWM arguments coming from a PWM lookup table or a DT definition without changing the duty_cycle/period proportion. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [thierry.reding@gmail.com: fix a couple of typos] Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/core.c | 187 +++++++++++++++++++++++------------- include/linux/pwm.h | 269 +++++++++++++++++++++++++++++++++++----------------- 2 files changed, 303 insertions(+), 153 deletions(-) commit 15fa8a43c147213a9563903c87b29671035eb6e8 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:40 2016 +0200 pwm: Add hardware readout infrastructure Add a ->get_state() function to the pwm_ops struct to let PWM drivers initialize the PWM state attached to a PWM device. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/core.c | 3 +++ include/linux/pwm.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 09a7e4a3d9fcb95ade2cb02167e85fbeb8315ce0 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:39 2016 +0200 pwm: Move the enabled/disabled info into pwm_state Prepare the transition to PWM atomic update by moving the enabled and disabled state into the pwm_state struct. This way we can easily update the whole PWM state by copying the new state in the ->state field. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/core.c | 13 +++++++++---- include/linux/pwm.h | 11 ++++++++--- 2 files changed, 17 insertions(+), 7 deletions(-) commit 43a276b003ed2e03de9d94b02a1ba49c1849b931 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:38 2016 +0200 pwm: Introduce the pwm_state concept The PWM state, represented by its period, duty_cycle and polarity is currently directly stored in the PWM device. Declare a pwm_state structure embedding those field so that we can later use this struct to atomically update all the PWM parameters at once. All pwm_get_xxx() helpers are now implemented as wrappers around pwm_get_state(). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/core.c | 8 ++++---- include/linux/pwm.h | 54 +++++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 46 insertions(+), 16 deletions(-) commit a8c3862551e063344f80c3e05d595f9d8836f355 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:37 2016 +0200 pwm: Keep PWM state in sync with hardware state Before the introduction of pwm_args, the core was resetting the PWM period and polarity states to the reference values (those provided through the DT, a PWM lookup table or hardcoded in the driver). Now that all PWM users are correctly using pwm_args to configure their PWM device, we can safely remove the pwm_apply_args() call in pwm_get() and of_pwm_get(). We can also get rid of the pwm_set_period() call in pwm_apply_args(), because PWM users are now directly using pargs->period instead of pwm_get_period(). By doing that we avoid messing with the current PWM period. The only remaining bit in pwm_apply_args() is the initial polarity setting, and it should go away when all PWM users have been patched to use the atomic API (with this API the polarity will be set along with other PWM arguments when configuring the PWM). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/core.c | 14 -------------- include/linux/pwm.h | 1 - 2 files changed, 15 deletions(-) commit 102232c54601071304cb6946f9758e3cd74d3e1e Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:36 2016 +0200 ARM: Explicitly apply PWM config extracted from pwm_args Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> arch/arm/mach-s3c24xx/mach-rx1950.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 2347aa7c34be284b266ab6b5f2bdf5daf14f582e Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:35 2016 +0200 drm: i915: Explicitly apply PWM config extracted from pwm_args Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/gpu/drm/i915/intel_panel.c | 6 ++++++ 1 file changed, 6 insertions(+) commit cfae56f18c7cbdb0542025b0d3f000d9ba0152d0 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:34 2016 +0200 input: misc: pwm-beeper: Explicitly apply PWM config extracted from pwm_args Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/input/misc/pwm-beeper.c | 6 ++++++ 1 file changed, 6 insertions(+) commit de93170b85d7ee2a6a6a881c019160a65adeb636 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:33 2016 +0200 input: misc: max8997: Explicitly apply PWM config extracted from pwm_args Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/input/misc/max8997_haptic.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 7ff666bc4b821650a03cadeb4108c77328c98c0a Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:32 2016 +0200 backlight: lm3630a: explicitly apply PWM config extracted from pwm_args Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/video/backlight/lm3630a_bl.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6fbab835a973cee2e6a7742bbc990055b24de5cd Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:31 2016 +0200 backlight: lp855x: Explicitly apply PWM config extracted from pwm_args Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/video/backlight/lp855x_bl.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 058be4d6c67d9fc043623cb26e4abe5608755d65 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:30 2016 +0200 backlight: lp8788: Explicitly apply PWM config extracted from pwm_args Call pwm_apply_args() just after requesting the PWM device so that the polarity and period are initialized according to the information provided in pwm_args. This is an intermediate state, and pwm_apply_args() should be dropped as soon as the atomic PWM infrastructure is in place and the driver makes use of it. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/video/backlight/lp8788_bl.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 6cb9644db7364ff5d2980ccd365b8cb684145327 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:29 2016 +0200 backlight: pwm_bl: Use pwm_get_args() where appropriate The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/video/backlight/pwm_bl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 717c18f0e4653bbb74a164e88e5b7ccc5db7684b Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:28 2016 +0200 fbdev: ssd1307fb: Use pwm_get_args() where appropriate The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/video/fbdev/ssd1307fb.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 6bc24526f8010f208a243cc73df4c6cc48fa18a4 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:27 2016 +0200 regulator: pwm: Use pwm_get_args() where appropriate The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/regulator/pwm-regulator.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) commit 1b50673dfa6486a69895bd45bb5eeaaede0a2b93 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:26 2016 +0200 leds: pwm: Use pwm_get_args() where appropriate The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/leds/leds-pwm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit ad4e9fec143c453cae145d7d5ccac902c37fb912 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:25 2016 +0200 input: misc: max77693: Use pwm_get_args() where appropriate The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/input/misc/max77693-haptic.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 2289711c9d4d588954ff86a06685f1579bf6c446 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:24 2016 +0200 hwmon: pwm-fan: Use pwm_get_args() where appropriate The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/hwmon/pwm-fan.c | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) commit dd0b38b7ca0d8c8aadcf8a17d7c90d36ab8ab6e4 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:23 2016 +0200 clk: pwm: Use pwm_get_args() where appropriate The PWM framework has clarified the concept of reference PWM config (the platform dependent config retrieved from the DT or the PWM lookup table) and real PWM state. Use pwm_get_args() when the PWM user wants to retrieve this reference config and not the current state. This is part of the rework allowing the PWM framework to support hardware readout and expose real PWM state even when the PWM has just been requested (before the user calls pwm_config/enable/disable()). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/clk/clk-pwm.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) commit 4b58896f72176b781816a9e14dcea5f755b19b5c Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 14 21:17:22 2016 +0200 pwm: Use pwm_get/set_xxx() helpers where appropriate Use pwm_get/set_xxx() helpers instead of directly accessing the pwm->xxx field. Doing that will ease adaptation of the PWM framework to support atomic update. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/pwm-crc.c | 2 +- drivers/pwm/pwm-lpc18xx-sct.c | 2 +- drivers/pwm/pwm-omap-dmtimer.c | 2 +- drivers/pwm/pwm-sun4i.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) commit 459a25afe97cb3d7f978b90c881f4d7aac8fb755 Author: Boris BREZILLON <boris.brezillon@free-electrons.com> Date: Wed Mar 30 22:03:27 2016 +0200 pwm: Get rid of pwm->lock PWM devices are not protected against concurrent accesses. The lock in struct pwm_device might let PWM users think it is, but it's actually only protecting the enabled state. Removing this lock should be fine as long as all PWM users are aware that accesses to the PWM device have to be serialized, which seems to be the case for all of them except the sysfs interface. Patch the sysfs code by adding a lock to the pwm_export struct and making sure it's taken for all relevant accesses to the exported PWM device. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/core.c | 19 ++++--------------- drivers/pwm/sysfs.c | 24 ++++++++++++++++++++---- include/linux/pwm.h | 2 -- 3 files changed, 24 insertions(+), 21 deletions(-) commit 4ff66efd59102280a71d432c9f0e89cdaf66b849 Author: Boris BREZILLON <boris.brezillon@free-electrons.com> Date: Wed Mar 30 22:03:26 2016 +0200 backlight: lm3630a_bl: Stop messing with the pwm->period field pwm->period field is not supposed to be changed by PWM users. The only ones authorized to change it are the PWM core and PWM drivers. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/video/backlight/lm3630a_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 7f044b09b68d36811518c55f736a20648e8ed6e2 Author: Boris BREZILLON <boris.brezillon@free-electrons.com> Date: Wed Mar 30 22:03:25 2016 +0200 backlight: pwm_bl: Remove useless call to pwm_set_period() The PWM period will be set when calling pwm_config. Remove this useless call to pwm_set_period(), which might mess up the internal PWM state. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/video/backlight/pwm_bl.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3587c260906259632df07652743269627f408d85 Author: Boris BREZILLON <boris.brezillon@free-electrons.com> Date: Wed Mar 30 22:03:24 2016 +0200 pwm: rcar: Make use of pwm_is_enabled() Commit 5c31252c4a86 ("pwm: Add the pwm_is_enabled() helper") introduced a new function to test whether a PWM device is enabled or not without manipulating PWM internal fields. Hiding this is necessary if we want to smoothly move to the atomic PWM config approach without impacting PWM drivers. Fix this driver to use pwm_is_enabled() instead of directly accessing the ->flags field. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/pwm-rcar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f1f368e4ab5ac2692e3dfec66a9e6a0a2f6cea7 Merge: f55532a fbd45a1 Author: Thierry Reding <thierry.reding@gmail.com> Date: Tue May 17 14:44:37 2016 +0200 Merge branch 'for-4.7/pwm-args' into for-4.7/pwm-atomic commit fbd45a12988e75a48d392feb8b0e5feb5d612513 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Tue May 17 14:27:25 2016 +0200 pwm: Fix pwm_apply_args() call sites pwm_apply_args() is supposed to initialize a PWM device according to the arguments provided by the DT or the PWM lookup, but this function was called inside pwm_device_request(), which in turn was called before the core had a chance to initialize the pwm->args fields. Fix that by calling pwm_apply_args directly in pwm_get() and of_pwm_get() after initializing pwm->args field. This commit also fixes an invalid pointer dereference introduced by commit e39c0df1be5a ("pwm: Introduce the pwm_args concept"). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Fixes: e39c0df1be5a ("pwm: Introduce the pwm_args concept") Signed-off-by: Thierry Reding <thierry.reding@gmail.com> drivers/pwm/core.c | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) commit 6971ce4134174b9772ed79ff7747696eab087d30 Merge: a158f2b 29cf67b Author: Takashi Iwai <tiwai@suse.de> Date: Tue May 17 12:45:31 2016 +0200 Merge tag 'asoc-v4.7-fix-hdac' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fix for v4.7 Fix an unused variable warning in the HDAC code. commit 66bc5ba5236519297d4ba2b52cdb6fc003a897d3 Merge: 3390e57 bef7e20 Author: Jiri Kosina <jkosina@suse.cz> Date: Tue May 17 12:42:27 2016 +0200 Merge branch 'for-4.7/wacom' into for-linus commit 3390e579b3dac71e630ed879a73c5ac3b4447045 Merge: 27fd38c 282bf1f Author: Jiri Kosina <jkosina@suse.cz> Date: Tue May 17 12:41:22 2016 +0200 Merge branch 'for-4.7/upstream' into for-linus Conflicts: drivers/hid/usbhid/hid-quirks.c commit 27fd38c5226ed0f1712d071880fa8e739eb78650 Merge: eff6ca9 b94f7d5 8f507c8 bbf4ac9 Author: Jiri Kosina <jkosina@suse.cz> Date: Tue May 17 12:38:03 2016 +0200 Merge branches 'for-4.6/upstream-fixes', 'for-4.7/asus', 'for-4.7/hidraw' and 'for-4.7/thingm' into for-linus commit 29cf67b99527296e9c9b9f6995c1d271d21f79c0 Author: Fabio Estevam <fabio.estevam@nxp.com> Date: Mon May 16 09:50:07 2016 -0300 ASoC: hdac_hdmi: Remove the unused 'timeout' variable Commit b2047e996cd88d3 ("ASoC: hdac_hdmi: add link management") introuduced the following build warning: sound/soc/codecs/hdac_hdmi.c:1721:16: warning: unused variable 'timeout' [-Wunused-variable] Remove the unused 'timeout' variable. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/hdac_hdmi.c | 1 - 1 file changed, 1 deletion(-) commit 2e636d5e66c35dfcbaf617aa8fa963f6847478fe Author: Peter Zijlstra <peterz@infradead.org> Date: Mon May 16 15:01:11 2016 +0200 sched/preempt: Fix preempt_count manipulations Vikram reported that his ARM64 compiler managed to 'optimize' away the preempt_count manipulations in code like: preempt_enable_no_resched(); put_user(); preempt_disable(); Irrespective of that fact that that is horrible code that should be fixed for many reasons, it does highlight a deficiency in the generic preempt_count manipulators. As it is never right to combine/elide preempt_count manipulations like this. Therefore sprinkle some volatile in the two generic accessors to ensure the compiler is aware of the fact that the preempt_count is observed outside of the regular program-order view and thus cannot be optimized away like this. x86; the only arch not using the generic code is not affected as we do all this in asm in order to use the segment base per-cpu stuff. Reported-by: Vikram Mulukutla <markivx@codeaurora.org> Tested-by: Vikram Mulukutla <markivx@codeaurora.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: a787870924db ("sched, arch: Create asm/preempt.h") Link: http://lkml.kernel.org/r/20160516131751.GH3205@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org> include/asm-generic/preempt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b937190c40de0f6f07f592042e3097b16c6b0130 Author: Kees Cook <keescook@chromium.org> Date: Tue May 17 01:45:52 2016 -0700 LSM: LoadPin: provide enablement CONFIG Instead of being enabled by default when SECURITY_LOADPIN is selected, provide an additional (default off) config to determine the boot time behavior. As before, the "loadpin.enabled=0/1" kernel parameter remains available. Suggested-by: James Morris <jmorris@namei.org> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: James Morris <james.l.morris@oracle.com> security/loadpin/Kconfig | 19 ++++++++++++++----- security/loadpin/loadpin.c | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) commit be69f70e6395a4ba9c178b2531433547e1955195 Merge: f09d908 5e4e384 4d4fb97 Author: Jiri Kosina <jkosina@suse.cz> Date: Tue May 17 12:06:35 2016 +0200 Merge branches 'for-4.7/core', 'for-4.7/livepatching-doc' and 'for-4.7/livepatching-ppc64' into for-linus commit 6e4ad1b413604b9130bdbe532aafdbd47ff5318e Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Tue May 17 10:35:52 2016 +0530 MIPS: pic32mzda: fix getting timer clock rate. PIC32 clock driver is now implemented as platform driver instead of as part of of_clk_init(). It meants all the clock modules are available quite late in the boot sequence. So request for CPU clock by clk_get_sys() and clk_get_rate() to find c0_timer rate fails. To fix this use PIC32 specific early clock functions implemented for early console support. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: Joshua Henderson <digitalpeer@digitalpeer.com> Patchwork: https://patchwork.linux-mips.org/patch/13262/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/pic32/pic32mzda/time.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) commit 9184dc8ffa56844352b3b9860e562ec4ee41176f Author: Felix Fietkau <nbd@nbd.name> Date: Mon May 16 19:51:55 2016 +0200 MIPS: ath79: fix regression in PCI window initialization ath79_ddr_pci_win_base has the type void __iomem *, so register offsets need to be a multiple of 4. Cc: Alban Bedel <albeu@free.fr> Fixes: 24b0e3e84fbf ("MIPS: ath79: Improve the DDR controller interface") Signed-off-by: Felix Fietkau <nbd@nbd.name> Cc: sergei.shtylyov@cogentembedded.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13258/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/common.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 6241bf6a59a41c7ca742c043416b6d57109c6b5d Author: Felix Fietkau <nbd@nbd.name> Date: Mon May 16 19:51:54 2016 +0200 MIPS: ath79: make ath79_ddr_ctrl_init() compatible for newer SoCs AR913x, AR724x and AR933x are the only SoCs where the ath79_ddr_wb_flush_base starts at 0x7c, all newer SoCs use 0x9c Invert the logic to make the code compatible with AR95xx Signed-off-by: Felix Fietkau <nbd@nbd.name> Cc: albeu@free.fr Cc: sergei.shtylyov@cogentembedded.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13257/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit bad50d79255a8a479ea63bea89e859bf08fd0f24 Author: James Hogan <james.hogan@imgtec.com> Date: Mon May 16 12:50:04 2016 +0100 MIPS: Fix VZ probe gas errors with binutils <2.24 The VZ guest register & TLB access macros introduced in commit "MIPS: Add guest CP0 accessors" use VZ ASE specific instructions that aren't understood by versions of binutils prior to 2.24. Add a check for whether the toolchain supports the -mvirt option, similar to the MSA toolchain check, and implement the accessors using .word if not. Due to difficulty in converting compiler specified registers (e.g. "$3") to usable numbers (e.g. "3") in inline asm, we need to copy to/from a temporary register, namely the assembler temporary (at/$1), and specify guest CP0 registers numerically in the gc0 macros. Fixes: 7eb91118227d ("MIPS: Add guest CP0 accessors") Signed-off-by: James Hogan <james.hogan@imgtec.com> Reported-by: Guenter Roeck <linux@roeck-us.net> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: linux-next@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13255/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Makefile | 2 + arch/mips/include/asm/mipsregs.h | 473 ++++++++++++++++++++++++--------------- 2 files changed, 295 insertions(+), 180 deletions(-) commit fd716fca10fc3dc0f18b8c16d4ecfa6d93f010d2 Author: James Hogan <james.hogan@imgtec.com> Date: Mon May 16 19:32:35 2016 +0100 MIPS: perf: Fix I6400 event numbers Fix perf hardware performance counter event numbers for I6400. This core does not follow the performance event numbering scheme of previous MIPS cores. All performance counters (both odd and even) are capable of counting any of the available events. Fixes: 4e88a8621301 ("MIPS: Add cases for CPU_I6400") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13259/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/perf_event_mipsxx.c | 54 ++++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) commit e48b4dacbc94fcb59b86f70f01837ed75ea6d616 Author: Maciej W. Rozycki <macro@linux-mips.org> Date: Mon May 16 13:15:47 2016 +0100 MIPS: DEC: Export `ioasic_ssr_lock' to modules Fix a modular `declance' regression caused by LMO commit bb46bf30d13f ("DECstation SCSI driver clean-ups.") Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13256/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/dec/setup.c | 1 + 1 file changed, 1 insertion(+) commit e49d38488515057dba8f0c2ba4cfde5be4a7281f Author: Maciej W. Rozycki <macro@imgtec.com> Date: Tue May 17 06:12:27 2016 +0100 MIPS: MSA: Fix a link error on `_init_msa_upper' with older GCC Fix a build regression from commit c9017757c532 ("MIPS: init upper 64b of vector registers when MSA is first used"): arch/mips/built-in.o: In function `enable_restore_fp_context': traps.c:(.text+0xbb90): undefined reference to `_init_msa_upper' traps.c:(.text+0xbb90): relocation truncated to fit: R_MIPS_26 against `_init_msa_upper' traps.c:(.text+0xbef0): undefined reference to `_init_msa_upper' traps.c:(.text+0xbef0): relocation truncated to fit: R_MIPS_26 against `_init_msa_upper' to !CONFIG_CPU_HAS_MSA configurations with older GCC versions, which are unable to figure out that calls to `_init_msa_upper' are indeed dead. Of the many ways to tackle this failure choose the approach we have already taken in `thread_msa_context_live'. [ralf@linux-mips.org: Drop patch segment to junk file.] Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: stable@vger.kernel.org # v3.16+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13271/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/msa.h | 13 +++++++++++++ arch/mips/kernel/traps.c | 6 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) commit 2e51f26245701cb28f154552836b7807159088a8 Author: Jan Beulich <JBeulich@suse.com> Date: Mon May 16 15:31:07 2016 -0500 objtool: Allow building with older libelf The switch to elf_getshdr{num,strndx} post-dates the oldest tool chain the kernel is supposed to be able to build with, so try to cope with such an environment. Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Cc: <stable@vger.kernel.org> # for v4.6 Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Jan Beulich <JBeulich@suse.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Link: http://lkml.kernel.org/r/732dae6872b7ff187d94f22bb699a12849d3fe04.1463430618.git.jpoimboe@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org> tools/objtool/Makefile | 4 ++++ tools/objtool/elf.h | 5 +++++ 2 files changed, 9 insertions(+) commit 8f0dfb3d8b1120c61f6e2cc3729290db10772b2d Author: Nicholas Bellinger <nab@linux-iscsi.org> Date: Sat Feb 27 18:15:46 2016 -0800 iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY race There is a iscsi-target/tcp login race in LOGIN_FLAGS_READY state assignment that can result in frequent errors during iscsi discovery: "iSCSI Login negotiation failed." To address this bug, move the initial LOGIN_FLAGS_READY assignment ahead of iscsi_target_do_login() when handling the initial iscsi_target_start_negotiation() request PDU during connection login. As iscsi_target_do_login_rx() work_struct callback is clearing LOGIN_FLAGS_READ_ACTIVE after subsequent calls to iscsi_target_do_login(), the early sk_data_ready ahead of the first iscsi_target_do_login() expects LOGIN_FLAGS_READY to also be set for the initial login request PDU. As reported by Maged, this was first obsered using an MSFT initiator running across multiple VMWare host virtual machines with iscsi-target/tcp. Reported-by: Maged Mokhtar <mmokhtar@binarykinetics.com> Tested-by: Maged Mokhtar <mmokhtar@binarykinetics.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target_nego.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 2d6b1d403ebeba464cc43b768f42fb2a612d9b99 Author: Gerd Hoffmann <kraxel@redhat.com> Date: Thu May 12 19:06:56 2016 +0200 qxl: catch qxlfb_create_pinned_object failures Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463072816-11788-1-git-send-email-kraxel@redhat.com drivers/gpu/drm/qxl/qxl_fb.c | 3 +++ 1 file changed, 3 insertions(+) commit f9628c2a8ecce1d9fbd74893e42bb0edd4c30fd4 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Thu May 12 22:54:57 2016 +0300 drm/exynos/hdmi: add a missing tab Smatch warns that the if statement isn't indented. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20160512195457.GA19095@mwanda drivers/gpu/drm/exynos/exynos_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3995b3954eba2d5768d655ea2ef9ad8054f1b06d Author: Noralf Trønnes <noralf@tronnes.org> Date: Thu May 12 20:25:22 2016 +0200 drm/fb-cma-helper: Add function drm_fb_cma_create_with_funcs() Add drm_fb_cma_create_with_funcs() for drivers that need to set the dirty() callback. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463077523-23959-3-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_fb_cma_helper.c | 31 +++++++++++++++++++++++++------ include/drm/drm_fb_cma_helper.h | 3 +++ 2 files changed, 28 insertions(+), 6 deletions(-) commit fdce184609ee56bc4d035b0886458625154a7e98 Author: Noralf Trønnes <noralf@tronnes.org> Date: Thu May 12 20:25:21 2016 +0200 drm/fb-cma-helper: Use const for drm_framebuffer_funcs argument drm_framebuffer_init() uses const for the drm_framebuffer_funcs argument so use that on drm_fb_cma_alloc() and drm_fbdev_cma_create_with_funcs() as well. Cc: laurent.pinchart@ideasonboard.com Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1463077523-23959-2-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_fb_cma_helper.c | 4 ++-- include/drm/drm_fb_cma_helper.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit fabd9106f758714ed614c8c2a7321386aa58bdb1 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon May 9 16:34:11 2016 +0200 drm: Drop connector argument from __drm_atomic_helper_connector_destroy_state It's unused, and really this helper should only look at the state structure and nothing else. Note that this conflicts with a patch from Dave that adds refcounting to drm_connectors. It's not yet clear whether the check Dave adds for connector != NULL is really needed or the right check. v2: Fix commmit message (Laurent). Cc: Dave Airlie <airlied@gmail.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-3-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 9 +++------ include/drm/drm_atomic_helper.h | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) commit 2f701695fd3a5876cd302662554f6c0ece5197eb Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon May 9 16:34:10 2016 +0200 drm: Drop plane argument from __drm_atomic_helper_plane_destroy_state It's unused, and really this helper should only look at the state structure and nothing else. v2: Fix commit message (Laurent). v3: Rebase onto mtk driver merge. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Mark Yao <mark.yao@rock-chips.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-2-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/drm_atomic_helper.c | 8 +++----- drivers/gpu/drm/exynos/exynos_drm_plane.c | 2 +- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 2 +- drivers/gpu/drm/omapdrm/omap_plane.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 2 +- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/tegra/dc.c | 4 ++-- drivers/gpu/drm/vc4/vc4_plane.c | 2 +- include/drm/drm_atomic_helper.h | 3 +-- 10 files changed, 13 insertions(+), 16 deletions(-) commit ec2dc6a0fe38de8d73a7b7638a16e7d33a19a5eb Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon May 9 16:34:09 2016 +0200 drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_state It's unused, and really this helper should only look at the state structure and nothing else. v2: Rebase on top of rockchip changes v3: Drop unrelated hunk, spotted by Laurent. v4: Rebase onto mtk driver merge. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Mark Yao <mark.yao@rock-chips.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-1-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 8 +++----- drivers/gpu/drm/i915/intel_display.c | 4 ++-- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 2 +- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- drivers/gpu/drm/tegra/dc.c | 4 ++-- drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- include/drm/drm_atomic_helper.h | 3 +-- 8 files changed, 12 insertions(+), 15 deletions(-) commit a8ad0bd84f986072314595d05444719fdf29e412 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon May 9 11:04:54 2016 +0100 drm: Remove unused drm_device from drm_gem_object_lookup() drm_gem_object_lookup() has never required the drm_device for its file local translation of the user handle to the GEM object. Let's remove the unused parameter and save some space. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: dri-devel@lists.freedesktop.org Cc: Dave Airlie <airlied@redhat.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> [danvet: Fixup kerneldoc too.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 10 +++++----- 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_v8_0.c | 2 +- drivers/gpu/drm/armada/armada_crtc.c | 2 +- drivers/gpu/drm/armada/armada_fb.c | 2 +- drivers/gpu/drm/armada/armada_gem.c | 6 +++--- drivers/gpu/drm/armada/armada_gem.h | 4 ++-- drivers/gpu/drm/ast/ast_main.c | 4 ++-- drivers/gpu/drm/ast/ast_mode.c | 2 +- drivers/gpu/drm/bochs/bochs_mm.c | 4 ++-- drivers/gpu/drm/cirrus/cirrus_main.c | 4 ++-- drivers/gpu/drm/drm_fb_cma_helper.c | 2 +- drivers/gpu/drm/drm_gem.c | 14 ++++---------- drivers/gpu/drm/drm_gem_cma_helper.c | 2 +- drivers/gpu/drm/drm_prime.c | 2 +- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 8 ++++---- drivers/gpu/drm/exynos/exynos_drm_fb.c | 3 +-- drivers/gpu/drm/exynos/exynos_drm_gem.c | 10 +++++----- drivers/gpu/drm/gma500/framebuffer.c | 2 +- drivers/gpu/drm/gma500/gem.c | 2 +- drivers/gpu/drm/gma500/gma_display.c | 2 +- drivers/gpu/drm/i915/i915_gem.c | 22 +++++++++++----------- drivers/gpu/drm/i915/i915_gem_tiling.c | 4 ++-- drivers/gpu/drm/i915/intel_display.c | 3 +-- drivers/gpu/drm/i915/intel_overlay.c | 2 +- drivers/gpu/drm/mgag200/mgag200_cursor.c | 2 +- drivers/gpu/drm/mgag200/mgag200_main.c | 4 ++-- drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 2 +- drivers/gpu/drm/msm/msm_drv.c | 6 +++--- drivers/gpu/drm/msm/msm_fb.c | 3 +-- drivers/gpu/drm/msm/msm_gem.c | 2 +- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 2 +- drivers/gpu/drm/nouveau/nouveau_display.c | 4 ++-- drivers/gpu/drm/nouveau/nouveau_gem.c | 8 ++++---- drivers/gpu/drm/nouveau/nv50_display.c | 2 +- drivers/gpu/drm/omapdrm/omap_drv.c | 6 +++--- drivers/gpu/drm/omapdrm/omap_drv.h | 4 ++-- drivers/gpu/drm/omapdrm/omap_fb.c | 2 +- drivers/gpu/drm/omapdrm/omap_gem.c | 2 +- drivers/gpu/drm/qxl/qxl_display.c | 6 ++++-- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- drivers/gpu/drm/qxl/qxl_ioctl.c | 11 +++++------ drivers/gpu/drm/radeon/radeon_cs.c | 2 +- drivers/gpu/drm/radeon/radeon_cursor.c | 2 +- drivers/gpu/drm/radeon/radeon_display.c | 2 +- drivers/gpu/drm/radeon/radeon_gem.c | 16 ++++++++-------- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 3 +-- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 2 +- drivers/gpu/drm/tegra/drm.c | 20 ++++++++++---------- drivers/gpu/drm/tegra/fb.c | 2 +- drivers/gpu/drm/tegra/gem.c | 2 +- drivers/gpu/drm/udl/udl_fb.c | 2 +- drivers/gpu/drm/udl/udl_gem.c | 2 +- drivers/gpu/drm/vc4/vc4_bo.c | 2 +- drivers/gpu/drm/vc4/vc4_gem.c | 2 +- drivers/gpu/drm/vgem/vgem_drv.c | 2 +- drivers/gpu/drm/virtio/virtgpu_display.c | 4 ++-- drivers/gpu/drm/virtio/virtgpu_gem.c | 2 +- drivers/gpu/drm/virtio/virtgpu_ioctl.c | 11 +++++------ include/drm/drm_gem.h | 4 +--- 65 files changed, 134 insertions(+), 147 deletions(-) commit 8b3db9798c689ba2dc509f6ca1a8c7e1c1a3e62a Author: Dan Williams <dan.j.williams@intel.com> Date: Wed Feb 24 14:02:06 2016 -0800 dax: fallback from pmd to pte on error In preparation for consulting a badblocks list in pmem_direct_access(), teach dax_pmd_fault() to fallback rather than fail immediately upon encountering an error. The thought being that reducing the span of the dax request may avoid the error region. Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/dax.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a8078b1fc616da6112eb95f0063cd34531d4ccf0 Author: Toshi Kani <toshi.kani@hpe.com> Date: Tue May 10 10:23:57 2016 -0600 block: Update blkdev_dax_capable() for consistency blkdev_dax_capable() is similar to bdev_dax_supported(), but needs to remain as a separate interface for checking dax capability of a raw block device. Rename and relocate blkdev_dax_capable() to keep them maintained consistently, and call bdev_direct_access() for the dax capability check. There is no change in the behavior. Link: https://lkml.org/lkml/2016/5/9/950 Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@fb.com> Cc: Andreas Dilger <adilger.kernel@dilger.ca> Cc: Jan Kara <jack@suse.cz> Cc: Dave Chinner <david@fromorbit.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Boaz Harrosh <boaz@plexistor.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> block/ioctl.c | 30 ------------------------------ fs/block_dev.c | 39 +++++++++++++++++++++++++++++++++++++-- include/linux/blkdev.h | 1 + include/linux/fs.h | 8 -------- 4 files changed, 38 insertions(+), 40 deletions(-) commit 1e937cddd1ff4b823fc9d148ebabd443f105211e Author: Toshi Kani <toshi.kani@hpe.com> Date: Tue May 10 10:23:56 2016 -0600 xfs: Add alignment check for DAX mount When a partition is not aligned by 4KB, mount -o dax succeeds, but any read/write access to the filesystem fails, except for metadata update. Call bdev_dax_supported() to perform proper precondition checks which includes this partition alignment check. Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Dave Chinner <david@fromorbit.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Boaz Harrosh <boaz@plexistor.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/xfs/xfs_super.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit 284854be2b85e967d17c098a1d4c176b5cd37eb3 Author: Toshi Kani <toshi.kani@hpe.com> Date: Tue May 10 10:23:55 2016 -0600 ext2: Add alignment check for DAX mount When a partition is not aligned by 4KB, mount -o dax succeeds, but any read/write access to the filesystem fails, except for metadata update. Call bdev_dax_supported() to perform proper precondition checks which includes this partition alignment check. Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Reviewed-by: Jan Kara <jack@suse.cz> Cc: Jan Kara <jack@suse.cz> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Boaz Harrosh <boaz@plexistor.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/ext2/super.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 87eefeb4e80b1526be83e670a08d059a003b7d0e Author: Toshi Kani <toshi.kani@hpe.com> Date: Tue May 10 10:23:54 2016 -0600 ext4: Add alignment check for DAX mount When a partition is not aligned by 4KB, mount -o dax succeeds, but any read/write access to the filesystem fails, except for metadata update. Call bdev_dax_supported() to perform proper precondition checks which includes this partition alignment check. Reported-by: Micah Parrish <micah.parrish@hpe.com> Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Reviewed-by: Jan Kara <jack@suse.cz> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Andreas Dilger <adilger.kernel@dilger.ca> Cc: Jan Kara <jack@suse.cz> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Boaz Harrosh <boaz@plexistor.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/ext4/super.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 2d96afc8f70ef86c66a0b5d80c24a27d6dd13df3 Author: Toshi Kani <toshi.kani@hpe.com> Date: Tue May 10 10:23:53 2016 -0600 block: Add bdev_dax_supported() for dax mount checks DAX imposes additional requirements to a device. Add bdev_dax_supported() which performs all the precondition checks necessary for filesystem to mount the device with dax option. Also add a new check to verify if a partition is aligned by 4KB. When a partition is unaligned, any dax read/write access fails, except for metadata update. Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@fb.com> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Andreas Dilger <adilger.kernel@dilger.ca> Cc: Jan Kara <jack@suse.cz> Cc: Dave Chinner <david@fromorbit.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Boaz Harrosh <boaz@plexistor.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/block_dev.c | 45 +++++++++++++++++++++++++++++++++++++++++++++ include/linux/blkdev.h | 1 + 2 files changed, 46 insertions(+) commit 2af3a8159cd204fc8437ed2f75863f0fb930f0d0 Author: Toshi Kani <toshi.kani@hpe.com> Date: Tue May 10 10:23:52 2016 -0600 block: Add vfs_msg() interface In preparation of moving DAX capability checks to the block layer from filesystem code, add a VFS message interface that aligns with filesystem's message format. For instance, a vfs_msg() message followed by XFS messages in case of a dax mount error may look like: VFS (pmem0p1): error: unaligned partition for dax XFS (pmem0p1): DAX unsupported by block device. Turning off DAX. XFS (pmem0p1): Mounting V5 Filesystem : vfs_msg() is largely based on ext4_msg(). Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: Jens Axboe <axboe@fb.com> Cc: "Theodore Ts'o" <tytso@mit.edu> Cc: Andreas Dilger <adilger.kernel@dilger.ca> Cc: Jan Kara <jack@suse.cz> Cc: Dave Chinner <david@fromorbit.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Boaz Harrosh <boaz@plexistor.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/block_dev.c | 12 ++++++++++++ include/linux/blkdev.h | 11 +++++++++++ 2 files changed, 23 insertions(+) commit 7795bec89ebf927ea3ad9ed5f396c227e5c73271 Author: Jan Kara <jack@suse.cz> Date: Wed May 11 11:58:53 2016 +0200 dax: Remove redundant inode size checks Callers of dax fault handlers must make sure these calls cannot race with truncate. Thus it is enough to check inode size when entering the function and we don't have to recheck it again later in the handler. Note that inode size itself can be decreased while the fault handler runs but filesystem locking prevents against any radix tree or block mapping information changes resulting from the truncate and that is what we really care about. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/dax.c | 60 +----------------------------------------------------------- 1 file changed, 1 insertion(+), 59 deletions(-) commit c3d98e39d5b37320b15f227686575d58f676e6ef Author: Jan Kara <jack@suse.cz> Date: Wed May 11 11:58:52 2016 +0200 dax: Remove pointless writeback from dax_do_io() dax_do_io() is calling filemap_write_and_wait() if DIO_LOCKING flags is set. Presumably this was copied over from direct IO code. However DAX inodes have no pagecache pages to write so the call is pointless. Remove it. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/dax.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit 069c77bc9eaee70fa9ecbd942372b1693b8cdeb0 Author: Jan Kara <jack@suse.cz> Date: Wed May 11 11:58:51 2016 +0200 dax: Remove zeroing from dax_io() All the filesystems are now zeroing blocks themselves for DAX IO to avoid races between dax_io() and dax_fault(). Remove the zeroing code from dax_io() and add warning to catch the case when somebody unexpectedly returns new or unwritten buffer. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/dax.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) commit 2b10945c532c165a824f541df76a15ed0be04d78 Author: Jan Kara <jack@suse.cz> Date: Wed May 11 11:58:50 2016 +0200 dax: Remove dead zeroing code from fault handlers Now that all filesystems zero out blocks allocated for a fault handler, we can just remove the zeroing from the handler itself. Also add checks that no filesystem returns to us unwritten or new buffer. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/dax.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) commit 86b0624e42d03a424e9571b8591d191c436f9af1 Author: Jan Kara <jack@suse.cz> Date: Wed May 11 11:58:49 2016 +0200 ext2: Avoid DAX zeroing to corrupt data Currently ext2 zeroes any data blocks allocated for DAX inode however it still returns them as BH_New. Thus DAX code zeroes them again in dax_insert_mapping() which can possibly overwrite the data that has been already stored to those blocks by a racing dax_io(). Avoid marking pre-zeroed buffers as new. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/ext2/inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9b6cd5f76d60b563d75e55e432e03ed134761432 Author: Jan Kara <jack@suse.cz> Date: Mon May 16 17:17:04 2016 +0200 ext2: Fix block zeroing in ext2_get_blocks() for DAX When zeroing allocated blocks for DAX, we accidentally zeroed only the first allocated block instead of all of them. So far this problem is hidden by the fact that page faults always need only a single block and DAX write code zeroes blocks again. But the zeroing in DAX code is racy and needs to be removed so fix the zeroing in ext2 to zero all allocated blocks. Reported-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/ext2/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c10ddf87472c07eabc206e273dc59f77c700858 Merge: 99ee872 d3450e0 Author: Dave Airlie <airlied@redhat.com> Date: Tue May 17 16:34:43 2016 +1000 Merge branch 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux into drm-next Not the biggest fan of doing it this way, but what the hell. * 'drm-uapi-extern-c-fixes' of https://github.com/evelikov/linux: (22 commits) drm/vmwgfx: add extern C guard for the UAPI header drm/virgl: add extern C guard for the UAPI header drm/via: add extern C guard for the UAPI header drm/vc4: add extern C guard for the UAPI header drm/tegra: add extern C guard for the UAPI header drm/sis: add extern C guard for the UAPI header drm/savage: add extern C guard for the UAPI header drm/radeon: add extern C guard for the UAPI header drm/r128: add extern C guard for the UAPI header drm/qxl: add extern C guard for the UAPI header drm/omap: add extern C guard for the UAPI header drm/nouveau: drop drm/ prefix from include drm/nouveau: add extern C guard for the UAPI header drm/msm: add extern C guard for the UAPI header drm/mga: add extern C guard for the UAPI header drm/i915: add extern C guard for the UAPI header drm/i810: add extern C guard for the UAPI header drm/exynos: add extern C guard for the UAPI header drm/etnaviv: add extern C guard for the UAPI header drm: add extern C guard for the UAPI headers ... commit fb75a2bb53a16069e2837ea1a4fa1bd99d636dd4 Author: Marek Vasut <marex@denx.de> Date: Tue May 17 14:01:18 2016 +0800 nios2: Fix libgcc location detection The extra CFLAGS required for correct operation of the toolchain are not propagated into the libgcc detection code. In case of the compiler from poky sdk, these extra CFLAGS contain the location of compiler sysroot (the --sysroot= option) and without this option, the location of libgcc is not properly reported. Add the missing CFLAGS to address this issue. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Ley Foon Tan <lftan@altera.com> Cc: Romain Perier <romain.perier@free-electrons.com> Acked-by: Romain Perier <romain.perier@free-electrons.com> Acked-by: Ley Foon Tan <lftan@altera.com> arch/nios2/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a6b27b79da5ccc6b85dc05bbe6a091e58be896a Author: Josh Poimboeuf <jpoimboe@redhat.com> Date: Mon May 16 15:16:18 2016 -0500 crypto: sha1-mb - make sha1_x8_avx2() conform to C function ABI Megha Dey reported a kernel panic in crypto code. The problem is that sha1_x8_avx2() clobbers registers r12-r15 without saving and restoring them. Before commit aec4d0e301f1 ("x86/asm/crypto: Simplify stack usage in sha-mb functions"), those registers were saved and restored by the callers of the function. I removed them with that commit because I didn't realize sha1_x8_avx2() clobbered them. Fix the potential undefined behavior associated with clobbering the registers and make the behavior less surprising by changing the registers to be callee saved/restored to conform with the C function call ABI. Also, rdx (aka RSP_SAVE) doesn't need to be saved: I verified that none of the callers rely on it being saved, and it's not a callee-saved register in the C ABI. Fixes: aec4d0e301f1 ("x86/asm/crypto: Simplify stack usage in sha-mb functions") Cc: stable@vger.kernel.org # 4.6 Reported-by: Megha Dey <megha.dey@linux.intel.com> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> arch/x86/crypto/sha-mb/sha1_x8_avx2.S | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 683ad8092cd262a02d01377dd17a29d492438b90 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 13:05:45 2016 -0700 x86/efi: Fix 7-parameter efi_call()s Alex Thorlton reported that the SGI/UV code crashes in the efi_call() code when invoked with 7 parameters, due to: mov (%rsp), %rax mov 8(%rax), %rax ... mov %rax, 40(%rsp) Offset 8 is only true if CONFIG_FRAME_POINTERS is disabled, with frame pointers enabled it should be 16. Furthermore, the SAVE_XMM code saves the old stack pointer, but that's just crazy. It saves the stack pointer *AFTER* we've done the: FRAME_BEGIN ... which will have *changed* the stack pointer, depending on whether stack frames are enabled or not. So when the code then does: mov (%rsp), %rax ... we now move that old stack pointer into %rax, but the offset off that stack pointer will depend on whether that FRAME_BEGIN saved off %rbp or not. So that whole 8-vs-16 offset confusion depends on the frame pointer! If frame pointers were enabled, it will be 16. If they weren't, it will be 8. The right fix is to just get rid of that silly conditional frame pointer thing, and always use frame pointers in this stub function. And then we don't need that (odd) load to get the old stack pointer into %rax - we can just use the frame pointer. Reported-by: Alex Thorlton <athorlton@sgi.com> Tested-by: Alex Thorlton <athorlton@sgi.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Link: http://lkml.kernel.org/r/CA%2B55aFzBS2v%3DWnEH83cUDg7XkOremFqJ30BJwF40dCYjReBkUQ@mail.gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/platform/efi/efi_stub_64.S | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit 0e0162bb8c008fa7742f69d4d4982c8a37b88f95 Merge: ae05327 38b78a5 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Tue May 17 02:17:59 2016 -0400 Merge branch 'ovl-fixes' into for-linus Backmerge to resolve a conflict in ovl_lookup_real(); "ovl_lookup_real(): use lookup_one_len_unlocked()" instead, but it was too late in the cycle to rebase. commit ff7199b04f08e1a72637ba66cd2c05842dc592d0 Author: Nicholas Bellinger <nab@linux-iscsi.org> Date: Sat May 14 22:28:51 2016 -0700 cxgbit: Use type ISCSI_CXGBIT + cxgbit tpg_np attribute Instead of having cxgbit use type ISCSI_HW_OFFLOAD + 'hw_offload' tpg_np attribute, it should be using it's own driver specific type + attribute Cc: Varun Prakash <varun@chelsio.com> Cc: Hariprasad Shenai <hariprasad@chelsio.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/cxgbit/cxgbit_main.c | 2 +- drivers/target/iscsi/iscsi_target_configfs.c | 14 +++++++------- include/target/iscsi/iscsi_target_core.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) commit bd027d856d3d7260017d0dc932201ce5fd7561f9 Author: Nicholas Bellinger <nab@linux-iscsi.org> Date: Sat May 14 22:23:34 2016 -0700 iscsi-target: Convert transport drivers to signal rdma_shutdown Instead of special casing the handful of callers that check for iser-target rdma verbs specific shutdown, use a simple flag at iscsit_transport->rdma_shutdown so each driver can signal this. Also, update iscsi-target/tcp + cxgbit to rdma_shutdown = false. Cc: Varun Prakash <varun@chelsio.com> Cc: Hariprasad Shenai <hariprasad@chelsio.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/infiniband/ulp/isert/ib_isert.c | 1 + drivers/target/iscsi/cxgbit/cxgbit_main.c | 1 + drivers/target/iscsi/iscsi_target.c | 10 ++++------ include/target/iscsi/iscsi_transport.h | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) commit d4b3fa4b0881b600ddeee9dd47b27dea9709f322 Author: Nicholas Bellinger <nab@linux-iscsi.org> Date: Sat May 14 21:44:01 2016 -0700 iscsi-target: Make iscsi_tpg_np driver show/store use generic code Go ahead and fold the duplicate iscsi_tpg_np driver attribute show/store functions into generic callers, invoked by current driver specific functions. This allows for future v4.8+ changes to have iscsi_target_mod use tpg_np driver attributes at runtime, instead of having the defaults hardcoded in iscsi_target_configfs.c. Also, drop the unused/legacy 'sctp' attribute for non standard RFC-3720 operation with IPPROTO_SCTP. Cc: Varun Prakash <varun@chelsio.com> Cc: Hariprasad Shenai <hariprasad@chelsio.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target_configfs.c | 199 ++++++--------------------- 1 file changed, 41 insertions(+), 158 deletions(-) commit f9114a54c1d828abbe87ac446a2da49d9720203f Merge: 0f5c85f ba16db3 Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:15:34 2016 +0530 Merge branch 'topic/xilinx' into for-linus commit 0f5c85f48a3d5cb4f551a7d68592085e75591df3 Merge: 53b84ba 86e486a Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:15:27 2016 +0530 Merge branch 'topic/tegra' into for-linus commit 53b84bad9e49e28faff74c51b137d036944291f4 Merge: 82770a2 a90e173 Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:15:20 2016 +0530 Merge branch 'topic/sun6i' into for-linus commit 82770a2f657ac4674db6db95b906218b526ef2a6 Merge: ba8b6cc0 42d236f Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:15:13 2016 +0530 Merge branch 'topic/qcom' into for-linus commit ba8b6cc07267fbf792cb7521cabc13879b227f4f Merge: 4dc5006 4e0def8 Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:15:06 2016 +0530 Merge branch 'topic/pxa' into for-linus commit 4dc50060c9fe68db800b14b2996de7ab88240986 Merge: 112db20 f9cd476 Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:14:59 2016 +0530 Merge branch 'topic/pl08x' into for-linus commit 112db20e8106a28b1c0b6997d614f43483c90ded Merge: ee5644c c39290a Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:14:50 2016 +0530 Merge branch 'topic/mv_xor' into for-linus commit ee5644ce4b391e3e46064756da0d68b07fecc12d Merge: 8dfc27a 77fc397 Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:14:40 2016 +0530 Merge branch 'topic/mpc512x' into for-linus commit 8dfc27af62b37b98c29768be7057663fd5c16c4d Merge: 5621488 17b3cf4 Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:14:30 2016 +0530 Merge branch 'topic/hsu' into for-linus commit 56214883c586a235ea73c07a423b27ee62ea2810 Merge: 95c4dc7 3a14c66 Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:14:16 2016 +0530 Merge branch 'topic/dw' into for-linus commit 95c4dc7b2c622a3cc41535f67f46dd31332186c8 Merge: a365c96 0eef727 Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:14:07 2016 +0530 Merge branch 'topic/bcm' into for-linus commit a365c9685438713dbf88828282c4699f571b97de Merge: 511deae 20ea6be Author: Vinod Koul <vinod.koul@intel.com> Date: Tue May 17 10:13:40 2016 +0530 Merge branch 'topic/core' into for-linus commit 16490980e396fac079248b23b1dd81e7d48bebf3 Merge: 46c1345 dab2e29 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 19:51:04 2016 -0700 Merge tag 'device-properties-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull device properties update from Rafael Wysocki: "Generic device properties framework update. Just one commit reworking the handling of built-in properties initialization and updating a few drivers in accordance with the core framework changes" * tag 'device-properties-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: device property: don't bother the drivers with struct property_set commit 46c13450624e36302547a2ac3695f2350fe7ffc3 Merge: d57d394 fc72395 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 19:41:41 2016 -0700 Merge tag 'acpi-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPI updates from Rafael Wysocki: "The new features here are ACPI 6.1 support (and some previously missing bits of ACPI 6.0 support) in ACPICA and two new drivers, a driver for the ACPI Generic Event Device (GED) feature introduced by ACPI 6.1 and the INT3406 thermal driver for display thermal management. Also the value returned by the _HRV (hardware revision) ACPI object will be exported to user space via sysfs now. In addition to that, ACPI on ARM64 will not depend on EXPERT any more. The rest is mostly fixes and cleanups and some code reorganization. Specifics: - In-kernel ACPICA code update to the upstream release 20160422 adding support for ACPI 6.1 along with some previously missing bits of ACPI 6.0 support, making a fair amount of fixes and cleanups and reducing divergences between the upstream ACPICA and the in-kernel code (Bob Moore, Lv Zheng, Al Stone, Aleksey Makarov, Will Miles) - ACPI Generic Event Device (GED) support and a fix for it (Sinan Kaya, Paul Gortmaker) - INT3406 thermal driver for display thermal management and ACPI backlight support code reorganization related to it (Aaron Lu, Arnd Bergmann) - Support for exporting the value returned by the _HRV (hardware revision) ACPI object via sysfs (Betty Dall) - Removal of the EXPERT dependency for ACPI on ARM64 (Mark Brown) - Rework of the handling of ACPI _OSI mechanism allowing the _OSI("Darwin") support to be overridden from the kernel command line among other things (Lv Zheng, Chen Yu) - Rework of the ACPI tables override mechanism to prepare it for the introduction of overlays support going forward (Lv Zheng, Rafael Wysocki) - Fixes related to the ECDT support and module-level execution of AML (Lv Zheng) - ACPI PCI interrupts management update to make it work better on ARM64 mostly (Sinan Kaya) - ACPI SRAT handling update to make the code process all entires in the table order regardless of the entry type (Lukasz Anaczkowski) - EFI power off support for full-hardware ACPI platforms that don't support ACPI S5 (Chen Yu) - Fixes and cleanups related to the ACPI core's sysfs interface (Dan Carpenter, Betty Dall) - acpi_dev_present() API rework to reduce possible confusion related to it (Lukas Wunner) - Removal of CLK_IS_ROOT from two ACPI drivers (Stephen Boyd)" * tag 'acpi-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (82 commits) ACPI / video: mark acpi_video_get_levels() inline Thermal / ACPI / video: add INT3406 thermal driver ACPI / GED: make evged.c explicitly non-modular ACPI / tables: Fix DSDT override mechanism ACPI / sysfs: fix error code in get_status() ACPICA: Update version to 20160422 ACPICA: Move all ASCII utilities to a common file ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write() ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support in acpi_hw_read() ACPICA: Executer: Introduce a set of macros to handle bit width mask generation ACPICA: Hardware: Add optimized access bit width support ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro ACPICA: Renamed some #defined flag constants for clarity ACPICA: ACPI 6.0, tools/iasl: Add support for new resource descriptors ACPICA: ACPI 6.0: Update _BIX support for new package element ACPICA: ACPI 6.1: Support for new PCCT subtable ACPICA: Refactor evaluate_object to reduce nesting ACPICA: Divergence: remove unwanted spaces for typedef ACPI,PCI,IRQ: remove SCI penalize function ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init() .. commit b1725423732dd7b58856adcc03cbf1145fcea491 Author: Philippe Reynes <tremyfr@gmail.com> Date: Tue May 17 00:32:34 2016 +0200 net: ethernet: fec-mpc52xx: use phy_ethtool_{get|set}_link_ksettings There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/fec_mpc52xx.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit a54d20f85ab12fab4873d2947b2be965430bf609 Author: Philippe Reynes <tremyfr@gmail.com> Date: Tue May 17 00:32:33 2016 +0200 net: ethernet: fec-mpc52xx: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/fec_mpc52xx.c | 43 +++++++++++++--------------- 1 file changed, 20 insertions(+), 23 deletions(-) commit 9295c034726e025395e6eff3013fa9e3753bcb39 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Mon May 16 23:06:53 2016 +0200 bpf, doc: fix typo on bpf_asm descriptions Fix description of some of the bpf_asm tool related jump instructions and generally move them to format A <op> k. Reported-by: Sebastian Amend <sebastian.amend@googlemail.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/networking/filter.txt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit a8df35d45800c2af2b9bac04a8f9d4e426862e4d Author: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Date: Mon May 16 12:41:07 2016 -0300 stmmac: hardware TX COE doesn't work when force_thresh_dma_mode is set Commit f748be531d70 ("stmmac: support new GMAC4") reverted a previous fix by mistake. This commit re-applies said fix: commit dec2165ff38a99f937fe61875d102c6c8596c815 Author: Sonic Zhang <sonic.zhang@analog.com> Date: Thu Jan 22 14:55:57 2015 +0800 stmmac: hardware TX COE doesn't work when force_thresh_dma_mode is set Clear the TX COE bit when force_thresh_dma_mode is set even hardware dma capability says support. Tested on BF609. Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net> Tested on LPC4350 Hitex board. Fixes: f748be531d70 ("stmmac: support new GMAC4") Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Tested-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit d57d39431924d1628ac9b93a2de7f806fc80680a Merge: 3e21e5d 27c4a1c Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 19:17:22 2016 -0700 Merge tag 'pm-4.7-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 cpufreq subsystem this time. To me, quite obviously, the biggest ticket item is the new "schedutil" governor. Interestingly enough, it's the first new cpufreq governor since the beginning of the git era (except for some out-of-the-tree ones). There are two main differences between it and the existing governors. First, it uses the information provided by the scheduler directly for making its decisions, so it doesn't have to track anything by itself. Second, it can invoke drivers (supporting that feature) to adjust CPU performance right away without having to spawn work items to be executed in process context or similar. Currently, the acpi-cpufreq driver is the only one supporting that mode of operation, but then it is used on a large number of systems. The "schedutil" governor as included here is very simple and mostly regarded as a foundation for future work on the integration of the scheduler with CPU power management (in fact, there is work in progress on top of it already). Nevertheless it works and the preliminary results obtained with it are encouraging. There also is some consolidation of CPU frequency management for ARM platforms that can add their machine IDs the the new stub dt-platdev driver now and that will take care of creating the requisite platform device for cpufreq-dt, so it is not necessary to do that in platform code any more. Several ARM platforms are switched over to using this generic mechanism. In addition to that, the intel_pstate driver is now going to respect CPU frequency limits set by the platform firmware (or a BMC) and provided via the ACPI _PPC object. The devfreq subsystem is getting a new "passive" governor for SoCs subsystems that will depend on somebody else to manage their voltage rails and its support for Samsung Exynos SoCs is consolidated. The rest is support for new hardware (Intel Broxton support in intel_idle for one example), bug fixes, optimizations and cleanups in a number of places. Specifics: - New cpufreq "schedutil" governor (making decisions based on CPU utilization information provided by the scheduler and capable of switching CPU frequencies right away if the underlying driver supports that) and support for fast frequency switching in the acpi-cpufreq driver (Rafael Wysocki) - Consolidation of CPU frequency management on ARM platforms allowing them to get rid of some platform-specific boilerplate code if they are going to use the cpufreq-dt driver (Viresh Kumar, Finley Xiao, Marc Gonzalez) - Support for ACPI _PPC and CPU frequency limits in the intel_pstate driver (Srinivas Pandruvada) - Fixes and cleanups in the cpufreq core and generic governor code (Rafael Wysocki, Sai Gurrappadi) - intel_pstate driver optimizations and cleanups (Rafael Wysocki, Philippe Longepe, Chen Yu, Joe Perches) - cpufreq powernv driver fixes and cleanups (Akshay Adiga, Shilpasri Bhat) - cpufreq qoriq driver fixes and cleanups (Jia Hongtao) - ACPI cpufreq driver cleanups (Viresh Kumar) - Assorted cpufreq driver updates (Ashwin Chaugule, Geliang Tang, Javier Martinez Canillas, Paul Gortmaker, Sudeep Holla) - Assorted cpufreq fixes and cleanups (Joe Perches, Arnd Bergmann) - Fixes and cleanups in the OPP (Operating Performance Points) framework, mostly related to OPP sharing, and reorganization of OF-dependent code in it (Viresh Kumar, Arnd Bergmann, Sudeep Holla) - New "passive" governor for devfreq (for SoC subsystems that will rely on someone else for the management of their power resources) and consolidation of devfreq support for Exynos platforms, coding style and typo fixes for devfreq (Chanwoo Choi, MyungJoo Ham) - PM core fixes and cleanups, mostly to make it work better with the generic power domains (genpd) framework, and updates for that framework (Ulf Hansson, Thierry Reding, Colin Ian King) - Intel Broxton support for the intel_idle driver (Len Brown) - cpuidle core optimization and fix (Daniel Lezcano, Dave Gerlach) - ARM cpuidle cleanups (Jisheng Zhang) - Intel Kabylake support for the RAPL power capping driver (Jacob Pan) - AVS (Adaptive Voltage Switching) rockchip-io driver update (Heiko Stuebner) - Updates for the cpupower tool (Arjun Sreedharan, Colin Ian King, Mattia Dongili, Thomas Renninger)" * tag 'pm-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (112 commits) intel_pstate: Clean up get_target_pstate_use_performance() intel_pstate: Use sample.core_avg_perf in get_avg_pstate() intel_pstate: Clarify average performance computation intel_pstate: Avoid unnecessary synchronize_sched() during initialization cpufreq: schedutil: Make default depend on CONFIG_SMP cpufreq: powernv: del_timer_sync when global and local pstate are equal cpufreq: powernv: Move smp_call_function_any() out of irq safe block intel_pstate: Clean up intel_pstate_get() cpufreq: schedutil: Make it depend on CONFIG_SMP cpufreq: governor: Fix handling of special cases in dbs_update() PM / OPP: Move CONFIG_OF dependent code in a separate file cpufreq: intel_pstate: Ignore _PPC processing under HWP cpufreq: arm_big_little: use generic OPP functions for {init, free}_opp_table PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_, }remove_table cpufreq: tango: Use generic platdev driver PM / OPP: pass cpumask by reference cpufreq: Fix GOV_LIMITS handling for the userspace governor cpupower: fix potential memory leak PM / devfreq: style/typo fixes PM / devfreq: exynos: Add the detailed correlation for Exynos5422 bus .. commit 73d9011c1f50ad3f82886d2187799acba1feb236 Author: Philippe Reynes <tremyfr@gmail.com> Date: Mon May 16 16:52:37 2016 +0200 net: ethernet: fs-enet: use phy_ethtool_{get|set}_link_ksettings There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 26 ++-------------------- 1 file changed, 2 insertions(+), 24 deletions(-) commit c1c511a275c9c0a14836c2071d37946df3862c25 Author: Philippe Reynes <tremyfr@gmail.com> Date: Mon May 16 16:52:36 2016 +0200 net: ethernet: fs-enet: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> .../net/ethernet/freescale/fs_enet/fs_enet-main.c | 31 +++++++++------------- drivers/net/ethernet/freescale/fs_enet/fs_enet.h | 1 - drivers/net/ethernet/freescale/fs_enet/mac-fcc.c | 4 +-- drivers/net/ethernet/freescale/fs_enet/mac-fec.c | 6 ++--- drivers/net/ethernet/freescale/fs_enet/mac-scc.c | 2 +- 5 files changed, 18 insertions(+), 26 deletions(-) commit a29d5c9b8167dbc21a7ca8c0302e3799f9063b4e Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Mon May 16 21:16:54 2016 -0300 perf tools: Separate accounting of contexts and real addresses in a stack trace The perf_sample->ip_callchain->nr value includes all the entries in the ip_callchain->ip[] array, real addresses and PERF_CONTEXT_{KERNEL,USER,etc}, while what the user expects is that what is in the kernel.perf_event_max_stack sysctl or in the upcoming per event perf_event_attr.sample_max_stack knob be honoured in terms of IP addresses in the stack trace. So match the kernel support and validate chain->nr taking into account both kernel.perf_event_max_stack and kernel.perf_event_max_contexts_per_stack. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: Wang Nan <wangnan0@huawei.com> Cc: Zefan Li <lizefan@huawei.com> Link: http://lkml.kernel.org/n/tip-mgx0jpzfdq4uq4abfa40byu0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/perf.c | 3 +++ tools/perf/util/machine.c | 26 +++++++++++++++++--------- tools/perf/util/util.c | 3 ++- tools/perf/util/util.h | 3 ++- 4 files changed, 24 insertions(+), 11 deletions(-) commit c85b03349640b34f3545503c8429fc43005e9a92 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Thu May 12 13:06:21 2016 -0300 perf core: Separate accounting of contexts and real addresses in a stack trace The perf_sample->ip_callchain->nr value includes all the entries in the ip_callchain->ip[] array, real addresses and PERF_CONTEXT_{KERNEL,USER,etc}, while what the user expects is that what is in the kernel.perf_event_max_stack sysctl or in the upcoming per event perf_event_attr.sample_max_stack knob be honoured in terms of IP addresses in the stack trace. So allocate a bunch of extra entries for contexts, and do the accounting via perf_callchain_entry_ctx struct members. A new sysctl, kernel.perf_event_max_contexts_per_stack is also introduced for investigating possible bugs in the callchain implementation by some arch. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: Wang Nan <wangnan0@huawei.com> Cc: Zefan Li <lizefan@huawei.com> Link: http://lkml.kernel.org/n/tip-3b4wnqk340c4sg4gwkfdi9yk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Documentation/sysctl/kernel.txt | 14 ++++++++++++++ include/linux/perf_event.h | 18 ++++++++++++++++-- include/uapi/linux/perf_event.h | 1 + kernel/events/callchain.c | 10 +++++++++- kernel/sysctl.c | 9 +++++++++ 5 files changed, 49 insertions(+), 3 deletions(-) commit 3e4de4ec4cfea40994b47a79767610153edbf45b Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Thu May 12 13:01:50 2016 -0300 perf core: Add perf_callchain_store_context() helper We need have different helpers to account how many contexts we have in the sample and for real addresses, so do it now as a prep patch, to ease review. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/n/tip-q964tnyuqrxw5gld18vizs3c@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> arch/powerpc/perf/callchain.c | 6 +++--- include/linux/perf_event.h | 2 ++ kernel/events/callchain.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) commit 3b1fff08038bd0792b1aa1e9703b2dd0512a3fd0 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue May 10 18:08:32 2016 -0300 perf core: Add a 'nr' field to perf_event_callchain_context We will use it to count how many addresses are in the entry->ip[] array, excluding PERF_CONTEXT_{KERNEL,USER,etc} entries, so that we can really return the number of entries specified by the user via the relevant sysctl, kernel.perf_event_max_contexts, or via the per event perf_event_attr.sample_max_stack knob. This way we keep the perf_sample->ip_callchain->nr meaning, that is the number of entries, be it real addresses or PERF_CONTEXT_ entries, while honouring the max_stack knobs, i.e. the end result will be max_stack entries if we have at least that many entries in a given stack trace. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/n/tip-s8teto51tdqvlfhefndtat9r@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> arch/arm/kernel/perf_callchain.c | 2 +- arch/arm64/kernel/perf_callchain.c | 4 ++-- arch/metag/kernel/perf_callchain.c | 2 +- arch/mips/kernel/perf_event.c | 4 ++-- arch/powerpc/perf/callchain.c | 4 ++-- arch/sparc/kernel/perf_event.c | 6 +++--- arch/x86/events/core.c | 4 ++-- include/linux/perf_event.h | 6 ++++-- kernel/events/callchain.c | 3 +-- 9 files changed, 18 insertions(+), 17 deletions(-) commit cfbcf468454ab4b20f0b4b62da51920b99fdb19e Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Thu Apr 28 12:30:53 2016 -0300 perf core: Pass max stack as a perf_callchain_entry context This makes perf_callchain_{user,kernel}() receive the max stack as context for the perf_callchain_entry, instead of accessing the global sysctl_perf_event_max_stack. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: He Kuang <hekuang@huawei.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: Wang Nan <wangnan0@huawei.com> Cc: Zefan Li <lizefan@huawei.com> Link: http://lkml.kernel.org/n/tip-kolmn1yo40p7jhswxwrc7rrd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> arch/arc/kernel/perf_event.c | 6 +++--- arch/arm/kernel/perf_callchain.c | 10 +++++----- arch/arm64/kernel/perf_callchain.c | 14 +++++++------- arch/metag/kernel/perf_callchain.c | 10 +++++----- arch/mips/kernel/perf_event.c | 12 ++++++------ arch/powerpc/perf/callchain.c | 14 +++++++------- arch/s390/kernel/perf_event.c | 4 ++-- arch/sh/kernel/perf_callchain.c | 4 ++-- arch/sparc/kernel/perf_event.c | 14 +++++++------- arch/tile/kernel/perf_event.c | 6 +++--- arch/x86/events/core.c | 14 +++++++------- arch/xtensa/kernel/perf_event.c | 10 +++++----- include/linux/perf_event.h | 16 +++++++++++----- kernel/bpf/stackmap.c | 3 ++- kernel/events/callchain.c | 20 ++++++++++++-------- 15 files changed, 84 insertions(+), 73 deletions(-) commit a831100aeefbe6d9f3e47a3e2712f82c042f1f5c Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue May 10 16:34:53 2016 -0300 perf core: Generalize max_stack sysctl handler So that it can be used for other stack related knobs, such as the upcoming one to tweak the max number of of contexts per stack sample. In all those cases we can only change the value if there are no perf sessions collecting stacks, so they need to grab that mutex, etc. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/n/tip-8t3fk94wuzp8m2z1n4gc0s17@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> kernel/events/callchain.c | 5 +++-- kernel/sysctl.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) commit 0a77582f0407e7f9b5d775bebc31297a1b890be0 Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Sun May 15 12:19:40 2016 +0900 perf symbols: Introduce DSO__NAME_KALLSYMS and DSO__NAME_KCORE Instead of using a raw string, use DSO__NAME_KALLSYMS and DSO__NAME_KCORE macros for kallsyms and kcore. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160515031935.4017.50971.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-buildid-cache.c | 8 ++++---- tools/perf/util/annotate.c | 2 +- tools/perf/util/machine.c | 2 +- tools/perf/util/symbol.c | 10 +++++----- tools/perf/util/symbol.h | 3 +++ 5 files changed, 14 insertions(+), 11 deletions(-) commit a1f3d56761df31f0ffeb215b974e26d5613e92a4 Author: Namhyung Kim <namhyung@kernel.org> Date: Fri May 13 15:01:03 2016 +0900 perf stat: Use cpu-clock event for cpu targets Currently 'perf stat' always counts task-clock event by default. But it's somewhat confusing for system-wide targets (especially with 'sleep N' as the 'sleep' task just sleeps and doesn't use cputime). Changing to cpu-clock event instead for that case makes more sense IMHO. Before: # perf stat -a sleep 0.1 Performance counter stats for 'system wide': 403.038603 task-clock (msec) # 4.001 CPUs utilized 150 context-switches # 0.372 K/sec 7 cpu-migrations # 0.017 K/sec 71 page-faults # 0.176 K/sec 23,705,169 cycles # 0.059 GHz 15,888,166 instructions # 0.67 insn per cycle 3,326,078 branches # 8.253 M/sec 87,643 branch-misses # 2.64% of all branches 0.100737009 seconds time elapsed # After: # perf stat -a sleep 0.1 Performance counter stats for 'system wide': 404.271182 cpu-clock (msec) # 4.000 CPUs utilized 143 context-switches # 0.354 K/sec 13 cpu-migrations # 0.032 K/sec 73 page-faults # 0.181 K/sec 22,119,220 cycles # 0.055 GHz 13,622,065 instructions # 0.62 insn per cycle 2,918,769 branches # 7.220 M/sec 85,033 branch-misses # 2.91% of all branches 0.101073089 seconds time elapsed # Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1463119263-5569-3-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-stat.c | 3 +++ 1 file changed, 3 insertions(+) commit daf4f4786e8af371048e72cb37ac05190e89198a Author: Namhyung Kim <namhyung@kernel.org> Date: Fri May 13 15:01:02 2016 +0900 perf stat: Update runtime using cpu-clock event Currently only the task-clock event updates the runtime_nsec so it cannot show the metric when using cpu-clock events. However cpu clock works basically same as task-clock, so no need to not update the runtime IMHO. Before: # perf stat -a -e cpu-clock,context-switches,page-faults,cycles sleep 0.1 Performance counter stats for 'system wide': 1217.759506 cpu-clock (msec) 93 context-switches 61 page-faults 18,958,022 cycles 0.101393794 seconds time elapsed After: Performance counter stats for 'system wide': 1220.471884 cpu-clock (msec) # 12.013 CPUs utilized 118 context-switches # 0.097 K/sec 59 page-faults # 0.048 K/sec 17,941,247 cycles # 0.015 GHz 0.101594777 seconds time elapsed Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Andi Kleen <andi@firstfloor.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1463119263-5569-2-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/stat-shadow.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit b0404be8d6186f9f3c23e2b5ff247e667be90652 Author: Namhyung Kim <namhyung@kernel.org> Date: Fri May 13 15:01:01 2016 +0900 perf stat: Fix indentation of stalled backend cycle The commit 140aeadc1fb5 ("perf stat: Abstract stat metrics printing") changed how shadow metrics are printed, but it missed to update the width of the stalled backend cycles event to 7.2% like others. This resulted in misaligned output like below: Performance counter stats for 'pwd': 0.638313 task-clock (msec) # 0.567 CPUs utilized 0 context-switches # 0.000 K/sec 0 cpu-migrations # 0.000 K/sec 54 page-faults # 0.085 M/sec 885,600 cycles # 1.387 GHz 558,438 stalled-cycles-frontend # 63.06% frontend cycles idle 431,355 stalled-cycles-backend # 48.71% backend cycles idle 674,956 instructions # 0.76 insn per cycle # 0.83 stalled cycles per insn 130,380 branches # 204.257 M/sec <not counted> branch-misses 0.001125426 seconds time elapsed Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Andi Kleen <andi@firstfloor.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Fixes: 140aeadc1fb5 ("perf stat: Abstract stat metrics printing") Link: http://lkml.kernel.org/r/1463119263-5569-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/stat-shadow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 6ae98ba611ed1c11ddc5645475bc03b46a3c04e7 Author: He Kuang <hekuang@huawei.com> Date: Thu May 12 08:43:11 2016 +0000 perf symbols: Store vdso buildid unconditionally When unwinding callchains on a different machine, vdso info should be available so the unwind process won't be interrupted if address falls into vdso region. But in most cases, the addresses of sample events are not in vdso range, the buildid of a zero hit vdso won't be stored into perf.data. This patch stores vdso buildid regardless of whether the vdso is hit or not. Signed-off-by: He Kuang <hekuang@huawei.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1463042596-61703-3-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/build-id.c | 2 +- tools/perf/util/dso.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) commit e3b03b6c1a4f3b4564be08809f58584592621a0a Author: Andi Kleen <ak@linux.intel.com> Date: Thu May 5 16:04:03 2016 -0700 perf stat: Avoid fractional digits for integer scales When the scaling factor is a full integer don't display fractional digits. This avoids unnecessary .00 output for topdown metrics with scale factors. v2: Remove redundant check. Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1462489447-31832-7-git-send-email-andi@firstfloor.org [ Rename 'round' to 'stat_round' as 'round' is defined in math.h, included by this patch, and this breaks the build on ubuntu 12.04 ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-stat.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit 3e21e5dda4907ecb21a124517ab0eb1d176e5231 Merge: d9dce51 1c44711 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 19:10:40 2016 -0700 Merge tag 'mmc-v4.7' of git://git.linaro.org/people/ulf.hansson/mmc Pull MMC updates from Ulf Hansson: "MMC core: - Add TRACE support to be able to debug request flow - Extend/improve reset support for (e)MMC - Convert MMC pwrseq to platform device drivers - Use IDA for indexes - Some additional minor improvements MMC host: - sdhci: Re-factoring, clean-ups and improvements - sdhci-acpi|pci: Use MMC_CAP_AGGRESSIVE_PM for Broxton - omap/omap_hsmmc: Convert to use dma_request_chan() - usdhi6rol0: Add support for UHS modes - sh_mmcif: Update runtime PM support - tmio: Wolfram Sang steps in as maintainer - tmio: Add UHS-I mode support - sh_mobile_sdhi: Add UHS-I mode support - tmio/sdhi: Re-factoring, clean-ups and improvements - dw_mmc: Re-factoring and clean-ups - davinci: Convert to use dma_request_chan()" * tag 'mmc-v4.7' of git://git.linaro.org/people/ulf.hansson/mmc: (99 commits) mmc: mmc: Fix partition switch timeout for some eMMCs mmc: sh_mobile_sdhi: enable SDIO IRQs for RCar Gen3 mmc: sdio: fall back to SDIO 1.0 for broken 1.1 cards mmc: sdhci-st: correct name of sd-uhs-sdr50 property MAINTAINERS: update entry for TMIO MMC driver mmc: block: improve logging of handling emmc timeouts mmc: sdhci: removed unneeded function wrappers mmc: core: remove the invalid message in mmc_select_timing mmc: core: fix using wrong io voltage if mmc_select_hs200 fails mmc: sdhci-of-arasan: fix set_clock when a phy is supported mmc: omap: Use dma_request_chan() for requesting DMA channel mmc: mmc: Attempt to flush cache before reset mmc: sh_mobile_sdhi: check return value when changing clk mmc: sh_mobile_sdhi: only change the clock on RCar Gen2+ mmc: tmio/sdhi: introduce flag for RCar 2+ specific features mmc: sh_mobile_sdhi: make clk_update function more compact mmc: omap_hsmmc: Use dma_request_chan() for requesting DMA channel mmc: sdhci-of-at91: add presets setup mmc: usdhi6rol0: add pinctrl to set pin drive strength mmc: usdhi6rol0: add support for UHS modes ... commit 92964c79b357efd980812c4de5c1fd2ec8bb5520 Author: Herbert Xu <herbert@gondor.apana.org.au> Date: Mon May 16 17:28:16 2016 +0800 netlink: Fix dump skb leak/double free When we free cb->skb after a dump, we do it after releasing the lock. This means that a new dump could have started in the time being and we'll end up freeing their skb instead of ours. This patch saves the skb and module before we unlock so we free the right memory. Fixes: 16b304f3404f ("netlink: Eliminate kmalloc in netlink dump operation.") Reported-by: Baozeng Ding <sploving1@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/netlink/af_netlink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit d9dce51c9b77b803348c787165a884b6e11011f0 Merge: e2ca542 4f38c56 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 19:04:53 2016 -0700 Merge tag 'regulator-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator updates from Mark Brown: "A few core enhancements to deal with some of the slightly more complicated edge cases that have started cropping up in systems, both new ones and old ones that people started worrying about upstream, but otherwise a quiet release for the regulator API: - When applying constraints at system image if we have a voltage range specified and the regulator is currently configured outside the bounds of that range bring the regulator to the nearest end of the range. - When regulators are in non-regulating bypass modes make sure that we always use the voltage from the parent regulator. - Support for LP873x, PV88080, PM8894 and FAN53555 chips" * tag 'regulator-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: (71 commits) regulator: rk808: Migrate to regulator core's simplified DT parsing code regulator: lp873x: Add support for lp873x PMIC regulators regulator: tps65917/palmas: Simplify multiple dereference of match->of_node regulator: tps65917/palmas: Handle possible memory allocation failure regulator: tps65917/palmas: Simplify multiple dereference of pdata->reg_init[idx] regulator: tps65917/palmas: Simplify multiple dereference of ddata->palmas_matches[idx] regulator: pwm: Use pwm_get_args() where appropriate pwm: Introduce the pwm_args concept regulator: max77686: Configure enable time to properly handle regulator enable regulator: rk808: Add rk808_reg_ops_ranges for LDO3 regulator: core: Add early supply resolution for regulators regulator: axp20x: Fix axp22x ldo_io voltage ranges regulator: tps65917/palmas: Add bypass "On" value regulator: rk808: remove unused rk808_reg_ops_ranges regulator: refactor valid_ops_mask checking code regulator: rk808: remove linear range definitions with a single range regulator: max77620: Add support for device specific ramp rate setting regulator: max77620: Add details of device specific ramp rate setting regulator: helpers: Ensure bypass register field matches ON value regulator: core: Move registration of regulator device ... commit e2ca54250d14347c35c55e9304296c2f04f3fbad Merge: 27d6caf d4ab78d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 19:00:09 2016 -0700 Merge tag 'regmap-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap Pull regmap updates from Mark Brown: "The updates for this kernel release really are trivial: - Check that max_register is set for the flat cache to avoid a crash on initialization - Fix a typo in the documentation" * tag 'regmap-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap: regcache: flat: Require max_registers to be set regmap: cache: Fix typo in cache_bypass parameter description commit 5af897e433e6ba2963c0edcb12f2f75c53d5fae4 Author: Richard Cochran <rcochran@linutronix.de> Date: Fri Mar 18 22:26:09 2016 +0100 thermal: x86_pkg_temp: Handle the FROZEN hot plug notifier actions. When performing a suspend operation, the kernel brings all of the non-boot CPUs offline, calling the hot plug notifiers with the flag, CPU_TASKS_FROZEN, set in the action code. Similarly, during resume, the CPUs are brought back online, but again the notifiers have the FROZEN flag set. While some very few drivers really need to treat suspend/resume specially, this driver unintentionally ignores the notifications. This patch changes the driver to cancel its work item when the CPU goes down, even during a suspend operation. As a result, the suspended state is no longer a special case. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: linux-pm@vger.kernel.org Signed-off-by: Richard Cochran <rcochran@linutronix.de> Signed-off-by: Zhang Rui <rui.zhang@intel.com> drivers/thermal/x86_pkg_temp_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 45e093ae2830cd1264677d47ff9a95a71f5d9f9c Author: Richard Alpe <richard.alpe@ericsson.com> Date: Mon May 16 11:14:54 2016 +0200 tipc: check nl sock before parsing nested attributes Make sure the socket for which the user is listing publication exists before parsing the socket netlink attributes. Prior to this patch a call without any socket caused a NULL pointer dereference in tipc_nl_publ_dump(). Tested-and-reported-by: Baozeng Ding <sploving1@gmail.com> Signed-off-by: Richard Alpe <richard.alpe@ericsson.com> Acked-by: Jon Maloy <jon.maloy@ericsson.cm> Signed-off-by: David S. Miller <davem@davemloft.net> net/tipc/socket.c | 3 +++ 1 file changed, 3 insertions(+) commit 27d6cafa7e10ca0f97b57ea4da2d8a73e41d6e65 Merge: fdb8a29 70f95b7 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 18:55:43 2016 -0700 Merge tag 'for-linus-4.7' of git://git.code.sf.net/p/openipmi/linux-ipmi Pull IPMI updates from Corey Minyard: "Some small fixes and cleanups, these latest have been in linux-next for a few weeks" * tag 'for-linus-4.7' of git://git.code.sf.net/p/openipmi/linux-ipmi: ipmi: Fix the I2C address extraction from SPMI tables IPMI: reserve memio regions separately ipmi: Fix some minor coding style issues commit 77f57761466e9aef2b57acf8ce07df11bf360e34 Author: Eric Dumazet <edumazet@google.com> Date: Sun May 15 18:16:38 2016 -0700 fq_codel: fix memory limitation drift memory_usage must be decreased in dequeue_func(), not in fq_codel_dequeue(), otherwise packets dropped by Codel algo are missing this decrease. Also we need to clear memory_usage in fq_codel_reset() Fixes: 95b58430abe7 ("fq_codel: add memory limitation per queue") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/sched/sch_fq_codel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fd24d72ca9b52558b1511edc814951cdfe5f21cf Author: Philippe Reynes <tremyfr@gmail.com> Date: Mon May 16 01:35:14 2016 +0200 net: ethernet: ftgmac100: use phy_ethtool_{get|set}_link_ksettings There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/faraday/ftgmac100.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) commit b3c40adcc9891a709d30b620f0cabd4679a355b5 Author: Philippe Reynes <tremyfr@gmail.com> Date: Mon May 16 01:35:13 2016 +0200 net: ethernet: ftgmac100: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/faraday/ftgmac100.c | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) commit cd5f9bb4be950079e911a64972dd7311f0bf8534 Author: Philippe Reynes <tremyfr@gmail.com> Date: Mon May 16 01:30:09 2016 +0200 net: ethernet: gianfar: use phy_ethtool_{get|set}_link_ksettings There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/gianfar_ethtool.c | 27 ++---------------------- 1 file changed, 2 insertions(+), 25 deletions(-) commit 4c4a6b0e8fa24a628cbca3931745d482c66d303e Author: Philippe Reynes <tremyfr@gmail.com> Date: Mon May 16 01:30:08 2016 +0200 net: ethernet: gianfar: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Acked-by: Claudiu Manoil <claudiu.manoil@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/gianfar.c | 42 +++++++++++++----------- drivers/net/ethernet/freescale/gianfar.h | 1 - drivers/net/ethernet/freescale/gianfar_ethtool.c | 24 +++++++------- 3 files changed, 35 insertions(+), 32 deletions(-) commit fdb8a291227338fe54a2a790dae457726e5c237b Merge: 1cc3880 d6a442d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 18:50:49 2016 -0700 Merge tag 'hwmon-for-linus-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon updates from Guenter Roeck: - major rework of it87 driver: cleanup, added support for additional attributes, added support for two chips in the system, added support for IT8728E - fam17h_power driver now reports accumulated power consumption - new driver for MAX31722/MAX31723 temperature sensors - minor fixes to sch5636 and ads7828 drivers * tag 'hwmon-for-linus-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: (35 commits) hwmon: (sch5636) trivial fix of spelling mistake on revision hwmon: (it87) Add support for IT8628E hwmon: (it87) Fix pwm_temp_map for system with 6 pwm channels hwmon: (it87) Support automatic pwm control on newer chips hwmon: (it87) Enhance validation for fan4 and fan5 hwmon: (it87) Support disabling fan control for all pwm control and chips hwmon: (it87) Formatting cleanup hwmon: (it87) Use defines for array sizes and sensor counts hwmon: (it87) Use BIT macro hwmon: (it87) Add support for VIN7 to VIN10 on IT8620E hwmon: (it87) Simplify reading voltage registers hwmon: (it87) Support up to 6 temperature sensors on IT8620E hwmon: (it87) Convert to use new hwmon API hwmon: (it87) Use single group and is_visible for miscellaneous attributes hwmon: (it87) Use is_visible for pwm attributes hwmon: (it87) Use is_visible for fan attributes hwmon: (it87) Use is_visible for temperature sensors hwmon: (it87) Use is_visible for voltage sensors hwmon: (it87) Rearrange code to avoid forward declarations hwmon: (it87) Add support for second Super-IO chip ... commit 1cc3880a3c99f1be73f9024bd9db6248ffdcec70 Merge: 490e142 3f37a36 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 18:44:39 2016 -0700 Merge tag 'edac_for_4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp Pull EDAC updates from Borislav Petkov: "It was pretty busy in EDAC land this time: - Altera Arria10 L2 cache and On-Chip RAM ECC handling (Thor Thayer) - Remove ad-hoc buffering of MCE records in sb_edac and i7core_edac (Tony Luck) - Do not register sb_edac with pci_register_driver() (Tony Luck) - Add support for Skylake to ie31200_edac (Jason Baron) - Do not register amd64_edac with pci_register_driver() (Borislav Petkov) ... plus the usual round of cleanups and fixes all over the place" * tag 'edac_for_4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (25 commits) EDAC, amd64_edac: Drop pci_register_driver() use EDAC, ie31200_edac: Add Skylake support EDAC, sb_edac: Use cpu family/model in driver detection EDAC, i7core: Remove double buffering of error records EDAC, amd64_edac: Issue driver banner only on success ARM: socfpga: Initialize Arria10 OCRAM ECC on startup EDAC: Increment correct counter in edac_inc_ue_error() EDAC, sb_edac: Remove double buffering of error records EDAC: Fix used after kfree() error in edac_unregister_sysfs() EDAC, altera: Avoid unused function warnings EDAC, altera: Remove useless casts ARM: socfpga: Enable Arria10 OCRAM ECC on startup EDAC, altera: Add Arria10 OCRAM ECC support Documentation: dt: socfpga: Add Altera Arria10 OCRAM binding EDAC, altera: Make OCRAM ECC dependency check generic EDAC, altera: Add register offset for ECC Enable EDAC, altera: Extract error inject operations to a struct fops ARM: socfpga: Enable Arria10 L2 cache ECC on startup EDAC, altera: Add Arria10 L2 Cache ECC handling Documentation, dt, socfpga: Add Altera Arria10 L2 cache binding ... commit 490e142209da64243577a997b6d2ed050684ef7b Merge: b6ae405 80d6737 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 18:37:06 2016 -0700 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds Pull LED updates from Jacek Anaszewski: "In this merge cycle we had an interaction with MTD subsystem, that included converting drivers/mtd/nand/nand_base.c to use newly introduced MTD (NAND/NOR) LED trigger instead of implementing it on its own. Related MTD patches are intended to be merged through the LED tree, before MTD tree is merged, since further MTD development is based on those modifications. Summary: LEDs: - Introduce a kernel panic LED trigger - Introduce a MTD (NAND/NOR) trigger - led-tca6507: silence an uninitialized variable warning - ledtrig-ide-disk: Move ide_blink_delay to ledtrig_ide_activity() - leds-ss4200: Add depend on x86 arch - leds-ss4200: add DMI data for FSC SCALEO Home Server - leds-triggers: Allow to switch the trigger to "panic" on a kernel panic - devicetree: leds: Introduce "panic-indicator" optional property - leds-gpio: Support the "panic-indicator" firmware property MTD: - Uninline mtd_write_oob and move it to mtdcore.c - Remove the "nand-disk" LED trigger - Hook I/O activity to the MTD LED trigger" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: gpio: Support the "panic-indicator" firmware property devicetree: leds: Introduce "panic-indicator" optional property leds: triggers: Allow to switch the trigger to "panic" on a kernel panic leds: ss4200: add DMI data for FSC SCALEO Home Server leds: ss4200: Add depend on x86 arch leds: ledtrig-ide-disk: Move ide_blink_delay to ledtrig_ide_activity() leds: tca6507: silence an uninitialized variable warning mtd: Hook I/O activity to the MTD LED trigger mtd: nand: Remove the "nand-disk" LED trigger leds: trigger: Introduce a MTD (NAND/NOR) trigger mtd: Uninline mtd_write_oob and move it to mtdcore.c leds: trigger: Introduce a kernel panic LED trigger commit 70f95b76f155153a2a51a9a4568b9bcd4e573f5c Author: Corey Minyard <cminyard@mvista.com> Date: Fri May 6 12:57:13 2016 -0500 ipmi: Fix the I2C address extraction from SPMI tables Unlike everywhere else in the IPMI specification, the I2C address specified in the SPMI table is not shifted to the left one bit with the LSB zero. Instead it is not shifted with the MSB zero. Reported-by: Sanjeev <singhsan@codeaurora.org> Signed-off-by: Corey Minyard <cminyard@mvista.com> drivers/char/ipmi/ipmi_ssif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57a38f1340eb2b036dbc4ec34f4a14603e5dd47c Author: Corey Minyard <cminyard@mvista.com> Date: Tue Apr 26 22:25:12 2016 -0500 IPMI: reserve memio regions separately Commit d61a3ead2680 ("[PATCH] IPMI: reserve I/O ports separately") changed the way I/O ports were reserved and includes this comment in log: Some BIOSes reserve disjoint I/O regions in their ACPI tables for the IPMI controller. This causes problems when trying to register the entire I/O region. Therefore we must register each I/O port separately. There is a similar problem with memio regions on an arm64 platform (AMD Seattle). Where I see: ipmi message handler version 39.2 ipmi_si AMDI0300:00: probing via device tree ipmi_si AMDI0300:00: ipmi_si: probing via ACPI ipmi_si AMDI0300:00: [mem 0xe0010000] regsize 1 spacing 4 irq 23 ipmi_si: Adding ACPI-specified kcs state machine IPMI System Interface driver. ipmi_si: Trying ACPI-specified kcs state machine at mem \ address 0xe0010000, slave address 0x0, irq 23 ipmi_si: Could not set up I/O space The problem is that the ACPI core registers disjoint regions for the platform device: e0010000-e0010000 : AMDI0300:00 e0010004-e0010004 : AMDI0300:00 and the ipmi_si driver tries to register one region e0010000-e0010004. Based on a patch from Mark Salter <msalter@redhat.com>, who also wrote all the above text. Signed-off-by: Corey Minyard <cminyard@mvista.com> Tested-by: Mark Salter <msalter@redhat.com> drivers/char/ipmi/ipmi_si_intf.c | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-) commit 76824852a941375aad640b35025dac75d077113a Author: Corey Minyard <cminyard@mvista.com> Date: Tue Apr 26 22:40:15 2016 -0500 ipmi: Fix some minor coding style issues Signed-off-by: Corey Minyard <cminyard@mvista.com> drivers/char/ipmi/ipmi_si_intf.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) commit b6ae4055f4ab55c05df31cc1b6a7ea8c85eb525d Merge: be09201 4ba2578 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 17:39:29 2016 -0700 Merge tag 'arm64-perf' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 perf updates from Will Deacon: "The main addition here is support for Broadcom's Vulcan core using the architected ID registers for discovering supported events. - Support for the PMU in Broadcom's Vulcan CPU - Dynamic event detection using the PMCEIDn_EL0 ID registers" * tag 'arm64-perf' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: arm64: perf: don't expose CHAIN event in sysfs arm64/perf: Add Broadcom Vulcan PMU support arm64/perf: Filter common events based on PMCEIDn_EL0 arm64/perf: Access pmu register using <read/write>_sys_reg arm64/perf: Define complete ARMv8 recommended implementation defined events arm64/perf: Changed events naming as per the ARM ARM arm64: dts: Add Broadcom Vulcan PMU in dts Documentation: arm64: pmu: Add Broadcom Vulcan PMU binding commit 23ea5967d6bd30ed59480edbc5fe21eec81682a3 Merge: c52c545 d96caf8 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Mon May 16 17:25:08 2016 -0700 Merge branch 'next' into for-linus Prepare first round of input updates for 4.7 merge window. commit be092017b6ffbd013f481f915632db6aa9fc3ca3 Merge: fb6363e e6d9a52 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 17:17:24 2016 -0700 Merge tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull arm64 updates from Will Deacon: - virt_to_page/page_address optimisations - support for NUMA systems described using device-tree - support for hibernate/suspend-to-disk - proper support for maxcpus= command line parameter - detection and graceful handling of AArch64-only CPUs - miscellaneous cleanups and non-critical fixes * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (92 commits) arm64: do not enforce strict 16 byte alignment to stack pointer arm64: kernel: Fix incorrect brk randomization arm64: cpuinfo: Missing NULL terminator in compat_hwcap_str arm64: secondary_start_kernel: Remove unnecessary barrier arm64: Ensure pmd_present() returns false after pmd_mknotpresent() arm64: Replace hard-coded values in the pmd/pud_bad() macros arm64: Implement pmdp_set_access_flags() for hardware AF/DBM arm64: Fix typo in the pmdp_huge_get_and_clear() definition arm64: mm: remove unnecessary EXPORT_SYMBOL_GPL arm64: always use STRICT_MM_TYPECHECKS arm64: kvm: Fix kvm teardown for systems using the extended idmap arm64: kaslr: increase randomization granularity arm64: kconfig: drop CONFIG_RTC_LIB dependency arm64: make ARCH_SUPPORTS_DEBUG_PAGEALLOC depend on !HIBERNATION arm64: hibernate: Refuse to hibernate if the boot cpu is offline arm64: kernel: Add support for hibernate/suspend-to-disk PM / Hibernate: Call flush_icache_range() on pages restored in-place arm64: Add new asm macro copy_page arm64: Promote KERNEL_START/KERNEL_END definitions to a header file arm64: kernel: Include _AC definition in page.h ... commit 02fbd139759feb1f331cebd858523b5d774082e6 Author: Jan Kara <jack@suse.cz> Date: Wed May 11 11:58:48 2016 +0200 dax: Remove complete_unwritten argument Fault handlers currently take complete_unwritten argument to convert unwritten extents after PTEs are updated. However no filesystem uses this anymore as the code is racy. Remove the unused argument. Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/block_dev.c | 4 ++-- fs/dax.c | 43 +++++++++---------------------------------- fs/ext2/file.c | 4 ++-- fs/ext4/file.c | 4 ++-- fs/xfs/xfs_file.c | 7 +++---- include/linux/dax.h | 17 +++++++---------- include/linux/fs.h | 1 - 7 files changed, 25 insertions(+), 55 deletions(-) commit e4b2749158631e6d74bf14d2ef3804d780e2f770 Author: NeilBrown <neilb@suse.com> Date: Wed May 11 11:58:47 2016 +0200 DAX: move RADIX_DAX_ definitions to dax.c These don't belong in radix-tree.c any more than PAGECACHE_TAG_* do. Let's try to maintain the idea that radix-tree simply implements an abstract data type. Acked-by: Ross Zwisler <ross.zwisler@linux.intel.com> Reviewed-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> fs/dax.c | 9 +++++++++ include/linux/radix-tree.h | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) commit fb6363e9f4eeb37323feb8253b93854195942b8b Merge: ce6a01c 9a64627 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 16:56:42 2016 -0700 Merge tag 'm68k-for-v4.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k Pull m68k updates from Geert Uytterhoeven: "Preparatory work for Arnd's genrtc removal series" * tag 'm68k-for-v4.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k: m68k/mvme16x: Include generic <linux/rtc.h> m68k/bvme6000: Include generic <linux/rtc.h> commit 5eee87cd51df8492d7e61c2d8b5154a15a4888b2 Author: Alexander Duyck <aduyck@mirantis.com> Date: Wed May 11 13:23:34 2016 -0700 ixgbe: Fix VLAN features error It looks like at some point I somehow transposed the location of setting the VLAN features in netdev->features and the configuration of the vlan_features. As a result the driver is now generating a warning about vlan_features being setup incorrectly. This patch corrects that by placing the update of netdev->features to include the VLAN features so that it is after the point where we write netdev->features into netdev->vlan_features. Fixes: b83e30104bd9 ("ixgbe/ixgbevf: Add support for GSO partial") Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit ce6a01c2d50e1d400cb6d492841f9b1932034fc2 Merge: bc231d9 096a8b6 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 16:50:38 2016 -0700 Merge tag 'metag-for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag Pull metag architecture updates from James Hogan: "Three minor fixes: - removal of stale comment - fix build for Meta1 when perf events are enabled - fix inline asm constraint in atomics" * tag 'metag-for-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/metag: metag: Fix atomic_*_return inline asm constraints metag: perf: fix build on Meta1 metag: ftrace: remove the misleading comment for ftrace_dyn_arch_init commit 11f2b494bc07f3d054687159ad6b1f3ec12a9040 Author: Emil Tantilov <emil.s.tantilov@intel.com> Date: Wed May 4 15:01:27 2016 -0700 ixgbe: use correct mask when enabling sriov Swap the parameters in GENMASK in order to generate the correct mask. This change fixes Tx hangs when enabling SRIOV. Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit bc231d9ede99518b67a77544d9084f15b898fe2e Merge: 62a0027 3cd0b53 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 16:46:03 2016 -0700 Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 platform updates from Ingo Molnar: "The main change is the addition of SGI/UV4 support" * 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits) x86/platform/UV: Fix incorrect nodes and pnodes for cpuless and memoryless nodes x86/platform/UV: Remove Obsolete GRU MMR address translation x86/platform/UV: Update physical address conversions for UV4 x86/platform/UV: Build GAM reference tables x86/platform/UV: Support UV4 socket address changes x86/platform/UV: Add obtaining GAM Range Table from UV BIOS x86/platform/UV: Add UV4 addressing discovery function x86/platform/UV: Fold blade info into per node hub info structs x86/platform/UV: Allocate common per node hub info structs on local node x86/platform/UV: Move blade local processor ID to the per cpu info struct x86/platform/UV: Move scir info to the per cpu info struct x86/platform/UV: Create per cpu info structs to replace per hub info structs x86/platform/UV: Update MMIOH setup function to work for both UV3 and UV4 x86/platform/UV: Clean up redunduncies after merge of UV4 MMR definitions x86/platform/UV: Add UV4 Specific MMR definitions x86/platform/UV: Prep for UV4 MMR updates x86/platform/UV: Add UV MMR Illegal Access Function x86/platform/UV: Add UV4 Specific Defines x86/platform/UV: Add UV Architecture Defines x86/platform/UV: Add Initial UV4 definitions ... commit 1eef33bec12d7e46a58f12b3604556a80c362a0d Author: Alessio Igor Bogani <alessio.bogani@elettra.eu> Date: Tue May 3 14:31:18 2016 +0200 powerpc/86xx: Fix PCI interrupt map definition Fix PCI interrupt map definition from 2 to 4 cells. Move interrupt-map and interrupt-map-mask and clone interrupts into the pcie child nodes. Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> Signed-off-by: Scott Wood <oss@buserror.net> arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) commit 62a0027839a4a69bc5d2696672242019a6bb6221 Merge: bcea36d 8fad7ec Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 16:45:03 2016 -0700 Merge branch 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 debug cleanup from Ingo Molnar: "A printk() output simplification" * 'x86-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/dumpstack: Combine some printk()s commit bcea36df7ae4b0db0b6e5e6dd3e5efe03410f5da Merge: 05e30f0 a3819e3 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 16:40:14 2016 -0700 Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 cleanup from Ingo Molnar: "Inline optimizations" * 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Fix non-static inlines commit a66639d4eec5e03bdc5d9a312b7eebd3827a4d14 Author: Alessio Igor Bogani <alessio.bogani@elettra.eu> Date: Wed Apr 20 10:18:29 2016 +0200 powerpc/86xx: Move pci1 definition to the include file Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> Signed-off-by: Scott Wood <oss@buserror.net> arch/powerpc/boot/dts/fsl/gef_ppc9a.dts | 4 ++++ arch/powerpc/boot/dts/fsl/gef_sbc310.dts | 22 --------------------- arch/powerpc/boot/dts/fsl/gef_sbc610.dts | 4 ++++ arch/powerpc/boot/dts/fsl/mpc8641_hpcn.dts | 24 +---------------------- arch/powerpc/boot/dts/fsl/mpc8641_hpcn_36b.dts | 24 +---------------------- arch/powerpc/boot/dts/fsl/mpc8641si-post.dtsi | 27 ++++++++++++++++++++++++++ arch/powerpc/boot/dts/fsl/mpc8641si-pre.dtsi | 1 + arch/powerpc/boot/dts/fsl/sbc8641d.dts | 23 ---------------------- 8 files changed, 38 insertions(+), 91 deletions(-) commit 05e30f01b70e5f75f3c3a62010c0f059826da565 Merge: 9a45f03 7a09b225f Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 16:27:53 2016 -0700 Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86-64 defconfig update from Ingo Molnar: "Small defconfig addition" [ I'm not actually convinced our defconfig is sensible, but whatever ] * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/build/defconfig/64: Enable CONFIG_E1000E=y commit 4680c9d50637f78338e786c920aef6c171c7cc00 Author: Alessio Igor Bogani <alessio.bogani@elettra.eu> Date: Mon Apr 18 08:36:19 2016 +0200 powerpc/fsl: Fix build of the dtb embedded kernel images Commit dc37374b9c833 ("powerpc/fsl: Move Freescale device tree files into fsl folder") moved a lot of device tree files into fsl directory, fixing Makefile for cuImage target only. Unfortunately there are other targets which require embedding a device tree into the kernel image (e.g. dtbImage.%). So use a more generic approach. Signed-off-by: Alessio Igor Bogani <alessio.bogani@elettra.eu> [scottwood: cleaned up commit message] Signed-off-by: Scott Wood <oss@buserror.net> arch/powerpc/boot/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d2d79dcc661d6a5b70597ab982e09d7752d66101 Author: Chenhui Zhao <chenhui.zhao@nxp.com> Date: Fri Apr 15 18:47:46 2016 +0800 powerpc/fsl: Fix rcpm compatible string For T1040, T1042, T1023, and T1024, they should use the compatible string "fsl,qoriq-rcpm-2.1". Signed-off-by: Chenhui Zhao <chenhui.zhao@nxp.com> Signed-off-by: Scott Wood <oss@buserror.net> arch/powerpc/boot/dts/fsl/t1023si-post.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t1040si-post.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9a45f036af363aec1efec08827c825d69c115a9a Merge: 168f1a7 d2d3462 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 15:54:01 2016 -0700 Merge branch 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 boot updates from Ingo Molnar: "The biggest changes in this cycle were: - prepare for more KASLR related changes, by restructuring, cleaning up and fixing the existing boot code. (Kees Cook, Baoquan He, Yinghai Lu) - simplifly/concentrate subarch handling code, eliminate paravirt_enabled() usage. (Luis R Rodriguez)" * 'x86-boot-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (50 commits) x86/KASLR: Clarify purpose of each get_random_long() x86/KASLR: Add virtual address choosing function x86/KASLR: Return earliest overlap when avoiding regions x86/KASLR: Add 'struct slot_area' to manage random_addr slots x86/boot: Add missing file header comments x86/KASLR: Initialize mapping_info every time x86/boot: Comment what finalize_identity_maps() does x86/KASLR: Build identity mappings on demand x86/boot: Split out kernel_ident_mapping_init() x86/boot: Clean up indenting for asm/boot.h x86/KASLR: Improve comments around the mem_avoid[] logic x86/boot: Simplify pointer casting in choose_random_location() x86/KASLR: Consolidate mem_avoid[] entries x86/boot: Clean up pointer casting x86/boot: Warn on future overlapping memcpy() use x86/boot: Extract error reporting functions x86/boot: Correctly bounds-check relocations x86/KASLR: Clean up unused code from old 'run_size' and rename it to 'kernel_total_size' x86/boot: Fix "run_size" calculation x86/boot: Calculate decompression size during boot not build ... commit ed8fd100b494b95118097ddfcc3f8c112a9a04f0 Author: Scott Wood <oss@buserror.net> Date: Tue Mar 8 17:30:36 2016 -0600 powerpc/fsl: Remove FSL_SOC dependency from FSL_LBC This dependency led to kconfig errors when MTD_NAND_FSL_ELBC was enabled, which selects FSL_LBC, in the absence of FSL_SOC, as reported in http://patchwork.ozlabs.org/patch/564405/ It was originally suggested to add an FSL_SOC dependency to MTD_NAND_FSL_ELBC, but the FSL_SOC symbol has been a growing problem due to hardware being shared between PPC and ARM SoCs. Even though eLBC isn't found on ARM SoCs (the newer IFC is used instead), I don't want to expand the use of FSL_SOC for things other than functions exported by fsl_soc.c. In particular, it would be odd to add it to MTD_NAND_FSL_ELBC and then remove it from MTD_NAND_FSL_IFC. Removing artificial dependencies also helps get compile-test exposure via randconfig, allyesconfig, etc. Reported-by: Brian Norris <computersforpeace@gmail.com> Cc: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Scott Wood <oss@buserror.net> arch/powerpc/Kconfig | 1 - 1 file changed, 1 deletion(-) commit 10aa97c379cdd1e9f537a00ef2d787989759269d Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Mon May 16 10:33:40 2016 -0700 f2fs: manipulate dirty file inodes when DATA_FLUSH is set It needs to maintain dirty file inodes only if DATA_FLUSH is set. Otherwise, let's avoid its overhead. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/checkpoint.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) commit 087968974fcd9e8c910bba73f3393a49b7380ca6 Author: Sheng Yong <shengyong1@huawei.com> Date: Mon May 16 12:38:50 2016 +0800 f2fs: add fault injection to sysfs This patch introduces a new struct f2fs_fault_info and a global f2fs_fault to save fault injection status. Fault injection entries are created in /sys/fs/f2fs/fault_injection/ during initializing f2fs module. Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/f2fs.h | 31 ++++++++++++++++++++----- fs/f2fs/super.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 91 insertions(+), 10 deletions(-) commit b951a4ec165af4973b2bd9c80fb5845fbd840435 Author: Yunlei He <heyunlei@huawei.com> Date: Fri May 13 14:57:43 2016 +0800 f2fs: no need inc dirty pages under inode lock No need inc dirty pages under inode lock Signed-off-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8975bdf48220cca703ad4586528e04b76b40ea1c Author: Chao Yu <yuchao0@huawei.com> Date: Sat May 14 19:03:53 2016 +0800 f2fs: fix incorrect error path handling in f2fs_move_rehashed_dirents Fix two bugs in error path of f2fs_move_rehashed_dirents: - release dir's inode page if fail to call kmalloc - recover i_current_depth if fail to converting Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/inline.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit e4103849ba784368e802eec4f15832ac54eb7d39 Author: Chao Yu <yuchao0@huawei.com> Date: Sat May 14 19:03:52 2016 +0800 f2fs: fix i_current_depth during inline dentry conversion With below steps, we will see that dentry page becoming unaccessable later. This is because we forget updating i_current_depth in inode during inline dentry conversion, after that, once we failed at somewhere, it will leave i_current_depth as 0 in non-inline directory. Then, during ->lookup, the current_depth value makes all dentry pages in first level invisible. Fix it. 1) mount f2fs with inline_dentry option 2) mkdir dir 3) touch 180 files named [0-179] in dir 4) touch 180 in dir (fail after inline dir conversion) 5) ll dir ls: cannot access /mnt/f2fs/dir/0: No such file or directory ls: cannot access /mnt/f2fs/dir/1: No such file or directory ls: cannot access /mnt/f2fs/dir/2: No such file or directory ls: cannot access /mnt/f2fs/dir/3: No such file or directory ls: cannot access /mnt/f2fs/dir/4: No such file or directory drwxr-xr-x 2 root root 4096 may 13 21:47 ./ drwxr-xr-x 3 root root 4096 may 13 21:46 ../ -????????? ? ? ? ? ? 0 -????????? ? ? ? ? ? 1 -????????? ? ? ? ? ? 10 -????????? ? ? ? ? ? 100 -????????? ? ? ? ? ? 101 -????????? ? ? ? ? ? 102 Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/inline.c | 1 + 1 file changed, 1 insertion(+) commit 99e3e858a486ccef93da0d4b67a71ed1c171b2fe Author: Sheng Yong <shengyong1@huawei.com> Date: Wed May 11 17:08:14 2016 +0800 f2fs: correct return value type of f2fs_fill_super Signed-off-by: Sheng Yong <shengyong1@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/super.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 168f1a7163b37294a0ef33829e1ed54d41e33c42 Merge: 825a3b2 4afd056 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 15:15:17 2016 -0700 Merge branch 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 asm updates from Ingo Molnar: "The main changes in this cycle were: - MSR access API fixes and enhancements (Andy Lutomirski) - early exception handling improvements (Andy Lutomirski) - user-space FS/GS prctl usage fixes and improvements (Andy Lutomirski) - Remove the cpu_has_*() APIs and replace them with equivalents (Borislav Petkov) - task switch micro-optimization (Brian Gerst) - 32-bit entry code simplification (Denys Vlasenko) - enhance PAT handling in enumated CPUs (Toshi Kani) ... and lots of other cleanups/fixlets" * 'x86-asm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (70 commits) x86/arch_prctl/64: Restore accidentally removed put_cpu() in ARCH_SET_GS x86/entry/32: Remove asmlinkage_protect() x86/entry/32: Remove GET_THREAD_INFO() from entry code x86/entry, sched/x86: Don't save/restore EFLAGS on task switch x86/asm/entry/32: Simplify pushes of zeroed pt_regs->REGs selftests/x86/ldt_gdt: Test set_thread_area() deletion of an active segment x86/tls: Synchronize segment registers in set_thread_area() x86/asm/64: Rename thread_struct's fs and gs to fsbase and gsbase x86/arch_prctl/64: Remove FSBASE/GSBASE < 4G optimization x86/segments/64: When load_gs_index fails, clear the base x86/segments/64: When loadsegment(fs, ...) fails, clear the base x86/asm: Make asm/alternative.h safe from assembly x86/asm: Stop depending on ptrace.h in alternative.h x86/entry: Rename is_{ia32,x32}_task() to in_{ia32,x32}_syscall() x86/asm: Make sure verify_cpu() has a good stack x86/extable: Add a comment about early exception handlers x86/msr: Set the return value to zero when native_rdmsr_safe() fails x86/paravirt: Make "unsafe" MSR accesses unsafe even if PARAVIRT=y x86/paravirt: Add paravirt_{read,write}_msr() x86/msr: Carry on after a non-"safe" MSR access fails ... commit 825a3b2605c3aa193e0075d0f9c72e33c17ab16a Merge: cf6ed9a ef0491e Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 14:47:16 2016 -0700 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler updates from Ingo Molnar: - massive CPU hotplug rework (Thomas Gleixner) - improve migration fairness (Peter Zijlstra) - CPU load calculation updates/cleanups (Yuyang Du) - cpufreq updates (Steve Muckle) - nohz optimizations (Frederic Weisbecker) - switch_mm() micro-optimization on x86 (Andy Lutomirski) - ... lots of other enhancements, fixes and cleanups. * 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (66 commits) ARM: Hide finish_arch_post_lock_switch() from modules sched/core: Provide a tsk_nr_cpus_allowed() helper sched/core: Use tsk_cpus_allowed() instead of accessing ->cpus_allowed sched/loadavg: Fix loadavg artifacts on fully idle and on fully loaded systems sched/fair: Correct unit of load_above_capacity sched/fair: Clean up scale confusion sched/nohz: Fix affine unpinned timers mess sched/fair: Fix fairness issue on migration sched/core: Kill sched_class::task_waking to clean up the migration logic sched/fair: Prepare to fix fairness problems on migration sched/fair: Move record_wakee() sched/core: Fix comment typo in wake_q_add() sched/core: Remove unused variable sched: Make hrtick_notifier an explicit call sched/fair: Make ilb_notifier an explicit call sched/hotplug: Make activate() the last hotplug step sched/hotplug: Move migration CPU_DYING to sched_cpu_dying() sched/migration: Move CPU_ONLINE into scheduler state sched/migration: Move calc_load_migrate() into CPU_DYING sched/migration: Move prepare transition to SCHED_STARTING state ... commit cf6ed9a6682d3f171cf9550d4bbe0ef31b768a7e Merge: 36db171 754a923 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 14:24:51 2016 -0700 Merge branch 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RAS updates from Ingo Molnar: "Main changes in this cycle were: - AMD MCE/RAS handling updates (Yazen Ghannam, Aravind Gopalakrishnan) - Cleanups (Borislav Petkov) - logging fix (Tony Luck)" * 'ras-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/RAS: Add SMCA support to AMD Error Injector EDAC, mce_amd: Detect SMCA using X86_FEATURE_SMCA x86/mce: Update AMD mcheck init to use cpu_has() facilities x86/cpu: Add detection of AMD RAS Capabilities x86/mce/AMD: Save an indentation level in prepare_threshold_block() x86/mce/AMD: Disable LogDeferredInMcaStat for SMCA systems x86/mce/AMD: Log Deferred Errors using SMCA MCA_DE{STAT,ADDR} registers x86/mce: Detect local MCEs properly x86/mce: Look in genpool instead of mcelog for pending error records x86/mce: Detect and use SMCA-specific msr_ops x86/mce: Define vendor-specific MSR accessors x86/mce: Carve out writes to MCx_STATUS and MCx_CTL x86/mce: Grade uncorrected errors for SMCA-enabled systems x86/mce: Log MCEs after a warm rest on AMD, Fam17h and later x86/mce: Remove explicit smp_rmb() when starting CPUs sync x86/RAS: Rename AMD MCE injector config item commit 36db171cc733bc7b8c628ef21831467d1919decd Merge: 3469d26 3f56e68 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 14:08:43 2016 -0700 Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf updates from Ingo Molnar: "Bigger kernel side changes: - Add backwards writing capability to the perf ring-buffer code, which is preparation for future advanced features like robust 'overwrite support' and snapshot mode. (Wang Nan) - Add pause and resume ioctls for the perf ringbuffer (Wang Nan) - x86 Intel cstate code cleanups and reorgnization (Thomas Gleixner) - x86 Intel uncore and CPU PMU driver updates (Kan Liang, Peter Zijlstra) - x86 AUX (Intel PT) related enhancements and updates (Alexander Shishkin) - x86 MSR PMU driver enhancements and updates (Huang Rui) - ... and lots of other changes spread out over 40+ commits. Biggest tooling side changes: - 'perf trace' features and enhancements. (Arnaldo Carvalho de Melo) - BPF tooling updates (Wang Nan) - 'perf sched' updates (Jiri Olsa) - 'perf probe' updates (Masami Hiramatsu) - ... plus 200+ other enhancements, fixes and cleanups to tools/ The merge commits, the shortlog and the changelogs contain a lot more details" * 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (249 commits) perf/core: Disable the event on a truncated AUX record perf/x86/intel/pt: Generate PMI in the STOP region as well perf buildid-cache: Use lsdir() for looking up buildid caches perf symbols: Use lsdir() for the search in kcore cache directory perf tools: Use SBUILD_ID_SIZE where applicable perf tools: Fix lsdir to set errno correctly perf trace: Move seccomp args beautifiers to tools/perf/trace/beauty/ perf trace: Move flock op beautifier to tools/perf/trace/beauty/ perf build: Add build-test for debug-frame on arm/arm64 perf build: Add build-test for libunwind cross-platforms support perf script: Fix export of callchains with recursion in db-export perf script: Fix callchain addresses in db-export perf script: Fix symbol insertion behavior in db-export perf symbols: Add dso__insert_symbol function perf scripting python: Use Py_FatalError instead of die() perf tools: Remove xrealloc and ALLOC_GROW perf help: Do not use ALLOC_GROW in add_cmd_list perf pmu: Make pmu_formats_string to check return value of strbuf perf header: Make topology checkers to check return value of strbuf perf tools: Make alias handler to check return value of strbuf ... commit 99ee87295017e36abb6925e6139ca303cb55aee7 Merge: 76e9cab 9ecb549 Author: Dave Airlie <airlied@redhat.com> Date: Tue May 17 07:06:14 2016 +1000 Merge tag 'topic/drm-misc-2016-05-13' of git://anongit.freedesktop.org/drm-intel into drm-next I kinda hoped that I could still sneak in Noralf's drm_simple_display_pipe, since there's intereset by others now (for tilcdc at least). But it wasn't ready by a hair. Oh well. Otherwise random stuff plus prep patches from Noralf. * tag 'topic/drm-misc-2016-05-13' of git://anongit.freedesktop.org/drm-intel: drm/atomic: Add drm_atomic_helper_best_encoder() drm/atomic: Don't skip drm_bridge_*() calls if !drm_encoder_helper_funcs drm/fb-cma-helper: Hook up to DocBook and fix some docs drm/fb-helper: Remove mention of CONFIG_FB_DEFERRED_IO in docs drm/sti: include linux/seq_file.h where needed drm/tegra: Use lockless gem BO free callback drm/exynos: Use lockless gem BO free callback drm: Make drm_encoder_helper_funcs optional commit ad67b437f187ea818b2860524d10f878fadfdd99 Author: Prarit Bhargava <prarit@redhat.com> Date: Wed May 11 12:27:16 2016 -0400 PCI: Disable all BAR sizing for devices with non-compliant BARs b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with non-compliant BARs") disabled BAR sizing for BARs 0-5 of devices that don't comply with the PCI spec. But it didn't do anything for expansion ROM BARs, so we still try to size them, resulting in warnings like this on Broadwell-EP: pci 0000:ff:12.0: BAR 6: failed to assign [mem size 0x00000001 pref] Move the non-compliant BAR check from __pci_read_base() up to pci_read_bases() so it applies to the expansion ROM BAR as well as to BARs 0-5. Note that direct callers of __pci_read_base(), like sriov_init(), will now bypass this check. We haven't had reports of devices with broken SR-IOV BARs yet. [bhelgaas: changelog] Fixes: b84106b4e229 ("PCI: Disable IO/MEM decoding for devices with non-compliant BARs") Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: stable@vger.kernel.org CC: Thomas Gleixner <tglx@linutronix.de> CC: Ingo Molnar <mingo@redhat.com> CC: "H. Peter Anvin" <hpa@zytor.com> CC: Andi Kleen <ak@linux.intel.com> drivers/pci/probe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit da77b67195de1c65bef4908fa29967c4d0af2da2 Author: Prarit Bhargava <prarit@redhat.com> Date: Wed May 11 12:27:15 2016 -0400 x86/PCI: Mark Broadwell-EP Home Agent 1 as having non-compliant BARs Commit b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs") marked Home Agent 0 & PCU has having non-compliant BARs. Home Agent 1 also has non-compliant BARs. Mark Home Agent 1 as having non-compliant BARs so the PCI core doesn't touch them. The problem with these devices is documented in the Xeon v4 specification update: BDF2 PCI BARs in the Home Agent Will Return Non-Zero Values During Enumeration Problem: During system initialization the Operating System may access the standard PCI BARs (Base Address Registers). Due to this erratum, accesses to the Home Agent BAR registers (Bus 1; Device 18; Function 0,4; Offsets (0x14-0x24) will return non-zero values. Implication: The operating system may issue a warning. Intel has not observed any functional failures due to this erratum. Link: http://www.intel.com/content/www/us/en/processors/xeon/xeon-e5-v4-spec-update.html Fixes: b894157145e4 ("x86/PCI: Mark Broadwell-EP Home Agent & PCU as having non-compliant BARs") Signed-off-by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Thomas Gleixner <tglx@linutronix.de> CC: Ingo Molnar <mingo@redhat.com> CC: "H. Peter Anvin" <hpa@zytor.com> CC: Andi Kleen <ak@linux.intel.com> arch/x86/pci/fixup.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 3469d261eac65912927dca13ee8f77c744ad7aa2 Merge: 1c19b68 4544ba8 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 13:41:02 2016 -0700 Merge branch 'locking-rwsem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull support for killable rwsems from Ingo Molnar: "This, by Michal Hocko, implements down_write_killable(). The main usecase will be to update mm_sem usage sites to use this new API, to allow the mm-reaper introduced in commit aac453635549 ("mm, oom: introduce oom reaper") to tear down oom victim address spaces asynchronously with minimum latencies and without deadlock worries" [ The vfs will want it too as the inode lock is changed from a mutex to a rwsem due to the parallel lookup and readdir updates ] * 'locking-rwsem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/rwsem: Fix comment on register clobbering locking/rwsem: Fix down_write_killable() locking/rwsem, x86: Add frame annotation for call_rwsem_down_write_failed_killable() locking/rwsem: Provide down_write_killable() locking/rwsem, x86: Provide __down_write_killable() locking/rwsem, s390: Provide __down_write_killable() locking/rwsem, ia64: Provide __down_write_killable() locking/rwsem, alpha: Provide __down_write_killable() locking/rwsem: Introduce basis for down_write_killable() locking/rwsem, sparc: Drop superfluous arch specific implementation locking/rwsem, sh: Drop superfluous arch specific implementation locking/rwsem, xtensa: Drop superfluous arch specific implementation locking/rwsem: Drop explicit memory barriers locking/rwsem: Get rid of __down_write_nested() commit 76e9cab5403809fa1fa6f698d2f7c1b7dd224022 Merge: cf15fab cb2ad5e Author: Dave Airlie <airlied@redhat.com> Date: Tue May 17 06:36:08 2016 +1000 Merge branch 'topic-arcpgu-updates' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux into drm-next Please pull this mini-series that allows ARC PGU to use dedicated memory location as framebuffer backing storage. * 'topic-arcpgu-updates' of https://github.com/foss-for-synopsys-dwc-arc-processors/linux: ARC: [axs10x] Specify reserved memory for frame buffer drm/arcpgu: use dedicated memory area for frame buffer commit 1c19b68a279c58d6da4379bf8b6d679a300a1daf Merge: 49817c3 a1cc5bc Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 13:17:56 2016 -0700 Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull locking changes from Ingo Molnar: "The main changes in this cycle were: - pvqspinlock statistics fixes (Davidlohr Bueso) - flip atomic_fetch_or() arguments (Peter Zijlstra) - locktorture simplification (Paul E. McKenney) - documentation updates (SeongJae Park, David Howells, Davidlohr Bueso, Paul E McKenney, Peter Zijlstra, Will Deacon) - various fixes" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: locking/atomics: Flip atomic_fetch_or() arguments locking/pvqspinlock: Robustify init_qspinlock_stat() locking/pvqspinlock: Avoid double resetting of stats lcoking/locktorture: Simplify the torture_runnable computation locking/Documentation: Clarify that ACQUIRE applies to loads, RELEASE applies to stores locking/Documentation: State purpose of memory-barriers.txt locking/Documentation: Add disclaimer locking/Documentation/lockdep: Fix spelling mistakes locking/lockdep: Deinline register_lock_class(), save 2328 bytes locking/locktorture: Fix NULL pointer dereference for cleanup paths locking/locktorture: Fix deboosting NULL pointer dereference locking/Documentation: Mention smp_cond_acquire() locking/Documentation: Insert white spaces consistently locking/Documentation: Fix formatting inconsistencies locking/Documentation: Add missed subsection in TOC locking/Documentation: Fix missed s/lock/acquire renames locking/Documentation: Clarify relationship of barrier() to control dependencies commit 92efb1bd9bcbdf83cc0e6cfead752d0c82f63677 Author: Alex Williamson <alex.williamson@redhat.com> Date: Mon May 16 15:12:02 2016 -0500 PCI: Identify Enhanced Allocation (EA) BAR Equivalent resources in sysfs Resource flags are exposed to userspace via the sysfs "resource" file. lspci reads the sysfs file to determine resource properties. Add a "BAR Equivalent Indicator" flag so lspci can distinguish between [virtual] and [enhanced] resources. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Sean O. Stalley <sean.stalley@intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> drivers/pci/pci.c | 2 +- include/linux/ioport.h | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) commit 49817c33433a3cd6f320b13699e6746cc39b453b Merge: 230e51f 6c5450e Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 13:06:27 2016 -0700 Merge branch 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull EFI updates from Ingo Molnar: "The main changes in this cycle were: - Drop the unused EFI_SYSTEM_TABLES efi.flags bit and ensure the ARM/arm64 EFI System Table mapping is read-only (Ard Biesheuvel) - Add a comment to explain that one of the code paths in the x86/pat code is only executed for EFI boot (Matt Fleming) - Improve Secure Boot status checks on arm64 and handle unexpected errors (Linn Crosetto) - Remove the global EFI memory map variable 'memmap' as the same information is already available in efi::memmap (Matt Fleming) - Add EFI Memory Attribute table support for ARM/arm64 (Ard Biesheuvel) - Add EFI GOP framebuffer support for ARM/arm64 (Ard Biesheuvel) - Add EFI Bootloader Control driver for storing reboot(2) data in EFI variables for consumption by bootloaders (Jeremy Compostella) - Add Core EFI capsule support (Matt Fleming) - Add EFI capsule char driver (Kweh, Hock Leong) - Unify EFI memory map code for ARM and arm64 (Ard Biesheuvel) - Add generic EFI support for detecting when firmware corrupts CPU status register bits (like IRQ flags) when performing EFI runtime service calls (Mark Rutland) ... and other misc cleanups" * 'efi-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (46 commits) efivarfs: Make efivarfs_file_ioctl() static efi: Merge boolean flag arguments efi/capsule: Move 'capsule' to the stack in efi_capsule_supported() efibc: Fix excessive stack footprint warning efi/capsule: Make efi_capsule_pending() lockless efi: Remove unnecessary (and buggy) .memmap initialization from the Xen EFI driver efi/runtime-wrappers: Remove ARCH_EFI_IRQ_FLAGS_MASK #ifdef x86/efi: Enable runtime call flag checking arm/efi: Enable runtime call flag checking arm64/efi: Enable runtime call flag checking efi/runtime-wrappers: Detect firmware IRQ flag corruption efi/runtime-wrappers: Remove redundant #ifdefs x86/efi: Move to generic {__,}efi_call_virt() arm/efi: Move to generic {__,}efi_call_virt() arm64/efi: Move to generic {__,}efi_call_virt() efi/runtime-wrappers: Add {__,}efi_call_virt() templates efi/arm-init: Reserve rather than unmap the memory map for ARM as well efi: Add misc char driver interface to update EFI firmware x86/efi: Force EFI reboot to process pending capsules efi: Add 'capsule' update support ... commit 230e51f21101e49c8d73018d414adbd0d57459a1 Merge: a3871bd 91c6180 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 12:25:25 2016 -0700 Merge branch 'core-signals-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core signal updates from Ingo Molnar: "These updates from Stas Sergeev and Andy Lutomirski, improve the sigaltstack interface by extending its ABI with the SS_AUTODISARM feature, which makes it possible to use swapcontext() in a sighandler that works on sigaltstack. Without this flag, the subsequent signal will corrupt the state of the switched-away sighandler. The inspiration is more robust dosemu signal handling" * 'core-signals-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: signals/sigaltstack: Change SS_AUTODISARM to (1U << 31) signals/sigaltstack: Report current flag bits in sigaltstack() selftests/sigaltstack: Fix the sigaltstack test on old kernels signals/sigaltstack: If SS_AUTODISARM, bypass on_sig_stack() selftests/sigaltstack: Add new testcase for sigaltstack(SS_ONSTACK|SS_AUTODISARM) signals/sigaltstack: Implement SS_AUTODISARM flag signals/sigaltstack: Prepare to add new SS_xxx flags signals/sigaltstack, x86/signals: Unify the x86 sigaltstack check with other architectures commit a3871bd434cfc313cdcd1edc433507298f4aa928 Merge: 0052af4 41ed943 Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 12:02:08 2016 -0700 Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull RCU updates from Ingo Molnar: "The main changes are: - Documentation updates, including fixes to the design-level requirements documentation and a fixed version of the design-level data-structure documentation. These fixes include removing cartoons and getting rid of the html/htmlx duplication. - Further improvements to the new-age expedited grace periods. - Miscellaneous fixes. - Torture-test changes, including a new rcuperf module for measuring RCU grace-period performance and scalability, which is useful for the expedited-grace-period changes" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (56 commits) rcutorture: Add boot-time adjustment of leaf fanout rcutorture: Add irqs-disabled test for call_rcu() rcutorture: Dump trace buffer upon shutdown rcutorture: Don't rebuild identical kernel rcutorture: Add OS-jitter capability documentation: Add documentation for RCU's major data structures rcutorture: Convert test duration to seconds early torture: Kill qemu, not parent process torture: Clarify refusal to run more than one torture test rcutorture: Consider FROZEN hotplug notifier transitions rcutorture: Remove redundant initialization to zero rcuperf: Do not wake up shutdown wait queue if "shutdown" is false. rcutorture: Add largish-system rcuperf scenario rcutorture: Avoid RCU CPU stall warning and RT throttling rcutorture: Add rcuperf holdoff boot parameter to reduce interference rcutorture: Make scripts analyze rcuperf trace data, if present rcutorture: Make rcuperf collect expedited event-trace data rcutorture: Print measure of batching efficiency rcutorture: Set rcuperf writer kthreads to real-time priority rcutorture: Bind rcuperf reader/writer kthreads to CPUs ... commit 0052af4411b048eb6c0b0adb73d0fb4803ba1794 Merge: 0fed3ac d18d12d Author: Linus Torvalds <torvalds@linux-foundation.org> Date: Mon May 16 11:36:02 2016 -0700 Merge branch 'core-lib-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core/lib update from Ingo Molnar: "This contains a single commit that removes an unused facility that the scheduler used to make use of" * 'core-lib-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lib/proportions: Remove unused code commit 0fed3ac866eabf01924457921ee3684c8e4c9005 Author: George Spelvin <linux@horizon.com> Date: Mon May 2 06:31:01 2016 -0400 namei: Improve hash mixing if CONFIG_DCACHE_WORD_ACCESS The hash mixing between adding the next 64 bits of name was just a bit weak. Replaced with a still very fast but slightly more effective mixing function. Signed-off-by: George Spelvin <linux@horizon.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> fs/namei.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) commit 7e2c3aea4398d079745b9faa2c17b6cbd010f221 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Sun May 15 23:28:29 2016 +0200 net: also make sch_handle_egress() drop monitor ready Follow-up for 8a3a4c6e7b34 ("net: make sch_handle_ingress() drop monitor ready") to also make the egress side drop monitor ready. Also here only TC_ACT_SHOT is a clear indication that something went wrong. Hence don't provide false positives to drop monitors such as 'perf record -e skb:kfree_skb ...'. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> net/core/dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 15db6e0dc73ebdbf42c35f2f64907a5f4e154be1 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Sun May 15 19:37:44 2016 +0530 net/hsr: Use setup_timer and mod_timer. The function setup_timer combines the initialization of a timer with the initialization of the timer's function and data fields. The mulitiline code for timer initialization is now replaced with function setup_timer. Also, quoting the mod_timer() function comment: -> mod_timer() is a more efficient way to update the expire field of an active timer (if the timer is inactive it will be activated). Use setup_timer() and mod_timer() to setup and arm a timer, making the code compact and aid readablity. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/hsr/hsr_device.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) commit a2a658a303486b95d766f690672c9f706b280704 Merge: 2bb07e1 416cdf0 Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:59:20 2016 -0400 Merge branch 'qed-next' Yuval Mintz says: ==================== qed: IOV enhncements and fixups This is a follow-up on the recent patch series that adds SR-IOV support to qed. All content here is iov-related fixups [nothing terminal] and enhancements. Please consider applying this series to `net-next'. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 416cdf0635b2173e96b7a66b303e768e0749b778 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Sun May 15 14:48:09 2016 +0300 qed: VFs gracefully accept lack of PM VF's probe might log that it has no PM capability in its PCI configuration space. As this is a valid configuration, silence such prints. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 83f34bd436fefc70376efe6f6dd7ddcb5265d88b Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Sun May 15 14:48:08 2016 +0300 qed: Allow more than 16 VFs In multi-function modes, PFs are currently limited to using 16 VFs - But that limitation would also currently apply in case there's a single PCI function exposed, where no such restriction should have existed. This lifts the restriction for the default mode; User should be able to start the maximum number of VFs as appear in the PCI config space. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_sriov.c | 3 +++ 1 file changed, 3 insertions(+) commit 079d20a6739e0b4a06d73f37b8435d443897cc0c Author: Manish Chopra <Manish.Chopra@qlogic.com> Date: Sun May 15 14:48:07 2016 +0300 qed: Reset link on IOV disable PF updates its VFs' bulletin boards with link configurations whenever the physical carrier changes or whenever hyper-user explicitly requires some setting of the VFs link via the hypervisor's PF. Since the bulletin board is getting cleaned as part of the IOV disable flow on the PF side, re-enabling sriov would lead to a VF that sees the carrier as 'down', until an event causing the PF to re-fill the bulletin with the link configuration would occur. To fix this we simply refelect the link state during the flows, giving the later VFs a default reflecting the PFs link state. Signed-off-by: Manish Chopra <Manish.Chopra@qlogic.com> Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_sriov.c | 90 ++++++++++++++++------------- 1 file changed, 51 insertions(+), 39 deletions(-) commit b2b897eba66636b7fd8e56cc4f7464819623609e Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Sun May 15 14:48:06 2016 +0300 qed: Improve VF interrupt reset During FLR flow, need to make sure HW is no longer capable of writing to host memory as part of its interrupt mechanisms. While we're at it, unify the logic cleaning the driver's status-blocks into using a single API function for both PFs and VFs. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_int.c | 59 ++++++++++++++------------ drivers/net/ethernet/qlogic/qed/qed_int.h | 20 +-------- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 2 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 20 +++------ 4 files changed, 41 insertions(+), 60 deletions(-) commit b0409fa0940b59dc0c313eb424cfbc4730778ecc Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Sun May 15 14:48:05 2016 +0300 qed: Correct PF-sanity check Seems like something broke in commit 1408cc1fa48c ("qed: Introduce VFs") and the function no longer verifies that the vf is indeed a valid one. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_sriov.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 2bb07e155bb3e0c722c806723f737cf8020961ef Author: Tariq Toukan <tariqt@mellanox.com> Date: Sun May 15 10:21:26 2016 +0300 net/mlx4_core: Fix access to uninitialized index Prevent using uninitialized or negative index when handling steering entries. Fixes: b12d93d63c32 ('mlx4: Add support for promiscuous mode in the new steering model.') Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx4/mcg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2ffd7e035601268915a393ae0b7cac34c27e190e Merge: 14d7e48 72f9f8b Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:56:37 2016 -0400 Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next Johan Hedberg says: ==================== pull request: bluetooth-next 2016-05-14 Here are two more Bluetooth patches for the 4.7 kernel which we wanted to get into net-next before the merge window opens. Please let me know if there are any issues pulling. Thanks. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 14d7e48751925b4d48f0fd2317b0570fd243f6fd Merge: b0456b2 c3875ca Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:55:49 2016 -0400 Merge branch 'w5100-small-changes' Akinobu Mita says: ==================== net: w5100: collection of small changes This patch series is the collection of relatively small changes for w5100 driver which includes a cleanup with no functional change, two fixes, and adding a functionality. * Changes from v1 - Remove the watchdong_timeo assignment to set default tx timeout, suggested by David Miller. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit c3875ca7d9f9ad135debc78e211ea062ac48323c Author: Akinobu Mita <akinobu.mita@gmail.com> Date: Sat May 14 14:55:50 2016 +0900 net: w5100-spi: add support to specify MAC address by device tree This adds support to specify the MAC address by 'mac-address' or 'local-mac-address' properties in the device tree. These are common properties for the Ethernet controller. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Mike Sinkovsky <msink@permonline.ru> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/wiznet/w5100-spi.c | 4 +++- drivers/net/ethernet/wiznet/w5100.c | 5 +++-- drivers/net/ethernet/wiznet/w5100.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) commit 7d6da453efce17fae35707fa7e5757e7ade8b3cc Author: Akinobu Mita <akinobu.mita@gmail.com> Date: Sat May 14 14:55:49 2016 +0900 net: w5100: increase TX timeout period This increases TX timeout period from one second to 5 seconds which is the default value if the driver doesn't explicitly set net_device->watchdog_timeo. The one second timeout is too short for W5100 with SPI interface mode which doesn't support burst READ/WRITE processing in the SPI transfer. If the packet is transmitted while RX packets are being received at a very high rate, the TX transmittion work in the workqueue is delayed and the watchdog timer is expired. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Mike Sinkovsky <msink@permonline.ru> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/wiznet/w5100.c | 1 - 1 file changed, 1 deletion(-) commit d41cd5f7e2fce8d3c5b1345a7cf9ed3f0d2d99c1 Author: Akinobu Mita <akinobu.mita@gmail.com> Date: Sat May 14 14:55:48 2016 +0900 net: w5100: fix MAC filtering for W5500 W5500 has different bit position for MAC filter in Socket n mode register from W5100 and W5200. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Mike Sinkovsky <msink@permonline.ru> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/wiznet/w5100.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) commit e9f0cd94c1697ad6c98422a1953105c8ffc515f3 Author: Akinobu Mita <akinobu.mita@gmail.com> Date: Sat May 14 14:55:47 2016 +0900 net: w5100: remove unused is_w5200() The is_w5200() function is not used anymore by the commit which adds the W5500 support. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Mike Sinkovsky <msink@permonline.ru> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/wiznet/w5100.c | 5 ----- 1 file changed, 5 deletions(-) commit b0456b24ff4c8f408feaf97ea465897672bb1ac1 Merge: 485b777 c8396d8 Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:53:20 2016 -0400 Merge branch 'lxt-cleanups' Sergei Shtylyov says: ==================== Here's the set of 2 patches against DaveM's 'net-next.git' repo. We save several LoCs on the unneeded local variables.... [1/2] lxt: simplify lxt97[01]_config_intr() [2/2] lxt: simplify lxt970_config_init() ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit c8396d84c70b47b31b5a9e34732e88bcc7dae9e9 Author: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Date: Sat May 14 02:09:07 2016 +0300 lxt: simplify lxt970_config_init() This function declares the 'err' local variable for no good reason, get rid of it. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/lxt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) commit 04e6233d57a9e68e97c248f97d1aa2cb354f3947 Author: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Date: Fri May 13 16:08:02 2016 -0700 lxt: simplify lxt97[01]_config_intr() Both these functions declare the 'err' local variables for no good reason, get rid of them. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/lxt.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) commit 485b777855ed74dfcde5c46cfc88e2bc1b7c0714 Merge: 553eb54 d93a47f Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:49:33 2016 -0400 Merge branch 'bpf-blinding' Daniel Borkmann says: ==================== BPF updates This set implements constant blinding for BPF, first couple of patches are some preparatory cleanups, followed by the blinding. Please see individual patches for details. Thanks a lot! ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit d93a47f735f3455a896e46b18d0ac26fa19639e6 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:35 2016 +0200 bpf, s390: add support for constant blinding This patch adds recently added constant blinding helpers into the s390 eBPF JIT. In the bpf_int_jit_compile() path, requirements are to utilize bpf_jit_blind_constants()/bpf_jit_prog_release_other() pair for rewriting the program into a blinded one, and to map the BPF_REG_AX register to a CPU register. The mapping of BPF_REG_AX is at r12 and similarly like in x86 case performs reloading when ld_abs/ind is used. When blinding is not used, there's no additional overhead in the generated image. When BPF_REG_AX is used, we don't need to emit skb->data reload when helper function changed skb->data, as this will be reloaded later on anyway from stack on ld_abs/ind, where skb->data is needed. s390 allows for this w/o much additional complexity unlike f.e. x86. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net> arch/s390/net/bpf_jit_comp.c | 73 +++++++++++++++++++++++++++++++++----------- 1 file changed, 56 insertions(+), 17 deletions(-) commit 26eb042ee4c7845aa395c41c4e125c240b82b984 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:34 2016 +0200 bpf, arm64: add support for constant blinding This patch adds recently added constant blinding helpers into the arm64 eBPF JIT. In the bpf_int_jit_compile() path, requirements are to utilize bpf_jit_blind_constants()/bpf_jit_prog_release_other() pair for rewriting the program into a blinded one, and to map the BPF_REG_AX register to a CPU register. The mapping is on x9. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Zi Shen Lim <zlim.lnx@gmail.com> Acked-by: Yang Shi <yang.shi@linaro.org> Tested-by: Yang Shi <yang.shi@linaro.org> Signed-off-by: David S. Miller <davem@davemloft.net> arch/arm64/net/bpf_jit_comp.c | 52 +++++++++++++++++++++++++++++++++---------- 1 file changed, 40 insertions(+), 12 deletions(-) commit 959a7579160349d222cc5da30db3b138139b6fbc Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:33 2016 +0200 bpf, x86: add support for constant blinding This patch adds recently added constant blinding helpers into the x86 eBPF JIT. In the bpf_int_jit_compile() path, requirements are to utilize bpf_jit_blind_constants()/bpf_jit_prog_release_other() pair for rewriting the program into a blinded one, and to map the BPF_REG_AX register to a CPU register. The mapping of BPF_REG_AX is at non-callee saved register r10, and thus shared with cached skb->data used for ld_abs/ind and not in every program type needed. When blinding is not used, there's zero additional overhead in the generated image. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> arch/x86/net/bpf_jit_comp.c | 66 ++++++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 13 deletions(-) commit 4f3446bb809f20ad56cadf712e6006815ae7a8f9 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:32 2016 +0200 bpf: add generic constant blinding for use in jits This work adds a generic facility for use from eBPF JIT compilers that allows for further hardening of JIT generated images through blinding constants. In response to the original work on BPF JIT spraying published by Keegan McAllister [1], most BPF JITs were changed to make images read-only and start at a randomized offset in the page, where the rest was filled with trap instructions. We have this nowadays in x86, arm, arm64 and s390 JIT compilers. Additionally, later work also made eBPF interpreter images read only for kernels supporting DEBUG_SET_MODULE_RONX, that is, x86, arm, arm64 and s390 archs as well currently. This is done by default for mentioned JITs when JITing is enabled. Furthermore, we had a generic and configurable constant blinding facility on our todo for quite some time now to further make spraying harder, and first implementation since around netconf 2016. We found that for systems where untrusted users can load cBPF/eBPF code where JIT is enabled, start offset randomization helps a bit to make jumps into crafted payload harder, but in case where larger programs that cross page boundary are injected, we again have some part of the program opcodes at a page start offset. With improved guessing and more reliable payload injection, chances can increase to jump into such payload. Elena Reshetova recently wrote a test case for it [2, 3]. Moreover, eBPF comes with 64 bit constants, which can leave some more room for payloads. Note that for all this, additional bugs in the kernel are still required to make the jump (and of course to guess right, to not jump into a trap) and naturally the JIT must be enabled, which is disabled by default. For helping mitigation, the general idea is to provide an option bpf_jit_harden that admins can tweak along with bpf_jit_enable, so that for cases where JIT should be enabled for performance reasons, the generated image can be further hardened with blinding constants for unpriviledged users (bpf_jit_harden == 1), with trading off performance for these, but not for privileged ones. We also added the option of blinding for all users (bpf_jit_harden == 2), which is quite helpful for testing f.e. with test_bpf.ko. There are no further e.g. hardening levels of bpf_jit_harden switch intended, rationale is to have it dead simple to use as on/off. Since this functionality would need to be duplicated over and over for JIT compilers to use, which are already complex enough, we provide a generic eBPF byte-code level based blinding implementation, which is then just transparently JITed. JIT compilers need to make only a few changes to integrate this facility and can be migrated one by one. This option is for eBPF JITs and will be used in x86, arm64, s390 without too much effort, and soon ppc64 JITs, thus that native eBPF can be blinded as well as cBPF to eBPF migrations, so that both can be covered with a single implementation. The rule for JITs is that bpf_jit_blind_constants() must be called from bpf_int_jit_compile(), and in case blinding is disabled, we follow normally with JITing the passed program. In case blinding is enabled and we fail during the process of blinding itself, we must return with the interpreter. Similarly, in case the JITing process after the blinding failed, we return normally to the interpreter with the non-blinded code. Meaning, interpreter doesn't change in any way and operates on eBPF code as usual. For doing this pre-JIT blinding step, we need to make use of a helper/auxiliary register, here BPF_REG_AX. This is strictly internal to the JIT and not in any way part of the eBPF architecture. Just like in the same way as JITs internally make use of some helper registers when emitting code, only that here the helper register is one abstraction level higher in eBPF bytecode, but nevertheless in JIT phase. That helper register is needed since f.e. manually written program can issue loads to all registers of eBPF architecture. The core concept with the additional register is: blind out all 32 and 64 bit constants by converting BPF_K based instructions into a small sequence from K_VAL into ((RND ^ K_VAL) ^ RND). Therefore, this is transformed into: BPF_REG_AX := (RND ^ K_VAL), BPF_REG_AX ^= RND, and REG <OP> BPF_REG_AX, so actual operation on the target register is translated from BPF_K into BPF_X one that is operating on BPF_REG_AX's content. During rewriting phase when blinding, RND is newly generated via prandom_u32() for each processed instruction. 64 bit loads are split into two 32 bit loads to make translation and patching not too complex. Only basic thing required by JITs is to call the helper bpf_jit_blind_constants()/bpf_jit_prog_release_other() pair, and to map BPF_REG_AX into an unused register. Small bpf_jit_disasm extract from [2] when applied to x86 JIT: echo 0 > /proc/sys/net/core/bpf_jit_harden ffffffffa034f5e9 + <x>: [...] 39: mov $0xa8909090,%eax 3e: mov $0xa8909090,%eax 43: mov $0xa8ff3148,%eax 48: mov $0xa89081b4,%eax 4d: mov $0xa8900bb0,%eax 52: mov $0xa810e0c1,%eax 57: mov $0xa8908eb4,%eax 5c: mov $0xa89020b0,%eax [...] echo 1 > /proc/sys/net/core/bpf_jit_harden ffffffffa034f1e5 + <x>: [...] 39: mov $0xe1192563,%r10d 3f: xor $0x4989b5f3,%r10d 46: mov %r10d,%eax 49: mov $0xb8296d93,%r10d 4f: xor $0x10b9fd03,%r10d 56: mov %r10d,%eax 59: mov $0x8c381146,%r10d 5f: xor $0x24c7200e,%r10d 66: mov %r10d,%eax 69: mov $0xeb2a830e,%r10d 6f: xor $0x43ba02ba,%r10d 76: mov %r10d,%eax 79: mov $0xd9730af,%r10d 7f: xor $0xa5073b1f,%r10d 86: mov %r10d,%eax 89: mov $0x9a45662b,%r10d 8f: xor $0x325586ea,%r10d 96: mov %r10d,%eax [...] As can be seen, original constants that carry payload are hidden when enabled, actual operations are transformed from constant-based to register-based ones, making jumps into constants ineffective. Above extract/example uses single BPF load instruction over and over, but of course all instructions with constants are blinded. Performance wise, JIT with blinding performs a bit slower than just JIT and faster than interpreter case. This is expected, since we still get all the performance benefits from JITing and in normal use-cases not every single instruction needs to be blinded. Summing up all 296 test cases averaged over multiple runs from test_bpf.ko suite, interpreter was 55% slower than JIT only and JIT with blinding was 8% slower than JIT only. Since there are also some extremes in the test suite, I expect for ordinary workloads that the performance for the JIT with blinding case is even closer to JIT only case, f.e. nmap test case from suite has averaged timings in ns 29 (JIT), 35 (+ blinding), and 151 (interpreter). BPF test suite, seccomp test suite, eBPF sample code and various bigger networking eBPF programs have been tested with this and were running fine. For testing purposes, I also adapted interpreter and redirected blinded eBPF image to interpreter and also here all tests pass. [1] http://mainisusuallyafunction.blogspot.com/2012/11/attacking-hardened-linux-systems-with.html [2] https://github.com/01org/jit-spray-poc-for-ksp/ [3] http://www.openwall.com/lists/kernel-hardening/2016/05/03/5 Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Reviewed-by: Elena Reshetova <elena.reshetova@intel.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/sysctl/net.txt | 11 +++ include/linux/filter.h | 42 +++++++++ kernel/bpf/core.c | 203 +++++++++++++++++++++++++++++++++++++++++++ net/Kconfig | 7 +- net/core/sysctl_net_core.c | 9 ++ 5 files changed, 270 insertions(+), 2 deletions(-) commit d1c55ab5e41fcd72cb0a8bef86d3f652ad9ad9f5 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:31 2016 +0200 bpf: prepare bpf_int_jit_compile/bpf_prog_select_runtime apis Since the blinding is strictly only called from inside eBPF JITs, we need to change signatures for bpf_int_jit_compile() and bpf_prog_select_runtime() first in order to prepare that the eBPF program we're dealing with can change underneath. Hence, for call sites, we need to return the latest prog. No functional change in this patch. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> arch/arm64/net/bpf_jit_comp.c | 7 ++++--- arch/s390/net/bpf_jit_comp.c | 8 +++++--- arch/x86/net/bpf_jit_comp.c | 7 ++++--- include/linux/filter.h | 5 +++-- kernel/bpf/core.c | 18 ++++++++++++++---- kernel/bpf/syscall.c | 2 +- lib/test_bpf.c | 5 ++++- net/core/filter.c | 6 +++++- 8 files changed, 40 insertions(+), 18 deletions(-) commit c237ee5eb33bf19fe0591c04ff8db19da7323a83 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:30 2016 +0200 bpf: add bpf_patch_insn_single helper Move the functionality to patch instructions out of the verifier code and into the core as the new bpf_patch_insn_single() helper will be needed later on for blinding as well. No changes in functionality. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> include/linux/filter.h | 3 +++ kernel/bpf/core.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++ kernel/bpf/verifier.c | 53 +++++++------------------------------ 3 files changed, 83 insertions(+), 44 deletions(-) commit 93a73d442d370e20ed1009cd79cb29c4d7c0ee86 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:29 2016 +0200 bpf, x86/arm64: remove useless checks on prog There is never such a situation, where bpf_int_jit_compile() is called with either prog as NULL or len as 0, so the tests are unnecessary and confusing as people would just copy them. s390 doesn't have them, so no change is needed there. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> arch/arm64/net/bpf_jit_comp.c | 3 --- arch/x86/net/bpf_jit_comp.c | 3 --- 2 files changed, 6 deletions(-) commit 6077776b5908e0493a3946f7d3bc63871b201e87 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:28 2016 +0200 bpf: split HAVE_BPF_JIT into cBPF and eBPF variant Split the HAVE_BPF_JIT into two for distinguishing cBPF and eBPF JITs. Current cBPF ones: # git grep -n HAVE_CBPF_JIT arch/ arch/arm/Kconfig:44: select HAVE_CBPF_JIT arch/mips/Kconfig:18: select HAVE_CBPF_JIT if !CPU_MICROMIPS arch/powerpc/Kconfig:129: select HAVE_CBPF_JIT arch/sparc/Kconfig:35: select HAVE_CBPF_JIT Current eBPF ones: # git grep -n HAVE_EBPF_JIT arch/ arch/arm64/Kconfig:61: select HAVE_EBPF_JIT arch/s390/Kconfig:126: select HAVE_EBPF_JIT if PACK_STACK && HAVE_MARCH_Z196_FEATURES arch/x86/Kconfig:94: select HAVE_EBPF_JIT if X86_64 Later code also needs this facility to check for eBPF JITs. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> arch/arm/Kconfig | 2 +- arch/arm64/Kconfig | 2 +- arch/mips/Kconfig | 2 +- arch/powerpc/Kconfig | 2 +- arch/s390/Kconfig | 2 +- arch/sparc/Kconfig | 2 +- arch/x86/Kconfig | 2 +- net/Kconfig | 14 +++++++++++--- 8 files changed, 18 insertions(+), 10 deletions(-) commit c94987e40ebbae3b7b6c3ece37b6f8338830f6b1 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:27 2016 +0200 bpf: move bpf_jit_enable declaration Move the bpf_jit_enable declaration to the filter.h file where most other core code is declared, also since we're going to add a second knob there. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> include/linux/filter.h | 2 ++ include/linux/netdevice.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) commit 4936e3528e3e272c567fe4ff0abb7ce3e1500575 Author: Daniel Borkmann <daniel@iogearbox.net> Date: Fri May 13 19:08:26 2016 +0200 bpf: minor cleanups in ebpf code Besides others, remove redundant comments where the code is self documenting enough, and properly indent various bpf_verifier_ops and bpf_prog_type_list declarations. Moreover, remove two exports that actually have no module user. Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> kernel/bpf/core.c | 2 -- net/core/filter.c | 34 +++++++++++++++------------------- 2 files changed, 15 insertions(+), 21 deletions(-) commit 553eb544444e28749e2d752dee11e2ae4a3ecfb6 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Fri May 13 20:38:23 2016 -0400 net: dsa: mv88e6xxx: remove bridge work Now that the bridge code defers the switchdev port state setting, there is no need to defer the port STP state change within the mv88e6xxx code. Thus get rid of the driver's bridge work code. This also fixes a race condition where the DSA layer assumes that the bridge code already set the unbridged port's STP state to Disabled before restoring the Forwarding state. As a consequence, this also fixes the FDB flush for the unbridged port which now correctly occurs during the Forwarding to Disabled transition. Fixes: 0bc05d585d38 ("switchdev: allow caller to explicitly request attr_set as deferred") Reported-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6xxx.c | 37 ++++++++----------------------------- drivers/net/dsa/mv88e6xxx.h | 5 ----- 2 files changed, 8 insertions(+), 34 deletions(-) commit b0e95ccdd77591f108c938bbc702b57554a1665d Author: David Ahern <dsa@cumulusnetworks.com> Date: Fri May 13 12:23:45 2016 -0700 net: vrf: protect changes to private data with rcu One cpu can be processing packets which includes using the cached route entries in the vrf device's private data and on another cpu the device gets deleted which releases the routes and sets the pointers in net_vrf to NULL. This results in datapath dereferencing a NULL pointer. Fix by protecting access to dst's with rcu. Fixes: 193125dbd8eb ("net: Introduce VRF device driver") Fixes: 35402e313663 ("net: Add IPv6 support to VRF device") Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/vrf.c | 70 +++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 23 deletions(-) commit ea1627c20c3462168a087ccecc69084b55b9c0b2 Author: Eric Dumazet <edumazet@google.com> Date: Fri May 13 09:16:40 2016 -0700 tcp: minor optimizations around tcp_hdr() usage tcp_hdr() is slightly more expensive than using skb->data in contexts where we know they point to the same byte. In receive path, tcp_v4_rcv() and tcp_v6_rcv() are in this situation, as tcp header has not been pulled yet. In output path, the same can be said when we just pushed the tcp header in the skb, in tcp_transmit_skb() and tcp_make_synack() Also factorize the two checks for tcb->tcp_flags & TCPHDR_SYN in tcp_transmit_skb() and pass tcp header pointer to tcp_ecn_send(), so that compiler can further optimize and avoid a reload. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv4/tcp_ipv4.c | 6 +++--- net/ipv4/tcp_output.c | 30 ++++++++++++++---------------- net/ipv6/tcp_ipv6.c | 6 +++--- 3 files changed, 20 insertions(+), 22 deletions(-) commit 5022524308c64f2954ac206a8781b64a98cddf00 Author: Nicolas Dichtel <nicolas.dichtel@6wind.com> Date: Fri May 13 15:25:40 2016 +0200 netlink: kill nla_put_u64() This function is not used anymore. nla_put_u64_64bit() should be used instead. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/netlink.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) commit 2632616bc484de9281bc2a1f5b033325783f8a10 Author: Eric Dumazet <edumazet@google.com> Date: Fri May 13 06:14:37 2016 -0700 sock: propagate __sock_cmsg_send() error __sock_cmsg_send() might return different error codes, not only -EINVAL. Fixes: 24025c465f77 ("ipv4: process socket-level control messages in IPv4") Fixes: ad1e46a83716 ("ipv6: process socket-level control messages in IPv6") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Soheil Hassas Yeganeh <soheil@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv4/ip_sockglue.c | 5 +++-- net/ipv6/datagram.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) commit a986a05de95b730fd6a00b2b2f82a06d917fd6a2 Author: Arnd Bergmann <arnd@arndb.de> Date: Fri May 13 15:09:58 2016 +0200 net: qrtr: fix build problems Having multiple loadable modules with the same name cannot work with modprobe, and having both net/qrtr/smd.ko and drivers/soc/qcom/smd.ko results in a (somewhat cryptic) build error: ERROR: "qcom_smd_driver_unregister" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_driver_register" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_set_drvdata" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_send" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_get_drvdata" [net/qrtr/smd.ko] undefined! ERROR: "qcom_smd_driver_unregister" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! ERROR: "qcom_smd_driver_register" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! ERROR: "qcom_smd_set_drvdata" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! ERROR: "qcom_smd_send" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! ERROR: "qcom_smd_get_drvdata" [drivers/soc/qcom/wcnss_ctrl.ko] undefined! Also, the qrtr driver uses the SMD interface and has a Kconfig dependency, but also allows for compile-testing when SMD is disabled. However, if with QCOM_SMD=m and COMPILE_TEST=y we can end up with QRTR_SMD=y and that fails with a related link error. The changes the dependency so we can still compile-test the driver but not have it built-in if SMD is a module, to avoid running in the broken configuration, and changes the Makefile to provide the driver under a different module name. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: bdabad3e363d ("net: Add Qualcomm IPC router") Signed-off-by: David S. Miller <davem@davemloft.net> net/qrtr/Kconfig | 2 +- net/qrtr/Makefile | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 148bd3a34b426031355fdff2778bdab4e008766b Merge: 388665a aad7e08 Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:43:52 2016 -0400 Merge branch 'tc_flower_offload' Amir Vadai says: ==================== sched,mlx5: Offloaded TC flower filter statistics This patchset introduces counters support for offloaded cls_flower filters. When the user calls 'tc show -s ..', fl_dump is called. Before fl_dump() returns the statistics, it calls the NIC driver (using a new ndo_setup_tc() command - TC_CLSFLOWER_STATS) to read the hardware counters and update the statistics accordingly. A new TC action op was added (stats_update()) to be used by the NIC driver to update the statistics. Patchset was applied and tested over commit ed7cbbc ("udp: Resolve NULL pointer dereference over flow-based vxlan device") ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit aad7e08d39bda94aedc594a82576980941306fc9 Author: Amir Vadai <amirva@mellanox.com> Date: Fri May 13 12:55:42 2016 +0000 net/mlx5e: Hardware offloaded flower filter statistics support Introduce support in updating statistics of offloaded TC flower classifiers. Currently only the DROP action is supported. Signed-off-by: Amir Vadai <amirva@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 71 ++++++++++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/en_tc.h | 3 + 3 files changed, 69 insertions(+), 7 deletions(-) commit 43a335e055bb7ebdc8a68ce7362ef26ef5bda92b Author: Amir Vadai <amirva@mellanox.com> Date: Fri May 13 12:55:41 2016 +0000 net/mlx5_core: Flow counters infrastructure If a counter has the aging flag set when created, it is added to a list of counters that will be queried periodically from a workqueue. query result and last use timestamp are cached. add/del counter must be very efficient since thousands of such operations might be issued in a second. There is only a single reference to counters without aging, therefore no need for locks. But, counters with aging enabled are stored in a list. In order to make code as lockless as possible, all the list manipulation and access to hardware is done from a single context - the periodic counters query thread. The hardware supports multiple counters per FTE, however currently we are using one counter for each FTE. Signed-off-by: Amir Vadai <amirva@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx5/core/Makefile | 2 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 7 +- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 3 + .../net/ethernet/mellanox/mlx5/core/fs_counters.c | 226 +++++++++++++++++++++ include/linux/mlx5/driver.h | 14 ++ include/linux/mlx5/fs.h | 5 + 6 files changed, 255 insertions(+), 2 deletions(-) commit bd5251dbf156b6bc0661a9409d46e47160df61dd Author: Amir Vadai <amirva@mellanox.com> Date: Fri May 13 12:55:40 2016 +0000 net/mlx5_core: Introduce flow steering destination of type counter When adding a flow steering rule with a counter, need to supply a destination of type MLX5_FLOW_DESTINATION_TYPE_COUNTER, with a pointer to a struct mlx5_fc. Also, MLX5_FLOW_CONTEXT_ACTION_COUNT bit should be set in the action. Signed-off-by: Amir Vadai <amirva@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 36 +++++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 1 + drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 52 +++++++++++++++++++++-- drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 23 ++++++++++ include/linux/mlx5/fs.h | 2 + include/linux/mlx5/mlx5_ifc.h | 2 + 6 files changed, 106 insertions(+), 10 deletions(-) commit 9dc0b289c4c09bc1a92bdcc055cb37af9b72eb28 Author: Amir Vadai <amirva@mellanox.com> Date: Fri May 13 12:55:39 2016 +0000 net/mlx5_core: Firmware commands to support flow counters Getting packet/byte statistics on flows is done through flow counters. Implement the firmware commands to alloc, free and query flow counters. Signed-off-by: Amir Vadai <amirva@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 6 ++ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 66 ++++++++++++++++ drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.h | 5 ++ include/linux/mlx5/mlx5_ifc.h | 99 +++++++++++++++++++++++- 4 files changed, 173 insertions(+), 3 deletions(-) commit 42ca502e179d0654ef441333a9d0f35c948734f3 Author: Amir Vadai <amirva@mellanox.com> Date: Fri May 13 12:55:38 2016 +0000 net/mlx5_core: Use a macro in mlx5_command_str() Use a macro instead of copying the OP name. Signed-off-by: Amir Vadai <amirva@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx5/core/cmd.c | 303 +++++++++++--------------- 1 file changed, 132 insertions(+), 171 deletions(-) commit 10cbc6843446165ee250e1ee80dc19ee325f1e6d Author: Amir Vadai <amirva@mellanox.com> Date: Fri May 13 12:55:37 2016 +0000 net/sched: cls_flower: Hardware offloaded filters statistics support Introduce a new command in ndo_setup_tc() for hardware offloaded filters, to call the NIC driver, and make it update the statistics. This will be done before dumping the filter and its statistics. Signed-off-by: Amir Vadai <amirva@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/pkt_cls.h | 1 + net/sched/cls_flower.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) commit 9fea47d93bcc98946a6eca0f019ced337564a344 Author: Amir Vadai <amirva@mellanox.com> Date: Fri May 13 12:55:36 2016 +0000 net/sched: act_gact: Update statistics when offloaded to hardware Implement the stats_update callback that will be called by NIC drivers for hardware offloaded filters. Signed-off-by: Amir Vadai <amirva@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/sched/act_gact.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 3804070235264ea883c3fdccd9ed16fef20b5ccb Author: Amir Vadai <amirva@mellanox.com> Date: Fri May 13 12:55:35 2016 +0000 net/sched: Enable netdev drivers to update statistics of offloaded actions Introduce stats_update callback. netdev driver could call it for offloaded actions to update the basic statistics (packets, bytes and last use). Since bstats_update() and bstats_cpu_update() use skb as an argument to get the counters, _bstats_update() and _bstats_cpu_update(), that get bytes and packets as arguments, were added. Signed-off-by: Amir Vadai <amirva@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/act_api.h | 12 ++++++++++++ include/net/sch_generic.h | 20 ++++++++++++++++++-- 2 files changed, 30 insertions(+), 2 deletions(-) commit 388665a9be5fd16abd3d9762b1995208355e6f6d Merge: 8be0cfa b17d155 Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:39:50 2016 -0400 Merge branch 'pxa168_eth-perf' Jisheng Zhang says: ==================== net: pxa168_eth: improve performance This series is to improve the pxa168_eth driver performance by using {readl|writel}_relaxed or appropriate memory barriers. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit b17d15592df057437ad356b431bb876889940620 Author: Jisheng Zhang <jszhang@marvell.com> Date: Fri May 13 19:57:30 2016 +0800 net: pxa168_eth: Use dma_wmb/rmb where appropriate Update the pxa168_eth driver to use the dma_rmb/wmb calls instead of the full barriers in order to improve performance: reduced 97ns/39ns on average in tx/rx path on Marvell BG4CT platform. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/marvell/pxa168_eth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 3ed687823c298b2349ab1f3d38ac88d967b8eaea Author: Jisheng Zhang <jszhang@marvell.com> Date: Fri May 13 19:57:29 2016 +0800 net: pxa168_eth: use {readl|writel}_relaxed instead of readl/writel Since appropriate memory barriers are already there, use the relaxed version to improve performance a bit. Signed-off-by: Jisheng Zhang <jszhang@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/marvell/pxa168_eth.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 8be0cfa4d352167df508acd571eb19afd8a2ce93 Author: Jiri Benc <jbenc@redhat.com> Date: Fri May 13 10:48:42 2016 +0200 vxlan: set mac_header correctly in GPE mode For VXLAN-GPE, the interface is ARPHRD_NONE, thus we need to reset mac_header after pulling the outer header. v2: Put the code to the existing conditional block as suggested by Shmulik Ladkani. Fixes: e1e5314de08b ("vxlan: implement GPE") Signed-off-by: Jiri Benc <jbenc@redhat.com> Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/vxlan.c | 1 + 1 file changed, 1 insertion(+) commit 41ae56ce3507d2967a29ae809200962d12cecb2b Merge: 1ca4673 c2d09fd Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:35:57 2016 -0400 Merge branch 'xen-netback-control-ring' Paul Durrant says: ==================== xen-netback: support for control ring My recent patch to import an up-to-date include/xen/interface/io/netif.h from the Xen Project brought in the necessary definitions to support the new control shared ring and protocol. This patch series updates xen-netback to support the new ring. Patch #1 adds the necessary boilerplate to map the control ring and handle messages. No implementation of the new protocol is included in this patch so that it can be kept to a reasonable size. Patch #2 adds the protocol implementation. Patch #3 adds support for passing has values calculated by xen-netback to capable frontends. Patch #4 adds support for accepting hash values calculated by capable frontends and using them the set the socket buffer hash. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit c2d09fde7299f68f29e84fe5a415d5c1a7abae75 Author: Paul Durrant <Paul.Durrant@citrix.com> Date: Fri May 13 09:37:29 2016 +0100 xen-netback: use hash value from the frontend My recent patch to include/xen/interface/io/netif.h defines a new extra info type that can be used to pass hash values between backend and guest frontend. This patch adds code to xen-netback to use the value in a hash extra info fragment passed from the guest frontend in a transmit-side (i.e. netback receive side) packet to set the skb hash accordingly. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/xen-netback/netback.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) commit f07f989338587bc2b202f6e3c8e8468c450bd6a2 Author: Paul Durrant <Paul.Durrant@citrix.com> Date: Fri May 13 09:37:28 2016 +0100 xen-netback: pass hash value to the frontend My recent patch to include/xen/interface/io/netif.h defines a new extra info type that can be used to pass hash values between backend and guest frontend. This patch adds code to xen-netback to pass hash values calculated for guest receive-side packets (i.e. netback transmit side) to the frontend. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/xen-netback/interface.c | 13 ++++++- drivers/net/xen-netback/netback.c | 78 +++++++++++++++++++++++++++++++------ 2 files changed, 77 insertions(+), 14 deletions(-) commit 40d8abdee806d496a60ee607a6d01b1cd7fabaf0 Author: Paul Durrant <Paul.Durrant@citrix.com> Date: Fri May 13 09:37:27 2016 +0100 xen-netback: add control protocol implementation My recent patch to include/xen/interface/io/netif.h defines a new shared ring (in addition to the rx and tx rings) for passing control messages from a VM frontend driver to a backend driver. A previous patch added the necessary boilerplate for mapping the control ring from the frontend, should it be created. This patch adds implementations for each of the defined protocol messages. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/xen-netback/Makefile | 2 +- drivers/net/xen-netback/common.h | 46 +++++ drivers/net/xen-netback/hash.c | 384 ++++++++++++++++++++++++++++++++++++ drivers/net/xen-netback/interface.c | 24 +++ drivers/net/xen-netback/netback.c | 49 ++++- 5 files changed, 502 insertions(+), 3 deletions(-) commit 4e15ee2cb46fed730fe6f0195a86d44e5aeef129 Author: Paul Durrant <Paul.Durrant@citrix.com> Date: Fri May 13 09:37:26 2016 +0100 xen-netback: add control ring boilerplate My recent patch to include/xen/interface/io/netif.h defines a new shared ring (in addition to the rx and tx rings) for passing control messages from a VM frontend driver to a backend driver. This patch adds the necessary code to xen-netback to map this new shared ring, should it be created by a frontend, but does not add implementations for any of the defined protocol messages. These are added in a subsequent patch for clarity. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/xen-netback/common.h | 28 +++++++--- drivers/net/xen-netback/interface.c | 101 +++++++++++++++++++++++++++++++++--- drivers/net/xen-netback/netback.c | 99 +++++++++++++++++++++++++++++++++-- drivers/net/xen-netback/xenbus.c | 79 ++++++++++++++++++++++++---- 4 files changed, 277 insertions(+), 30 deletions(-) commit 1ca467343240be738c8e61edd4b421ca9ebe2d77 Merge: 860d7ef d34e3e1 Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:30:57 2016 -0400 Merge branch 'cls_u32_hw_sw' Sridhar Samudrala says: ==================== Enable SW only or HW only offloads with u32 classifier This set of patches export TCA_CLS_FLAGS_SKIP_HW to userspace and also introduces another flag TCA_CLS_FLAGS_SKIP_SW. These flags enable offloading u32 filters to either SW or HW only. The default semantics with no flags is to add the filter to HW if possible and also into SW. With SKIP_HW flag, the filter is only added to SW. With SKIP_SW flag, the filter is added to HW and an error is returned to user on failure. These flags are mutually exclusive. There was an earlier discussion on these semantics in the following email thread. http://thread.gmane.org/gmane.linux.network/401733 ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit d34e3e181395192d6d1f50dd97bd7854e04e33a4 Author: Samudrala, Sridhar <sridhar.samudrala@intel.com> Date: Thu May 12 17:08:23 2016 -0700 net: cls_u32: Add support for skip-sw flag to tc u32 classifier. On devices that support TC U32 offloads, this flag enables a filter to be added only to HW. skip-sw and skip-hw are mutually exclusive flags. By default without any flags, the filter is added to both HW and SW, but no error checks are done in case of failure to add to HW. With skip-sw, failure to add to HW is treated as an error. Here is a sample script that adds 2 filters, one with skip-sw and the other with skip-hw flag. # add ingress qdisc tc qdisc add dev p4p1 ingress # enable hw tc offload. ethtool -K p4p1 hw-tc-offload on # add u32 filter with skip-sw flag. tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 800:0:1 u32 ht 800: flowid 800:1 \ skip-sw \ match ip src 192.168.1.0/24 \ action drop # add u32 filter with skip-hw flag. tc filter add dev p4p1 parent ffff: protocol ip prio 99 \ handle 800:0:2 u32 ht 800: flowid 800:2 \ skip-hw \ match ip src 192.168.2.0/24 \ action drop Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/pkt_cls.h | 17 +++++++++++++++++ include/uapi/linux/pkt_cls.h | 1 + net/sched/cls_u32.c | 45 +++++++++++++++++++++++++++++++++++--------- 3 files changed, 54 insertions(+), 9 deletions(-) commit 760edee8b59ebf05bb268d0a6b568f76bb1bb599 Author: Samudrala, Sridhar <sridhar.samudrala@intel.com> Date: Thu May 12 17:08:22 2016 -0700 net: sched: Move TCA_CLS_FLAGS_SKIP_HW to uapi header file. Signed-off-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Acked-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/pkt_cls.h | 3 --- include/uapi/linux/pkt_cls.h | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) commit 860d7ef64da14b642a2b0dc15381b69b7263fc44 Merge: da47b45 8809883 Author: David S. Miller <davem@davemloft.net> Date: Mon May 16 13:26:01 2016 -0400 Merge branch 'hv_netvsc-races' Vitaly Kuznetsov says: ==================== hv_netvsc: avoid races on mtu change/set channels Changes since v1: - Rebased to net-next [Haiyang Zhang] Original description: MTU change and set channels operations are implemented as netvsc device re-creation destroying internal structures (struct net_device stays). This is really unfortunate but there is no support from Hyper-V host to do it in a different way. Such re-creation is unsurprisingly racy, Haiyang reported a crash when netvsc_change_mtu() is racing with netvsc_link_change() but I was able to identify additional races upon investigation. Both netvsc_set_channels() and netvsc_change_mtu() race against: 1) netvsc_link_change() 2) netvsc_remove() 3) netvsc_send() To solve these issues without introducing new locks some refactoring is required. We need to get rid of very complex link graph in all the internal structures and avoid traveling through structures which are being removed. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 88098834827025cc04c15f1b4b0d9bbef3cf55af Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Fri May 13 13:55:25 2016 +0200 hv_netvsc: set nvdev link after populating chn_table Crash in netvsc_send() is observed when netvsc device is re-created on mtu change/set channels. The crash is caused by dereferencing of NULL channel pointer which comes from chn_table. The root cause is a mixture of two facts: - we set nvdev pointer in net_device_context in alloc_net_device() before we populate chn_table. - we populate chn_table[0] only. The issue could be papered over by checking channel != NULL in netvsc_send() but populating the whole chn_table and writing the nvdev pointer afterwards seems more appropriate. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/hyperv/netvsc.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) commit 6da7225f5a95ba68e3c6225c4051182bef30eed4 Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Fri May 13 13:55:24 2016 +0200 hv_netvsc: synchronize netvsc_change_mtu()/netvsc_set_channels() with netvsc_remove() When netvsc device is removed during mtu change or channels setup we get into troubles as both paths are trying to remove the device. Synchronize them with start_remove flag and rtnl lock. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/hyperv/netvsc_drv.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit 0a1275ca5128b84ffffc149960969ed351ae00eb Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Fri May 13 13:55:23 2016 +0200 hv_netvsc: get rid of struct net_device pointer in struct netvsc_device Simplify netvsvc pointer graph by getting rid of the redundant ndev pointer. We can always get a pointer to struct net_device from somewhere else. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/hyperv/hyperv_net.h | 5 +-- drivers/net/hyperv/netvsc.c | 36 +++++++--------- drivers/net/hyperv/netvsc_drv.c | 91 +++++++++++++++++++++++---------------- drivers/net/hyperv/rndis_filter.c | 4 +- 4 files changed, 72 insertions(+), 64 deletions(-) commit 3d541ac5a92af708d0085925d136f875f3a58d57 Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Fri May 13 13:55:22 2016 +0200 hv_netvsc: untangle the pointer mess We have the following structures keeping netvsc adapter state: - struct net_device - struct net_device_context - struct netvsc_device - struct rndis_device - struct hv_device and there are pointers/dependencies between them: - struct net_device_context is contained in struct net_device - struct hv_device has driver_data pointer which points to 'struct net_device' OR 'struct netvsc_device' depending on driver's state (!). - struct net_device_context has a pointer to 'struct hv_device'. - struct netvsc_device has pointers to 'struct hv_device' and 'struct net_device_context'. - struct rndis_device has a pointer to 'struct netvsc_device'. Different functions get different structures as parameters and use these pointers for traveling. The problem is (in addition to keeping in mind this complex graph) that some of these structures (struct netvsc_device and struct rndis_device) are being removed and re-created on mtu change (as we implement it as re-creation of hyper-v device) so our travel using these pointers is dangerous. Simplify this to a the following: - add struct netvsc_device pointer to struct net_device_context (which is a part of struct net_device and thus never disappears) - remove struct hv_device and struct net_device_context pointers from struct netvsc_device - replace pointer to 'struct netvsc_device' with pointer to 'struct net_device'. - always keep 'struct net_device' in hv_device driver_data. We'll end up with the following 'circular' structure: net_device: [net_device_context] -> netvsc_device -> rndis_device -> net_device -> hv_device -> net_device On MTU change we'll be removing the 'netvsc_device -> rndis_device' branch and re-creating it making the synchronization easier. There is one additional redundant pointer left, it is struct net_device link in struct netvsc_device, it is going to be removed in a separate commit. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/hyperv/hyperv_net.h | 10 ++--- drivers/net/hyperv/netvsc.c | 82 ++++++++++++++++----------------------- drivers/net/hyperv/netvsc_drv.c | 51 ++++++++++-------------- drivers/net/hyperv/rndis_filter.c | 78 +++++++++++++++++++------------------ 4 files changed, 99 insertions(+), 122 deletions(-) commit 1bdcec8a5f05445752a0639edd603ac09ae6c553 Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Fri May 13 13:55:21 2016 +0200 hv_netvsc: use start_remove flag to protect netvsc_link_change() netvsc_link_change() can race with netvsc_change_mtu() or netvsc_set_channels() as these functions destroy struct netvsc_device and rndis filter. Use start_remove flag for syncronization. As netvsc_change_mtu()/netvsc_set_channels() are called with rtnl lock held we need to take it before checking start_remove value in netvsc_link_change(). Reported-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/hyperv/netvsc_drv.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit f580aec4bfd7babe51f086e599400027def08ed8 Author: Vitaly Kuznetsov <vkuznets@redhat.com> Date: Fri May 13 13:55:20 2016 +0200 hv_netvsc: move start_remove flag to net_device_context struct netvsc_device is destroyed on mtu change so keeping the protection flag there is not a good idea. Move it to struct net_device_context which is preserved. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/hyperv/hyperv_net.h | 4 +++- drivers/net/hyperv/netvsc.c | 3 +-- drivers/net/hyperv/netvsc_drv.c | 12 +++++++++--- 3 files changed, 13 insertions(+), 6 deletions(-) commit da47b4572056487fd7941c26f73b3e8815ff712a Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Date: Thu May 12 12:00:33 2016 +0200 phy: add support for a reset-gpio specification The framework only asserts (for now) that the reset gpio is not active. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Roger Quadros <rogerq@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/devicetree/bindings/net/phy.txt | 3 +++ drivers/net/phy/phy_device.c | 8 ++++++++ 2 files changed, 11 insertions(+) commit a7aabcc8a5f5e7834abb538ad97db04d29968fbe Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Fri May 13 23:06:40 2016 +0530 drm/amd/powerplay: use ARRAY_SIZE() to calculate array size. It is preferred to use ARRAY_SIZE() for size calculation, instead using sizeof(array)/sizeof(*array). It makes the code more readable. Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/smumgr/cz_smumgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3a834b1596ac668df206aa2bb1f191c31f5f5e4 Author: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Date: Mon May 16 09:54:47 2016 -0600 blk-mq: fix undefined behaviour in order_to_size() When this_order variable in blk_mq_init_rq_map() becomes zero the code incorrectly decrements the variable and passes the result to order_to_size() helper causing undefined behaviour: UBSAN: Undefined behaviour in block/blk-mq.c:1459:27 shift exponent 4294967295 is too large for 32-bit type 'unsigned int' CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.6.0-rc6-00072-g33656a1 #22 Fix the code by checking this_order variable for not having the zero value first. Reported-by: Meelis Roos <mroos@linux.ee> Fixes: 320ae51feed5 ("blk-mq: new multi-queue block IO queueing mechanism") Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Signed-off-by: Jens Axboe <axboe@fb.com> block/blk-mq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit b3c8eb50383178f3a4dcf1dc867001156da6473d Author: David Bond <dbond@suse.com> Date: Wed Mar 23 21:49:26 2016 -0400 ibft: Expose iBFT acpi header via sysfs Some ethernet adapter vendors are supplying products which support optional (payed license) features. On some adapters this includes a hardware iscsi initiator. The same adapters in a normal (no extra licenses) mode of operation can be used as a software iscsi initiator. In addition, software iscsi boot initiators are becoming a standard part of many vendors uefi implementations. This is creating difficulties during early boot/install determining the proper configuration method for these adapters when they are used as a boot device. The attached patch creates sysfs entries to expose information from the acpi header of the ibft table. This information allows for a method to easily determining if an ibft table was created by a ethernet card's firmware or the system uefi/bios. In the case of a hardware initiator this information in combination with the pci vendor and device id can be used to ascertain any vendor specific behaviors that need to be accommodated. Reviewed-by: Lee Duncan <lduncan@suse.com> Signed-off-by: David Bond <dbond@suse.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> Documentation/ABI/testing/sysfs-ibft | 10 ++++++ drivers/firmware/iscsi_ibft.c | 66 +++++++++++++++++++++++++++++++++++- drivers/scsi/iscsi_boot_sysfs.c | 62 +++++++++++++++++++++++++++++++++ include/linux/iscsi_boot_sysfs.h | 13 +++++++ 4 files changed, 150 insertions(+), 1 deletion(-) commit 9a99425f0736a416442525ac7b15903173888b86 Author: Hannes Reinecke <hare@suse.de> Date: Thu Feb 25 09:56:04 2016 -0800 iscsi_ibft: Add prefix-len attr and display netmask The iBFT table only specifies a prefix length, not a netmask. And the netmask is pretty much pointless for IPv6. So introduce a new attribute 'prefix-len'. Some older user-space code might rely on the netmask attribute being present, so we should always display it. Changes from v1: - Combined two patches into one Changes from v2: - Cleaned up/corrected wording for patch description Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Lee Duncan <lduncan@suse.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org> drivers/firmware/iscsi_ibft.c | 4 ++++ drivers/scsi/iscsi_boot_sysfs.c | 5 +++++ include/linux/iscsi_boot_sysfs.h | 1 + 3 files changed, 10 insertions(+) commit 6eab37daf0ec1077fd612ff27ab513db20f33767 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Fri May 13 17:35:43 2016 +0530 tools: testing: define the _GNU_SOURCE macro Add the macro _GNU_SOURCE, to fix CPU_ZERO and CPU_SET undefined compile errors. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> tools/testing/selftests/intel_pstate/run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2c6c3946c3955f96ae0d48fdac940903918207d8 Author: Namhyung Kim <namhyung@kernel.org> Date: Tue May 10 23:53:06 2016 +0900 kselftests/ftrace: Add a test case for event pid filtering Check event is filtered by set_event_pid and options/event-fork. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> .../selftests/ftrace/test.d/event/event-pid.tc | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit 5a614ec8a7cfe9098475fa1221b409fb7eec6054 Author: Namhyung Kim <namhyung@kernel.org> Date: Tue May 10 23:53:05 2016 +0900 kselftests/ftrace: Detect tracefs mount point Currently ftracetest assumes tracing directory is located under $DEBUGFS/tracing. But it's possible to mount tracefs directly without debugfs. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com> tools/testing/selftests/ftrace/ftracetest | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) commit fc723957801465c4a911d0a509709f0f8b91aa8a Merge: efc499f 9e5ed6d f18ebc2 60438d9 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 16:45:48 2016 +0200 Merge branches 'acpi-pci', 'acpi-misc' and 'acpi-tools' * acpi-pci: ACPI,PCI,IRQ: remove SCI penalize function ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init() ACPI,PCI,IRQ: reduce static IRQ array size to 16 ACPI,PCI,IRQ: reduce resource requirements * acpi-misc: ACPI / sysfs: fix error code in get_status() ACPI / device_sysfs: Clean up checkpatch errors ACPI / device_sysfs: Change _SUN and _STA show functions error return to EIO ACPI / device_sysfs: Add sysfs support for _HRV hardware revision arm64: defconfig: Enable ACPI ACPI / ARM64: Remove EXPERT dependency for ACPI on ARM64 ACPI / ARM64: Don't enable ACPI by default on ARM64 acer-wmi: Use acpi_dev_found() eeepc-wmi: Use acpi_dev_found() ACPI / utils: Rename acpi_dev_present() * acpi-tools: tools/power/acpi: close file only if it is open commit efc499f9807bfc179c66b7c3524e30370c6fd1b1 Merge: a6becfb 702b07f 7421669 e5f660e Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 16:45:25 2016 +0200 Merge branches 'acpi-numa', 'acpi-tables' and 'acpi-osi' * acpi-numa: ACPI / SRAT: fix SRAT parsing order with both LAPIC and X2APIC present * acpi-tables: ACPI / tables: Fix DSDT override mechanism ACPI / tables: Convert initrd table override to table upgrade mechanism ACPI / x86: Cleanup initrd related code ACPI / tables: Move table override mechanisms to tables.c * acpi-osi: ACPI / osi: Collect _OSI handling into one single file ACPI / osi: Cleanup coding style issues before creating a separate OSI source file ACPI / osi: Cleanup OSI handling code to use bool ACPI / osi: Fix default _OSI(Darwin) support ACPI / osi: Add acpi_osi=!! to allow reverting acpi_osi=! ACPI / osi: Cleanup _OSI("Linux") related code before introducing new support ACPI / osi: Fix an issue that acpi_osi=!* cannot disable ACPICA internal strings Conflicts: drivers/acpi/internal.h commit a6becfbaba801ccac4ca2708e4689a9ef013b080 Merge: 407aa3f 437014b 1373718 3d4b7ae e4f35c1 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 16:44:41 2016 +0200 Merge branches 'acpi-drivers', 'acpi-pm', 'acpi-ec' and 'acpi-video' * acpi-drivers: ACPI / GED: make evged.c explicitly non-modular ACPI / amba: Remove CLK_IS_ROOT ACPI / APD: Remove CLK_IS_ROOT ACPI: implement Generic Event Device * acpi-pm: ACPI / PM: Introduce efi poweroff for HW-full platforms without _S5 * acpi-ec: ACPI 2.0 / AML: Improve module level execution by moving the If/Else/While execution to per-table basis ACPI 2.0 / ECDT: Enable correct ECDT initialization order ACPI 2.0 / ECDT: Remove early namespace reference from EC ACPI 2.0 / ECDT: Split EC_FLAGS_HANDLERS_INSTALLED * acpi-video: ACPI / video: mark acpi_video_get_levels() inline Thermal / ACPI / video: add INT3406 thermal driver ACPI/video: export acpi_video_get_levels video / backlight: remove the backlight_device_registered API video / backlight: add two APIs for drivers to use commit 407aa3ff6f54ea2be7959639d664ae5183e2e9f8 Merge: 44549e8 d1ce3bb Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 16:44:15 2016 +0200 Merge branch 'acpica' * acpica: (41 commits) ACPICA: Update version to 20160422 ACPICA: Move all ASCII utilities to a common file ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write() ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support in acpi_hw_read() ACPICA: Executer: Introduce a set of macros to handle bit width mask generation ACPICA: Hardware: Add optimized access bit width support ACPICA: Utilities: Add ACPI_IS_ALIGNED() macro ACPICA: Renamed some #defined flag constants for clarity ACPICA: ACPI 6.0, tools/iasl: Add support for new resource descriptors ACPICA: ACPI 6.0: Update _BIX support for new package element ACPICA: ACPI 6.1: Support for new PCCT subtable ACPICA: Refactor evaluate_object to reduce nesting ACPICA: Divergence: remove unwanted spaces for typedef ACPICA: Update version to 20160318 ACPICA: Namespace: Reorder \_SB._INI to make sure it is evaluated before _REG evaluations ACPICA: Events: Fix an issue that _REG association can happen before namespace is initialized ACPICA: Tables: Fix wrong MLC condition for dynamic table loading ACPICA: Interpreter: Fix wrong conditions for acpi_ev_install_region_handlers() invocation ACPICA: Hardware: Enhance acpi_hw_validate_register() with access_width/bit_offset awareness Utilities: Fix missing parentheses in ACPI_GET_BITS()/ACPI_SET_BITS() ... commit 484f689fc9d4eb91c68f53e97dc355b1b06c3edb Author: tom will <os@iscas.ac.cn> Date: Mon May 16 10:31:07 2016 -0400 drm/amdgpu: fix array out of bounds When the initial value of i is greater than zero, it may cause endless loop, resulting in array out of bounds, fix it. This is a port of the radeon fix to amdgpu. Signed-off-by: tom will <os@iscas.ac.cn> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a8efd58815a8d8bdca409a4b8319281cd9c24f7f Author: tom will <os@iscas.ac.cn> Date: Sun May 15 21:58:11 2016 -0700 drm/radeon: fix array out of bounds When the initial value of i is greater than zero, it may cause endless loop, resulting in array out of bounds, fix it. Signed-off-by: tom will <os@iscas.ac.cn> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/radeon/kv_dpm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 680834ca0ad4e9827048d4bda1e38db69c3dd1e4 Merge: 36fac9e 14b05c5 Author: David Sterba <dsterba@suse.com> Date: Mon May 16 15:46:29 2016 +0200 Merge branch 'foreign/jeffm/uapi' into for-chris-4.7-20160516 # Conflicts: # include/uapi/linux/btrfs.h commit 36fac9e9ff20f71fe7ba21978f5949a38d390a4b Merge: 5ef64a3 88acff6 Author: David Sterba <dsterba@suse.com> Date: Mon May 16 15:46:26 2016 +0200 Merge branch 'foreign/anand/dev-del-by-id-ext' into for-chris-4.7-20160516 commit 5ef64a3e757c94b2f2fc61465ef9603aaacaecff Merge: 73d32ce e1860a7 Author: David Sterba <dsterba@suse.com> Date: Mon May 16 15:46:24 2016 +0200 Merge branch 'cleanups-4.7' into for-chris-4.7-20160516 commit 73d32ce21e1701eaafcea3cbc2a8f27ab1967abe Merge: 02da2d7 4673272 Author: David Sterba <dsterba@suse.com> Date: Mon May 16 15:46:23 2016 +0200 Merge branch 'misc-4.7' into for-chris-4.7-20160516 commit a158f2b79ff1948c864a38296ea4249f7296362b Merge: 581abba 515511a Author: Takashi Iwai <tiwai@suse.de> Date: Mon May 16 14:59:00 2016 +0200 Merge tag 'asoc-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Updates for v4.7 The updates this time around are almost all driver code: - Further slow progress on the topology code. - Substantial updates and improvements for the da7219, es8328, fsl-ssi Intel and rcar drivers. commit 27c4a1c5ef61b6d4a9aeae68b24419b4319b97ed Merge: aa24781 bc19b9a 0b26985 6c51cc0 0b81561 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 14:31:56 2016 +0200 Merge branches 'pm-avs', 'pm-clk', 'powercap' and 'pm-tools' * pm-avs: PM / AVS: rockchip-io: make io-domains a child of the GRF * pm-clk: PM / clk: ensure we don't allocate a -ve size of count clks * powercap: powercap/intel_rapl: Add support for Kabylake * pm-tools: cpupower: fix potential memory leak cpupower: Add cpuidle parts into library cpupowerutils: bench: trivial fix of spelling mistake on "average" Fix cpupower manpages "NAME" section cpupower: bench: parse.c: fix several resource leaks Honour user's LDFLAGS commit aa24781b1cbd62cc7e7d2f1964bfd5727388bf3e Merge: 7777c27 fba1fbf 164a215 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 14:31:29 2016 +0200 Merge branches 'pm-core' and 'pm-domains' * pm-core: PM / sleep: Drop unused `info' variable PM / Runtime: Move ignore_children flag under CONFIG_PM PM / Runtime: Fix error path in pm_runtime_force_resume() * pm-domains: PM / Domains: Drop unnecessary wakeup code from pm_genpd_prepare() PM / Domains: Remove redundant pm_runtime_get|put*() in pm_genpd_prepare() PM / Domains: Remove ->save|restore_state() callbacks PM / Domains: Rename pm_genpd_runtime_suspend|resume() PM / Domains: Rename stop_ok to suspend_ok for the genpd governor commit 7777c2785b4ae5bfbef1c9f7dd4a08660541cb45 Merge: acc53b4 512eae3 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 14:31:15 2016 +0200 Merge branch 'pm-devfreq' * pm-devfreq: PM / devfreq: style/typo fixes PM / devfreq: exynos: Add the detailed correlation for Exynos5422 bus PM / devfreq: event: Find the instance of devfreq-event device by using phandle PM / devfreq: event: Add new Exynos NoC probe driver MAINTAINERS: Add samsung bus frequency driver entry PM / devfreq: exynos: Remove unused exynos4/5 busfreq driver PM / devfreq: exynos: Add the detailed correlation between sub-blocks and power line PM / devfreq: exynos: Update documentation for bus devices using passive governor PM / devfreq: exynos: Add support of bus frequency of sub-blocks using passive governor PM / devfreq: Add new passive governor PM / devfreq: Add new DEVFREQ_TRANSITION_NOTIFIER notifier PM / devfreq: Add devfreq_get_devfreq_by_phandle() PM / devfreq: exynos: Add documentation for generic exynos bus frequency driver PM / devfreq: exynos: Add generic exynos bus frequency driver commit acc53b49b183adaee6c839430a04b464908db84f Merge: c47b3bd fd7c3c2 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 14:31:03 2016 +0200 Merge branch 'pm-cpuidle' * pm-cpuidle: cpuidle: Replace ktime_get() with local_clock() drivers: firmware: psci: use const and __initconst for psci_cpuidle_ops soc: qcom: spm: Use const and __initconst for qcom_cpuidle_ops ARM: cpuidle: constify return value of arm_cpuidle_get_ops() ARM: cpuidle: add const qualifier to cpuidle_ops member in structures intel_idle: add BXT support cpuidle: Indicate when a device has been unregistered commit c47b3bd0d3a18a93d62b91d2d02e3fe599805e6d Merge: 29cff18 1aa7a6e Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 14:30:43 2016 +0200 Merge branch 'pm-cpufreq' * pm-cpufreq: (63 commits) intel_pstate: Clean up get_target_pstate_use_performance() intel_pstate: Use sample.core_avg_perf in get_avg_pstate() intel_pstate: Clarify average performance computation intel_pstate: Avoid unnecessary synchronize_sched() during initialization cpufreq: schedutil: Make default depend on CONFIG_SMP cpufreq: powernv: del_timer_sync when global and local pstate are equal cpufreq: powernv: Move smp_call_function_any() out of irq safe block intel_pstate: Clean up intel_pstate_get() cpufreq: schedutil: Make it depend on CONFIG_SMP cpufreq: governor: Fix handling of special cases in dbs_update() cpufreq: intel_pstate: Ignore _PPC processing under HWP cpufreq: arm_big_little: use generic OPP functions for {init, free}_opp_table cpufreq: tango: Use generic platdev driver cpufreq: Fix GOV_LIMITS handling for the userspace governor cpufreq: mvebu: Move cpufreq code into drivers/cpufreq/ cpufreq: dt: Kill platform-data mvebu: Use dev_pm_opp_set_sharing_cpus() to mark OPP tables as shared cpufreq: dt: Identify cpu-sharing for platforms without operating-points-v2 cpufreq: governor: Change confusing struct field and variable names cpufreq: intel_pstate: Enable PPC enforcement for servers ... commit 29cff1844a340f27fa8b9a47adcee880dcc3ae6f Merge: 44549e8 c854120 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon May 16 14:30:14 2016 +0200 Merge branch 'pm-opp' * pm-opp: PM / OPP: Move CONFIG_OF dependent code in a separate file PM / OPP: add non-OF versions of dev_pm_opp_{cpumask_, }remove_table PM / OPP: pass cpumask by reference PM / OPP: Add dev_pm_opp_get_sharing_cpus() PM / OPP: Mark cpumask as const in dev_pm_opp_set_sharing_cpus() PM / OPP: -ENOSYS is applicable only to syscalls PM / OPP: Mark shared-opp for non-dt case PM / OPP: Relocate dev_pm_opp_set_sharing_cpus() PM / OPP: dev_pm_opp_set_sharing_cpus() doesn't depend on CONFIG_OF PM / OPP: Add missing doc style comments PM / OPP: Propagate the error returned by _find_opp_table() commit b9c43856f21d97ffdfdd642acf2eb0b52d3b1555 Author: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Date: Mon May 9 16:20:42 2016 +0300 of: dynamic: changeset prop-update revert fix When reverting an update property changeset entry that created a property the reverse operation is a remove property and not an update. Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/dynamic.c | 5 +++++ 1 file changed, 5 insertions(+) commit bb91f923d176578257aed682047653cc33148413 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 23:22:52 2016 +1000 drivers/of: Export of_detach_node() This exports of_detach_node() for PowerPC PowerNV PCI hotplug driver. No functional changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/dynamic.c | 1 + 1 file changed, 1 insertion(+) commit 83262418b0ef8bda66eca7c72d4c24ae6f7b230e Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 23:22:51 2016 +1000 drivers/of: Return allocated memory from of_fdt_unflatten_tree() This returns the allocate memory chunk, storing the unflattened device tree, from of_fdt_unflatten_tree() so that memory chunk can be released on demand in PowerNV PCI hotplug driver. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/fdt.c | 33 ++++++++++++++++++++++----------- include/linux/of_fdt.h | 6 +++--- 2 files changed, 25 insertions(+), 14 deletions(-) commit c4263233f30e72f2645ff83c9074c994f88b015a Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 23:22:50 2016 +1000 drivers/of: Specify parent node in of_fdt_unflatten_tree() This adds one more argument to of_fdt_unflatten_tree() to specify the parent node of the FDT blob that is going to be unflattened. In the result, the function can be used to unflatten FDT blob that represents device sub-tree in PowerNV PCI hotplug driver. Cc: Jyri Sarha <jsarha@ti.com> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Rob Herring <robh@kernel.org> drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c | 2 +- drivers/of/fdt.c | 14 ++++++++++---- drivers/of/unittest.c | 2 +- include/linux/of_fdt.h | 1 + 4 files changed, 13 insertions(+), 6 deletions(-) commit 947c82cbf01c9c6012cb96e385b5f6d6d1e1decb Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 23:22:49 2016 +1000 drivers/of: Rename unflatten_dt_node() This renames unflatten_dt_node() to unflatten_dt_nodes() as it populates multiple device nodes from FDT blob. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/fdt.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 50800082f17645620bfdd357ba9141c86b76363d Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 23:22:48 2016 +1000 drivers/of: Avoid recursively calling unflatten_dt_node() In current implementation, unflatten_dt_node() is called recursively to unflatten device nodes in FDT blob. It's stress to limited stack capacity, especially to adopt the function to unflatten device sub-tree that possibly has multiple root nodes. In that case, we runs out of stack and the system can't boot up successfully. In order to reuse the function to unflatten device sub-tree, this avoids calling the function recursively, meaning the device nodes are unflattened in one call on unflatten_dt_node(): two arrays are introduced to track the parent path size and the device node of current level of depth, which will be used by the device node on next level of depth to be unflattened. All device nodes in more than 64 level of depth are dropped and hopefully, the system can boot up successfully with the partial device-tree. Also, the parameter "poffset" and "fpsize" are unused and dropped and the parameter "dryrun" is figured out from "mem == NULL". Besides, the return value of the function is changed to indicate the size of memory consumed by the unflatten device tree or error code. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/fdt.c | 122 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 74 insertions(+), 48 deletions(-) commit dfbd4c6eff35f1b1065cca046003cc9d7ff27222 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 23:22:47 2016 +1000 drivers/of: Split unflatten_dt_node() The function unflatten_dt_node() is called recursively to unflatten device nodes and properties in the FDT blob. It looks complicated and hard to be understood. This splits the function into 3 functions: populate_properties(), populate_node() and unflatten_dt_node(). populate_properties(), which is called by populate_node(), creates properties for the indicated device node. The later one creates the device nodes from FDT blob. populate_node() gets the offset in FDT blob for next device nodes and then calls populate_node(). No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Rob Herring <robh@kernel.org> drivers/of/fdt.c | 249 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 147 insertions(+), 102 deletions(-) commit 65a9f31c5042e5bb50d30ed8ae374044be561054 Author: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Date: Sat May 14 20:09:52 2016 -0700 scripts/package/Makefile: rpmbuild add support of RPMOPTS After commit 21a59991ce0c ("scripts/package/Makefile: rpmbuild is needed for rpm targets"), it is no longer possible to specify RPMOPTS. For example, we can no longer able to control _topdir using the following make command. make RPMOPTS="--define '_topdir /home/xyz/workspace/'" binrpm-pkg Fixes: 21a59991ce0c ("scripts/package/Makefile: rpmbuild is needed for rpm targets") Cc: <stable@vger.kernel.org> # 4.3+ Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Michal Marek <mmarek@suse.com> scripts/package/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit e8df1a95b685af84a81698199ee206e0e66a8b44 Author: Dave Hansen <dave.hansen@linux.intel.com> Date: Fri May 13 15:13:28 2016 -0700 x86/cpufeature, x86/mm/pkeys: Fix broken compile-time disabling of pkeys When I added support for the Memory Protection Keys processor feature, I had to reindent the REQUIRED/DISABLED_MASK macros, and also consult the later cpufeature words. I'm not quite sure how I bungled it, but I consulted the wrong word at the end. This only affected required or disabled cpu features in cpufeature words 14, 15 and 16. So, only Protection Keys itself was screwed over here. The result was that if you disabled pkeys in your .config, you might still see some code show up that should have been compiled out. There should be no functional problems, though. In verifying this patch I also realized that the DISABLE_PKU/OSPKE macros were defined backwards and that the cpu_has() check in setup_pku() was not doing the compile-time disabled checks. So also fix the macro for DISABLE_PKU/OSPKE and add a compile-time check for pkeys being enabled in setup_pku(). Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Cc: <stable@vger.kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Dave Hansen <dave@sr71.net> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Fixes: dfb4a70f20c5 ("x86/cpufeature, x86/mm/pkeys: Add protection keys related CPUID definitions") Link: http://lkml.kernel.org/r/20160513221328.C200930B@viggo.jf.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/include/asm/cpufeature.h | 12 ++++++------ arch/x86/include/asm/disabled-features.h | 6 +++--- arch/x86/kernel/cpu/common.c | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) commit 4544ba8c6b1743499cabb682897a469911845f15 Author: Borislav Petkov <bp@suse.de> Date: Mon May 16 11:34:28 2016 +0200 locking/rwsem: Fix comment on register clobbering Document explicitly that %edx can get clobbered on the slow path, on 32-bit kernels. Something I learned the hard way. :-\ Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: Guenter Roeck <linux@roeck-us.net> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: linux-next@vger.kernel.org Link: http://lkml.kernel.org/r/20160516093428.GA26108@pd.tnic Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/lib/rwsem.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1c447116d017a98c90f8f71c8c5a611e0aa42178 Author: Adrian Hunter <adrian.hunter@intel.com> Date: Thu May 5 08:12:28 2016 +0300 mmc: mmc: Fix partition switch timeout for some eMMCs Some eMMCs set the partition switch timeout too low. Now typically eMMCs are considered a critical component (e.g. because they store the root file system) and consequently are expected to be reliable. Thus we can neglect the use case where eMMCs can't switch reliably and we might want a lower timeout to facilitate speedy recovery. Although we could employ a quirk for the cards that are affected (if we could identify them all), as described above, there is little benefit to having a low timeout, so instead simply set a minimum timeout. The minimum is set to 300ms somewhat arbitrarily - the examples that have been seen had a timeout of 10ms but were sometimes taking 60-70ms. Cc: stable@vger.kernel.org Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/core/mmc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 685d29ef1783af0049c4aeeec43722e410d5845d Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon May 9 17:01:07 2016 +0200 mmc: sh_mobile_sdhi: enable SDIO IRQs for RCar Gen3 Tested on a Salvator-X board with a Spectec SDW-823 WLAN card. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/sh_mobile_sdhi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88ea46bcbfd677b779897bbada32ec0709a6c92f Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon May 9 09:59:59 2016 +0200 mmc: sdio: fall back to SDIO 1.0 for broken 1.1 cards I have two SDIO WLAN cards which specify being SDIO Rev. 1.1 cards but their FUNCE tuple reports the smaller size of a Rev 1.0 card. So, enforce 1.0 on these cards to avoid reading the not present registers. They are not really used anyhow. My cards initialize properly after this patch. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/core/sdio_cis.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5b5fe95a6977b9cdd30749cb1576df2329d70da9 Author: Simon Horman <horms+renesas@verge.net.au> Date: Tue May 10 09:14:24 2016 +0900 mmc: sdhci-st: correct name of sd-uhs-sdr50 property Correct what appears to be a typo in the name of the sd-uhs-sdr50. Also fix mixed tab/space indentation. Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Documentation/devicetree/bindings/mmc/sdhci-st.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 560e647515ca90f4277fb8d8f94d370dae0709b5 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Mon May 9 10:26:58 2016 +0200 MAINTAINERS: update entry for TMIO MMC driver I have some more additions planned for this driver, so I'd like to get notified of other changes and coordinate them. Drop Ian as maintainer because he hasn't been involved in development for a while. Thanks for all the initial work, of course! Also, reflect the recent changes to the include file layout. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Cc: Ian Molton <ian@mnementh.co.uk> Acked-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> MAINTAINERS | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit cc4d04be94e34fc6d53307b534f830c6854c8721 Author: Ken Sumrall <ksumrall@android.com> Date: Tue May 10 14:53:13 2016 +0530 mmc: block: improve logging of handling emmc timeouts Add some logging to make it clear just how the emmc timeout was handled. Signed-off-by: Ken Sumrall <ksumrall@android.com> [AmitP: cherry-picked this Android patch from aosp common kernel android-4.4] Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/card/block.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) commit ded97e0b165076556714d4a5708c87f5bcf03783 Author: Dong Aisheng <aisheng.dong@nxp.com> Date: Sat Apr 16 01:29:25 2016 +0800 mmc: sdhci: removed unneeded function wrappers After commit d6463f170cf0 ("mmc: sdhci: Remove redundant runtime PM calls"), some of original sdhci_do_xx() function wrappers becomes meaningless, so remove them. Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> Acked-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/host/sdhci.c | 60 ++++++++++++------------------------------------ 1 file changed, 15 insertions(+), 45 deletions(-) commit 4673272f43ae790ab9ec04e38a7542f82bb8f020 Author: Scott Talbert <scott.talbert@hgst.com> Date: Mon May 9 09:14:28 2016 -0400 btrfs: fix memory leak during RAID 5/6 device replacement A 'struct bio' is allocated in scrub_missing_raid56_pages(), but it was never freed anywhere. Signed-off-by: Scott Talbert <scott.talbert@hgst.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/scrub.c | 2 ++ 1 file changed, 2 insertions(+) commit 52e9e6e05617264e6e609a8699098380d6b7a6aa Author: Fengguang Wu <fengguang.wu@intel.com> Date: Thu Mar 17 10:36:28 2016 +0800 microblaze: pci: export isa_io_base to fix link errors ERROR: "isa_io_base" [sound/pci/vx222/snd-vx222.ko] undefined! ERROR: "isa_io_base" [sound/pci/trident/snd-trident.ko] undefined! ERROR: "isa_io_base" [sound/pci/snd-via82xx.ko] undefined! ... ERROR: "isa_io_base" [drivers/watchdog/wdt_pci.ko] undefined! ERROR: "isa_io_base" [drivers/watchdog/pcwd_pci.ko] undefined! ERROR: "isa_io_base" [drivers/video/vgastate.ko] undefined! ... ERROR: "isa_io_base" [drivers/video/fbdev/cirrusfb.ko] undefined! ERROR: "isa_io_base" [drivers/video/fbdev/arkfb.ko] undefined! ERROR: "isa_io_base" [drivers/usb/host/uhci-hcd.ko] undefined! ERROR: "isa_io_base" [drivers/usb/host/isp1362-hcd.ko] undefined! ERROR: "isa_io_base" [drivers/tty/serial/jsm/jsm.ko] undefined! ERROR: "isa_io_base" [drivers/tty/serial/8250/8250_pci.ko] undefined! ... ERROR: "isa_io_base" [drivers/scsi/qla2xxx/qla2xxx.ko] undefined! ERROR: "isa_io_base" [drivers/scsi/ppa.ko] undefined! Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> arch/microblaze/pci/pci-common.c | 2 ++ 1 file changed, 2 insertions(+) commit fbce3befd60d40639bf3c6b60f7477b2f988f92d Author: Michal Simek <michal.simek@xilinx.com> Date: Mon Nov 16 08:53:38 2015 +0100 microblaze: Wire up userfaultfd, membarrier, mlock2 syscalls Wire up new syscalls userfaultfd, membarrier and mlock2. Signed-off-by: Michal Simek <michal.simek@xilinx.com> arch/microblaze/include/asm/unistd.h | 2 +- arch/microblaze/include/uapi/asm/unistd.h | 3 +++ arch/microblaze/kernel/syscall_table.S | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) commit 581abbaa03367f0b1327521f30bd2b69b8075b2f Merge: 84add30 639db59 Author: Takashi Iwai <tiwai@suse.de> Date: Mon May 16 09:13:08 2016 +0200 Merge branch 'for-next' into for-linus commit 191b07541fcdd1de1ccc71d00bc28ca5060dd484 Author: Michele Di Giorgio <michele.digiorgio@arm.com> Date: Wed May 11 10:49:07 2016 +0100 thermal: check validity get_trip_hyst function pointer in bang-bang governor Bang-bang thermal governor uses trip point hysteresis to make decisions. Hysteresis is a required property in the device tree for trip points, but it is an optional thermal zone device operation. Hence, we need to check whether the function pointer is valid or not. If it is not available, we assume the hysteresis to be zero. Consequently, a highly varying temperature will make the governor continuosly switch a cooling device ON and OFF. CC: Zhang Rui <rui.zhang@intel.com> CC: Eduardo Valentin <edubezval@gmail.com> CC: Peter Feuerer <peter@piie.net> Signed-off-by: Michele Di Giorgio <michele.digiorgio@arm.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> drivers/thermal/gov_bang_bang.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a8165d421dabd476d811f89942e345827f7b1497 Author: chenhui zhao <chenhui.zhao@freescale.com> Date: Fri Jan 15 17:38:20 2016 +0800 powerpc/fsl-pci: Add a workaround for PCI 5 errata Issue: As a master, the PCI IP block can combine a memory write to the last PCI double word (4 bytes) of a cacheline with a 4 byte memory write to the first PCI double word of the subsequent cacheline. This affects 32-bit PCI target devices that blindly assert STOP on memory-write transactions, without detecting that the data beat being transferred is the last data beat of the transaction. It can cause a hang. PCI-X operation is not affected by this erratum. Workaround: Setting the bit MDS in the PCI Bus Function Register will disable the combining of crossing cacheline boundary requests into one burst transaction. Therefore, it can prevent the errata scenario from occurring. This errata exists in MPC8543, MPC8543E, MPC8545, MPC8545E, MPC8547, MPC8547E, MPC8548 and MPC8548E. Refer to PCI 5 in MPC8548 errata document. Signed-off-by: Zhao Chenhui <chenhui.zhao@freescale.com> Signed-off-by: Zhiqiang Hou <Zhiqiang.Hou@freescale.com> [scottwood: whitespace fix] Signed-off-by: Scott Wood <oss@buserror.net> arch/powerpc/sysdev/fsl_pci.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) commit 6a369fa28509c3b6a35db979d6fa97a075b94876 Author: Hou Zhiqiang <Zhiqiang.Hou@freescale.com> Date: Wed Jan 13 15:54:46 2016 +0800 powerpc/fsl: Fix SPI compatible on t208xrdb and t1040rdb On the t208xrdb and t1040rdb, the SPI device is n25q512ax3 instead of n25q512a. Signed-off-by: Hou Zhiqiang <Zhiqiang.Hou@freescale.com> Signed-off-by: Scott Wood <oss@buserror.net> arch/powerpc/boot/dts/fsl/t104xrdb.dtsi | 2 +- arch/powerpc/boot/dts/fsl/t208xrdb.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 04cafed7fc19a8010771c788708ac97c405fc3de Author: Peter Zijlstra <peterz@infradead.org> Date: Thu May 12 13:57:45 2016 +0200 locking/rwsem: Fix down_write_killable() The new signal_pending exit path in __rwsem_down_write_failed_common() was fingered as breaking his kernel by Tetsuo Handa. Upon inspection it was found that there are two things wrong with it; - it forgets to remove WAITING_BIAS if it leaves the list empty, or - it forgets to wake further waiters that were blocked on the now removed waiter. Especially the first issue causes new lock attempts to block and stall indefinitely, as the code assumes that pending waiters mean there is an owner that will wake when it releases the lock. Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Tested-by: Michal Hocko <mhocko@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Chris Zankel <chris@zankel.net> Cc: David S. Miller <davem@davemloft.net> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: Waiman Long <Waiman.Long@hpe.com> Link: http://lkml.kernel.org/r/20160512115745.GP3192@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/locking/rwsem-xadd.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) commit f23e0f6507d9e5bcfc30a7f6be5d8df8fad9ec85 Merge: bf14e9e 1c306f7 Author: David S. Miller <davem@davemloft.net> Date: Sun May 15 13:47:27 2016 -0400 Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2016-05-14 This series contains updates to i40e and i40evf. Kevin adds support to disable link on all ports and changes bits set for telling firmware the PHY needs to be modified by the driver. Anjali adds a feature to enable/disable all multicast for a trusted VF. Added priv-flag knob to configure global true promiscuous support. Shannon adds the support code for calling the admin queue API call aq_set_switch_config(). Mitch modifies the VF, to log a message if an untrusted VF attempts to configure promiscuous mode, but lies to it and returns everything is ok instead of returning an error. Corrects the logic for reporting the receive packet hash. Fixed the adding of a broadcast filter for VFs, since that all VSIs are configured to receive broadcasts as default, so do not need to add a filter. Catherine refactors the ethtool get_settings to report the possible supported link modes from what we know about the current PHY type and that with the firmware supported PHY types. Jacob changes the driver to use WARN_ONCE in order to highlight the issue, but do not display a warning every time when receive hang message is received. Akeem corrects receive ptype payload layer for non_tunneled IPv6, when it should be layer 4 for UDP, instead of layer 3. Dan Carpenter fixes an uninitialized variable bug. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit bf14e9ec80dea9a16cd47bdf1d7c418add2594f0 Merge: 909b27f7 b67daab Author: David S. Miller <davem@davemloft.net> Date: Sun May 15 13:35:49 2016 -0400 Merge branch 'bnxt_en-next' Michael Chan says: ==================== bnxt_en: updates for net-next. Non-critical bug fixes, improvements, a new ethtool feature, and a new device ID. v2: Fixed a bug in bnxt_get_module_eeprom() found by Ben Hutchings. Ajit Khaparde (2): bnxt_en: Add Support for ETHTOOL_GMODULEINFO and ETHTOOL_GMODULEEEPRO bnxt_en: Report PCIe link speed and width during driver load Michael Chan (6): bnxt_en: Reduce maximum ring pages if page size is 64K. bnxt_en: Improve the delay logic for firmware response. bnxt_en: Fix length value in dmesg log firmware error message. bnxt_en: Simplify and improve unsupported SFP+ module reporting. bnxt_en: Add BCM57314 device ID. bnxt_en: Use dma_rmb() instead of rmb(). Satish Baddipadige (1): bnxt_en: Fix invalid max channel parameter in ethtool -l. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit b67daab033293b3882ba4dc926ffb084d70044e0 Author: Michael Chan <michael.chan@broadcom.com> Date: Sun May 15 03:04:51 2016 -0400 bnxt_en: Use dma_rmb() instead of rmb(). Use the weaker but more appropriate dma_rmb() to order the reading of the completion ring. Suggested-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5049e33b559a44e9f216d86c58c7c7fce6f5df2f Author: Michael Chan <michael.chan@broadcom.com> Date: Sun May 15 03:04:50 2016 -0400 bnxt_en: Add BCM57314 device ID. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +++ 1 file changed, 3 insertions(+) commit 10289bec0072b13f629a654d94faf1dadd44f335 Author: Michael Chan <michael.chan@broadcom.com> Date: Sun May 15 03:04:49 2016 -0400 bnxt_en: Simplify and improve unsupported SFP+ module reporting. The current code is more complicated than necessary and can only report unsupported SFP+ module if it is plugged in after the device is up. Rename bnxt_port_module_event() to bnxt_get_port_module_status(). We already have the current module_status in the link_info structure, so just check that and report any unsupported SFP+ module status. Delete the unnecessary last_port_module_event. Call this function at the end of bnxt_open to report unsupported module already plugged in. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 66 ++++++++++++++----------------- drivers/net/ethernet/broadcom/bnxt/bnxt.h | 1 - 2 files changed, 30 insertions(+), 37 deletions(-) commit 8578d6c19a308dea3daf3d03acdf18724ec05590 Author: Michael Chan <michael.chan@broadcom.com> Date: Sun May 15 03:04:48 2016 -0400 bnxt_en: Fix length value in dmesg log firmware error message. The len value in the hwrm error message is wrong. Use the properly adjusted value in the variable len. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a11fa2be6d1564375dc57530680268ad569c2632 Author: Michael Chan <michael.chan@broadcom.com> Date: Sun May 15 03:04:47 2016 -0400 bnxt_en: Improve the delay logic for firmware response. The current code has 2 problems: 1. The maximum wait time is not long enough. It is about 60% of the duration specified by the firmware. It is calling usleep_range(600, 800) for every 1 msec we are supposed to wait. 2. The granularity of the delay is too coarse. Many simple firmware commands finish in 25 usec or less. We fix these 2 issues by multiplying the original 1 msec loop counter by 40 and calling usleep_range(25, 40) for each iteration. There is also a second delay loop to wait for the last DMA word to complete. This delay loop should be a very short 5 usec wait. This change results in much faster bring-up/down time: Before the patch: time ip link set p4p1 up real 0m0.120s user 0m0.001s sys 0m0.009s After the patch: time ip link set p4p1 up real 0m0.030s user 0m0.000s sys 0m0.010s Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) commit d0a42d6fc8eaf1b64f62b0bbc3b829b756eacf57 Author: Michael Chan <michael.chan@broadcom.com> Date: Sun May 15 03:04:46 2016 -0400 bnxt_en: Reduce maximum ring pages if page size is 64K. The chip supports 4K/8K/64K page sizes for the rings and we try to match it to the CPU PAGE_SIZE. The current page size limits for the rings are based on 4K/8K page size. If the page size is 64K, these limits are too large. Reduce them appropriately. Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnxt/bnxt.h | 7 +++++++ 1 file changed, 7 insertions(+) commit 90c4f788f6c08aaa52edbb47a817403376523375 Author: Ajit Khaparde <ajit.khaparde@broadcom.com> Date: Sun May 15 03:04:45 2016 -0400 bnxt_en: Report PCIe link speed and width during driver load Add code to log a message during driver load indicating PCIe link speed and width. The log message will look like this: bnxt_en 0000:86:00.0 eth0: PCIe: Speed 8.0GT/s Width x8 Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 42ee18fe4ca2a12b8370bb1c53fa6b9f9300c70c Author: Ajit Khaparde <ajit.khaparde@broadcom.com> Date: Sun May 15 03:04:44 2016 -0400 bnxt_en: Add Support for ETHTOOL_GMODULEINFO and ETHTOOL_GMODULEEEPRO Add support to fetch the SFP EEPROM settings from the firmware and display it via the ethtool -m command. We support SFP+ and QSFP modules. v2: Fixed a bug in bnxt_get_module_eeprom() found by Ben Hutchings. Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 + drivers/net/ethernet/broadcom/bnxt/bnxt.h | 11 ++ drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 121 ++++++++++++++++++++++ drivers/net/ethernet/broadcom/bnxt/bnxt_hsi.h | 34 ++++++ 4 files changed, 167 insertions(+) commit 18d6e4e2d800cbd44a7d7d215a49f99c6508e4a5 Author: Satish Baddipadige <sbaddipa@broadcom.com> Date: Sun May 15 03:04:43 2016 -0400 bnxt_en: Fix invalid max channel parameter in ethtool -l. When there is only 1 MSI-X vector or in INTA mode, tx and rx pre-set max channel parameters are shown incorrectly in ethtool -l. With only 1 vector, bnxt_get_max_rings() will return -ENOMEM. bnxt_get_channels should check this return value, and set max_rx/max_tx to 0 if it is non-zero. Signed-off-by: Satish Baddipadige <sbaddipa@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 909b27f706433a0b3dff79aa259de63aafe40a42 Merge: 8fbb89c 272911b Author: David S. Miller <davem@davemloft.net> Date: Sun May 15 13:32:12 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net The nf_conntrack_core.c fix in 'net' is not relevant in 'net-next' because we no longer have a per-netns conntrack hash. The ip_gre.c conflict as well as the iwlwifi ones were cases of overlapping changes. Conflicts: drivers/net/wireless/intel/iwlwifi/mvm/tx.c net/ipv4/ip_gre.c net/netfilter/nf_conntrack_core.c Signed-off-by: David S. Miller <davem@davemloft.net> commit 73e8b0528346e88a0624f2d9821f382cd6256677 Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Sat May 14 14:17:08 2016 +0200 i2c: rcar: add DMA support Make it possible to transfer i2c message buffers via DMA. Start/Stop/Sending_Slave_Address and some data is still handled using the old state machine, it is sending the bulk of the data that is done via DMA. The first byte of a transmission and the last two bytes of reception are sent/received using PIO. This is needed for the HW to have access to the first byte before DMA transmit and to be able to set the STOP condition for DMA reception. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Acked-by: Rob Herring <robh@kernel.org> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> [wsa: fixed a checkpatch warning] Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 3 + drivers/i2c/busses/i2c-rcar.c | 233 ++++++++++++++++++++- 2 files changed, 232 insertions(+), 4 deletions(-) commit 8fbb89c6fbfd1cda9ae413cd1e042837a8edbdeb Author: Florian Fainelli <f.fainelli@gmail.com> Date: Sat May 14 12:49:54 2016 -0700 net: switchdev: Drop EXPERIMENTAL from description Switchdev has been around for quite a while now, putting "EXPERIMENTAL" in the description is no longer accurate, drop it. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/switchdev/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a3e5afe491bf7462013aa9f0bb3b55e3d05b784d Author: Akinobu Mita <akinobu.mita@gmail.com> Date: Thu Apr 28 23:39:53 2016 +0900 iio: pressure: bmp280: fix error message for wrong chip id The bmp280 driver also supports BMP180 which has a different chip id with BMP280. The probe routine verifies that the device reports the correct chip id but the error message is confusing as if BMP280's chip id is always expected. Reported-by: Matt Ranostay <mranostay@gmail.com> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Cc: Matt Ranostay <mranostay@gmail.com> Cc: Vlad Dogaru <vlad.dogaru@intel.com> Cc: Christoph Mair <christoph.mair@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Hartmut Knaack <knaack.h@gmx.de> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Jonathan Cameron <jic23@kernel.org> drivers/iio/pressure/bmp280.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae67643edc6edcab41d8d5d35cb796416b253a01 Author: William Breathitt Gray <vilhelm.gray@gmail.com> Date: Wed May 11 08:47:46 2016 -0400 Documentation: Add ebc-c384_wdt watchdog-parameters.txt entry The WinSystems EBC-C384 watchdog timer driver supports two module parameters: timeout and nowayout. These parameters should be documented in the watchdog-parameters.txt file. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Documentation/watchdog/watchdog-parameters.txt | 4 ++++ 1 file changed, 4 insertions(+) commit 12fe36e2ca0e474a2d7b48ab018d16977f9745a4 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Fri May 6 18:29:41 2016 +0530 watchdog: shwdt: Use setup_timer() The function setup_timer combines the initialization of a timer with the initialization of the timer's function and data fields. The multiline code for timer initialization is now replaced with function setup_timer. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/shwdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d904ac34bdbcf62a50c745cfe991681ae3948e4e Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Fri May 6 18:29:40 2016 +0530 watchdog: cpwd: Use setup_timer() The function setup_timer combines the initialization of a timer with the initialization of the timer's function and data fields. The multiline code for timer initialization is now replaced with function setup_timer. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/cpwd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 022eedeebfdd54c67c7c3b8ef4f5ff42b4ba0cc5 Merge: b79ef07 0e95abf Author: Jonathan Corbet <corbet@lwn.net> Date: Sat May 14 10:21:57 2016 -0600 Merge branch 'jani-rest' into docs-next Patch series from Jani Nikula: > Jon, I was hoping we could consider nudging things forward a bit in the > kernel-doc and docproc reStructuredText front already in 4.7. I know > it's a bit close to the merge window, but this should not interfere with > anything else, and some of it are just trivial cleanups that I've been > carrying around locally. > > Obviously this doesn't actually add anything that uses them yet, but I > think it would be helpful to have some common base in to ease > collaboration. commit b79ef07d205c6504e701b48380d33fe2bab78ec5 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Wed May 11 13:56:05 2016 +0200 serial: doc: Use port->state instead of info As of commit ebd2c8f6d2ec4012 ("serial: kill off uart_info"), the circular transmission buffer is part of struct uart_state instead of struct uart_info. Make it clear this structure is pointed to from struct uart_port. Change 'circ' to 'circ_buf' to match the structure name while we're at it. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Documentation/serial/driver | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 95f981f2e3b9a27ea2eb744b6861a3b9c81a1fde Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Wed May 11 13:56:04 2016 +0200 serial: doc: Always refer to tty_port->mutex Stop referring to the mutex member of the tty_port struct as 'port->mutex', as 'port' is ambiguous, and usually refers to the uart_port struct in this document. Use 'tty_port->mutex' instead, following the single existing use. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Documentation/serial/driver | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit fc4d2c7390dde766ec62f8f83be06e9227e9eb7a Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Fri Apr 1 13:56:26 2016 +0200 arm64: defconfig: enable Renesas Watchdog Timer Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> arch/arm64/configs/defconfig | 2 ++ 1 file changed, 2 insertions(+) commit bd99b68ed7f96c9c845aad2a25f84145213058f2 Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Fri Apr 1 13:56:23 2016 +0200 watchdog: renesas-wdt: add driver Add support for watchdogs (RWDT and SWDT) found on RCar Gen3 based SoCs from Renesas. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> .../devicetree/bindings/watchdog/renesas-wdt.txt | 25 +++ drivers/watchdog/Kconfig | 8 + drivers/watchdog/Makefile | 1 + drivers/watchdog/renesas_wdt.c | 213 +++++++++++++++++++++ 4 files changed, 247 insertions(+) commit 30955e71fc2bd1b966ce6531285ac59ae653819f Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue May 10 20:59:56 2016 +0200 Documentation: vm: Spelling s/paltform/platform/g Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Documentation/vm/hugetlbpage.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2bdbc5bc16c338a43c9ac7ef93c1a60a8b17ee7d Author: Qiang Huang <h.huangqiang@huawei.com> Date: Wed May 11 14:07:31 2016 +0800 Documentation/memcg: update kmem limit doc as codes behavior The restriction of kmem setting is not there anymore because the accounting is enabled by default even in the cgroup v1 - see b313aeee2509 ("mm: memcontrol: enable kmem accounting for all cgroups in the legacy hierarchy"). Update docs accordingly. Signed-off-by: Qiang Huang <h.huangqiang@huawei.com> Acked-by: Michal Hocko <mhocko@suse.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Documentation/cgroup-v1/memory.txt | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) commit 0e95abf9be3108498128458ffb087209e0a1b5fa Author: Jani Nikula <jani.nikula@intel.com> Date: Thu May 12 16:15:44 2016 +0300 docproc: print a comment about autogeneration for rst output Leave a hint to folks which file to edit instead. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> scripts/docproc.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 064669b43baa4b74b262c49db3ce69118e2f0f2d Author: Jani Nikula <jani.nikula@intel.com> Date: Thu May 12 16:15:43 2016 +0300 docproc: add support for reStructuredText format via --rst option Expect reStructuredText input and have kernel-doc produce reStructuredText output with the new --rst option. Also add --docbook option for completeness. If no option is given, default to reStructuredText if the input file has ".rst" extension, DocBook otherwise. Directives for reStructuredText use .. ! instead of just !, to make them reStructuredText comments. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> scripts/docproc.c | 90 ++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 80 insertions(+), 10 deletions(-) commit 1dcdad0aacb6d762b77f3e17167d131a14c0dbce Author: Jani Nikula <jani.nikula@intel.com> Date: Thu May 12 16:15:42 2016 +0300 docproc: abstract terminating lines at first space Cleaner code. Also fixes a bug when F or P directives didn't in fact have space. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> scripts/docproc.c | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) commit a48dc45e9c02ebaebc79de5b3fec8e4f59a9fe9f Author: Jani Nikula <jani.nikula@intel.com> Date: Thu May 12 16:15:41 2016 +0300 docproc: abstract docproc directive detection Helps follow-up work. No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> scripts/docproc.c | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) commit 868fb19212ca5bdbfa765a97a4bf6d2439b89056 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu May 12 16:15:40 2016 +0300 docproc: reduce unnecessary indentation Improves clarity. No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> scripts/docproc.c | 93 ++++++++++++++++++++++++++++--------------------------- 1 file changed, 47 insertions(+), 46 deletions(-) commit 568fb2dec9c68bb38c2a1ad01fb3d4dd41488115 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu May 12 16:15:39 2016 +0300 docproc: add variables for subcommand and filename Improves clarity. No functional changes. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> scripts/docproc.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 6285097654725f39357527b553d03b70bfbaf4d2 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu May 12 16:15:38 2016 +0300 kernel-doc: use rst C domain directives and references for types First, the headings for structs, enums and typedefs will be similar to functions. Second, this provides a kind of namespace for cross references. Third, and most importantly, the return and parameter types from .. c:function:: definitions will automagically become cross references to the documented types. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> scripts/kernel-doc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) commit c0d1b6ee780ab16f16cdbe046aa9c83a2a31f9e2 Author: Jonathan Corbet <corbet@lwn.net> Date: Thu May 12 16:15:37 2016 +0300 kernel-doc: produce RestructuredText output If given the -rst flag, output will now be in RestructuredText. Various glitches to be worked out yet. In the end I decided not to use RST section headings within the kerneldoc comments. gpu.tmpl already has headings five levels deep; adding more is not going to bring clarity. This is really just Jani Nikula's asciidoc change with the serial numbers filed off. It's a hack job that doubtless needs a lot of cleaning up. Signed-off-by: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> scripts/kernel-doc | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) commit fadc0b31cba0bb56bce1a3259cc60e4d7ee67333 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu May 12 16:15:36 2016 +0300 kernel-doc: rewrite usage description, remove duplicated comments Instead of having the kernel-doc usage in both comments and in output to the user, merge them all to one here document. While at it, imrove the text and make it pretty. Give shoemaker's children some shoes. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net> scripts/kernel-doc | 83 ++++++++++++++++++++++++------------------------------ 1 file changed, 37 insertions(+), 46 deletions(-) commit e26e74b15468b42c47cf9b045539720006abb1e4 Author: Colin Ian King <colin.king@canonical.com> Date: Tue Apr 26 18:18:49 2016 +0100 watchdog: remove error message when unable to allocate watchdog device The dev_err message is superfluous because the failure is already printed by dev_kzalloc, so remove it. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/jz4740_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit b97cb21a46341575c6cbe3d327a08b99030c3aee Author: Knud Poulsen <knpo@ieee.org> Date: Tue Apr 26 08:44:16 2016 +0200 watchdog: f71808e_wdt: Fix WDTMOUT_STS register read Tested and verified on Lanner LEC-3030 Industrial PC (with F81865) Datasheet verified for F71808, F71858, F71862, F71869, F71869A, F71882, F71889, F81865 Datasheet references: F71808A: http://www.electronicsdatasheets.com/download/534cf560e34e2406135f4658.pdf?format=pdf F71858: http://www.electronicsdatasheets.com/download/534cf55fe34e2406135f4635.pdf?format=pdf F71862: http://www.hardwaresecrets.com/datasheets/F71862_V027P.pdf F71869: http://www.clubedohardware.com.br/datasheets/366451_F71869.pdf F71869A: http://www.chipset-ic.com/datasheet/F71869AD.pdf F71882: http://www.digchip.com/datasheets/parts/datasheet/931/F71882-pdf.php F71889: http://pdf1.alldatasheet.com/datasheet-pdf/view/406312/FINTEK/F71889.html F81865: http://www.hardwaresecrets.com/datasheets/F81865_V028P.pdf http://www.alldatasheet.com/datasheet-pdf/pdf/406317/FINTEK/F81865.html Signed-off-by: Knud Poulsen <knpo@ieee.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/f71808e_wdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 85c130a8bf542205a84edbca225972375fcb07eb Author: Knud Poulsen <knpo@ieee.org> Date: Mon Apr 25 17:34:47 2016 +0200 watchdog: f71808e_wdt: Fix typo Spelling/ typo Signed-off-by: Knud Poulsen <knpo@ieee.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/f71808e_wdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ea0c03e80ccd99cb0ab208397da5a417dabf9a22 Author: Knud Poulsen <knpo@ieee.org> Date: Mon Apr 25 12:28:51 2016 +0200 watchdog: f71808e_wdt: Add F81865 support Adds watchdog enable support for Fintek F81865 Super-IO chip to Fintek wdt driver (f71808e_wdt) Tested and verified on Lanner LEC-3030 Industrial PC Datasheet references: http://www.hardwaresecrets.com/datasheets/F81865_V028P.pdf http://www.alldatasheet.com/datasheet-pdf/pdf/406317/FINTEK/F81865.html Signed-off-by: Knud Poulsen <knpo@ieee.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/f71808e_wdt.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) commit 46856fabe40cc80f92134683cdec7dc0fc8f4000 Author: Lucas Stach <dev@lynxeye.de> Date: Tue May 3 19:15:58 2016 +0200 watchdog: sp5100_tco: properly check for new register layouts Commits 190aa4304de6 (Add AMD Mullins platform support) and cca118fa2a0a94 (Add AMD Carrizo platform support) enabled the driver on a lot more devices, but the following commit missed a single location in the code when checking if the SB800 register offsets should be used. This leads to the wrong register being written which in turn causes ACPI to go haywire. Fix this by introducing a helper function to check for the new register layout and use this consistently. https://bugzilla.kernel.org/show_bug.cgi?id=114201 https://bugzilla.redhat.com/show_bug.cgi?id=1329910 Fixes: bdecfcdb5461 (sp5100_tco: fix the device check for SB800 and later chipsets) Cc: stable@vger.kernel.org (4.5+) Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/sp5100_tco.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit e1f30282a1d3d0c75d5a08e47c6ac1563065be52 Author: Guenter Roeck <linux@roeck-us.net> Date: Thu Apr 21 07:38:14 2016 -0700 watchdog: core: Fix circular locking dependency lockdep reports the following circular locking dependency. ====================================================== INFO: possible circular locking dependency detected ] 4.6.0-rc3-00191-gfabf418 #162 Not tainted ------------------------------------------------------- systemd/1 is trying to acquire lock: ((&(&wd_data->work)->work)){+.+...}, at: [<80141650>] flush_work+0x0/0x280 but task is already holding lock: (&wd_data->lock){+.+...}, at: [<804acfa8>] watchdog_release+0x18/0x190 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&wd_data->lock){+.+...}: [<80662310>] mutex_lock_nested+0x64/0x4a8 [<804aca4c>] watchdog_ping_work+0x18/0x4c [<80143128>] process_one_work+0x1ac/0x500 [<801434b4>] worker_thread+0x38/0x554 [<80149510>] kthread+0xf4/0x108 [<80107c10>] ret_from_fork+0x14/0x24 -> #0 ((&(&wd_data->work)->work)){+.+...}: [<8017c4e8>] lock_acquire+0x70/0x90 [<8014169c>] flush_work+0x4c/0x280 [<801440f8>] __cancel_work_timer+0x9c/0x1e0 [<804acfcc>] watchdog_release+0x3c/0x190 [<8022c5e8>] __fput+0x80/0x1c8 [<80147b28>] task_work_run+0x94/0xc8 [<8010b998>] do_work_pending+0x8c/0xb4 [<80107ba8>] slow_work_pending+0xc/0x20 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&wd_data->lock); lock((&(&wd_data->work)->work)); lock(&wd_data->lock); lock((&(&wd_data->work)->work)); *** DEADLOCK *** 1 lock held by systemd/1: stack backtrace: CPU: 2 PID: 1 Comm: systemd Not tainted 4.6.0-rc3-00191-gfabf418 #162 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) [<8010f5e4>] (unwind_backtrace) from [<8010c038>] (show_stack+0x10/0x14) [<8010c038>] (show_stack) from [<8039d7fc>] (dump_stack+0xa8/0xd4) [<8039d7fc>] (dump_stack) from [<80177ee0>] (print_circular_bug+0x214/0x334) [<80177ee0>] (print_circular_bug) from [<80179230>] (check_prevs_add+0x4dc/0x8e8) [<80179230>] (check_prevs_add) from [<8017b3d8>] (__lock_acquire+0xc6c/0x14ec) [<8017b3d8>] (__lock_acquire) from [<8017c4e8>] (lock_acquire+0x70/0x90) [<8017c4e8>] (lock_acquire) from [<8014169c>] (flush_work+0x4c/0x280) [<8014169c>] (flush_work) from [<801440f8>] (__cancel_work_timer+0x9c/0x1e0) [<801440f8>] (__cancel_work_timer) from [<804acfcc>] (watchdog_release+0x3c/0x190) [<804acfcc>] (watchdog_release) from [<8022c5e8>] (__fput+0x80/0x1c8) [<8022c5e8>] (__fput) from [<80147b28>] (task_work_run+0x94/0xc8) [<80147b28>] (task_work_run) from [<8010b998>] (do_work_pending+0x8c/0xb4) [<8010b998>] (do_work_pending) from [<80107ba8>] (slow_work_pending+0xc/0x20) Turns out the call to cancel_delayed_work_sync() in watchdog_release() is not necessary and can be dropped. If the worker is no longer necessary, the subsequent call to watchdog_update_worker() will cancel it. If it is already running, it won't do anything, since the worker function checks if it needs to ping the watchdog or not. Reported-by: Clemens Gruber <clemens.gruber@pqgruber.com> Tested-by: Clemens Gruber <clemens.gruber@pqgruber.com> Fixes: 11d7aba9ceb7 ("watchdog: imx2: Convert to use infrastructure triggered keepalives") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Cc: stable <stable@vger.kernel.org> drivers/watchdog/watchdog_dev.c | 1 - 1 file changed, 1 deletion(-) commit 358d5a565fa6a5f51fcd04f8e890a0a474a814fe Author: Wolfram Sang <wsa+renesas@sang-engineering.com> Date: Tue Apr 12 17:56:11 2016 +0200 watchdog: core: fix trivial typo in a comment Let's have balanced round brackets. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/watchdog_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 60d5794fe5a50d02f4a0df84b45910a4dfa8b487 Merge: 13069bd b923c6c Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Sat May 14 11:25:35 2016 +0200 Merge tag 'usb-serial-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next Johan writes: USB-serial updates for v4.7-rc1 These updates fixes a number of issues where resources were not properly released on probe errors. Included is also a fix for hardware flow-control disable for cp210x. Support for Moxa UPort 11x0 is added to the ti_usb_3410_5052 driver, and included are also some general code clean ups. Signed-off-by: Johan Hovold <johan@kernel.org> commit 511deae0261c839461948f2d4d1c13b8c8a59cd8 Author: Dave Jiang <dave.jiang@intel.com> Date: Wed May 11 14:32:49 2016 -0700 dmaengine: ioatdma: disable relaxed ordering for ioatdma ioatdma by default is in snoop mode. Relaxed ordering according to spec does not do anything in snoop mode. However, it causes hang or significant performance degrade when tested with NTB. Disabling in the driver due to some BIOS do not configure it correctly. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/ioat/init.c | 12 ++++++++++++ drivers/dma/ioat/registers.h | 7 +++++++ 2 files changed, 19 insertions(+) commit 20ea6be6bffd4da8cfe3aeea9e6a090f346a54da Author: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Date: Wed May 11 15:15:11 2016 +0200 dmaengine: of_dma: approximate an average distribution Currently the following DT description would result in dmac0 always being tried first and dmac1 second if dmac0 was unavailable. This results in heavier use of dmac0 then of dmac1. This patch adds an approximate average distribution over the two nodes lessening the load of anyone of them. i2c6: i2c@e60b0000 { ... dmas = <&dmac0 0x77>, <&dmac0 0x78>, <&dmac1 0x77>, <&dmac1 0x78>; dma-names = "tx", "rx", "tx", "rx"; ... }; Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/of-dma.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit d57d3a48ca784615e839475d8bdf8f3cecf77c8d Author: Javier Martinez Canillas <javier@osg.samsung.com> Date: Wed May 11 13:39:27 2016 -0400 dmaengine: core: Use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/dmaengine.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 3b2bc8a732a8dc2a7c4407aea64127229eb8fdd1 Author: Peter Ujfalusi <peter.ujfalusi@ti.com> Date: Tue May 10 13:40:54 2016 +0300 dmaengine: edma: Re-evaluate errors when ccerr is triggered w/o error event When the ccerr handler is called but the error registers indicate no error events we need to command eDMA to re-evaluate the errors. Otherwise we can receive flood of error interrupts. Reported-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/edma.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit 84df082cad236a6ec70df1fbbf3d8dcb5c5f994e Author: Nigel Croxon <nigel.croxon@hpe.com> Date: Wed Apr 6 14:40:05 2016 -0400 watchdog: hpwdt: Adjust documentation to match latest kernel module parameters. Adjust documentation to match latest kernel module parameters. Signed-off-by: Nigel Croxon <nigel.croxon@hpe.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> Documentation/watchdog/hpwdt.txt | 57 +++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 27 deletions(-) commit bc677ff42e81bbf78308a7b66cf7b63b0f5c26b0 Author: Tim Harvey <tharvey@gateworks.com> Date: Fri Apr 1 08:16:43 2016 -0700 watchdog: imx2_wdt: add external reset support via dt prop The IMX6 watchdog supports assertion of a signal (WDOG_B) which can be pinmux'd to an external pin. This is typically used for boards that have PMIC's in control of the IMX6 power rails. In fact, failure to use such an external reset on boards with external PMIC's can result in various hangs due to the IMX6 not being fully reset [1] as well as the board failing to reset because its PMIC has not been reset to provide adequate voltage for the CPU when coming out of reset at 800Mhz. This uses a new device-tree property 'fsl,ext-reset-output' to indicate the board has such a reset and to cause the watchdog to be configured to assert WDOG_B instead of an internal reset both on a watchdog timeout and in system_restart. [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2015-March/333689.html Cc: Fabio Estevam <festevam@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Stefan Roese <sr@denx.de> Cc: Iain Paton <ipaton0@gmail.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Acked-by: Shawn Guo <shawn.guo@linaro.org> Tested-by: Akshay Bhat <akshay.bhat@timesys.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> .../devicetree/bindings/watchdog/fsl-imx-wdt.txt | 4 +++- drivers/watchdog/imx2_wdt.c | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) commit ebbf677a3fb54fda56c58fc985c4617c215da6a0 Author: Richard Cochran <rcochran@linutronix.de> Date: Fri Mar 18 22:26:08 2016 +0100 watchdog: octeon: Handle the FROZEN hot plug notifier actions. When performing a suspend operation, the kernel brings all of the non-boot CPUs offline, calling the hot plug notifiers with the flag, CPU_TASKS_FROZEN, set in the action code. Similarly, during resume, the CPUs are brought back online, but again the notifiers have the FROZEN flag set. While some very few drivers really need to treat suspend/resume specially, this driver unintentionally ignores the notifications. This patch changes the driver to disable the watchdog interrupt whenever the CPU goes offline, and to enable it whenever the CPU goes back online. As a result, the suspended state is no longer a special case that leaves the watchdog active. Signed-off-by: Richard Cochran <rcochran@linutronix.de> Cc: linux-watchdog@vger.kernel.org Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/octeon-wdt-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c306f7f62a38ee5f05f0ee994dfe82d654cf47c Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Thu May 5 16:18:02 2016 +0300 i40e: fix an uninitialized variable bug We removed this initialization but it is required. Let's put it back. Fixes: 895106a577c4 ('i40e: trivial fixes') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_hmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c74dff1aaaf2ee51368a0cbf2f903cc3d8690abc Author: Bimmy Pujari <bimmy.pujari@intel.com> Date: Tue May 3 15:13:20 2016 -0700 i40e: Bump version from 1.5.10 to 1.5.16 Signed-off-by: Bimmy Pujari <bimmy.pujari@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d96a83def2f70ea7b26268efdd44eb9f1e400171 Author: Mitch Williams <mitch.a.williams@intel.com> Date: Tue May 3 15:13:19 2016 -0700 i40e: don't add broadcast filter for VFs Now that all VSIs are configured to receive broadcasts as default, we don't need to add a filter. This eliminates an annoying but harmless error message each time VFs are created or reset. Change-ID: I4cd6339684df45b0d2722133eeb84c14fa93ea19 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 8 -------- 1 file changed, 8 deletions(-) commit b6ef36d2c1e391adc1fe1b2dd2a0f887a9f3052b Author: Guenter Roeck <groeck@chromium.org> Date: Mon Apr 4 17:37:46 2016 -0700 watchdog: qcom: Report reboot reason The Qualcom watchdog timer block reports if the system was reset by the watchdog. Pass the information to user space. Reviewed-by: Grant Grundler <grundler@chromium.org> Tested-by: Grant Grundler <grundler@chromium.org> Signed-off-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be> drivers/watchdog/qcom-wdt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit a876c3ba59a69a1d4ba240ee7cb50acf31116647 Author: Mitch Williams <mitch.a.williams@intel.com> Date: Tue May 3 15:13:18 2016 -0700 i40e/i40evf: properly report Rx packet hash This logic is inverted. If the RXHASH flag is set, then we should go ahead and call skb_set_hash. Change-ID: Ib2e30356dced1d3e939c8061ab6ad5bd94197e7c Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4b28cdba4859c2d1eb77144fe2383afb8daea1ca Author: Ashish Shah <ashish.n.shah@intel.com> Date: Tue May 3 15:13:17 2016 -0700 i40e: set context to use VSI RSS LUT for SR-IOV For the SR-IOV VSIs, when the queue filtering section is valid, the RSS LUT needs to be set to use the VSI specific lookup table (otherwise it will use the PF RSS LUT table). Change-ID: Ia9377cc818078238a75c3bdeade1b593a91b3480 Signed-off-by: Ashish Shah <ashish.n.shah@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 73df8c9e3e3d1d5d38d48ba4bfb0f709f68c8e13 Author: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Date: Tue May 3 15:13:16 2016 -0700 i40e: Correct UDP packet header for non_tunnel-ipv6 This patch corrects Rx ptype payload layer for non_tunneled ipv6. It should be layer 4 for UDP, instead of layer 3. Change-ID: I9382e4458ab3c4e58f6d2e9f195d5d4ee513805e Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c420815d12b744ad8cf9312af13af794bad48216 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Tue May 3 15:13:15 2016 -0700 i40e: change Rx hang message into a WARN_ONCE Use WARN_ONCE in order to highlight the issue, but don't display a warning every time. The user should be able to see the ethtool counter we created if necessary to see how often it is occurring. Change-ID: I40c4ea159819b64a7d33b7f5716749089791533a Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_ptp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 06566e5dd4e53f57fc3daa12fb8b5252772d70de Author: Catherine Sullivan <catherine.sullivan@intel.com> Date: Tue May 3 15:13:14 2016 -0700 i40e: Refactor ethtool get_settings Previously we were only looking at the FW supported PHY types if link was down, because we want to be more specific when link is up. This refactor changes this. When link is down, we still rely on the FW supported PHY types, but when link is up, we select the possible supported link modes from what we know about the current PHY type, and AND that with the FW supported PHY types. Change-ID: Ice5dad83f2a17932b0b8b59f07439696ad6aa013 Signed-off-by: Catherine Sullivan <catherine.sullivan@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 258 +++++++++++++------------ 1 file changed, 135 insertions(+), 123 deletions(-) commit 42d236f8a4479fefb69b20da3962a462e05a112d Author: Sinan Kaya <okaya@codeaurora.org> Date: Sun May 1 00:25:28 2016 -0400 dmaengine: qcom_hidma: add support for object hierarchy In order to create a relationship model between the channels and the management object, we are adding support for object hierarchy to the drivers. This patch simplifies the userspace application development. We will not have to traverse different firmware paths based on device tree or ACPI based kernels. No matter what flavor of kernel is used, objects will be represented as platform devices. The new layout is as follows: hidmam_10: hidma-mgmt@0x5A000000 { compatible = "qcom,hidma-mgmt-1.0"; ... hidma_10: hidma@0x5a010000 { compatible = "qcom,hidma-1.0"; ... } } The hidma_mgmt_init detects each instance of the hidma-mgmt-1.0 objects in device tree and calls into the channel driver to create platform devices for each child of the management object. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Documentation/ABI/testing/sysfs-platform-hidma | 9 ++ drivers/dma/qcom/hidma.c | 39 ++++++++- drivers/dma/qcom/hidma_mgmt.c | 113 ++++++++++++++++++++++++- 3 files changed, 156 insertions(+), 5 deletions(-) commit 570d0176296f0d17c4b5ab206ad4a4bc027b863b Author: Sinan Kaya <okaya@codeaurora.org> Date: Sun May 1 00:25:27 2016 -0400 dmaengine: qcom_hidma: add debugfs hooks Add debugfs hooks for debugging the execution behavior of the DMA channel. The debugfs hooks get initialized by the probe function and uninitialized by the remove function. A stats file is created in debugfs. The stats file will show the information about each HIDMA channel as well as each asynchronous job queued and completed at a given time. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/qcom/Makefile | 2 +- drivers/dma/qcom/hidma.c | 5 +- drivers/dma/qcom/hidma.h | 2 + drivers/dma/qcom/hidma_dbg.c | 217 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 224 insertions(+), 2 deletions(-) commit d1615ca2e085222025118793b7b4af2cf4867b6e Author: Sinan Kaya <okaya@codeaurora.org> Date: Sun May 1 00:25:26 2016 -0400 dmaengine: qcom_hidma: implement lower level hardware interface This patch implements the hardware hooks for the HIDMA channel driver. The main functions of interest are: - hidma_ll_init - hidma_ll_request - hidma_ll_queue_request - hidma_ll_hw_start OS layer calls the hidma_ll_init function during probe to set up the hardware. At this moment, the number of supported descriptors are also given. On each request, a descriptor is allocated from the free pool and filled in with the transfer parameters. Multiple requests can be queued into the hardware via the OS interface. When client is ready for requests to be executed, start method is called. Completions are delivered via callbacks via tasklet. Signed-off-by: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/qcom/Makefile | 2 + drivers/dma/qcom/hidma.c | 8 +- drivers/dma/qcom/hidma.h | 38 +- drivers/dma/qcom/hidma_ll.c | 872 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 895 insertions(+), 25 deletions(-) commit eee4172abcdcc610e40eb9513d19ff16c7820270 Author: Mitch Williams <mitch.a.williams@intel.com> Date: Tue May 3 15:13:13 2016 -0700 i40e: lie to the VF If an untrusted VF attempts to configure promiscuous mode, log a message pointing out its naughty behavior. But then, instead of returning an error to the offender, just lie to it and say everything's OK. It will continue on its way, thinking it's in promiscuous mode, but receiving no packets except its own. Change-ID: I63369215b1720f3c531eedfc06af86ff8c0e3dc8 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit b5569892309e2e62641076f43aef6919286343b4 Author: Anjali Singhai Jain <anjali.singhai@intel.com> Date: Tue May 3 15:13:12 2016 -0700 i40e: Add vf-true-promisc-support priv flag This patch adds priv-flag knob to configure global true promisc support. With this patch the user can decide the flavor of promiscuous that the VFs will see when promiscuous mode is enabled on the interface. Since this a global setting for the whole device, the priv-flag is exposed only on the first PF of the device. The default is true promisc support is off, which means the promisc mode for the VF will be limited/defport mode. For the PF, we still will be in limited promisc unless in MFP mode irrespective of the flavor picked through this knob. Usage: On PF0 ethtool --show-priv-flags p261p1 Private flags for p261p1: MFP : off LinkPolling : off flow-director-atr : on veb-stats : off hw-atr-eviction : off vf-true-promisc-support: off to enable setting true promisc ethtool --set-priv-flags p261p1 vf-true-promisc-support on At this point if the VF is set to trust and promisc is enabled on the VF through ip link set ... promisc on The VF/VFs will be able to see ALL ingress traffic Change-Id: I8fac4b6eb1af9ca77b5376b79c50bdce5055bd94 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e.h | 12 ++-- drivers/net/ethernet/intel/i40e/i40e_common.c | 9 ++- drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 72 +++++++++++++++++++--- drivers/net/ethernet/intel/i40e/i40e_main.c | 30 ++++++++- drivers/net/ethernet/intel/i40e/i40e_prototype.h | 3 +- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 3 +- 6 files changed, 111 insertions(+), 18 deletions(-) commit f3d5849756f0da14edabb1835e35aea8b6bc7440 Author: Shannon Nelson <shannon.nelson@intel.com> Date: Tue May 3 15:13:11 2016 -0700 i40e: Implement the API function for aq_set_switch_config Add the support code for calling the AdminQ API call aq_set_switch_config Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e_common.c | 29 ++++++++++++++++++++++++ drivers/net/ethernet/intel/i40e/i40e_prototype.h | 4 ++++ 2 files changed, 33 insertions(+) commit f42a5c74da9996d602093d7760f6916444009a9d Author: Anjali Singhai Jain <anjali.singhai@intel.com> Date: Tue May 3 15:13:10 2016 -0700 i40e: Add allmulti support for the VF This patch enables a feature to enable/disable all multicast for a trusted VF. Change-Id: I926eba7f8850c8d40f8ad7e08bbe4056bbd3985f Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40evf/i40evf.h | 3 +++ drivers/net/ethernet/intel/i40evf/i40evf_main.c | 15 ++++++++++++++- drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c | 15 +++++++++++++-- 3 files changed, 30 insertions(+), 3 deletions(-) commit 06c0e39bbefd04b19ca50f29be698eeed21630b5 Author: Kevin Scott <kevin.c.scott@intel.com> Date: Tue May 3 15:13:09 2016 -0700 i40e: Add support for disabling all link and change bits needed for PHY interactions Add flag to tell firmware to disable link on all ports. This patch changes the bits set for telling firmware the PHY needs to be modified by driver. Without this patch, the setting will only set that mode for the current port on the device. Because the MDIO interface is common for the copper device. The command needs to set the mode for all ports. Change-ID: I8baa7da91d384291ac95b41ae1a516604f8eb67f Signed-off-by: Kevin Scott <kevin.c.scott@intel.com> Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/i40e/i40e.h | 4 +++- drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h | 3 +++ drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) commit 8ea658cea453e3deede3851b58113112ae1dd9cb Merge: ed7cbbc aa524b6 Author: David S. Miller <davem@davemloft.net> Date: Fri May 13 21:08:24 2016 -0400 Merge branch '1GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue Jeff Kirsher says: ==================== 1GbE Intel Wired LAN Driver Updates 2016-05-13 This series contains updates to e1000e, igb and igbvf. Steve Shih fixes an issue for disabling auto-negotiation and forcing speed and duplex settings for non-copper media. Brian Walsh cleanups some inconsistency in the use of return variables names to avoid confusion. Jake cleans up the drivers to use the BIT() macro when it can, which will future proof the drivers for GCC 6 when it gets released. Cleaned up dead code which was never being used. Also fixed e1000e, where it was incorrectly restting the SYSTIM registers every time the ioctl was being run. Denys Vlasenko fixes an oversight where incvalue variable holds a 32 bit value so we should declare it as such, instead of 64 bits. Also fixed an overflow check, where two reads are the same, then it is not an overflow. Nathan Sullivan fixes the PTP timestamps for transmit and receive latency based on the current link speed. Alexander Duyck adds support for partial GSO segmentation in the case of tunnels for igb and igbvf. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 0651ec932afffce6547efb3e0352e5d229273962 Merge: e9bb8af ba987e5 78c49f8 e3614bc 37aa5c3 cff5a0f Author: Doug Ledford <dledford@redhat.com> Date: Fri May 13 19:40:38 2016 -0400 Merge branches 'cxgb4-2', 'i40iw-2', 'ipoib', 'misc-4.7' and 'mlx5-fcs' into k.o/for-4.7 commit cff5a0f3a3cda0d852425093f92acca169eb5aea Author: Majd Dibbiny <majd@mellanox.com> Date: Sun Apr 17 17:19:38 2016 +0300 IB/mlx5: Report Scatter FCS device capability when supported Report Scatter FCS support when the Firmware supports as well. Signed-off-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/mlx5/main.c | 4 ++++ 1 file changed, 4 insertions(+) commit 358e42ea66e26d30a7a3e2c967c78f01ec31fe4f Author: Majd Dibbiny <majd@mellanox.com> Date: Sun Apr 17 17:19:37 2016 +0300 IB/mlx5: Add Scatter FCS support for Raw Packet QP Enable Scatter FCS in the RQ context when the user passes Scatter FCS create flag. Signed-off-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/mlx5/mlx5_ib.h | 1 + drivers/infiniband/hw/mlx5/qp.c | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) commit b531b909481933f78493e4d2fcda25c606acf120 Author: Majd Dibbiny <majd@mellanox.com> Date: Sun Apr 17 17:19:36 2016 +0300 IB/core: Add Scatter FCS create flag Raw Packet QPs that were created with Scatter FCS flag, will scatter the FCS into the receive buffers. Signed-off-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/uverbs_cmd.c | 3 ++- include/rdma/ib_verbs.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) commit 45686f2d6535525a9875e4a77a35da013814de82 Author: Majd Dibbiny <majd@mellanox.com> Date: Sun Apr 17 17:19:35 2016 +0300 IB/core: Add Raw Scatter FCS device capability Raw Scatter FCS device capability is set when the NIC supports scattering the FCS to the receive buffers of Raw Packet QPs. Signed-off-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> include/rdma/ib_verbs.h | 1 + 1 file changed, 1 insertion(+) commit 0b24e5ac93c2d0792ba8604e9f64e0b564d5f23e Author: Majd Dibbiny <majd@mellanox.com> Date: Sun Apr 17 17:19:34 2016 +0300 IB/core: Add extended device capability flags Since all the uverbs device_cap_flags are occupied, we need a place to expose more device capabilities. This patch adds a new 64 bit device_cap_flags_ex to expose new device capabilities. The lower 32 bits will be identical to the original device_cap_flags, The upper 32 bits will be new capabilities. Signed-off-by: Majd Dibbiny <majd@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/uverbs_cmd.c | 5 +++++ include/uapi/rdma/ib_user_verbs.h | 1 + 2 files changed, 6 insertions(+) commit 73fbb4db6cf3682f12b68a64040897fe226fd409 Author: Colin Ian King <colin.king@canonical.com> Date: Mon Mar 28 12:14:46 2016 +0100 i40iw: pass hw_stats by reference rather than by value passing hw_stats by value requires a 280 byte copy so instead pass it by reference is much more efficient. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Chien Tin Tung <chien.tin.tung@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_virtchnl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit d42ed55aaf0e9040b063189b72928279848c0a1b Author: Lars-Peter Clausen <lars@metafoo.de> Date: Mon Mar 28 11:31:26 2016 +0200 i40iw: Remove unnecessary synchronize_irq() before free_irq() Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patch was generated using the following semantic patch: // <smpl> @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Acked-by: Faisal Latif <faisal.latif#intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_main.c | 1 - 1 file changed, 1 deletion(-) commit fb997816fdf3475fd9bd9a76b6b77aba03864835 Author: Julia Lawall <Julia.Lawall@lip6.fr> Date: Sun May 1 14:22:21 2016 +0200 i40iw: constify i40iw_vf_cqp_ops structure The i40iw_vf_cqp_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_type.h | 2 +- drivers/infiniband/hw/i40iw/i40iw_vf.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_vf.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 37aa5c36aa70c9fc5f633b89cce990f04aaa3cd4 Author: Guy Levi <guyle@mellanox.com> Date: Wed Apr 27 16:49:50 2016 +0300 IB/mlx5: Add UARs write-combining and non-cached mapping By this patch, the user space library will be able to improve performance using appropriate ringing DoorBell method according to the memory type it asked for. Currently only one mapping command is allowed for UARs: MLX5_IB_MMAP_REGULAR_PAGE. Using this mapping, the kernel maps the UARs to write-combining (WC) if the system supports it. If the system is not supporting WC the UARs are mapped to non-cached(NC). In this case the user space library can't tell which mapping is applied. This patch adds 2 new mapping commands: MLX5_IB_MMAP_WC_PAGE and MLX5_IB_MMAP_NC_PAGE. For these commands the kernel maps exactly as requested and fails if it can't. Since there is no generic way to check if the requested memory region can be mapped as WC, driver enables conclusive WC mapping only for x86, PowerPC and ARM which support WC for the device's memory region. Signed-off-by: Guy Levy <guyle@mellanox.com> Signed-off-by: Moshe Lazer <moshel@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/mlx5/main.c | 96 ++++++++++++++++++++++++++++-------- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 + 2 files changed, 77 insertions(+), 21 deletions(-) commit 6cbac1e4cd0e0110b4be38c201fc055249dfd365 Author: Matan Barak <matanb@mellanox.com> Date: Thu Apr 14 16:52:10 2016 +0300 IB/mlx5: Allow mapping the free running counter on PROT_EXEC The current mlx5 code disallows mapping the free running counter of mlx5 based hardwares when PROT_EXEC is set. Although this behaviour is correct, Linux does add an implicit VM_EXEC to the vm_flags if the READ_IMPLIES_EXEC bit is set in the process personality. This happens for example if the process stack is executable. This causes libmlx5 to output a warning and prevents the user from reading the free running clock. Executing the init segment of the hardware isn't a security risk (at least no more than executing a process own stack), so we just prevent writes to there. Fixes: d69e3bcf7976 ('IB/mlx5: Mmap the HCA's core clock register to user-space') Signed-off-by: Matan Barak <matanb@mellanox.com> Reviewed-by: Haggai Eran <haggaie@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/mlx5/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ee71b9681df6b71b7fa110d42200bec05dfaf19a Author: Geliang Tang <geliangtang@163.com> Date: Mon Dec 7 23:04:43 2015 +0800 IB/mlx4: Use list_for_each_entry_safe Simplify the code in search_relocate_mgid0_group with by using list_for_each_entry_safe(). Signed-off-by: Geliang Tang <geliangtang@163.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/mlx4/mcg.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) commit 0f377d86252d11bfea941852785e3094b93601a7 Author: Mark Bloch <markb@mellanox.com> Date: Fri May 6 22:45:27 2016 +0300 IB/SA: Use correct free function Fixes a direct call to kfree_skb when nlmsg_free should be used. Fixes: 2ca546b92a02 ('IB/sa: Route SA pathrecord query through netlink') Signed-off-by: Mark Bloch <markb@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/sa_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2fa2d4fb1166d1ef35f0aacac6165d53ab1b89c7 Author: Mark Bloch <markb@mellanox.com> Date: Fri May 6 22:45:26 2016 +0300 IB/core: Fix a potential array overrun in CMA and SA agent Fix array overrun when going over callback table. In declaration of callback table, the max size isn't provided and in registration phase, it is provided. There is potential scenario where a new operation is added and it is not supported by current client. The acceptance of such operation by ib_netlink will cause to array overrun. Fixes: 809d5fc9bf65 ("infiniband: pass rdma_cm module to netlink_dump_start") Fixes: b493d91d333e ("iwcm: common code for port mapper") Fixes: 2ca546b92a02 ("IB/sa: Route SA pathrecord query through netlink") Signed-off-by: Mark Bloch <markb@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/cma.c | 3 ++- drivers/infiniband/core/iwcm.c | 2 +- drivers/infiniband/core/sa_query.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) commit 1ae5ccc78105490cd1f73bdf4847e7c6d03f0aa1 Author: Mark Bloch <markb@mellanox.com> Date: Fri May 6 22:45:25 2016 +0300 IB/core: Remove unnecessary check in ibnl_rcv_msg RDMA_NL_GET_OP is defined like this: (type & ((1 << 10) - 1)) which means op (defined as an int) can never be a negative number. Fixes: b2cbae2c2487 ('RDMA: Add netlink infrastructure') Signed-off-by: Mark Bloch <markb@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/netlink.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit 5ed935e861a4cbf2158ad3386d6d26edd60d2658 Author: Mark Bloch <markb@mellanox.com> Date: Fri May 6 22:45:24 2016 +0300 IB/IWPM: Fix a potential skb leak In case ibnl_put_msg fails in send_nlmsg_done, the function returns with -ENOMEM without freeing. This patch fixes this behavior. Fixes: 30dc5e63d6a5 ("RDMA/core: Add support for iWARP Port Mapper user space service") Signed-off-by: Mark Bloch <markb@mellanox.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/iwpm_util.c | 1 + 1 file changed, 1 insertion(+) commit faca88273b68b71a15749e04037a4d7ee98fff2d Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Fri May 6 20:19:42 2016 +0300 RDMA/nes: replace custom print_hex_dump() There is no need to duplicate a lot of code that is in the kernel library for ages. Replace duplicating code by calling to print_hex_dump() directly. Note that output is slightly changed: - hex and ascii parts have just two spaces delimeter - there is no delimeter for ascii portions - file and line removed from prefix (they were redundant anyway since previous output shows same closer enough) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/nes/nes_utils.c | 60 ++--------------------------------- 1 file changed, 3 insertions(+), 57 deletions(-) commit aa70345369e251779c0372ef6dd2bd6325a3350c Author: Colin Ian King <colin.king@canonical.com> Date: Mon Apr 25 20:26:50 2016 +0100 IB/mlx4: trivial fix of spelling mistake on "argument" fix spelling mistake, argumant -> argument Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/mlx4/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit da74bf4aea3d9ec6cf653ad0014c13e9680f3903 Author: Denys Vlasenko <dvlasenk@redhat.com> Date: Fri Apr 8 20:58:42 2016 +0200 IB/nes: Deinline nes_free_qp_mem, save 1072 bytes This function compiles to 550 bytes of machine code. Three callsites, all in nes_create_qp. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> CC: Faisal Latif <faisal.latif@intel.com> CC: Doug Ledford <dledford@redhat.com> CC: linux-rdma@vger.kernel.org CC: linux-kernel@vger.kernel.org Reviewed-By: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/nes/nes_verbs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1997412db64bae810edd9ef77d62aefccf965e80 Author: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com> Date: Tue Mar 29 12:58:37 2016 -0500 RDMA/nes: Adding queue drain functions Adding sq and rq drain functions, which block until all previously posted wr-s in the specified queue have completed. A completion object is signaled to unblock the thread, when the last cqe for the corresponding queue is processed. Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com> Signed-off-by: Faisal Latif <faisal.latif@intel.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/nes/nes_verbs.c | 34 ++++++++++++++++++++++++++++++++++ drivers/infiniband/hw/nes/nes_verbs.h | 2 ++ 2 files changed, 36 insertions(+) commit 825107a237bd0a1589e5af3853a14ba61bef02ef Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Tue Apr 12 14:43:41 2016 -0700 iwcm: Fix a sparse warning Avoid that sparse complains about the comparison of s_addr with INADDR_ANY. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Steve Wise <swise@opengridcomputing.com> Cc: Faisal Latif <faisal.latif@intel.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/iwcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 54f5c9c52d69afa55abf2b034df8d45f588466c3 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Tue Apr 12 14:39:18 2016 -0700 IB/srp: Fix a debug kernel crash Avoid that the following BUG() is triggered against a debug kernel: kernel BUG at include/linux/scatterlist.h:92! RIP: 0010:[<ffffffffa0467199>] [<ffffffffa0467199>] srp_map_idb+0x199/0x1a0 [ib_srp] Call Trace: [<ffffffffa04685fa>] srp_map_data+0x84a/0x890 [ib_srp] [<ffffffffa0469674>] srp_queuecommand+0x1e4/0x610 [ib_srp] [<ffffffff813f5a5e>] scsi_dispatch_cmd+0x9e/0x180 [<ffffffff813f8b07>] scsi_request_fn+0x477/0x610 [<ffffffff81298ffe>] __blk_run_queue+0x2e/0x40 [<ffffffff81299070>] blk_delay_work+0x20/0x30 [<ffffffff81071f07>] process_one_work+0x197/0x480 [<ffffffff81072239>] worker_thread+0x49/0x490 [<ffffffff810787ea>] kthread+0xea/0x100 [<ffffffff8159b632>] ret_from_fork+0x22/0x40 Fixes: f7f7aab1a5c0 ("IB/srp: Convert to new registration API") Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Sagi Grimberg <sagi@grimberg.me> Cc: Christoph Hellwig <hch@lst.de> Cc: <stable@vger.kernel.org> # v4.4+ Reviewed-by: Max Gurtovoy <maxg@mellanox.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e3614bc9dc448c3395adf311098dfc64abcc5a35 Author: Hans Westgaard Ry <hans.westgaard.ry@oracle.com> Date: Thu Apr 21 13:13:21 2016 +0200 IB/ipoib: Add readout of statistics using ethtool IPoIB collects statistics of traffic including number of packets sent/received, number of bytes transferred, and certain errors. This patch makes these statistics available to be queried by ethtool. Signed-off-by: Hans Westgaard Ry <hans.westgaard.ry@oracle.com> Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Tested-by: Yuval Shaia <yuval.shaia@oracle.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 67 ++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) commit 01690e9c70c0b42072d6c82470d78b747fcc5c70 Author: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed May 11 12:04:09 2016 +0200 infiniband/ulp/ipoib: remove pkey_mutex The last user of pkey_mutex was removed in db84f8803759 ("IB/ipoib: Use P_Key change event instead of P_Key polling mechanism") but the lock remained. This patch removes it. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 -- 1 file changed, 2 deletions(-) commit 78c49f83ee282dd08fd264fecb90f4f9e2f21a6d Author: Colin Ian King <colin.king@canonical.com> Date: Mon Mar 28 12:14:46 2016 +0100 i40iw: pass hw_stats by reference rather than by value passing hw_stats by value requires a 280 byte copy so instead pass it by reference is much more efficient. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Chien Tin Tung <chien.tin.tung@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_virtchnl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6d6c5c1eb39badb85be1df9b1d6aa5b345dac75f Author: Lars-Peter Clausen <lars@metafoo.de> Date: Mon Mar 28 11:31:26 2016 +0200 i40iw: Remove unnecessary synchronize_irq() before free_irq() Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patch was generated using the following semantic patch: // <smpl> @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Acked-by: Faisal Latif <faisal.latif#intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_main.c | 1 - 1 file changed, 1 deletion(-) commit 2016de7ba013462d56fb344a5a8ed93f7a4c460a Author: Julia Lawall <Julia.Lawall@lip6.fr> Date: Sun May 1 14:22:21 2016 +0200 i40iw: constify i40iw_vf_cqp_ops structure The i40iw_vf_cqp_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_type.h | 2 +- drivers/infiniband/hw/i40iw/i40iw_vf.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_vf.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit eea570788ebeb817a5ecb173dafc316779120081 Author: Muhammad Falak R Wani <falakreyaz@gmail.com> Date: Sun May 1 18:05:31 2016 +0530 staging/rdma/hfi1: use RCU_INIT_POINTER() when NULLing. It is safe to use RCU_INIT_POINTER() to NULL a pointer, instead of rcu_assign_pointer(). This results in slightly smaller/faster code. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3923979e9bc6aa6f168a644314d6729e9f98eccc Author: Ashutosh Dixit <ashutosh.dixit@intel.com> Date: Thu May 12 10:24:00 2016 -0700 IB/hfi1: Change hfi1_init loop to preserve error returns If one iteration of the loop causes an error return and a later iteration doesn't, the later iteration causes the earlier error condition to be lost. This could result in driver probe succeeding when it should have failed. Therefore save off the error return in the loop itself rather than outside the loop. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit bf77cc34f3e6905bc8841489dd628bbffe37d743 Author: Jianxin Xiong <jianxin.xiong@intel.com> Date: Thu May 12 10:23:53 2016 -0700 ib_pack.h: Add opcode definition for send with invalidate The opcode for "SEND Last with Invalidate" and "SEND Only with Invalidate" have been defined for RC in IBA Specification Vol 1 since Release 1.2. Add the definition to the header file in preparation of supporting these opcodes in rdmavt based drivers. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> include/rdma/ib_pack.h | 5 +++++ 1 file changed, 5 insertions(+) commit 859b527f00ad1364a4152c0365e2e5ef5a6bf20a Author: Jianxin Xiong <jianxin.xiong@intel.com> Date: Thu May 12 10:23:47 2016 -0700 IB/hfi1: Keep SC_USER as the last send context type SC_USER needs to be the last send context type to ensure other send context types get their allocation when num_user_contexts is set to a large number. This fixes a panic when the module parameter num_user_contexts is set to 141 and larger. Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/pio.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit f036780be8ac7abee912bd1eeb459230e6bcc878 Author: Dean Luick <dean.luick@intel.com> Date: Thu May 12 10:23:41 2016 -0700 IB/hfi1: Immediately apply congestion setting MAD The handling of the congestion setting MAD packet only saved off the values, waiting for a congestion control table packet before going active. Instead, immediately apply the values. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/mad.c | 93 ++++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 33 deletions(-) commit cde10afa6c8d0db75a3dc038ec46ae901c51cfab Author: Jakub Pawlak <jakub.pawlak@intel.com> Date: Thu May 12 10:23:35 2016 -0700 IB/hfi1: Correct log message strings Remove "IB" keyword from log messages. Correct comment for thermal sensor init function. Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Jakub Pawlak <jakub.pawlak@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/chip.c | 2 +- drivers/staging/rdma/hfi1/driver.c | 2 +- drivers/staging/rdma/hfi1/hfi.h | 5 ++--- drivers/staging/rdma/hfi1/sysfs.c | 4 ++-- 4 files changed, 6 insertions(+), 7 deletions(-) commit cdbff5042d69bbe3f9840bea03863c93f93c88fa Author: Mike Marciniszyn <mike.marciniszyn@intel.com> Date: Thu May 12 10:23:28 2016 -0700 IB/rdmavt: Increase CQ callback thread priority The priority of the send engines is higher than the CQ completion thread potentially causing completions to be starved for very fast interfaces. Change the CQ kthread to match the send engine threads to minimize this delay for ULP completion processing. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/sw/rdmavt/cq.c | 1 + 1 file changed, 1 insertion(+) commit 02ba00c0bbfbbe8abd81abd38302d400b59e220f Author: Jubin John <jubin.john@intel.com> Date: Thu May 12 10:23:22 2016 -0700 IB/hfi1: Fix hfi_rcvhdr tracepoint The hfi_rcvhdr tracepoint has the ctxt and eflags switched in the prototype of the trace event, compared to the args and usage of the trace function. Fix this by swapping these 2 fields in the trace event prototype. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 63d0b4a5fc5f589c6e980fc5d43c220e74a6f06c Author: Jubin John <jubin.john@intel.com> Date: Thu May 12 10:23:16 2016 -0700 IB/hfi1: Remove unnecessary header While running perftests, there is a significant utilization of the random number daemon. This is due to the linux/random.h header being included in qp.c and verbs.c. However, none of the functions from this header are being used in these files, so remove the unnecessary header. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Jubin John <jubin.john@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/qp.c | 1 - drivers/staging/rdma/hfi1/verbs.c | 1 - 2 files changed, 2 deletions(-) commit 67caea1fec85266590dddfa431e1cb000bc942f4 Author: Mitko Haralanov <mitko.haralanov@intel.com> Date: Thu May 12 10:23:09 2016 -0700 IB/hfi1: Improve performance of interval RB trees The interval RB tree management functions use handlers to store user-specific callback for the various tree operations. These handlers are put on a doubly-linked list. When a RB tree function is called, the list is searched for the handler of the particular tree. The list which holds the handlers is modified very rarely - when a handler is created and when a handler is removed. On the other hand, it is searched very often. This a perfect usage scenario for RCU. The result is a much lower overhead of traversing the list as most of the time no locking will be required. Reviewed-by: Dean Luick <dean.luick@intel.com> Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Mitko Haralanov <mitko.haralanov@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/mmu_rb.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit b96b040445f5d84fb8aa2ff986be71f5069c976e Author: Mike Marciniszyn <mike.marciniszyn@intel.com> Date: Thu May 12 10:23:03 2016 -0700 IB/hfi1: Fix potential panic with sdma drained mechanism The guard is backwards, potentially causing the SDMA client to panic if a wait structure was not specified. psm and verbs are not exposed to the issue, but fix the code just to be correct. Fixes: a545f5308b6c ("staging/rdma/hfi: fix CQ completion order issue") Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/sdma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 17f15bf66884b9e33c5005ee0149b039af8f7af2 Author: Mike Marciniszyn <mike.marciniszyn@intel.com> Date: Thu May 12 10:22:57 2016 -0700 IB/hfi1: Fix pio wait counter double increment The code unconditionlly increments the pio wait counter making the counter inacurate and unusable. Fixes: 14553ca11039 ("staging/rdma/hfi1: Adaptive PIO for short messages") Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/verbs.c | 1 - 1 file changed, 1 deletion(-) commit 1ebe79c9484bb1b9bd51b3dd6e82b8ff87ebaeba Author: Dean Luick <dean.luick@intel.com> Date: Thu May 12 10:22:51 2016 -0700 IB/hfi1: Remove no-op QSFP reset code The RESET_N bit of the ASIC_QSFPn_OE register is not used by the hardware. Remove code that tries to use it - it does nothing. Reviewed-by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/chip.c | 3 --- 1 file changed, 3 deletions(-) commit 27a340f6b206dd2a0208d3bc4605c0708b55d7b4 Author: Easwar Hariharan <easwar.hariharan@intel.com> Date: Thu May 12 10:22:45 2016 -0700 IB/hfi1: Correct external device configuration shift The external device configuration was incorrectly shifted to byte 3 of the 32 bit DC_HOST_COMM_SETTINGS instead of byte 0. This patch corrects the shift and provides the cable capability information in byte 0. Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 9775a991f9bdbdde3cc38e553326755af5b2b2a9 Author: Easwar Hariharan <easwar.hariharan@intel.com> Date: Thu May 12 10:22:39 2016 -0700 IB/hfi1: Wait for QSFP modules to initialize The function level reset in init_chip() and subsequent write of all 1s to the ASIC_QSFP registers effectively resets attached active and optical QSFP modules that pay attention to the RESET_N pin. We subsequently try to access the QSFP management interface to qualify and tune the channel and fabric SerDes before enough time (2 seconds per SFF 8679 spec for QSFP28 modules) has elapsed for the module to finish initialization. This fails and causes the failure of the channel tuning algorithm, preventing us from bringing the link up. This patch checks the port type prior to beginning channel and SerDes tuning, and if found to be QSFP, watches for the QSFP initialization complete interrupt, with a maximum timeout of 2 seconds, to allow the initialization to complete. Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/chip.c | 10 +++++++++- drivers/staging/rdma/hfi1/platform.c | 17 +++++++++++------ drivers/staging/rdma/hfi1/platform.h | 1 + 3 files changed, 21 insertions(+), 7 deletions(-) commit 0c7f77afb7f6e74af899584ac672c8d9e63058b0 Author: Easwar Hariharan <easwar.hariharan@intel.com> Date: Thu May 12 10:22:33 2016 -0700 IB/hfi1: Ignore non-temperature warnings on a downed link QSFP modules can raise an interrupt to inform us of expected conditions while the link is down, such as RX power low. Actively ignore these conditions when the link is down as they only add reporting noise. Continue reporting conditions that are valid at all times, such as temperature alarms and warnings. Reviewed-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Easwar Hariharan <easwar.hariharan@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/staging/rdma/hfi1/chip.c | 17 +++++++++++------ drivers/staging/rdma/hfi1/diag.c | 2 +- drivers/staging/rdma/hfi1/hfi.h | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) commit ba987e51a63713669ce6bdbe9b120d72e59eec8e Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Tue Apr 12 14:45:24 2016 -0700 iw_cxgb4: Convert a __force cast __force casts should be avoided if there is a better alternative. Hence modify the comparison of s_addr with INADDR_ANY such that the __force cast is no longer necessary. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Steve Wise <swise@opengridcomputing.com> Cc: Vipul Pandya <vipul@chelsio.com> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 64bec74a9b3ccc0e9795161427ea49864462f612 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:10 2016 +0530 RDMA/iw_cxgb4: Add arp failure handlers to send_mpa_reply/reject() These handlers when called print error message to the kernel log, but the actual handling is done by _c4iw_free_ep() and process_timeout(). Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 093108cb3640844cfdabb0f506fa6b592b64272d Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:09 2016 +0530 RDMA/iw_cxgb4: Always wake up waiter in c4iw_peer_abort_intr() Currently c4iw_peer_abort_intr() does not wake up the waiter if the endpoint state indicates we're using MPAv2 and we're currently trying to connect. This was introduced with commit 7c0a33d61187a ("RDMA/cxgb4: Don't wakeup threads for MPAv2") However, this original fix is flawed because it introduces a race that can cause a deadlock of the iwarp stack. Here is the race: ->local side sets up an active offload connection. ->local side sends MPA_START request. ->peer sends MPA_START response. ->local side ingress cpl thread begins processing the MPA_START response, but before it changes the state from MPA_REQ_SENT to FPDU_MODE: ->peer sends a RST which results in a ABORT_REQ_RSS. This triggers peer_abort_intr() which sees the state in MPA_REQ_SENT and since mpa_rev is 2, it will avoid waking up the endpoint with -ECONNRESET, assuming the stack will re-attempt the connection using MPAv1. ->Meanwhile, the cpl thread moves the state to FPDU_MODE and calls c4iw_modify_rc_qp() which calls rdma_init() which sends a RI_WR/INIT WR to firmware. But since HW sent an abort, FW correctly drops the RI_WR/INIT WR. ->So the cpl thread is stuck waiting for a reply and cannot process the ABORT_REQ_RSS cpl sitting in its input queue. Thus everything comes to a halt because no more ingress cpls are processed by the stack... The correct fix for the issue is to always do the wake up in c4iw_abort_intr() but reinitialize the wait object in c4iw_reconnect(). Fixes: 7c0a33d61187a ("RDMA/cxgb4: Don't wakeup threads for MPAv2") Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 4a4dd8db9dc15579edc62631326f37c43fda0942 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:08 2016 +0530 RDMA/iw_cxgb4: Handle ret value of process_mpa_reply() in rx_data Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit f86fac79afecb41682886785364b15cb13f22280 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:07 2016 +0530 RDMA/iw_cxgb4: atomic find and reference for listening endpoints Add get_ep_from_stid() which will atomically find and reference the endpoint struct if found. This avoids touch-after-free races between threads destroying listening endpoints and the CPL processing thread processing an incoming PASS_ACCEPT_REQ CPL. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) commit e8667a9b35c550e3daf4519058a52252bf41d9db Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:06 2016 +0530 RDMA/iw_cxgb4: Handle ULP accept/reject during ABORTING c4iw_reject() and c4iw_accept() need to handle the case where the endpoint has timed out and is in the middle of ABORTING the connection. Here is the flow that causes the BUG_ON() to fire on the server side: 1) offload connection setup and endpoint timer started 2) MPA_START request received from peer, CONNECT_REQUEST passed to ULP 3) endpoint timer fires, and process_timeout() aborts the connection, this moves the endpoint state to ABORTING until HW sends up the ABORT_RPL_RSS. 4) application exits closing the CONNECT_REQUEST cm_id. The IWCM calls c4iw_reject_cr() to destroy this connection request. 5) WHAMO: BUG_ON() because the state is ABORTING. The fix is to change c4iw_reject_cr() and c4iw_accept_cr() to fail the operation if the state is not in MPA_REQ_RCVD vs in DEAD. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit ceb110a8c1518f54913568bf84f84df573db99e4 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:05 2016 +0530 RDMA/iw_cxgb4: Release ep for for FPDU_MODE and MPA_REQ_RCVD in process_timeout ARP failure may also happen when ep in FPDU_MODE and these failures need to be handled by process_timeout(). process_timeout() also has to handle case MPA_REQ_RCVD, setting abort to 1, leading to ep resource release. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 2 ++ 1 file changed, 2 insertions(+) commit c878b706ffcb1f71908491dcadb2ff556fc86d95 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:04 2016 +0530 RDMA/iw_cxgb4: Free skb in case of arp failure in _c4iw_free_ep() Arp failure for send_mpa_reply/reject() is handled by freeing the mpa_skb in c4iw_free_ep() before releasing ep. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 2 ++ 1 file changed, 2 insertions(+) commit 944661dd97f4f257cd914fffec7eb80832ff9141 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:03 2016 +0530 RDMA/iw_cxgb4: atomically lookup ep and get a reference There is a race between ULP threads calling c4iw_ep_disconnect() via c4iw_modify_rc_qp() and the ingress CPL thread where the ULP thread can free the endpoint just after the ingress CPL thread finds the ep pointer in the tid table. To avoid this, we now use the hwtid_idr table for lookups instead of the LLD tid table so we can lock around insert, remove, and lookup+get_ep to avoid the race. The CPL handlers now will either find the ep ptr and have a ref on it, or not find it and they can discard the CPL. Callers of get_ep_from_tid() will have a ref on the ep if found, and thus must deref when they are done. Negative advice in peer_abort_intr() need to dereference the ep. therefore peer_abort() is scheduled to dereference the ep later. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 110 +++++++++++++++++++++++++++++---------- 1 file changed, 82 insertions(+), 28 deletions(-) commit 761e19a504afa55ec0ede0ed490cddb99b2596a5 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:02 2016 +0530 RDMA/iw_cxgb4: Handle return value of c4iw_ofld_send() in abort_arp_failure() In abort_arp_failure(), the return value from c4iw_ofld_send() is ignored and thus if the CPL isn't sent, the endpoint is stuck and never gets aborted. Failure of c4iw_ofld_send() is treated as fatal error, and the ep resources are released in a safer context through process_work(). Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 8a70f812b16ea4523938749a168817ffed232df9 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:01 2016 +0530 RDMA/iw_cxgb4: in process_timeout() don't move ep state to ABORTING Moving the state to ABORTING causes the ep to get stuck because c4iw_ep_timeout() thinks the ABORT has already been done. So leave the state alone and let c4iw_ep_disconnect() do the right thing given the ep state. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 3 --- 1 file changed, 3 deletions(-) commit caa6c9f247d64f7f7c183514d71113f472124f55 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:18:00 2016 +0530 RDMA/iw_cxgb4: handle return value of c4iw_l2t_send() and send_mpa_req() ->In act_open_rpl(), CPL_ERR_TCAM_FULL error handling branch, there is no handling of the return value of send_fw_act_open_req(). ->In send_fw_act_open_req(), there is no handling of return value of c4iw_l2t_send(), which may cause a ep leak and won't notify upper layers on connection establish failure. ->send_mpa_req() should act on the return from c4iw_l2t_send() and return the error to the caller. ->In case of c4iw_l2t_send() failure in send_mpa_req(), returns without starting the timer and not changing the ep state, which is further handled by act_establish() -> In act_establish()?if send_mpa_request's get_skb returns an error, may cause an ep leak. So handle return value of send_mpa_req() Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) commit e4b76a2a2619e95deb1ae2b088c0aa4f24a0bbee Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:17:59 2016 +0530 RDMA/iw_cxgb4: stop_ep_timer() after MPA negotiation ->Stop the ep timer after MPA negotiation so that the arp failures during send_mpa_reply/reject will be handled by process_timeout() after the ep timer expires. ->Added case MPA_REP_SENT in process_timeout(). ->For MPA reject, c4iw_ep_disconnect tries to start an already started timer, which leads to warning message "timer already started". -> In case of mpa reject stop the timer and call send_mpa_reject(). -> Added new ep flag STOP_MPA_TIMER to tell fw4_ack() to stop the timer only for send_mpa_reply(), which is set in c4iw_accept_cr(). Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 39 +++++++++++++++++----------------- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 1 + 2 files changed, 20 insertions(+), 20 deletions(-) commit da1cecdffc13494bef012d598ed3dc1ed9572204 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:17:58 2016 +0530 RDMA/iw_cxgb4: Do not stop timer in case of incomplete messages In case of incomplete mpa messages we should not stop timer as it results in return with timeout for the next mpa message Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) commit 8d1f1a6b3fccfce5d95ee0d6456b1437e93f2bba Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:17:57 2016 +0530 RDMA/iw_cxgb4: parent_ep has to be dereferenced in case of passive accept failure -> On passive side of connection parent_ep referenced during connection request has to be dereferenced during the passive accept failure. -> As passive accept failure error handlinglogic runs in atomic context, the parent ep is dereferenced by scheduling work request. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) commit 92f850ec3a18d9d8bf2157a8509d435d49ce80b6 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:17:56 2016 +0530 RDMA/iw_cxgb4: set the correct FID value in DSGL commands The FID value in a ULP_MEMIO command needs to be set to an IQ ID of a queue configured for our PF. The FID/IQ id is used to index into the PCIE FID table, to find out on which function the DMA needs to be issued. Essentially, every DMA needs to have the ingress queue. The exact ingress queue doesn't matter, but it needs to be an ingress queue associated with the function you want to see the DMA on. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/mem.c | 5 +++-- drivers/net/ethernet/chelsio/cxgb4/t4_msg.h | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) commit ccd2c30b4513905a0624a696ec3eeaa3bf93530d Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:17:55 2016 +0530 RDMA/iw_cxgb4: Correct RFC number of MPA Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ca6f7cf9c9e2ae9a28618be320d09407c312a46 Author: Hariprasad S <hariprasad@chelsio.com> Date: Fri May 6 22:17:54 2016 +0530 RDMA/iw_cxgb4: Add few history bits for ep - add EP_DISC_FAIL history bit - add QP_REFED/DEREFED history bits - Add functions to ref/deref the cm_id and add history bit for the same - add CLOSE_CON_RPL history Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/cxgb4/cm.c | 46 +++++++++++++++++++++------------- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 8 +++++- 2 files changed, 36 insertions(+), 18 deletions(-) commit aa524b66c5efd1d3220b74168d803e8b2ee1d212 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Wed Apr 20 11:36:42 2016 -0700 e1000e: don't modify SYSTIM registers during SIOCSHWTSTAMP ioctl The e1000e_config_hwtstamp function was incorrectly resetting the SYSTIM registers every time the ioctl was being run. If you happened to be running ptp4l and lost the PTP connect (removing cable, or blocking the UDP traffic for example), then ptp4l will eventually perform a restart which involves re-requesting timestamp settings. In e1000e this has the unfortunate and incorrect result of resetting SYSTIME to the kernel time. Since kernel time is usually in UTC, and PTP time is in TAI, this results in the leap second being re-applied. Fix this by extracting the SYSTIME reset out into its own function, e1000e_ptp_reset, which we call during reset to restore the hardware registers. This function will (a) restart the timecounter based on the new system time, (b) restore the previous PPB setting, and (c) restore the previous hwtstamp settings. In order to perform (b), I had to modify the adjfreq ptp function pointer to store the old delta each time it is called. This also has the side effect of restoring the correct base timinca register correctly. The driver does not need to explicitly zero the ptp_delta variable since the entire adapter structure comes zero-initialized. Reported-by: Brian Walsh <brian@walsh.ws> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Brian Walsh <brian@walsh.ws> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/e1000e/e1000.h | 1 + drivers/net/ethernet/intel/e1000e/netdev.c | 68 +++++++++++++++++++++++------- drivers/net/ethernet/intel/e1000e/ptp.c | 2 + 3 files changed, 55 insertions(+), 16 deletions(-) commit e10715d3e9618901c5ef820a92e6a8e6548b43d3 Author: Alexander Duyck <aduyck@mirantis.com> Date: Thu Apr 14 17:19:38 2016 -0400 igb/igbvf: Add support for GSO partial This patch adds support for partial GSO segmentation in the case of tunnels. Specifically with this change the driver an perform segmentation as long as the frame either has IPv6 inner headers, or we are allowed to mangle the IP IDs on the inner header. This is needed because we will not be modifying any fields from the start of the start of the outer transport header to the start of the inner transport header as we are treating them like they are just a block of IP options. Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/igb/igb_main.c | 137 +++++++++++++++------- drivers/net/ethernet/intel/igbvf/netdev.c | 182 ++++++++++++++++++------------ 2 files changed, 203 insertions(+), 116 deletions(-) commit 942c711206d1e0cd3dffc591829cbcbb9bcc0b1b Author: Jacob Keller <jacob.e.keller@intel.com> Date: Wed Apr 13 16:08:33 2016 -0700 e1000e: mark shifted values as unsigned The E1000_ICH_NVM_SIG_MASK value is shifted, out to the 31st bit, which is the signed bit for signed constants. Mark these values as unsigned to prevent compiler warnings and issues on platforms which a different signed bit implementation. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/e1000e/ich8lan.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 18dd23920703891c39c7965873f8ae369bd3a237 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Wed Apr 13 16:08:32 2016 -0700 e1000e: use BIT() macro for bit defines This prevents signed bitshift issues when the shift would overwrite the signed bit, and prevents making this mistake in the future when copying and modifying code. Use GENMASK or the unsigned postfix for cases which aren't suitable for BIT() macro. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/e1000e/80003es2lan.c | 12 +-- drivers/net/ethernet/intel/e1000e/82571.c | 30 +++---- drivers/net/ethernet/intel/e1000e/e1000.h | 108 ++++++++++++------------ drivers/net/ethernet/intel/e1000e/ethtool.c | 45 +++++----- drivers/net/ethernet/intel/e1000e/ich8lan.c | 44 +++++----- drivers/net/ethernet/intel/e1000e/mac.c | 2 +- drivers/net/ethernet/intel/e1000e/netdev.c | 28 +++--- drivers/net/ethernet/intel/e1000e/nvm.c | 2 +- drivers/net/ethernet/intel/e1000e/phy.c | 4 +- drivers/net/ethernet/intel/e1000e/phy.h | 10 +-- 10 files changed, 143 insertions(+), 142 deletions(-) commit 0ed2dbf4f469e2e286d903ebc091edfd9be4d063 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Wed Apr 13 16:08:31 2016 -0700 igbvf: use BIT() macro instead of shifts To prevent signed bitshift issues, and improve code readability, use the BIT() macro. Also make use of GENMASK or the unsigned postfix where this is more appropriate than BIT() Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/igbvf/defines.h | 2 +- drivers/net/ethernet/intel/igbvf/ethtool.c | 3 ++- drivers/net/ethernet/intel/igbvf/igbvf.h | 4 ++-- drivers/net/ethernet/intel/igbvf/netdev.c | 10 +++++----- drivers/net/ethernet/intel/igbvf/vf.c | 2 +- 5 files changed, 11 insertions(+), 10 deletions(-) commit 12b28b41084aa61970fecb417c66c88dcce6afed Author: Jacob Keller <jacob.e.keller@intel.com> Date: Wed Apr 13 16:08:30 2016 -0700 igbvf: remove unused variable and dead code The variable rdlen is set but never used, and thus setting it is dead code. Remove it. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/igbvf/netdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 3f544d2a4d5c2d817cfee9e6302fc2909aaef155 Author: Nathan Sullivan <nathan.sullivan@ni.com> Date: Tue May 3 18:10:56 2016 -0500 igb: adjust PTP timestamps for Tx/Rx latency Table 7-62 on page 338 of the i210 datasheet lists TX and RX latencies for the various speeds the chip supports. To give better PTP timestamp accuracy, adjust the timestamps by the amounts Intel gives based on current link speed. Signed-off-by: Nathan Sullivan <nathan.sullivan@ni.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/igb/igb.h | 8 +++++++ drivers/net/ethernet/intel/igb/igb_ptp.c | 36 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit e4f35c1339f0cfcf38d3f63dd6fea2b070399263 Author: Arnd Bergmann <arnd@arndb.de> Date: Thu May 12 23:00:12 2016 +0200 ACPI / video: mark acpi_video_get_levels() inline A recent patch added a stub function for acpi_video_get_levels when CONFIG_ACPI_VIDEO is disabled. However, this is marked as 'static' and causes a warning about an unused function whereever the header gets included: In file included from ../drivers/gpu/drm/radeon/radeon_acpi.c:28:0: include/acpi/video.h:74:12: error: 'acpi_video_get_levels' defined but not used [-Werror=unused-function] This makes the declaration 'static inline', which gets rid of the warning. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 059500940def (ACPI/video: export acpi_video_get_levels) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> include/acpi/video.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab507c9a54ce3580e6a3829c9f4c24a13c32cbac Author: Denys Vlasenko <dvlasenk@redhat.com> Date: Wed Apr 20 17:45:56 2016 +0200 e1000e: e1000e_cyclecounter_read(): do overflow check only if needed SYSTIMH:SYSTIML registers are incremented by 24-bit value TIMINCA[23..0] er32(SYSTIML) are probably moderately expensive (they are pci bus reads). Can we avoid one of them? Yes, we can. If the SYSTIML value we see is smaller than 0xff000000, the overflow into SYSTIMH would require at least two increments. We do two reads, er32(SYSTIML) and er32(SYSTIMH), in this order. Even if one increment happens between them, the overflow into SYSTIMH is impossible, and we can avoid doing another er32(SYSTIML) read and overflow check. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/e1000e/netdev.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) commit a07fd74d5ea9c45a5c6e41f7cb4b997cf40d50f3 Author: Denys Vlasenko <dvlasenk@redhat.com> Date: Wed Apr 20 17:45:55 2016 +0200 e1000e: e1000e_cyclecounter_read(): fix er32(SYSTIML) overflow check If two consecutive reads of the counter are the same, it is also not an overflow. "systimel_1 < systimel_2" should be "systimel_1 <= systimel_2". Before the patch, we could perform an *erroneous* correction: Let's say that systimel_1 == systimel_2 == 0xffffffff. "systimel_1 < systimel_2" is false, we think it's an overflow, we read "systimeh = er32(SYSTIMH)" which meanwhile had incremented, and use "(systimeh << 32) + systimel_2" value which is 2^32 too large. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> CC: intel-wired-lan@lists.osuosl.org Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/e1000e/netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit fb5277f2c2e4db4a29740ff071072a688892d2df Author: Denys Vlasenko <dvlasenk@redhat.com> Date: Wed Apr 20 17:45:54 2016 +0200 e1000e: e1000e_cyclecounter_read(): incvalue is 32 bits, not 64 "incvalue" variable holds a result of "er32(TIMINCA) & E1000_TIMINCA_INCVALUE_MASK" and used in "do_div(temp, incvalue)" as a divisor. Thus, "u64 incvalue" declaration is probably a mistake. Even though it seems to be a harmless one, let's fix it. Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/e1000e/netdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f79a917e69e1f5cd86e864b67f06147f1b0340f4 Merge: ed7cbbc b853cb9 Author: Bjorn Andersson <bjorn.andersson@linaro.org> Date: Fri May 13 14:36:11 2016 -0700 Merge tag 'qcom-soc-for-4.7-2' into net-next This merges the Qualcomm SOC tree with the net-next, solving the merge conflict in the SMD API between the two. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> commit 8008f68cb805c0099723ba1b58d26257a52ce890 Author: Jacob Keller <jacob.e.keller@intel.com> Date: Wed Apr 13 16:08:29 2016 -0700 igb: make igb_update_pf_vlvf static Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/igb/igb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a51d8c217b15b97fede844dd6860f7b3c6ffcfef Author: Jacob Keller <jacob.e.keller@intel.com> Date: Wed Apr 13 16:08:28 2016 -0700 igb: use BIT() macro or unsigned prefix For bitshifts, we should make use of the BIT macro when possible, and ensure that other bitshifts are marked as unsigned. This helps prevent signed bitshift errors, and ensures similar style. Make use of GENMASK and the unsigned postfix where BIT() isn't appropriate. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/igb/e1000_82575.c | 8 +- drivers/net/ethernet/intel/igb/e1000_82575.h | 30 +++---- drivers/net/ethernet/intel/igb/e1000_defines.h | 108 ++++++++++++------------- drivers/net/ethernet/intel/igb/e1000_mac.c | 10 +-- drivers/net/ethernet/intel/igb/e1000_mbx.c | 4 +- drivers/net/ethernet/intel/igb/e1000_nvm.c | 2 +- drivers/net/ethernet/intel/igb/e1000_phy.h | 6 +- drivers/net/ethernet/intel/igb/igb.h | 32 ++++---- drivers/net/ethernet/intel/igb/igb_ethtool.c | 18 ++--- drivers/net/ethernet/intel/igb/igb_main.c | 48 +++++------ drivers/net/ethernet/intel/igb/igb_ptp.c | 6 +- 11 files changed, 136 insertions(+), 136 deletions(-) commit 847042a6a51e6dbb789c259750609b78aa3f27a3 Author: Brian Walsh <brian@walsh.ws> Date: Tue Apr 12 23:22:30 2016 -0400 e1000e: Cleanup consistency in ret_val variable usage Fixed the file to use a consistent ret_val for return value checking. Signed-off-by: Brian Walsh <brian@walsh.ws> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/e1000e/netdev.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit e11f303e3d0731a7379252192e7d02a1ae319238 Author: Steve Shih <sshih@cisco.com> Date: Tue Apr 5 11:30:03 2016 -0700 e1000e: fix ethtool autoneg off for non-copper This patch fixes the issues for disabling auto-negotiation and forcing speed and duplex settings for the non-copper media. For non-copper media, e1000_get_settings should return ETH_TP_MDI_INVALID for eth_tp_mdix_ctrl instead of ETH_TP_MDI_AUTO so subsequent e1000_set_settings call would not fail with -EOPNOTSUPP. e1000_set_spd_dplx should not automatically turn autoneg back on for forced 1000 Mbps full duplex settings for non-copper media. Cc: xe-kernel@external.cisco.com Cc: Daniel Walker <dwalker@fifo99.com> Signed-off-by: Steve Shih <sshih@cisco.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> drivers/net/ethernet/intel/e1000e/ethtool.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit f8d1a93930a754c4ea27238ae1c0fb2356d12e9a Merge: 26f5883 535dac4 Author: Tejun Heo <tj@kernel.org> Date: Fri May 13 17:20:48 2016 -0400 Merge branch 'for-4.6-fixes' into for-4.7 commit 0868971a8dad52e726711a2a4b161ace9ed011fa Author: Tony Wu <tung7970@gmail.com> Date: Fri Dec 4 19:40:00 2015 +0800 MIPS: CM: Fix compilation error when !MIPS_CM Fix mips_cm_lock_other compilation error when MIPS_CM is not selected. This was introduced in commit 23d5de8efb9a (MIPS: CM: Introduce core-other locking functions) Signed-off-by: Tony Wu <tung7970@gmail.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11698/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mips-cm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2afb97454347f641dd2435a3956ba12f816fb1df Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 13 19:41:06 2016 +0100 MIPS: Fix genvdso error on rebuild The genvdso program modifies the debug and stripped versions of the VDSOs in place, and errors if the modification has already taken place. Unfortunately this means that a rebuild which tries to rerun genvdso to generate vdso*-image.c without also rebuilding vdso.so.dbg (for example if genvdso.c is modified) hits a build error like this: arch/mips/vdso/genvdso 'arch/mips/vdso/vdso.so.dbg' already contains a '.MIPS.abiflags' section This is fixed by reorganising the rules such that unmodified .so files have a .raw suffix, and these are copied in the same rule that runs genvdso on the copies. I.e. previously we had: cmd_vdsold: link objects -> vdso.so.dbg cmd_genvdso: strip vdso.so.dbg -> vdso.so run genvdso -> vdso-image.c and modify vdso.so.dbg and vdso.so in place Now we have: cmd_vdsold: link objects -> vdso.so.dbg.raw a new cmd_objcopy based strip rule (inspired by ARM): strip vdso.so.dbg.raw -> vdso.so.raw cmd_genvdso: copy vdso.so.dbg.raw -> vdso.so.dbg copy vdso.so.raw -> vdso.so run genvdso -> vdso-image.c and modify vdso.so.dbg and vdso.so in place Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13250/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/vdso/Makefile | 40 ++++++++++++++++++++++++++++------------ 1 file changed, 28 insertions(+), 12 deletions(-) commit 59643d1535eb220668692a5359de22545af579f6 Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org> Date: Fri May 13 09:34:12 2016 -0400 ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this and converts kb to bytes. 18014398509481980 << 10 = 18446744073709547520 and this is passed to ring_buffer_resize() as unsigned long size. size = DIV_ROUND_UP(size, BUF_PAGE_SIZE); Where DIV_ROUND_UP(a, b) is (a + b - 1)/b BUF_PAGE_SIZE is 4080 and here 18446744073709547520 + 4080 - 1 = 18446744073709551599 where 18446744073709551599 is still smaller than 2^64 2^64 - 18446744073709551599 = 17 But now 18446744073709551599 / 4080 = 4521260802379792 and size = size * 4080 = 18446744073709551360 This is checked to make sure its still greater than 2 * 4080, which it is. Then we convert to the number of buffer pages needed. nr_page = DIV_ROUND_UP(size, BUF_PAGE_SIZE) but this time size is 18446744073709551360 and 2^64 - (18446744073709551360 + 4080 - 1) = -3823 Thus it overflows and the resulting number is less than 4080, which makes 3823 / 4080 = 0 an nr_pages is set to this. As we already checked against the minimum that nr_pages may be, this causes the logic to fail as well, and we crash the kernel. There's no reason to have the two DIV_ROUND_UP() (that's just result of historical code changes), clean up the code and fix this bug. Cc: stable@vger.kernel.org # 3.5+ Fixes: 83f40318dab00 ("ring-buffer: Make removal of ring buffer pages atomic") Signed-off-by: Steven Rostedt <rostedt@goodmis.org> kernel/trace/ring_buffer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) commit d9e4084f6c9746e51a78a4d7ebf4983023289b32 Author: Chuck Lever <chuck.lever@oracle.com> Date: Wed May 4 10:53:47 2016 -0400 svcrdma: Generalize svc_rdma_xdr_decode_req() Clean up: Pass in just the piece of the svc_rqst that is needed here. While we're in the area, add an informative documenting comment. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> include/linux/sunrpc/svc_rdma.h | 2 +- net/sunrpc/xprtrdma/svc_rdma_marshal.c | 32 ++++++++++++++++++++++---------- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 +- 3 files changed, 24 insertions(+), 12 deletions(-) commit 84f225c23d8906c9371d0749e062975c018ef6c4 Author: Chuck Lever <chuck.lever@oracle.com> Date: Wed May 4 10:53:39 2016 -0400 svcrdma: Eliminate code duplication in svc_rdma_recvfrom() Clean up. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) commit 76ee8fd64ac9af36b03b68912c18b3d3cd5c99de Author: Chuck Lever <chuck.lever@oracle.com> Date: Wed May 4 10:53:30 2016 -0400 svcrdma: Drain QP before freeing svcrdma_xprt If the server has forced a disconnect, the associated QP has not been moved to the Error state, and thus Receives are still posted. Ensure Receives (and any other outstanding WRs) are drained to release resources that can be freed during teardown of the svcrdma_xprt. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> net/sunrpc/xprtrdma/svc_rdma_transport.c | 3 +++ 1 file changed, 3 insertions(+) commit 0319aafc95eaae10fdb867c35ce9bacfca27eaa3 Author: Chuck Lever <chuck.lever@oracle.com> Date: Wed May 4 10:53:22 2016 -0400 svcrdma: Post Receives only for forward channel requests Since backward direction support was added, the rq_depth was increased to accommodate both forward and backward Receives. But only forward Receives need to be posted after a connection has been accepted. Receives for backward replies are posted as needed by svc_rdma_bc_sendto(). This doesn't break anything, but it means some resources are wasted. Fixes: 03fe9931536f ('svcrdma: Define maximum number of ...') Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> net/sunrpc/xprtrdma/svc_rdma_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cac7f15036dc69c8708fa73369a9fae193e82bfb Author: Chuck Lever <chuck.lever@oracle.com> Date: Wed May 4 10:53:14 2016 -0400 svcrdma: Remove superfluous line from rdma_read_chunks() Clean up: svc_rdma_get_read_chunk() already returns a pointer to the Read list. No need to set "ch" again to the value it already contains. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 9ec64052060f972101b49f47631f5072f075426c Author: Chuck Lever <chuck.lever@oracle.com> Date: Wed May 4 10:53:05 2016 -0400 svcrdma: svc_rdma_put_context() is invoked twice in Send error path Get a fresh op_ctxt in send_reply() instead of in svc_rdma_sendto(). This ensures that svc_rdma_put_context() is invoked only once if send_reply() fails. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> net/sunrpc/xprtrdma/svc_rdma_sendto.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) commit 6625d0913771df5f12b9531c8cb8414e55f1c21d Author: Chuck Lever <chuck.lever@oracle.com> Date: Wed May 4 10:52:55 2016 -0400 svcrdma: Do not add XDR padding to xdr_buf page vector An xdr_buf has a head, a vector of pages, and a tail. Each RPC request is presented to the NFS server contained in an xdr_buf. The RDMA transport would like to supply the NFS server with only the NFS WRITE payload bytes in the page vector. In some common cases, that would allow the NFS server to swap those pages right into the target file's page cache. Have the transport's RDMA Read logic put XDR pad bytes in the tail iovec, and not in the pages that hold the data payload. The NFSv3 WRITE XDR decoder is finicky about the lengths involved, so make sure it is looking in the correct places when computing the total length of the incoming NFS WRITE request. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> fs/nfsd/nfs3xdr.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 696190eaf168e83fcbf0c9cf087995cdd15807e5 Author: Shirley Ma <shirley.ma@oracle.com> Date: Wed May 4 10:52:47 2016 -0400 svcrdma: Support IPv6 with NFS/RDMA Allow both IPv4 and IPv6 to bind same port at the same time, restricts use of the IPv6 socket to IPv6 communication. Changes from v1: - Check rdma_set_afonly return value (suggested by Leon Romanovsky) Changes from v2: - Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Shirley Ma <shirley.ma@oracle.com> Acked-by: Leon Romanovsky <leonro@mellanox.com> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> net/sunrpc/xprtrdma/svc_rdma_transport.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 14b7f4a1edf15808cf52dc38277ffe1d84854839 Author: Jeff Layton <jlayton@poochiereds.net> Date: Thu May 5 06:53:47 2016 -0400 nfsd: handle seqid wraparound in nfsd4_preprocess_layout_stateid Move the existing static function to an inline helper, and call it. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> fs/nfsd/nfs4layouts.c | 2 +- fs/nfsd/nfs4state.c | 8 +------- fs/nfsd/state.h | 5 +++++ 3 files changed, 7 insertions(+), 8 deletions(-) commit e2ed8a132a70dc61ef6d9979bec4f37a3abbba4b Author: Eric Huang <JinHuiEric.Huang@amd.com> Date: Thu May 12 14:41:04 2016 -0400 drm/amd/powerplay: fix a bug on updating sclk for Tonga Update sclk smc table rather than mclk smc table for sclk updates. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit bd6080d662f08b4c4540c4e3735f0738cab7004f Author: Eric Huang <JinHuiEric.Huang@amd.com> Date: Tue May 10 14:39:09 2016 -0400 drm/amd/powerplay: fix a bug on updating sclk for Fiji Update sclk smc table rather than mclk smc table for sclk updates. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Eric Huang <JinHuiEric.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d573de2d00835e38cef1fb4bff7b49c174c68941 Author: Rex Zhu <Rex.Zhu@amd.com> Date: Thu May 12 13:27:28 2016 +0800 drm/amdgpu: create fence slab once when amdgpu module init. This avoids problems with multiple GPUs. For example, if the first GPU failed before amdgpu_fence_init() was called, amdgpu_fence_slab_ref is still 0 and it will get decremented in amdgpu_fence_driver_fini(). This will lead to a crash during init of the second GPU since amdgpu_fence_slab_ref is not 0. v2: add functions for init/exit instead of moving the variables into the driver. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 25 ++++++++++++++----------- 3 files changed, 20 insertions(+), 12 deletions(-) commit 8b41e7a03a306d93276f91c1dae39dc51a1af58d Author: Rex Zhu <Rex.Zhu@amd.com> Date: Tue May 10 15:37:00 2016 +0800 drm/amd/powerplay: move asic unrelated function to hwmgr.c. It's generic and used by multiple asics. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 37 +-------------------- drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 38 ++++++++++++++++++++++ .../gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 36 -------------------- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 +- 4 files changed, 40 insertions(+), 73 deletions(-) commit 2dcbffad94f3c2f85cc2c433dad382a741e91dc4 Author: Rex Zhu <Rex.Zhu@amd.com> Date: Tue May 10 13:39:29 2016 +0800 drm/amd/powerplay: fix NULL point check error && was used instead of || Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit 9ab9cf058a5de590146fdc67bf9c483c8bdcbffa Author: Rex Zhu <Rex.Zhu@amd.com> Date: Tue May 3 15:47:15 2016 +0800 drm/amd/powerplay: SCLK will have a big drop with low VDDC when PPlib was enabled. SMC uses CurrSclkPllRange structure to keep track of what range of PLL SCLK is sitting on. Driver overwrites this value to 0 because it's part of DPM table and driver doesn't program this. This change will set this field to 0xFF every time there's a init SMC table call. Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e9bb8af98a981fe404010706a192ca0450a87760 Author: Colin Ian King <colin.king@canonical.com> Date: Mon Mar 28 12:14:46 2016 +0100 i40iw: pass hw_stats by reference rather than by value passing hw_stats by value requires a 280 byte copy so instead pass it by reference is much more efficient. Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Chien Tin Tung <chien.tin.tung@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_virtchnl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit e381b3bbd7969a2bf134e10c1ead96644f985b10 Author: Lars-Peter Clausen <lars@metafoo.de> Date: Mon Mar 28 11:31:26 2016 +0200 i40iw: Remove unnecessary synchronize_irq() before free_irq() Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patch was generated using the following semantic patch: // <smpl> @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // </smpl> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Acked-by: Faisal Latif <faisal.latif#intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_main.c | 1 - 1 file changed, 1 deletion(-) commit dc1badf63026550ce8d099c3a4d1c803d23b038f Author: Julia Lawall <Julia.Lawall@lip6.fr> Date: Sun May 1 14:22:21 2016 +0200 i40iw: constify i40iw_vf_cqp_ops structure The i40iw_vf_cqp_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_type.h | 2 +- drivers/infiniband/hw/i40iw/i40iw_vf.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_vf.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit a647040ea85ae0bf5bd93f2a1b42dba57b0d0059 Author: Julia Lawall <Julia.Lawall@lip6.fr> Date: Sun May 1 14:07:23 2016 +0200 i40e: constify i40e_client_ops structure The i40e_client_ops structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/hw/i40iw/i40iw_main.c | 2 +- drivers/net/ethernet/intel/i40e/i40e_client.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c222a39f0d2652ff32e10a95979af9bf906b9844 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Thu May 12 10:51:01 2016 -0700 IB/srp: Do not register memory if never_register has been set This makes it easier to test the code path that does not use memory registration (srp_map_sg_dma()). Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Cc: Laurence Oberman <loberman@redhat.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 509c5f33f4f6dc328d96bf4099ef6589739f22d4 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Thu May 12 10:50:35 2016 -0700 IB/srp: Prevent mapping failures If both max_sectors and the queue_depth are high enough it can happen that the MR pool is depleted temporarily. This causes the SRP initiator to report mapping failures. Although the SRP initiator recovers from such mapping failures, prevent that this can happen by allocating more memory regions. Additionally, only enable memory registration if at least two pages can be registered per memory region. Reported-by: Laurence Oberman <loberman@redhat.com> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Tested-by: Laurence Oberman <loberman@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 137 +++++++++++++++++++++++++++++++----- drivers/infiniband/ulp/srp/ib_srp.h | 1 + 2 files changed, 119 insertions(+), 19 deletions(-) commit 835ee624c99d0b63797babf25abe208182bb88bf Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Thu May 12 10:49:39 2016 -0700 IB/srp: Swap two code blocks in srp_add_one() This patch does not change any functionality but makes the next patch in this series easier to read. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Tested-by: Laurence Oberman <loberman@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) commit 9aa8b3217ed3c13d4e3496020b140da0e6f49a08 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Thu May 12 10:49:15 2016 -0700 IB/core: Enhance ib_map_mr_sg() The SRP initiator allows to set max_sectors to a value that exceeds the largest amount of data that can be mapped at once with an mlx4 HCA using fast registration and a page size of 4 KB. Hence modify ib_map_mr_sg() such that it can map partial sg-elements. If an sg-element has been mapped partially, let the caller know which fraction has been mapped by adjusting *sg_offset. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Tested-by: Laurence Oberman <loberman@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/rw.c | 2 +- drivers/infiniband/core/verbs.c | 26 +++++++++++++++++++++----- drivers/infiniband/hw/cxgb3/iwch_provider.c | 2 +- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 2 +- drivers/infiniband/hw/cxgb4/mem.c | 2 +- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 2 +- drivers/infiniband/hw/mlx4/mr.c | 2 +- drivers/infiniband/hw/mlx5/mlx5_ib.h | 2 +- drivers/infiniband/hw/mlx5/mr.c | 8 ++++++-- drivers/infiniband/hw/nes/nes_verbs.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +- drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 2 +- drivers/infiniband/ulp/iser/iser_memory.c | 4 ++-- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- include/rdma/ib_verbs.h | 8 ++++---- net/sunrpc/xprtrdma/frwr_ops.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 +- 18 files changed, 47 insertions(+), 27 deletions(-) commit f83b2561a6d4ff12959660ad597580097b744941 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Thu May 12 10:48:48 2016 -0700 IB/srp: Fix srp_create_target() error handling Avoid that the following kernel oops occurs if memory pool allocation fails: BUG: unable to handle kernel NULL pointer dereference at (null) IP: [<ffffffffa048d0a0>] ib_drain_rq+0x0/0x20 [ib_core] Call Trace: [<ffffffffa04af386>] srp_create_target+0xca6/0x13a9 [ib_srp] [<ffffffff813cc863>] dev_attr_store+0x13/0x20 [<ffffffff81214b50>] sysfs_kf_write+0x40/0x50 [<ffffffff81213f1c>] kernfs_fop_write+0x13c/0x180 [<ffffffff81197683>] __vfs_write+0x23/0xf0 [<ffffffff81198744>] vfs_write+0xa4/0x1a0 [<ffffffff81199a44>] SyS_write+0x44/0xa0 [<ffffffff8159e3e9>] entry_SYSCALL_64_fastpath+0x1c/0xac Fixes: 1dc7b1f10dcb ("IB/srp: use the new CQ API") Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Tested-by: Laurence Oberman <loberman@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Cc: <stable@vger.kernel.org> # v4.5+ Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 9d8e7d0dacf09ddac7e617d17dbeec6af56e81e8 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Thu May 12 10:48:13 2016 -0700 IB/srp: Fix a memory descriptor leak in an error path If an error occurs after srp_fr_pool_get() succeeded and before the descriptor is stored in srp_map_state (*state->fr.next++ = desc) then srp_unmap_data() won't free the newly allocated memory descriptor. Hence free the descriptor explicitly. Fixes: f7f7aab1a5c0 ("IB/srp: Convert to new registration API") Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Tested-by: Laurence Oberman <loberman@redhat.com> Cc: Sagi Grimberg <sai@grimberg.me> Cc: Christoph Hellwig <hch@lst.de> Cc: <stable@vger.kernel.org> # v4.4+ Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit cf1acab7d75652a372ee5b9c996689d518914e83 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Thu May 12 10:47:38 2016 -0700 IB/srp: Print "ib_srp: " prefix once pr_debug() already prints prefix PFX. Avoid that PFX is printed twice if the debug statement in srp_add_target() is enabled. Fixes: 34aa654ecb8e ("IB/srp: Avoid that I/O hangs due to a cable pull during LUN scanning") Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Tested-by: Laurence Oberman <loberman@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38a2d0d429f1d87315c55d9139b8bdf66d51c4f4 Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:13 2016 +0200 IB/isert: convert to the generic RDMA READ/WRITE API Replace the homegrown RDMA READ/WRITE code in isert with the generic API, which also adds iWarp support to the I/O path as a side effect. Note that full iWarp operation will need a few additional patches from Steve. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/isert/ib_isert.c | 841 ++++---------------------------- drivers/infiniband/ulp/isert/ib_isert.h | 69 +-- 2 files changed, 85 insertions(+), 825 deletions(-) commit 0e353e34e1e740fe575eb479ca0f2a723a4ef51c Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:12 2016 +0200 IB/core: add RW API support for signature MRs Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/rw.c | 228 +++++++++++++++++++++++++++++++++++++++- drivers/infiniband/core/verbs.c | 1 + include/rdma/ib_verbs.h | 1 + include/rdma/rw.h | 19 ++++ 4 files changed, 244 insertions(+), 5 deletions(-) commit b99f8e4d7bcd3bfbb3cd965918523299370d0cb2 Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:11 2016 +0200 IB/srpt: convert to the generic RDMA READ/WRITE API Replace the homegrown RDMA READ/WRITE code in srpt with the generic API. The only real twist here is that we need to allocate one Linux scatterlist per direct buffer in the SRP command, and chain them before handing them off to the target core. As a side-effect of the conversion the driver will also chain the SEND of the SRP response to the RDMA WRITE WRs for a DATA OUT command, and properly account for RDMA WRITE WRs instead of just for RDMA READ WRs like the driver previously did. We now allocate half of the SQ size to RDMA READ/WRITE contexts, assuming by default one RDMA READ or WRITE operation per command. If a command has multiple operations it will eat into the budget but will still succeed, possible after waiting for WQEs to be available. Also ensure the QPs request the maximum allowed SGEs so that RDMA R/W API works correctly. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srpt/ib_srpt.c | 729 ++++++++++++---------------------- drivers/infiniband/ulp/srpt/ib_srpt.h | 31 +- 2 files changed, 265 insertions(+), 495 deletions(-) commit e64aa657c3d0dae84c2ccc166f6fe25b7d1d28c6 Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:10 2016 +0200 target: enhance and export target_alloc_sgl/target_free_sgl The SRP target driver will need to allocate and chain it's own SGLs soon. For this export target_alloc_sgl, and add a new argument to it so that it can allocate an additional chain entry that doesn't point to a page. Also export transport_free_sgl after renaming it to target_free_sgl to free these SGLs again. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/target/target_core_transport.c | 32 ++++++++++++++++++-------------- drivers/target/target_core_xcopy.c | 2 +- include/target/target_core_backend.h | 1 - include/target/target_core_fabric.h | 4 ++++ 4 files changed, 23 insertions(+), 16 deletions(-) commit a060b5629ab066dd1d321430eeb96f70939a1790 Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:09 2016 +0200 IB/core: generic RDMA READ/WRITE API This supports both manual mapping of lots of SGEs, as well as using MRs from the QP's MR pool, for iWarp or other cases where it's more optimal. For now, MRs are only used for iWARP transports. The user of the RDMA-RW API must allocate the QP MR pool as well as size the SQ accordingly. Thanks to Steve Wise for testing, fixing and rewriting the iWarp support, and to Sagi Grimberg for ideas, reviews and fixes. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/Makefile | 2 +- drivers/infiniband/core/rw.c | 509 +++++++++++++++++++++++++++++++++++++++ drivers/infiniband/core/verbs.c | 25 ++ include/rdma/ib_verbs.h | 14 +- include/rdma/rw.h | 69 ++++++ 5 files changed, 617 insertions(+), 2 deletions(-) commit d4a85c309b33f93cb211f2fa9d26fa77d0bb7b5e Author: Steve Wise <swise@chelsio.com> Date: Tue May 3 18:01:08 2016 +0200 IB/core: add a need_inval flag to struct ib_mr This is the first step toward moving MR invalidation decisions to the core. It will be needed by the upcoming RW API. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/verbs.c | 2 ++ include/rdma/ib_verbs.h | 1 + 2 files changed, 3 insertions(+) commit fffb0383cf0b433ad029d19e6e9d6f1f46523ace Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:07 2016 +0200 IB/core: add a simple MR pool Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/Makefile | 2 +- drivers/infiniband/core/mr_pool.c | 86 +++++++++++++++++++++++++++++++++++++++ drivers/infiniband/core/verbs.c | 5 +++ include/rdma/ib_verbs.h | 8 +++- include/rdma/mr_pool.h | 25 ++++++++++++ 5 files changed, 124 insertions(+), 2 deletions(-) commit 04c41bf39f5b2de72bda04cf10bb95ea1870a94f Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:06 2016 +0200 IB/core: refactor ib_create_qp Split the XRC magic into a separate function, and return early on failure to make the initialization code readable. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/verbs.c | 103 +++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 49 deletions(-) commit 002516edf5176dde2bee54addb7e6e8129a9532b Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:05 2016 +0200 IB/core: add a helper to check for READ WITH INVALIDATE support Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Doug Ledford <dledford@redhat.com> include/rdma/ib_verbs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit ff2ba9936591a1364ae21adf18366dca7608395a Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:04 2016 +0200 IB/core: Add passing an offset into the SG to ib_map_mr_sg Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Steve Wise <swise@opengridcomputing.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/verbs.c | 24 ++++++++++++------------ drivers/infiniband/hw/cxgb3/iwch_provider.c | 7 +++---- drivers/infiniband/hw/cxgb4/iw_cxgb4.h | 5 ++--- drivers/infiniband/hw/cxgb4/mem.c | 7 +++---- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 5 +++-- drivers/infiniband/hw/mlx4/mlx4_ib.h | 5 ++--- drivers/infiniband/hw/mlx4/mr.c | 7 +++---- drivers/infiniband/hw/mlx5/mlx5_ib.h | 5 ++--- drivers/infiniband/hw/mlx5/mr.c | 21 ++++++++++++--------- drivers/infiniband/hw/nes/nes_verbs.c | 7 +++---- drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 7 +++---- drivers/infiniband/hw/ocrdma/ocrdma_verbs.h | 5 ++--- drivers/infiniband/ulp/iser/iser_memory.c | 4 ++-- drivers/infiniband/ulp/isert/ib_isert.c | 2 +- drivers/infiniband/ulp/srp/ib_srp.c | 2 +- include/rdma/ib_verbs.h | 23 +++++++++-------------- net/rds/ib_frmr.c | 2 +- net/sunrpc/xprtrdma/frwr_ops.c | 2 +- net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 2 +- 19 files changed, 66 insertions(+), 76 deletions(-) commit b071c5d7998a79919e83565ddfb98fdf6fa804bc Author: Maarten ter Huurne <maarten@treewalker.org> Date: Mon Apr 18 20:58:53 2016 +0200 USB: ohci-jz4740: Remove obsolete driver The ohci-platform driver can control the clock, while usb-nop-xceiv as the PHY can control the vbus regulator. So this JZ4740-specific glue is not needed anymore. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Paul Cercueil <paul@crapouillou.net> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13105/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/usb/host/ohci-hcd.c | 5 - drivers/usb/host/ohci-jz4740.c | 245 ----------------------------------------- 2 files changed, 250 deletions(-) commit 9d1e7875fafc45dbcbe3d816b022aa1f17219f32 Author: Maarten ter Huurne <maarten@treewalker.org> Date: Mon Apr 18 20:58:52 2016 +0200 MIPS: JZ4740: Probe OHCI platform device via DT The DT fragment will select the ohci-platform driver, since that can handle the JZ4740 OHCI just fine. While I don't have a JZ4740-based board with anything connected to the USB host controller, I did test the generic OHCI driver successfully on a JZ4770-based board. The device is disabled by default; boards that want to use it can override the "status" property. The mass-production Qi LB60 boards don't use the USB host controller. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Paul Cercueil <paul@crapouillou.net> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13104/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/ingenic/jz4740.dtsi | 14 ++++++++++++++ arch/mips/include/asm/mach-jz4740/platform.h | 1 - arch/mips/jz4740/platform.c | 25 ------------------------- 3 files changed, 14 insertions(+), 26 deletions(-) commit 46d6ccdbf384f3659e204824d3bce40c1fa989de Author: Maarten ter Huurne <maarten@treewalker.org> Date: Mon Apr 18 20:58:51 2016 +0200 MIPS: JZ4740: Qi LB60: Remove support for AVT2 variant AVT2 was a prototype board of which about 5 were made, none of which are in use anymore. Signed-off-by: Maarten ter Huurne <maarten@treewalker.org> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Cc: Paul Cercueil <paul@crapouillou.net> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13103/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/jz4740/board-qi_lb60.c | 52 ++-------------------------------------- 1 file changed, 2 insertions(+), 50 deletions(-) commit ae07ea85bd2900d0df0c17724b252131ddae4b50 Author: James Hartley <James.Hartley@imgtec.com> Date: Tue Apr 19 15:46:55 2016 +0100 MIPS: pistachio: Determine SoC revision during boot Now that there are different revisions of the Pistachio SoC in circulation, add this information to the boot log to make it easier for users to determine which hardware they have. Signed-off-by: James Hartley <james.hartley@imgtec.com> Signed-off-by: Ionela Voinescu <ionela.voinescu@imgtec.com> Cc: Andrew Bresticker <abrestic@chromium.org> Cc: Jonas Gorski <jogo@openwrt.org> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13130/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/pistachio/init.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) commit 80fa40acaa1dad5a0a9c15ed2e5d2e72461843f5 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Tue Apr 19 15:35:39 2016 -0700 MIPS: BMIPS: Adjust mips-hpt-frequency for BCM7435 The CPU actually runs at 1405Mhz which gives us a 175625000 Hz MIPS timer frequency (CPU frequency / 8). Fixes: e4c7d009654a ("MIPS: BMIPS: Add BCM7435 dtsi") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-mips@linux-mips.org Cc: john@phrozen.org Cc: cernekee@gmail.com Cc: jaedon.shin@gmail.com Patchwork: https://patchwork.linux-mips.org/patch/13132/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/brcm/bcm7435.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c4a8de357ef1916c38e4419c0bafad86ca4fbcf7 Author: Christian Borntraeger <borntraeger@de.ibm.com> Date: Fri May 13 12:16:36 2016 +0200 KVM: s390: set halt polling to 80 microseconds on s390 we disabled the halt polling with commit 920552b213e3 ("KVM: disable halt_poll_ns as default for s390x"), as floating interrupts would let all CPUs have a successful poll, resulting in much higher CPU usage (on otherwise idle systems). With the improved selection of polls we can now retry halt polling. Performance measurements with different choices like 25,50,80,100,200 microseconds showed that 80 microseconds seems to improve several cases without increasing the CPU costs too much. Higher values would improve the performance even more but increased the cpu time as well. So let's start small and use this value of 80 microseconds on s390 until we have a better understanding of cost/benefit of higher values. Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/s390/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 3491caf2755e9f312666712510d80b00c81ff247 Author: Christian Borntraeger <borntraeger@de.ibm.com> Date: Fri May 13 12:16:35 2016 +0200 KVM: halt_polling: provide a way to qualify wakeups during poll Some wakeups should not be considered a sucessful poll. For example on s390 I/O interrupts are usually floating, which means that _ALL_ CPUs would be considered runnable - letting all vCPUs poll all the time for transactional like workload, even if one vCPU would be enough. This can result in huge CPU usage for large guests. This patch lets architectures provide a way to qualify wakeups if they should be considered a good/bad wakeups in regard to polls. For s390 the implementation will fence of halt polling for anything but known good, single vCPU events. The s390 implementation for floating interrupts does a wakeup for one vCPU, but the interrupt will be delivered by whatever CPU checks first for a pending interrupt. We prefer the woken up CPU by marking the poll of this CPU as "good" poll. This code will also mark several other wakeup reasons like IPI or expired timers as "good". This will of course also mark some events as not sucessful. As KVM on z runs always as a 2nd level hypervisor, we prefer to not poll, unless we are really sure, though. This patch successfully limits the CPU usage for cases like uperf 1byte transactional ping pong workload or wakeup heavy workload like OLTP while still providing a proper speedup. This also introduced a new vcpu stat "halt_poll_no_tuning" that marks wakeups that are considered not good for polling. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Radim Krčmář <rkrcmar@redhat.com> (for an earlier version) Cc: David Matlack <dmatlack@google.com> Cc: Wanpeng Li <kernellwp@gmail.com> [Rename config symbol. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/arm/include/asm/kvm_host.h | 2 ++ arch/arm64/include/asm/kvm_host.h | 2 ++ arch/mips/include/asm/kvm_host.h | 2 ++ arch/mips/kvm/mips.c | 1 + arch/powerpc/include/asm/kvm_host.h | 2 ++ arch/powerpc/kvm/book3s.c | 1 + arch/powerpc/kvm/booke.c | 1 + arch/s390/include/asm/kvm_host.h | 3 +++ arch/s390/kvm/Kconfig | 1 + arch/s390/kvm/interrupt.c | 5 +++++ arch/s390/kvm/kvm-s390.c | 6 ++++++ arch/x86/include/asm/kvm_host.h | 2 ++ arch/x86/kvm/x86.c | 1 + include/linux/kvm_host.h | 15 +++++++++++++++ include/trace/events/kvm.h | 11 +++++++---- virt/kvm/Kconfig | 3 +++ virt/kvm/kvm_main.c | 8 ++++++-- 17 files changed, 60 insertions(+), 6 deletions(-) commit 9b94a8fba501f38368aef6ac1b30e7335252a220 Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org> Date: Thu May 12 11:01:24 2016 -0400 ring-buffer: Use long for nr_pages to avoid overflow failures The size variable to change the ring buffer in ftrace is a long. The nr_pages used to update the ring buffer based on the size is int. On 64 bit machines this can cause an overflow problem. For example, the following will cause the ring buffer to crash: # cd /sys/kernel/debug/tracing # echo 10 > buffer_size_kb # echo 8556384240 > buffer_size_kb Then you get the warning of: WARNING: CPU: 1 PID: 318 at kernel/trace/ring_buffer.c:1527 rb_update_pages+0x22f/0x260 Which is: RB_WARN_ON(cpu_buffer, nr_removed); Note each ring buffer page holds 4080 bytes. This is because: 1) 10 causes the ring buffer to have 3 pages. (10kb requires 3 * 4080 pages to hold) 2) (2^31 / 2^10 + 1) * 4080 = 8556384240 The value written into buffer_size_kb is shifted by 10 and then passed to ring_buffer_resize(). 8556384240 * 2^10 = 8761737461760 3) The size passed to ring_buffer_resize() is then divided by BUF_PAGE_SIZE which is 4080. 8761737461760 / 4080 = 2147484672 4) nr_pages is subtracted from the current nr_pages (3) and we get: 2147484669. This value is saved in a signed integer nr_pages_to_update 5) 2147484669 is greater than 2^31 but smaller than 2^32, a signed int turns into the value of -2147482627 6) As the value is a negative number, in update_pages_handler() it is negated and passed to rb_remove_pages() and 2147482627 pages will be removed, which is much larger than 3 and it causes the warning because not all the pages asked to be removed were removed. Link: https://bugzilla.kernel.org/show_bug.cgi?id=118001 Cc: stable@vger.kernel.org # 2.6.28+ Fixes: 7a8e76a3829f1 ("tracing: unified trace buffer") Reported-by: Hao Qin <QEver.cn@gmail.com> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> kernel/trace/ring_buffer.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit 72f9f8b58bc743e6b6abdc68f60db98486c3ffcf Author: Lauro Costa <lauro@polilinux.com.br> Date: Mon May 9 17:36:11 2016 -0300 Bluetooth: Add USB ID 13D3:3487 to ath3k Add hw id to ath3k usb device list and btusb blacklist T: Bus=01 Lev=01 Prnt=01 Port=08 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=13d3 ProdID=3487 Rev=00.02 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 Requires these firmwares: ar3k/AthrBT_0x11020100.dfu and ar3k/ramps_0x11020100_40.dfu Firmwares are available in linux-firmware. Device found in a laptop ASUS model N552VW. It's an Atheros AR9462 chip. Signed-off-by: Lauro Costa <lauro@polilinux.com.br> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> drivers/bluetooth/ath3k.c | 2 ++ drivers/bluetooth/btusb.c | 1 + 2 files changed, 3 insertions(+) commit bf389cabb3b8079c23f9762e62b05f291e2d5e99 Author: Jiri Slaby <jslaby@suse.cz> Date: Fri May 13 10:38:49 2016 +0200 Bluetooth: fix power_on vs close race With all the latest fixes applied, I am still able to reproduce this (and other) warning(s): WARNING: CPU: 1 PID: 19684 at ../kernel/workqueue.c:4092 destroy_workqueue+0x70a/0x770() ... Call Trace: [<ffffffff819fee81>] ? dump_stack+0xb3/0x112 [<ffffffff8117377e>] ? warn_slowpath_common+0xde/0x140 [<ffffffff811ce68a>] ? destroy_workqueue+0x70a/0x770 [<ffffffff811739ae>] ? warn_slowpath_null+0x2e/0x40 [<ffffffff811ce68a>] ? destroy_workqueue+0x70a/0x770 [<ffffffffa0c944c9>] ? hci_unregister_dev+0x2a9/0x720 [bluetooth] [<ffffffffa0b301db>] ? vhci_release+0x7b/0xf0 [hci_vhci] [<ffffffffa0b30160>] ? vhci_flush+0x50/0x50 [hci_vhci] [<ffffffff8117cd73>] ? do_exit+0x863/0x2b90 This is due to race present in the hci_unregister_dev path. hdev->power_on work races with hci_dev_do_close. One tries to open, the other tries to close, leading to warning like the above. (Another example is a warning in kobject_get or kobject_put depending on who wins the race.) Fix this by switching those two racers to ensure hdev->power_on never triggers while hci_dev_do_close is in progress. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> net/bluetooth/hci_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ef0491ea17f8019821c7e9c8e801184ecf17f85a Author: Steven Rostedt <rostedt@goodmis.org> Date: Fri May 13 15:30:13 2016 +0200 ARM: Hide finish_arch_post_lock_switch() from modules The introduction of switch_mm_irqs_off() brought back an old bug regarding the use of preempt_enable_no_resched: As part of: 62b94a08da1b ("sched/preempt: Take away preempt_enable_no_resched() from modules") the definition of preempt_enable_no_resched() is only available in built-in code, not in loadable modules, so we can't generally use it from header files. However, the ARM version of finish_arch_post_lock_switch() calls preempt_enable_no_resched() and is defined as a static inline function in asm/mmu_context.h. This in turn means we cannot include asm/mmu_context.h from modules. With today's tip tree, asm/mmu_context.h gets included from linux/mmu_context.h, which is normally the exact pattern one would expect, but unfortunately, linux/mmu_context.h can be included from the vhost driver that is a loadable module, now causing this compile time error with modular configs: In file included from ../include/linux/mmu_context.h:4:0, from ../drivers/vhost/vhost.c:18: ../arch/arm/include/asm/mmu_context.h: In function 'finish_arch_post_lock_switch': ../arch/arm/include/asm/mmu_context.h:88:3: error: implicit declaration of function 'preempt_enable_no_resched' [-Werror=implicit-function-declaration] preempt_enable_no_resched(); Andy already tried to fix the bug by including linux/preempt.h from asm/mmu_context.h, but that didn't help. Arnd suggested reordering the header files, which wasn't popular, so let's use this workaround instead: The finish_arch_post_lock_switch() definition is now also hidden inside of #ifdef MODULE, so we don't see anything referencing preempt_enable_no_resched() from a header file. I've built a few hundred randconfig kernels with this, and did not see any new problems. Tested-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Borislav Petkov <bp@suse.de> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mel Gorman <mgorman@techsingularity.net> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Russell King - ARM Linux <linux@armlinux.org.uk> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: linux-arm-kernel@lists.infradead.org Fixes: f98db6013c55 ("sched/core: Add switch_mm_irqs_off() and use it in the scheduler") Link: http://lkml.kernel.org/r/1463146234-161304-1-git-send-email-arnd@arndb.de Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/arm/include/asm/mmu_context.h | 2 ++ 1 file changed, 2 insertions(+) commit 86ce9a340e38bcba664fb11c7ab9ba03fcf5e55e Author: Sashka Nochkin <linux-mips@durdom.com> Date: Tue Apr 19 23:44:45 2016 -0400 mips: mt7620: fallback to SDRAM when syscfg0 does not have a valid value for the memory type Mediatek MT7620 SoC has syscfg0 bits where it sets the type of memory being used. However, sometimes those bits are not set properly (reading "11"). In this case, the SoC assumes SDRAM. The patch below reflects that. Signed-off-by: Sashka Nochkin <linux-mips@durdom.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13135/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mach-ralink/mt7620.h | 1 + arch/mips/ralink/mt7620.c | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) commit 6533af4d4831c421cd9aa4dce7cfc19a3514cc09 Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 18:04:53 2016 +0100 MIPS: Prevent "restoration" of MSA context in non-MSA kernels If a kernel doesn't support MSA context (ie. CONFIG_CPU_HAS_MSA=n) then it will only keep 64 bits per FP register in thread context, and the calls to set_fpr64 in restore_msa_extcontext will overrun the end of the FP register context into the FCSR & MSACSR values. GCC 6.x has become smart enough to detect this & complain like so: arch/mips/kernel/signal.c: In function 'protected_restore_fp_context': ./arch/mips/include/asm/processor.h:114:17: error: array subscript is above array bounds [-Werror=array-bounds] fpr->val##width[FPR_IDX(width, idx)] = val; \ ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ ./arch/mips/include/asm/processor.h:118:1: note: in expansion of macro 'BUILD_FPR_ACCESS' BUILD_FPR_ACCESS(64) The only way to trigger this code to run would be for a program to set up an artificial extended MSA context structure following a sigframe & execute sigreturn. Whilst this doesn't allow a program to write to any state that it couldn't already, it makes little sense to allow this "restoration" of MSA context in a system that doesn't support MSA. Fix this by killing a program with SIGSYS if it tries something as crazy as "restoring" fake MSA context in this way, also fixing the build error & allowing for most of restore_msa_extcontext to be optimised out of kernels without support for MSA. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reported-by: Michal Toman <michal.toman@imgtec.com> Fixes: bf82cb30c7e5 ("MIPS: Save MSA extended context around signals") Tested-by: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: James Hogan <james.hogan@imgtec.com> Cc: Michal Toman <michal.toman@imgtec.com> Cc: linux-mips@linux-mips.org Cc: stable <stable@vger.kernel.org> # v4.3+ Patchwork: https://patchwork.linux-mips.org/patch/13164/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/signal.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit 1fa405552e33f2169d173cdb7ca0c03e094904f6 Author: James Hogan <james.hogan@imgtec.com> Date: Fri Apr 22 18:19:17 2016 +0100 MIPS: cevt-r4k: Dynamically calculate min_delta_ns Calculate the MIPS clockevent device's min_delta_ns dynamically based on the time it takes to perform the mips_next_event() sequence. Virtualisation in particular makes the current fixed min_delta of 0x300 inappropriate under some circumstances, as the CP0_Count and CP0_Compare registers may be being emulated by the hypervisor, and the frequency may not correspond directly to the CPU frequency. We actually use twice the median of multiple 75th percentiles of multiple measurements of how long the mips_next_event() sequence takes, in order to fairly efficiently eliminate outliers due to unexpected hypervisor latency (which would need handling with retries when it occurs during normal operation anyway). Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13176/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cevt-r4k.c | 82 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 80 insertions(+), 2 deletions(-) commit 24e1df664fd3c025664ae0b64a4aec691507959a Author: James Hogan <james.hogan@imgtec.com> Date: Fri Apr 22 18:19:15 2016 +0100 MIPS: malta-time: Take seconds into account When estimating the clock frequency based on the RTC, take seconds into account in case the Update In Progress (UIP) bit wasn't seen. This can happen in virtual machines (which may get pre-empted by the hypervisor at inopportune times) with QEMU emulating the RTC (and in fact not setting the UIP bit for very long), especially on slow hosts such as FPGA systems and hardware emulators. This results in several seconds actually having elapsed before seeing the UIP bit instead of just one second, and exaggerated timer frequencies. While updating the comments, they're also fixed to match the code in that the rising edge of the update flag is detected first, not the falling edge. The rising edge gives a more precise point to read the counters in a virtualised system than the falling edge, resulting in a more accurate frequency. It does however mean that we have to also wait for the falling edge before doing the read of the RTC seconds register, otherwise it seems to be possible in slow hardware emulation to stray into the interval when the RTC time is undefined during the update (at least 244uS after the rising edge of the update flag). This can result in both seconds values reading the same, and it wrapping to 60 seconds, vastly underestimating the frequency. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13174/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mti-malta/malta-time.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) commit aab4673b599d8037c713afce40fabae398ca96c4 Author: James Hogan <james.hogan@imgtec.com> Date: Fri Apr 22 18:19:14 2016 +0100 MIPS: malta-time: Start GIC count before syncing to RTC The sampling of the GIC counter on Malta after observing a rising edge of the RTC update flag differs slightly between the first and second sample, with the first sample also calling gic_start_count(). The two samples should really be taken as similarly as possible to get the most accurate figure, so move the gic_start_count() call before detecting the rising edge. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13173/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mti-malta/malta-time.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 6b8322576e9d325b65c54fbef64e4e8690ad70ce Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 12:43:58 2016 +0100 MIPS: Force CPUs to lose FP context during mode switches Commit 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS") added support for the PR_SET_FP_MODE prctl, which allows a userland program to modify its FP mode at runtime. This is most notably required if dynamic linking leads to the FP mode requirement changing at runtime from that indicated in the initial executable's ELF header. In order to avoid overhead in the general FP context restore code, it aimed to have threads in the process become unable to enable the FPU during a mode switch & have the thread calling the prctl syscall wait for all other threads in the process to be context switched at least once. Once that happens we can know that no thread in the process whose mode will be switched has live FP context, and it's safe to perform the mode switch. However in the (rare) case of modeswitches occurring in multithreaded programs this can lead to indeterminate delays for the thread invoking the prctl syscall, and the code monitoring for those context switches was woefully inadequate for all but the simplest cases. Fix this by broadcasting an IPI if other CPUs may have live FP context for an affected thread, with a handler causing those CPUs to relinquish their FPU ownership. Threads will then be allowed to continue running but will stall on the wait_on_atomic_t in enable_restore_fp_context if they attempt to use FP again whilst the mode switch is still in progress. The end result is less fragile poking at scheduler context switch counts & a more expedient completion of the mode switch. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Fixes: 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS") Reviewed-by: Maciej W. Rozycki <macro@imgtec.com> Cc: Adam Buchbinder <adam.buchbinder@gmail.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: stable <stable@vger.kernel.org> # v4.0+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13145/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/process.c | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) commit bd239f1e1429e7781096bf3884bdb1b2b1bb4f28 Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 12:43:57 2016 +0100 MIPS: Disable preemption during prctl(PR_SET_FP_MODE, ...) Whilst a PR_SET_FP_MODE prctl is performed there are decisions made based upon whether the task is executing on the current CPU. This may change if we're preempted, so disable preemption to avoid such changes for the lifetime of the mode switch. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Fixes: 9791554b45a2 ("MIPS,prctl: add PR_[GS]ET_FP_MODE prctl options for MIPS") Reviewed-by: Maciej W. Rozycki <macro@imgtec.com> Tested-by: Aurelien Jarno <aurelien@aurel32.net> Cc: Adam Buchbinder <adam.buchbinder@gmail.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: stable <stable@vger.kernel.org> # v4.0+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13144/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/process.c | 4 ++++ 1 file changed, 4 insertions(+) commit e70ac023f9515c70cf2b291a294f0f250df29847 Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 12:25:38 2016 +0100 MIPS: Allow emulation for unaligned [LS]DXC1 instructions If an address error exception occurs for a LDXC1 or SDXC1 instruction, within the cop1x opcode space, allow it to be passed through to the FPU emulator rather than resulting in a SIGILL. This causes LDXC1 & SDXC1 to be handled in a manner consistent with the more common LDC1 & SDC1 instructions. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Tested-by: Aurelien Jarno <aurelien@aurel32.net> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13143/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/unaligned.c | 1 + 1 file changed, 1 insertion(+) commit abf378be49f38c4d3e23581d3df3fa9f1b1b11d2 Author: Maciej W. Rozycki <macro@imgtec.com> Date: Thu May 12 10:19:08 2016 +0100 MIPS: ptrace: Prevent writes to read-only FCSR bits Correct the cases missed with commit 9b26616c8d9d ("MIPS: Respect the ISA level in FCSR handling") and prevent writes to read-only FCSR bits there. This in particular applies to FP context initialisation where any IEEE 754-2008 bits preset by `mips_set_personality_nan' are cleared before the relevant ptrace(2) call takes effect and the PTRACE_POKEUSR request addressing FPC_CSR where no masking of read-only FCSR bits is done. Remove the FCSR clearing from FP context initialisation then and unify PTRACE_POKEUSR/FPC_CSR and PTRACE_SETFPREGS handling, by factoring out code from `ptrace_setfpregs' and calling it from both places. This mostly matters to soft float configurations where the emulator can be switched this way to a mode which should not be accessible and cannot be set with the CTC1 instruction. With hard float configurations any effect is transient anyway as read-only bits will retain their values at the time the FP context is restored. Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: stable@vger.kernel.org # v4.0+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13239/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/ptrace.c | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) commit 4249548454f7ba4581aeee26bd83f42b48a14d15 Author: Maciej W. Rozycki <macro@imgtec.com> Date: Thu May 12 10:18:27 2016 +0100 MIPS: ptrace: Fix FP context restoration FCSR regression Fix a floating-point context restoration regression introduced with commit 9b26616c8d9d ("MIPS: Respect the ISA level in FCSR handling") that causes a Floating Point exception and consequently a kernel oops with hard float configurations when one or more FCSR Enable and their corresponding Cause bits are set both at a time via a ptrace(2) call. To do so reinstate Cause bit masking originally introduced with commit b1442d39fac2 ("MIPS: Prevent user from setting FCSR cause bits") to address this exact problem and then inadvertently removed from the PTRACE_SETFPREGS request with the commit referred above. Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: stable@vger.kernel.org # v4.0+ Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13238/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/ptrace.c | 1 + 1 file changed, 1 insertion(+) commit 9125f19bbb97e7444b5ea01f8262fa09679e1376 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Fri May 13 13:22:41 2016 +0530 MIPS: dts: pic32: Update dts to reflect new PIC32MZDA clk binding - now clock nodes definition is merged with core .dtsi file - only one rootclk is now part of DT - clock clients also updated based on new binding doc Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Kumar Gala <galak@codeaurora.org> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Sandeep Sheriker <sandeepsheriker.mallikarjun@microchip.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-clk@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13248/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/pic32/pic32mzda-clk.dtsi | 236 ---------------------------- arch/mips/boot/dts/pic32/pic32mzda.dtsi | 63 +++++--- arch/mips/boot/dts/pic32/pic32mzda_sk.dts | 5 +- 3 files changed, 45 insertions(+), 259 deletions(-) commit ce6e1188465998820e7182455261b1f5d508ca17 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Fri May 13 13:22:40 2016 +0530 CLK: microchip: Add Microchip PIC32 clock driver. This clock driver implements PIC32 specific clock-tree. clock-tree entities can only be configured through device-tree file (OF). Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-clk@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13247/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/clk/Kconfig | 3 + drivers/clk/Makefile | 1 + drivers/clk/microchip/Makefile | 2 + drivers/clk/microchip/clk-core.c | 1031 +++++++++++++++++++++++++++++++++ drivers/clk/microchip/clk-core.h | 84 +++ drivers/clk/microchip/clk-pic32mzda.c | 275 +++++++++ 6 files changed, 1396 insertions(+) commit d863dc9e5840b319105ebc90b46df8e26f1ea723 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Fri May 13 13:22:39 2016 +0530 dt/bindings/clk: Add PIC32 clock binding documentation. Document the devicetree bindings for the clock driver found on Microchip PIC32 class devices. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Acked-by: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Purna Chandra Mandal <purna.mandal@microchip.com> Cc: Kumar Gala <galak@codeaurora.org> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-clk@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13246/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> .../devicetree/bindings/clock/microchip,pic32.txt | 39 ++++++++++++++++++++ include/dt-bindings/clock/microchip,pic32-clock.h | 42 ++++++++++++++++++++++ 2 files changed, 81 insertions(+) commit c9babb1926852d88ebee3c27f2b8bac848560c0e Author: Maciej W. Rozycki <macro@imgtec.com> Date: Fri May 13 07:21:40 2016 +0100 MIPS: ELF: Unify ABI classification macros Remove a duplicate o32 `elf_check_arch' implementation, move all macro variants to <asm/elf.h> and define them unconditionally under indvidual names, substituting alias `elf_check_arch' definitions in variant code. Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13245/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/elf.h | 91 ++++++++++++++++++++++++++-------------- arch/mips/kernel/binfmt_elfn32.c | 16 +------ arch/mips/kernel/binfmt_elfo32.c | 20 +-------- 3 files changed, 62 insertions(+), 65 deletions(-) commit 4a60ad51d660200adcb8bfecda472f0179ff22ec Author: Maciej W. Rozycki <macro@imgtec.com> Date: Fri May 13 07:20:55 2016 +0100 MIPS: ELF: Unify __MIPS_O32_FP64_MUST_BE_ZERO definitions Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13244/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/elf.h | 25 ++++++++++++------------- arch/mips/kernel/binfmt_elfo32.c | 12 ------------ 2 files changed, 12 insertions(+), 25 deletions(-) commit de704161aa05a594fcd596cb7f50e231c384355e Author: Maciej W. Rozycki <macro@imgtec.com> Date: Fri May 13 07:20:16 2016 +0100 MIPS: ELF: Deconditionalise ABI flags definitions Move the `mips_elf_abiflags_v0' structure and FP ABI flag macros outside #ifndef ELF_ARCH. These are public interfaces. Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13243/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/elf.h | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) commit 4b62fad50efd1cff9017d3e4dcfcf5c4b6c13193 Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 15:50:32 2016 +0100 MIPS: Print GuestCtl1 on machine check exception The GuestCtl1 CP0 register can contain the GuestID used for root TLB operations, which affects TLB matching. The other TLB registers are already dumped out to the log on a machine check exception due to multiple matching TLB entries, so also dump the value of the GuestCtl1 register if GuestIDs are supported. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13232/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/lib/dump_tlb.c | 2 ++ 1 file changed, 2 insertions(+) commit 382208dc8c856b4d8ba602031412842b121decb2 Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 15:50:31 2016 +0100 MIPS: dump_tlb: Preserve and dump GuestID The GuestID for root TLB operations (GuestCtl1.RID) is modified by TLB reads, so needs preserving by dump_tlb() like the ASID field of EntryHi. Also dump the GuestID of each entry if it exists alongside the ASID, as it forms an important part of the TLB entry when VZ guests are used. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13230/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/lib/dump_tlb.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) commit 6ad816e77ed77538fe729050cf6631328c6113f7 Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 15:50:30 2016 +0100 MIPS: Add probing & defs for VZ & guest features Add a few new cpu-features.h definitions for VZ sub-features, namely the existence of the CP0_GuestCtl0Ext, CP0_GuestCtl1, and CP0_GuestCtl2 registers, and support for GuestID to dialias TLB entries belonging to different guests. Also add certain features present in the guest, with the naming scheme cpu_guest_has_*. These are added separately to the main options bitfield since they generally parallel similar features in the root context. A few of these (FPU, MSA, watchpoints, perf counters, CP0_[X]ContextConfig registers, MAAR registers, and probably others in future) can be dynamically configured in the guest context, for which the cpu_guest_has_dyn_* macros are added. [ralf@linux-mips.org: Resolve merge conflict.] Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13231/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-features.h | 98 +++++++++++++++ arch/mips/include/asm/cpu-info.h | 14 +++ arch/mips/include/asm/cpu.h | 5 + arch/mips/kernel/cpu-probe.c | 232 +++++++++++++++++++++++++++++++++++ 4 files changed, 349 insertions(+) commit 7eb91118227d71132ca2da06a9b376ba656171d9 Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 15:50:29 2016 +0100 MIPS: Add guest CP0 accessors Add guest CP0 accessors and guest TLB operations along the same lines as the existing macros and functions for the root CP0. Signed-off-by: James Hogan <james.hogan@imgtec.com> Acked-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13229/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 341 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 330 insertions(+), 11 deletions(-) commit f913e9ea3946902f5443e703d70d5daf90f4498a Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 15:50:28 2016 +0100 MIPS: Add register definitions for VZ ASE registers Add various register definitions to <asm/mipsregs.h> for the coprocessor zero registers in the VZ ASE, namely CP0_GuestCtl0, CP0_GuestCtl0Ext, CP0_GuestCtl1, CP0_GuestCtl2, CP0_GuestCtl3, and CP0_GTOffset. Signed-off-by: James Hogan <james.hogan@imgtec.com> Acked-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13228/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 117 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) commit 9e575f753576d85e83ae0afc27eca9708259a797 Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 15:50:27 2016 +0100 MIPS: Avoid magic numbers probing kscratch_mask The decode_config4() function reads kscratch_mask from CP0_Config4.KScrExist using a hard coded shift and mask. We already have a definition for the mask in mipsregs.h, so add a definition for the shift and make use of them. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13227/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 3 ++- arch/mips/kernel/cpu-probe.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 30228c40f0c6f0a93910325f120904505a4c39cc Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 13:50:53 2016 +0100 MIPS: Add perf counter feature Add CPU feature for standard MIPS r2 performance counters, as determined by the Config1.PC bit. Both perf_events and oprofile probe this bit, so lets combine the probing and change both to use cpu_has_perf. This will also be used for VZ support in KVM to know whether performance counters exist which can be exposed to guests. [ralf@linux-mips.org: resolve conflict.] Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Robert Richter <rric@kernel.org> Cc: linux-mips@linux-mips.org Cc: oprofile-list@lists.sf.net Patchwork: https://patchwork.linux-mips.org/patch/13226/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-features.h | 4 ++++ arch/mips/include/asm/cpu.h | 1 + arch/mips/kernel/cpu-probe.c | 2 ++ arch/mips/kernel/perf_event_mipsxx.c | 4 +--- arch/mips/oprofile/op_model_mipsxx.c | 4 +--- 5 files changed, 9 insertions(+), 6 deletions(-) commit f18bdfa191df3947879f93519ce4a4985e5f5fce Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 13:50:52 2016 +0100 MIPS: Add defs & probing of [X]ContextConfig The CP0_[X]ContextConfig registers are present if CP0_Config3.CTXTC or CP0_Config3.SM are set, and provide more control over which bits of CP0_[X]Context are set to the faulting virtual address on a TLB exception. KVM/VZ will need to be able to save and restore these registers in the guest context, so add the relevant definitions and probing of the ContextConfig feature in the root context first. [ralf@linux-mips.org: resolve merge conflict.] Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13225/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-features.h | 4 ++++ arch/mips/include/asm/cpu.h | 1 + arch/mips/include/asm/mipsregs.h | 6 ++++++ arch/mips/kernel/cpu-probe.c | 4 +++- 4 files changed, 14 insertions(+), 1 deletion(-) commit e06a1548f3043febb658b58ec5ccbc7d03a785af Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 13:50:51 2016 +0100 MIPS: Add defs & probing of BadInstr[P] registers The optional CP0_BadInstr and CP0_BadInstrP registers are written with the encoding of the instruction that caused a synchronous exception to occur, and the prior branch instruction if in a delay slot. These will be useful for instruction emulation in KVM, and especially for VZ support where reading guest virtual memory is a bit more awkward. Add CPU option numbers and cpu_has_* definitions to indicate the presence of each registers, and add code to probe for them using bits in the CP0_Config3 register. [ralf@linux-mips.org: resolve merge conflict.] Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13224/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-features.h | 8 ++++++++ arch/mips/include/asm/cpu.h | 2 ++ arch/mips/include/asm/mipsregs.h | 3 +++ arch/mips/kernel/cpu-probe.c | 4 ++++ 4 files changed, 17 insertions(+) commit 37fb60f8e3f011c25c120081a73886ad8dbc42fd Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 13:50:50 2016 +0100 MIPS: Add defs & probing of extended CP0_EBase The CP0_EBase register may optionally have a write gate (WG) bit to allow the upper bits to be written, i.e. bits 31:30 on MIPS32 since r3 (to allow for an exception base outside of KSeg0/KSeg1 when segmentation control is in use) and bits 63:30 on MIPS64 (which also implies the extension of CP0_EBase to 64 bits long). The presence of this feature will need to be known about for VZ support in order to correctly save and restore all the bits of the guest CP0_EBase register, so add CPU feature definition and probing for this feature. Probing the WG bit on MIPS64 can be a bit fiddly, since 64-bit COP0 register access instructions were UNDEFINED for 32-bit registers prior to MIPS r6, and it'd be nice to be able to probe without clobbering the existing state, so there are 3 potential paths: - If we do a 32-bit read of CP0_EBase and the WG bit is already set, the register must be 64-bit. - On MIPS r6 we can do a 64-bit read-modify-write to set CP0_EBase.WG, since the upper bits will read 0 and be ignored on write if the register is 32-bit. - On pre-r6 cores, we do a 32-bit read-modify-write of CP0_EBase. This avoids the potentially UNDEFINED behaviour, but will clobber the upper 32-bits of CP0_EBase if it isn't a simple sign extension (which also requires us to ensure BEV=1 or modifying the exception base would be UNDEFINED too). It is hopefully unlikely a bootloader would set up CP0_EBase to a 64-bit segment and leave WG=0. [ralf@linux-mips.org: Resolved merge conflict.] Signed-off-by: James Hogan <james.hogan@imgtec.com> Tested-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13223/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-features.h | 4 ++++ arch/mips/include/asm/cpu.h | 1 + arch/mips/include/asm/mipsregs.h | 3 +++ arch/mips/kernel/cpu-probe.c | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 43 insertions(+) commit 37af2f3077d9202f8f8d17f453c91c9d08e11c76 Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 11 13:50:49 2016 +0100 MIPS: Define & use CP0_EBase bit definitions Add definitions for the bits & fields in the CP0_EBase register, and use them from a few different places in arch/mips which hardcoded these values. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Jayachandran C <jchandra@broadcom.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13222/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 10 +++++++++- arch/mips/kvm/trap_emul.c | 3 ++- arch/mips/netlogic/xlp/nlm_hal.c | 2 +- arch/mips/netlogic/xlr/setup.c | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) commit dc3ee608d6f16947b812c7fac33c18863acdc074 Author: Stephen Boyd <sboyd@codeaurora.org> Date: Tue Apr 19 18:34:37 2016 -0700 MIPS: alchemy: Remove CLK_IS_ROOT This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Manuel Lauss <manuel.lauss@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13134/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/alchemy/common/clock.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 9c938a0df074d4100de38ff967b97451f9b9ae7e Author: Stephen Boyd <sboyd@codeaurora.org> Date: Tue Apr 19 18:33:21 2016 -0700 MIPS: ath79: Remove CLK_IS_ROOT This flag is a no-op now (see commit 47b0eeb3dc8a "clk: Deprecate CLK_IS_ROOT", 2016-02-02) so remove it. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Antony Pavlov <antonynpavlov@gmail.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13133/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/clock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8f4703aa4df758def78e9a39cc5d1ff73c3ef51f Author: Aurelien Jarno <aurelien@aurel32.net> Date: Wed May 11 00:50:03 2016 +0200 MIPS: Octeon: detect and fix byte swapped initramfs Octeon machines support running in little endian mode. U-Boot usually runs in big endian-mode. Therefore the initramfs is loaded in big endian mode, and the kernel later tries to access it in little endian mode. This patch fixes that by detecting byte swapped initramfs using either the CPIO header or the header from standard compression methods, and byte swaps it if needed. It first checks that the header doesn't match in the native endianness to avoid false detections. It uses the kernel decompress library so that we don't have to maintain the list of magics if some decompression methods are added to the kernel. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13219/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/setup.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) commit b47208091291ea2990b69eb59c72d04c7161303e Author: Florian Fainelli <f.fainelli@gmail.com> Date: Tue Feb 9 12:55:53 2016 -0800 MIPS: BMIPS: BMIPS4380 and BMIPS5000 support RIXI Make BMIPS4380 and BMIPS5000 advertise support for RIXI through cpu_probe_broadcom(). bmips_cpu_setup() needs to be called shortly after that, during prom_init() in order to enable the proper Broadcom-specific register to turn on RIXI and the "rotr" instruction. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: john@phrozen.org Cc: cernekee@gmail.com Cc: jon.fraser@broadcom.com Cc: pgynther@google.com Cc: paul.burton@imgtec.com Cc: ddaney.cavm@gmail.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12507/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 2 ++ arch/mips/kernel/cpu-probe.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) commit 2e274768e4dd9565a31cd1979ed6d534cd4e656f Author: Florian Fainelli <f.fainelli@gmail.com> Date: Tue Feb 9 12:55:52 2016 -0800 MIPS: Move RIXI exception enabling after vendor-specific cpu_probe Some processors may not have the RIXI bit advertised in the Config3 register, not being a MIPS32R2 or R6 core, yet, they might be supporting it through a different way, which is overriden during vendor-specific cpu_probe(). Move the RIXI exceptions enabling after the vendor-specific cpu_probe() function has had a change to run and override the current CPU's options with MIPS_CPU_RIXI. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: john@phrozen.org Cc: cernekee@gmail.com Cc: jon.fraser@broadcom.com Cc: pgynther@google.com Cc: paul.burton@imgtec.com Cc: ddaney.cavm@gmail.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12506/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cpu-probe.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) commit 8256b17ecb028949d80c982d0f28ad46fe4e73d8 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Tue Feb 9 12:55:51 2016 -0800 MIPS: Allow RIXI to be used on non-R2 or R6 cores Some processors, like Broadcom's BMIPS4380 and BMIPS5000 support RIXI and the "rotr" instruction, which can be used to get a slightly more efficient page table layout. Introduce a CONFIG_CPU_HAS_RIXI such that those cores can benefit from this feature. Perform the conditional check updates where relevant. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: john@phrozen.org Cc: cernekee@gmail.com Cc: jon.fraser@broadcom.com Cc: pgynther@google.com Cc: paul.burton@imgtec.com Cc: ddaney.cavm@gmail.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12505/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 5 +++++ arch/mips/include/asm/pgtable-bits.h | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) commit e56c7e18818dd721179f9ca95c77dd941a360384 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Apr 19 09:25:11 2016 +0100 MIPS: mm: Panic if an XPA kernel is run without RIXI XPA kernels hardcode for the presence of RIXI - the PTE format & its handling presume RI & XI bits. Make this dependence explicit by panicing if we run on a system that violates it. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13125/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/tlbex.c | 3 +++ 1 file changed, 3 insertions(+) commit 4b6f99d307ed6c7a28b952bfb7b66fb26a6a4cf0 Author: James Hogan <james.hogan@imgtec.com> Date: Tue Apr 19 09:25:10 2016 +0100 MIPS: mm: Don't do MTHC0 if XPA not present Performing an MTHC0 instruction without XPA being present will trigger a reserved instruction exception, therefore conditionalise the use of this instruction when building TLB handlers (build_update_entries()), and in __update_tlb(). This allows an XPA kernel to run on non XPA hardware without that instruction implemented, just like it can run on XPA capable hardware without XPA in use (with the noxpa kernel argument) or with XPA not configured in hardware. [paul.burton@imgtec.com: - Rebase atop other TLB work. - Add "mm" to subject. - Handle the __kmap_pgprot case.] Fixes: c5b367835cfc ("MIPS: Add support for XPA.") Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: David Hildenbrand <dahi@linux.vnet.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jerome Marchand <jmarchan@redhat.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13124/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/init.c | 8 +++++--- arch/mips/mm/tlb-r4k.c | 6 ++++-- arch/mips/mm/tlbex.c | 16 ++++++++++------ 3 files changed, 19 insertions(+), 11 deletions(-) commit 2caa89b49b21737b2b7b6fce37cb323535188b06 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Apr 19 09:25:09 2016 +0100 MIPS: mm: Simplify build_update_entries We can simplify build_update_entries by unifying the code for the 36 bit physical addressing with MIPS32 case with the general case, by using pte_off_ variables in all cases & handling the trivial _PAGE_GLOBAL_SHIFT == 0 case in build_convert_pte_to_entrylo. This leaves XPA as the only special case. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13123/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/tlbex.c | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) commit b4ebbb876dca9327cc964138f5558ca3c6832392 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Apr 19 09:25:08 2016 +0100 MIPS: mm: Be more explicit about PTE mode bit handling The XPA case in iPTE_SW or's in software mode bits to the pte_low value (which is what actually ends up in the high 32 bits of EntryLo...). It does this presuming that only bits in the upper 16 bits of the 32 bit pte_low value will be set. Make this assumption explicit with a BUG_ON. A similar assumption is made for the hardware mode bits, which are or'd in with a single ori instruction. Make that assumption explicit with a BUG_ON too. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13122/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/tlbex.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit bbeeffec6f14a04454906032e9322538535030dc Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Apr 19 09:25:07 2016 +0100 MIPS: mm: Pass scratch register through to iPTE_SW Rather than hardcode a scratch register for the XPA case in iPTE_SW, pass one through from the work registers allocated by the caller. This allows for the XPA path to function correctly regardless of the work registers in use. Without doing this there are cases (where KScratch registers are unavailable) in which iPTE_SW will incorrectly clobber $1 despite it already being in use for the PTE or PTE pointer. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13121/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/tlbex.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) commit f383219674b72f390911c60e1d8ae95e32622398 Author: James Hogan <james.hogan@imgtec.com> Date: Tue Apr 19 09:25:06 2016 +0100 MIPS: mm: Don't clobber $1 on XPA TLB refill For XPA kernels build_update_entries() uses $1 (at) as a scratch register, but doesn't arrange for it to be preserved, so it will always be clobbered by the TLB refill exception. Although this register normally has a very short lifetime that doesn't cross memory accesses, TLB refills due to instruction fetches (either on a page boundary or after preemption) could clobber live data, and its easy to reproduce the clobber with a little bit of assembler code. Note that the use of a hardware page table walker will partly mask the problem, as the TLB refill handler will not always be invoked. This is fixed by avoiding the use of the extra scratch register. The pte_high parts (going into the lower half of the EntryLo registers) are loaded and manipulated separately so as to keep the PTE pointer around for the other halves (instead of storing in the scratch register), and the pte_low parts (going into the high half of the EntryLo registers) are masked with 0x00ffffff using an ext instruction (instead of loading 0x00ffffff into the scratch register and AND'ing). [paul.burton@imgtec.com: - Rebase atop other TLB work. - Use ext instead of an sll, srl sequence. - Use cpu_has_xpa instead of #ifdefs. - Modify commit subject to include "mm".] Fixes: c5b367835cfc ("MIPS: Add support for XPA.") Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13120/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/tlbex.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) commit 7b2cb64f91f25a7293b10054e20d1c0734ffab6f Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Apr 19 09:25:05 2016 +0100 MIPS: mm: Fix MIPS32 36b physical addressing (alchemy, netlogic) There are 2 distinct cases in which a kernel for a MIPS32 CPU (CONFIG_CPU_MIPS32=y) may use 64 bit physical addresses (CONFIG_PHYS_ADDR_T_64BIT=y): - 36 bit physical addressing as used by RMI Alchemy & Netlogic XLP/XLR CPUs. - MIPS32r5 eXtended Physical Addressing (XPA). These 2 cases are distinct in that they require different behaviour from the kernel - the EntryLo registers have different formats. Until Linux v4.1 we only supported the first case, with code conditional upon the 2 aforementioned Kconfig variables being set. Commit c5b367835cfc ("MIPS: Add support for XPA.") added support for the second case, but did so by modifying the code that existed for the first case rather than treating the 2 cases as distinct. Since the EntryLo registers have different formats this breaks the 36 bit Alchemy/XLP/XLR case. Fix this by splitting the 2 cases, with XPA cases now being conditional upon CONFIG_XPA and the non-XPA case matching the code as it existed prior to commit c5b367835cfc ("MIPS: Add support for XPA."). Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reported-by: Manuel Lauss <manuel.lauss@gmail.com> Tested-by: Manuel Lauss <manuel.lauss@gmail.com> Fixes: c5b367835cfc ("MIPS: Add support for XPA.") Cc: James Hogan <james.hogan@imgtec.com> Cc: David Daney <david.daney@cavium.com> Cc: Huacai Chen <chenhc@lemote.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: David Hildenbrand <dahi@linux.vnet.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Alex Smith <alex.smith@imgtec.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: stable@vger.kernel.org # v4.1+ Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13119/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/pgtable-32.h | 27 +++++++++++++++-- arch/mips/include/asm/pgtable-bits.h | 29 +++++++++++++++--- arch/mips/include/asm/pgtable.h | 57 +++++++++++++++++++++++++++++++----- arch/mips/mm/init.c | 4 ++- arch/mips/mm/tlbex.c | 35 ++++++++++++++-------- 5 files changed, 125 insertions(+), 27 deletions(-) commit 745f35587846249b392aa548b4c5f54cd69ed688 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Apr 19 09:25:04 2016 +0100 MIPS: mm: Unify pte_page definition The same definition for pte_page is duplicated for the MIPS32 PHYS_ADDR_T_64BIT case & the generic case. Unify them by moving a single definition outside of preprocessor conditionals. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13117/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/pgtable-32.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 780602d740fc0b723ea3a05bd7f35d2d7f31aa68 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Apr 19 09:25:03 2016 +0100 MIPS: mm: Standardise on _PAGE_NO_READ, drop _PAGE_READ Ever since support for RI/XI was implemented by commit 6dd9344cfc41 ("MIPS: Implement Read Inhibit/eXecute Inhibit") we've had a mixture of _PAGE_READ & _PAGE_NO_READ bits. Rather than keep both around, switch away from using _PAGE_READ to determine page presence & instead invert the use to _PAGE_NO_READ. Wherever we formerly had no definition for _PAGE_NO_READ, change what was _PAGE_READ to _PAGE_NO_READ. The end result is that we consistently use _PAGE_NO_READ to determine whether a page is readable, regardless of whether RI/XI is implemented. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: David Daney <david.daney@cavium.com> Cc: Huacai Chen <chenhc@lemote.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Alex Smith <alex.smith@imgtec.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13116/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/pgtable-bits.h | 19 ++++--------------- arch/mips/include/asm/pgtable.h | 23 +++++++---------------- arch/mips/mm/tlbex.c | 13 ++++--------- 3 files changed, 15 insertions(+), 40 deletions(-) commit 694977006a7ba71e33e1f5df4f66ffd5ae19ec84 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Apr 19 09:25:02 2016 +0100 MIPS: Use enums to make asm/pgtable-bits.h readable asm/pgtable-bits.h has grown to become an unreadable mess of #ifdef directives defining bits conditionally upon other bits all at the preprocessing stage, for no good reason. Instead of having quite so many #ifdef's, simply use enums to provide sequential numbering for bit shifts, without having to keep track manually of what the last bit defined was. Masks are defined separately, after the shifts, which allows for most of their definitions to be reused for all systems rather than duplicated. This patch is not intended to make any behavioural change to the code - all bits should be used in the same way they were before this patch. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Alex Smith <alex.smith@imgtec.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13115/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/pgtable-bits.h | 189 +++++++++++++++-------------------- 1 file changed, 81 insertions(+), 108 deletions(-) commit 253f0d4a5fdcba9367b83df7fb504407efc20ec2 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Apr 19 09:25:01 2016 +0100 MIPS: Remove redundant asm/pgtable-bits.h inclusions asm/pgtable-bits.h is included in 2 assembly files and thus has to ifdef around C code, however nothing defined by the header is used in either of the assembly files that include it. Remove the redundant inclusions such that asm/pgtable-bits.h doesn't need to #ifdef around C code, for cleanliness and in preparation for later patches which will add more C. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Jonas Gorski <jogo@openwrt.org> Cc: Alex Smith <alex.smith@imgtec.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13114/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/pgtable-bits.h | 2 -- arch/mips/kernel/head.S | 1 - arch/mips/kernel/r4k_switch.S | 1 - 3 files changed, 4 deletions(-) commit 515511a7920c69aebf7f5fef0cb8e1df6767f34c Merge: 180bc41 8f65881 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:27:16 2016 +0100 Merge remote-tracking branch 'asoc/topic/hdmi' into asoc-next commit 180bc41ad11b9a7ec5b420fbcef6570163d09204 Merge: e449f7a ca0d879 fbb88b5 aeea2fd 4d24585 027db2e Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:27:01 2016 +0100 Merge remote-tracking branches 'asoc/topic/es8328', 'asoc/topic/find-dai', 'asoc/topic/fsl', 'asoc/topic/fsl-sai' and 'asoc/topic/fsl-ssi' into asoc-next commit e449f7a394dfa444d2e3c15be2cffb758c79a6c9 Merge: 1c21e63 ddecd14 3fafd14 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:46 2016 +0100 Merge remote-tracking branches 'asoc/topic/davinci' and 'asoc/topic/dwc' into asoc-next commit 1c21e63465d1cbe051256951236a694c0a32e39d Merge: 3b15d43 beff053 de06f22 abc189e ae48a35 b58cea7 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:43 2016 +0100 Merge remote-tracking branches 'asoc/topic/bcm2835', 'asoc/topic/cs42l56', 'asoc/topic/da7213', 'asoc/topic/da7218' and 'asoc/topic/da7219' into asoc-next commit 3b15d43bdf9f51c81701663f35db57e10543f405 Merge: 87b88aa 721be3b b6bf328 80833ff 896491b Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:35 2016 +0100 Merge remote-tracking branches 'asoc/topic/adsp', 'asoc/topic/ak4624', 'asoc/topic/atmel' and 'asoc/topic/au1x' into asoc-next commit 87b88aafbfce5a08b04f3ffba05a92ea6a342cdb Merge: e74ac45 381437d Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:26 2016 +0100 Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next commit e74ac45d892f3c03756bd9e9fb4d242fe08cb35d Merge: c988e26 97d3ddd Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:23 2016 +0100 Merge remote-tracking branch 'asoc/topic/pcm5102' into asoc-next commit c988e26130132813e3550a7b97ab2ed2ae0455eb Merge: 3530215 b2047e9 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:22 2016 +0100 Merge remote-tracking branch 'asoc/topic/intel' into asoc-next commit 35302156ea791f96bdc7e0ca3c44cb25341fbcb1 Merge: bf10262 e92077c Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:21 2016 +0100 Merge remote-tracking branch 'asoc/topic/imx' into asoc-next commit bf10262159cfd7ed76b777927e7cba628cea85ba Merge: f84025b 73fe01c Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:20 2016 +0100 Merge remote-tracking branch 'asoc/topic/dmaengine' into asoc-next commit f84025ba12ec843daf81511feef764f6b5f1972f Merge: 86d811d 3290217 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:20 2016 +0100 Merge remote-tracking branch 'asoc/topic/dapm' into asoc-next commit 86d811d898cdd823d3ee35f6441c72216ae89e1e Merge: 44549e8 823ecdd 3cc6185 7e885d2 b9c17f1 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:26:15 2016 +0100 Merge remote-tracking branches 'asoc/fix/davinci', 'asoc/fix/fsl-ssi', 'asoc/fix/rockchip' and 'asoc/fix/rt286' into asoc-linus commit 4f38c566a0967ce9291537ba04891391681a7661 Merge: 39d652e ae714c3 74d8b45 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:23:49 2016 +0100 Merge remote-tracking branches 'regulator/topic/tps6524x' and 'regulator/topic/twl' into regulator-next commit 39d652e0660bbad6a90a21042dc9f22584dfaabd Merge: eb76d84 bc0868c b1d21a2 9e9daa0 94be46b Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:23:46 2016 +0100 Merge remote-tracking branches 'regulator/topic/pwm', 'regulator/topic/qcom-spmi', 'regulator/topic/rk808' and 'regulator/topic/s2mps11' into regulator-next commit eb76d8407ced8d96eb3bcf3112348b8de5bd1c02 Merge: ce59ded a959730 d2d5437 724fef5 6c7d614 99cf3af Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:23:38 2016 +0100 Merge remote-tracking branches 'regulator/topic/max77686', 'regulator/topic/max8973', 'regulator/topic/maxim', 'regulator/topic/palmas' and 'regulator/topic/pv88080' into regulator-next commit ce59dedfef302216d1ee93d5089d7dad59bd13fa Merge: 78d5501 e57cbb7 40e1d79 7cb7348 994aae3 5aa4359 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:23:34 2016 +0100 Merge remote-tracking branches 'regulator/topic/fan53555', 'regulator/topic/lp3971', 'regulator/topic/lp3972', 'regulator/topic/lp873x' and 'regulator/topic/max77620' into regulator-next commit 78d5501cf41d25a2a78dd571d91fee3e1e271d3f Merge: 8595bb2 6a0028b 8a34e97 2d80a91 abf2f82 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:23:27 2016 +0100 Merge remote-tracking branches 'regulator/topic/can-change', 'regulator/topic/constrain', 'regulator/topic/debugfs' and 'regulator/topic/doc' into regulator-next commit 8595bb27cebe8b823167fd11b2b506f2e59e83f5 Merge: ab36885 1a4d5a3 c5c9c2d 162c5a3 f2e6721 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:23:08 2016 +0100 Merge remote-tracking branches 'regulator/topic/abb', 'regulator/topic/act8865', 'regulator/topic/as3722' and 'regulator/topic/axp20x' into regulator-next commit ab3688541d72cae7570840c7e3c7770b35adc0ba Merge: 170b649 45389c4 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:23:01 2016 +0100 Merge remote-tracking branch 'regulator/topic/supply' into regulator-next commit 170b649e40c0dac86eba6bd446fc79dd3b38c7ea Merge: 75941a1 de4a54c Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:22:57 2016 +0100 Merge remote-tracking branch 'regulator/topic/core' into regulator-next commit 75941a1ba32d36fe6230a6388f10c493b3f6232b Merge: 93878cd fef9501 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:22:55 2016 +0100 Merge remote-tracking branch 'regulator/topic/bypass' into regulator-next commit 93878cd540500884b2ea428f620c8e1426fc4d6d Merge: 5535fc7 45fa203 a215137 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:22:43 2016 +0100 Merge remote-tracking branches 'regulator/fix/constrain' and 'regulator/fix/defer' into regulator-linus commit 5535fc7958efbd68542def0abd6c9e6b3a9e6812 Merge: e9cb77d 2c0a303 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:22:41 2016 +0100 Merge remote-tracking branch 'regulator/fix/core' into regulator-linus commit e9cb77d03ca1055d0d65483bc972a5a0e8d3eeed Merge: 099cba2 dd1a571 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:22:38 2016 +0100 Merge remote-tracking branch 'regulator/fix/bypass' into regulator-linus commit 099cba20b211dd0ca66b0991a32bb22dc64bdcb8 Merge: 44549e8 9689dab Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 14:22:36 2016 +0100 Merge tag 'regulator-fix-v4.6-rc7' into regulator-linus regulator: Fixes for v4.6 A small collection of driver specific fixes for the regulator subsysetem: - Fix handling of probe deferral for GPIO regulators. - Fix a typo in the module alias for DA9053. - Fix the definition of BUCK9 in the S2MPS11 driver. This change looks larger than it is because an irregularity in the hardware means that the macro used to define bucks 6-10 needs duplicating and tweaking to have a separate macro for 9. - Fix a series of errors in the definitions of the LDOs the AXP20x regulators, some of which had always been present and some of which were introduced in the merge window. # gpg: Signature made Fri 13 May 2016 11:31:13 BST using RSA key ID 5D5487D0 # gpg: key CD7BEEBC: no public key for trusted key - skipped # gpg: key CD7BEEBC marked as ultimately trusted # gpg: key AF88CD16: no public key for trusted key - skipped # gpg: key AF88CD16 marked as ultimately trusted # gpg: key 16005C11: no public key for trusted key - skipped # gpg: key 16005C11 marked as ultimately trusted # gpg: key 5621E907: no public key for trusted key - skipped # gpg: key 5621E907 marked as ultimately trusted # gpg: key 5C6153AD: no public key for trusted key - skipped # gpg: key 5C6153AD marked as ultimately trusted # gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>" # gpg: aka "Mark Brown <broonie@debian.org>" # gpg: aka "Mark Brown <broonie@kernel.org>" # gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>" # gpg: aka "Mark Brown <broonie@linaro.org>" # gpg: aka "Mark Brown <Mark.Brown@linaro.org>" commit d3450e009f9038f3c7824f64695fa51ef2474e08 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:40:10 2016 +0100 drm/vmwgfx: add extern C guard for the UAPI header Cc: Thomas Hellstrom <thellstrom@vmware.com> Cc: Brian Paul <brianp@vmware.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Sinclair Yeh <syeh@vmware.com> include/uapi/drm/vmwgfx_drm.h | 9 +++++++++ 1 file changed, 9 insertions(+) commit 3818081565b01f126c1fcb22f810466fa589cf97 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:38:49 2016 +0100 drm/virgl: add extern C guard for the UAPI header Cc: Dave Airlie <airlied@redhat.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/virtgpu_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit b6c2b64223d27ca579cce61fa5ffbf71b3f12a38 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:37:48 2016 +0100 drm/via: add extern C guard for the UAPI header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/via_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6a982350f892c286c645a6fe0e1da1f869a0c43f Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:36:57 2016 +0100 drm/vc4: add extern C guard for the UAPI header Cc: Eric Anholt <eric@anholt.net> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/vc4_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 7aa8ceeb5709bddd2202f637101b69c81af732c5 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:35:50 2016 +0100 drm/tegra: add extern C guard for the UAPI header Cc: Erik Faye-Lund <kusmabite@gmail.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Thierry Reding <treding@nvidia.com> include/uapi/drm/tegra_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 81dda38710ffe1fb94e755235e60f10d7e63f51b Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Fri May 13 13:59:03 2016 +0100 drm/sis: add extern C guard for the UAPI header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/sis_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit ea526b7f17a4f27202aa368a6ac4668826f75d4a Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:14:34 2016 +0100 drm/savage: add extern C guard for the UAPI header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/savage_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 6db26a941461cc5a544c737cf654c346b2a8da07 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:13:24 2016 +0100 drm/radeon: add extern C guard for the UAPI header Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/radeon_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 99be554c23096ff35fb49d94df730168b1baece3 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:12:25 2016 +0100 drm/r128: add extern C guard for the UAPI header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/r128_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 485c40b467a25a4e376d283c7bc679b6d20caa52 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:09:39 2016 +0100 drm/qxl: add extern C guard for the UAPI header Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Dave Airlie <airlied@redhat.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/qxl_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit c92378a06181456c4d8e45a33764c8524c15b99b Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:06:40 2016 +0100 drm/omap: add extern C guard for the UAPI header Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> include/uapi/drm/omap_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit c6734c689a26591fe43946ffa8911f22e7c631c6 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:05:47 2016 +0100 drm/nouveau: drop drm/ prefix from include Similar to the rest of the DRM UAPI - these are to be imported unmodified into libdrm. In current form that's impossible. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> include/uapi/drm/nouveau_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 8daf6359c48dc42979463f5cd575948b46a8143b Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:05:06 2016 +0100 drm/nouveau: add extern C guard for the UAPI header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Ben Skeggs <bskeggs@redhat.com> include/uapi/drm/nouveau_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit a62424e29dc33fdf1cf9efadfbf54deefbcfe7bf Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:03:46 2016 +0100 drm/msm: add extern C guard for the UAPI header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Rob Clark <robdclark@gmail.com> (over irc) include/uapi/drm/msm_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit c56e046f17a40571cf2bddd0edaeafa769ffba9a Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:01:39 2016 +0100 drm/mga: add extern C guard for the UAPI header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/mga_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit b1c1f5c400f4c5dfd5405c210fcc9e019b734335 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 19:00:35 2016 +0100 drm/i915: add extern C guard for the UAPI header Cc: Jani Nikula <jani.nikula@linux.intel.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@intel.com> include/uapi/drm/i915_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 79e7328db71350e652a963aa6049d13e272a6d24 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 18:59:30 2016 +0100 drm/i810: add extern C guard for the UAPI header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> include/uapi/drm/i810_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 202bae52934d4eb79ffaebf49f49b1cc64d8e40b Author: Joe Thornber <ejt@redhat.com> Date: Wed May 4 14:12:42 2016 -0400 dm thin: unroll issue_discard() to create longer discard bio chains There is little benefit to doing this but it does structure DM thinp's code to more cleanly use the __blkdev_issue_discard() interface -- particularly in passdown_double_checking_shared_status(). Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> drivers/md/dm-thin.c | 108 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 71 insertions(+), 37 deletions(-) commit 3dba53a958a758fe7bed5002f6a2846e1acefe8e Author: Mike Snitzer <snitzer@redhat.com> Date: Mon May 2 20:16:21 2016 -0400 dm thin: use __blkdev_issue_discard for async discard support With commit 38f25255330 ("block: add __blkdev_issue_discard") DM thinp no longer needs to carry its own async discard method. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Joe Thornber <ejt@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> drivers/md/dm-thin.c | 70 ++++++++++++---------------------------------------- 1 file changed, 16 insertions(+), 54 deletions(-) commit 13e4f8a695aa1dc7c94525047fc2ffb9abc8125e Author: Mike Snitzer <snitzer@redhat.com> Date: Wed May 4 15:05:44 2016 -0400 dm thin: remove __bio_inc_remaining() and switch to using bio_inc_remaining() DM thinp's use of bio_inc_remaining() is critical to ensure the original parent discard bio isn't completed before sub-discards have. DM thinp needs this due to the extra quiescing that occurs, via multiple DM thinp mappings, while processing large discards. As such DM thinp must build the async discard bio chain after some delay -- so bio_inc_remaining() is used to enable DM thinp to take a reference on the original parent discard bio for each mapping. This allows the immediate use of bio_endio() on that discard bio; but with the understanding that the actual completion won't occur until each of the sub-discards' per-mapping references are dropped. Signed-off-by: Mike Snitzer <snitzer@redhat.com> Acked-by: Joe Thornber <ejt@redhat.com> drivers/md/dm-thin.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) commit 4c9971ca6a172e70f52a7f9b6796e843c3f70293 Author: Heinz Mauelshagen <heinzm@redhat.com> Date: Fri Apr 29 18:59:56 2016 +0200 dm raid: make sure no feature flags are set in metadata Given we don't yet support any feature flags in the dm-raid ondisk metadata (see: 'features' member of 'struct dm_raid_superblock'), add a check to ensure no flags are actually set, if any features are set reject the activation of the RAID mapping. This is to prevent possible data corruption in case of a kernel downgrade when there'll potentially be feature flags set by a future dm-raid target. Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com> drivers/md/dm-raid.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 445a64214285073ebc02af633a8a149e1522b7cb Author: Jose Abreu <Jose.Abreu@synopsys.com> Date: Thu Apr 21 18:19:35 2016 +0100 arc: axs10x: Add DT bindings for I2S PLL Clock Add device tree bindings for AXS10X I2S PLL Clock driver. Acked-by: Alexey Brodkin <abrodkin@synopsys.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Jose Abreu <joabreu@synopsys.com> arch/arc/boot/dts/axs10x_mb.dtsi | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 37a96bedae42317e85dcb1a5064a3ef39ded338c Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 18:58:35 2016 +0100 drm/exynos: add extern C guard for the UAPI header Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/exynos_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit 60ef910d0d7f007c805c2824906d4d6ea24f7890 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 18:54:33 2016 +0100 drm/etnaviv: add extern C guard for the UAPI header Cc: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> include/uapi/drm/etnaviv_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit ebbb0e5cfd2ceb1150b1af7f9fcf7aeebfb1b69f Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 18:49:00 2016 +0100 drm: add extern C guard for the UAPI headers Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/drm.h | 16 ++++++++++++++++ include/uapi/drm/drm_fourcc.h | 8 ++++++++ include/uapi/drm/drm_mode.h | 8 ++++++++ include/uapi/drm/drm_sarea.h | 8 ++++++++ 4 files changed, 40 insertions(+) commit 1224649a9c842b4bb2ba4bd06af0c24d2b941ff0 Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 18:47:05 2016 +0100 drm/armada: add extern C guard for the UAPI header Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> include/uapi/drm/armada_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit cfa7152f1cfeedba7c4ab3abcb4accee94cc2c0f Author: Emil Velikov <emil.l.velikov@gmail.com> Date: Thu Apr 7 18:45:18 2016 +0100 drm/amdgpu: add extern C guard for the UAPI header Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> include/uapi/drm/amdgpu_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) commit ab366b40b8513e7590858229ecbb5e1434a52b54 Author: Javier Martinez Canillas <javier@osg.samsung.com> Date: Wed May 11 11:59:23 2016 -0400 fbdev: Use IS_ENABLED() instead of checking for built-in or module The IS_ENABLED() macro checks if a Kconfig symbol has been enabled either built-in or as a module, use that macro instead of open coding the same. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/video/fbdev/via/accel.c | 2 +- drivers/video/fbdev/via/via-core.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 14bc241443e126c62fcbf571b7d4c79740debc58 Author: James Hogan <james.hogan@imgtec.com> Date: Tue Apr 19 09:25:00 2016 +0100 MIPS: Fix HTW config on XPA kernel without LPA enabled The hardware page table walker (HTW) configuration is broken on XPA kernels where XPA couldn't be enabled (either nohtw or the hardware doesn't support it). This is because the PWSize.PTEW field (PTE width) was only set to 8 bytes (an extra shift of 1) in config_htw_params() if PageGrain.ELPA (enable large physical addressing) is set. On an XPA kernel though the size of PTEs is fixed at 8 bytes regardless of whether XPA could actually be enabled. Fix the initialisation of this field based on sizeof(pte_t) instead. Fixes: c5b367835cfc ("MIPS: Add support for XPA.") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Steven J. Hill <sjhill@realitydiluted.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13113/ Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/tlbex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 12822570a29bdc12c69fca2c021753cb5ce319c5 Author: James Hogan <james.hogan@imgtec.com> Date: Tue Apr 19 09:24:59 2016 +0100 MIPS: Separate XPA CPU feature into LPA and MVH XPA (eXtended Physical Addressing) should be detected as a combination of two architectural features: - Large Physical Address (as per Config3.LPA). With XPA this will be set on MIPS32r5 cores, but it may also be set for MIPS64r2 cores too. - MTHC0/MFHC0 instructions (as per Config5.MVH). With XPA this will be set, but it may also be set in VZ guest context even when Config3.LPA in the guest context has been cleared by the hypervisor. As such, XPA is only usable if both bits are set. Update CPU features to separate these two features, with cpu_has_xpa requiring both to be set. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: Joshua Kinard <kumba@gentoo.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13112/ Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-features.h | 8 +++++++- arch/mips/include/asm/cpu.h | 3 ++- arch/mips/kernel/cpu-probe.c | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) commit ab4a92e66741b35ca12f8497896bafbe579c28a1 Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:55 2016 +0100 MIPS: math-emu: Fix jalr emulation when rd == $0 When emulating a jalr instruction with rd == $0, the code in isBranchInstr was incorrectly writing to GPR $0 which should actually always remain zeroed. This would lead to any further instructions emulated which use $0 operating on a bogus value until the task is next context switched, at which point the value of $0 in the task context would be restored to the correct zero by a store in SAVE_SOME. Fix this by not writing to rd if it is $0. Fixes: 102cedc32a6e ("MIPS: microMIPS: Floating point support.") Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable <stable@vger.kernel.org> # v3.10 Patchwork: https://patchwork.linux-mips.org/patch/13160/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/cp1emu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit db57f29d50683afd75c7f8b9908af7669837c3a9 Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:54 2016 +0100 MIPS: math-emu: Fix m{add,sub}.s shifts The code in _sp_maddf (formerly ieee754sp_madd) appears to have been copied verbatim from ieee754sp_add, and although it's adding the unpacked "r" & "z" floats it kept using macros that operate on "x" & "y". This led to the addition being carried out incorrectly on some mismash of the product, accumulator & multiplicand fields. Typically this would lead to the assertions "ze == re" & "ze <= SP_EMAX" failing since ze & re hadn't been operated upon. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Fixes: e24c3bec3e8e ("MIPS: math-emu: Add support for the MIPS R6 MADDF FPU instruction") Cc: Adam Buchbinder <adam.buchbinder@gmail.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13159/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/ieee754sp.c | 3 ++- arch/mips/math-emu/ieee754sp.h | 16 +++++++--------- arch/mips/math-emu/sp_add.c | 6 ++++-- arch/mips/math-emu/sp_maddf.c | 13 ++++++++----- arch/mips/math-emu/sp_sub.c | 6 ++++-- 5 files changed, 25 insertions(+), 19 deletions(-) commit 5c18c936b52ae80db5737849e11f436e79b84b2d Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:53 2016 +0100 MIPS: math-emu: Fix code indentation A line incrementing the re variable was indented a level too deep in ieee754dp_mul, making the code unclear to read. Fix the indentation. This appears to have been copied verbatim along with the rest of the multiplication code to ieee754dp_maddf, now _dp_maddf, too so fix the indentation there too. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13158/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/dp_maddf.c | 2 +- arch/mips/math-emu/dp_mul.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 95bff2410cdccfe2cf4b99f4e86165956767740e Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:52 2016 +0100 MIPS: math-emu: Fix bit-width in ieee754dp_{mul, maddf, msubf} comments A comment in ieee754dp_mul indicates that the code is about to perform a 32b x 32b multiplication & keep the high 32b of the result. It appears this was copied from the single-precision multiplication code, since the code actually goes on to perform a 64b x 64b multiplication & keep the high 64b of the result. Fix the comment to indicate 64b. It appears also that this comment was copied verbatim along with the rest of the multiplication code into ieee754dp_maddf, which has since been renamed _dp_maddf. Fix the same issue there. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13157/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/dp_maddf.c | 2 +- arch/mips/math-emu/dp_mul.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit e2d11e1a8398b7447d337add50521a5abc6267fd Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:51 2016 +0100 MIPS: math-emu: Add z argument macros Introduce macros for handling the "z" argument to maddf & msubf, making its handling consistent with that of the "x" & "y" arguments rather than open-coding equivalents. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13156/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/dp_maddf.c | 9 ++++----- arch/mips/math-emu/ieee754dp.h | 1 + arch/mips/math-emu/ieee754int.h | 10 ++++++++++ arch/mips/math-emu/ieee754sp.h | 1 + arch/mips/math-emu/sp_maddf.c | 8 ++++---- 5 files changed, 20 insertions(+), 9 deletions(-) commit d728f6709bcc49c98097485e3561f1faaf52b4f3 Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:50 2016 +0100 MIPS: math-emu: Unify ieee754dp_m{add,sub}f The code for emulating MIPSr6 madd.d & msub.d instructions has previously been implemented as 2 different functions, namely ieee754dp_maddf & ieee754dp_msubf. The difference in behaviour of these 2 instructions is merely the sign of the product, so we can easily share the code implementing them. Do this for the double precision variant, removing the original ieee754dp_msubf in favor of reusing the code from ieee754dp_maddf. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13155/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/Makefile | 2 +- arch/mips/math-emu/dp_maddf.c | 22 +++- arch/mips/math-emu/dp_msubf.c | 269 ------------------------------------------ 3 files changed, 21 insertions(+), 272 deletions(-) commit 6162051e87f6ea785cb51ad99bdcf8eb0bd9cb07 Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:49 2016 +0100 MIPS: math-emu: Unify ieee754sp_m{add,sub}f The code for emulating MIPSr6 madd.s & msub.s instructions has previously been implemented as 2 different functions, namely ieee754sp_maddf & ieee754sp_msubf. The difference in behaviour of these 2 instructions is merely the sign of the product, so we can easily share the code implementing them. Do this for the single precision variant, removing the original ieee754sp_msubf in favor of reusing the code from ieee754sp_maddf. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13154/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/Makefile | 2 +- arch/mips/math-emu/sp_maddf.c | 22 +++- arch/mips/math-emu/sp_msubf.c | 258 ------------------------------------------ 3 files changed, 21 insertions(+), 261 deletions(-) commit 4b820d95dc53c15e6e727da964430a3ed60e05ef Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:48 2016 +0100 MIPS: math-emu: Emulate MIPSr6 sel.fmt instruction Add support for emulating the MIPSr6 sel.fmt instruction, which was previously missing from the FPU emulation code. This instruction selects its result from 2 possible source registers, based upon bit 0 of the destination register, and is valid only for S (single) & D (double) data types. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13153/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/cp1emu.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) commit b6d5c4eda7a771e72b3640500e026d72c4f64419 Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:47 2016 +0100 MIPS: inst: Declare fsel_op for sel.fmt instruction Declare the opcode for the MIPSr6 sel.fmt instruction, as fsel_op in order to match other FP op names. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13152/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/uapi/asm/inst.h | 1 + 1 file changed, 1 insertion(+) commit ac1496980f1d2752f26769f5db63afbc9ac2b603 Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:46 2016 +0100 MIPS: Fix BC1{EQ,NE}Z return offset calculation The conditions for branching when emulating the BC1EQZ & BC1NEZ instructions were backwards, leading to each of those instructions being treated as the other. Fix this by reversing the conditions, and clear up the code a little for readability & checkpatch. Fixes: c8a34581ec09 ("MIPS: Emulate the BC1{EQ,NE}Z FPU instructions") Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13151/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/branch.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) commit 93583e178ebfdd2fadf950eef1547f305cac12ca Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Apr 21 14:04:45 2016 +0100 MIPS: math-emu: Fix BC1{EQ,NE}Z emulation The conditions for branching when emulating the BC1EQZ & BC1NEZ instructions were backwards, leading to each of those instructions being treated as the other. Fix this by reversing the conditions, and clear up the code a little for readability & checkpatch. Fixes: c909ca718e8f ("MIPS: math-emu: Emulate missing BC1{EQ,NE}Z instructions") Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: James Hogan <james.hogan@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13150/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/cp1emu.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) commit ed47e1533292e26baaec1b5ed7d425690289d5df Author: Rabin Vincent <rabinv@axis.com> Date: Thu Apr 28 11:03:09 2016 +0200 MIPS: Add support for extending builtin cmdline Allow the builtin command line to be extended by what the bootloader passes in. For example, the bootloader can pass specific arguments depending on the boot mode, and these should override the defaults in the builtin cmdline. The default MIPS_CMDLINE_FROM_BOOTLOADER option prepends the bootloader's cmdline to the builtin cmdline so is not suitable for this purpose. Signed-off-by: Rabin Vincent <rabinv@axis.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13181/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 4 ++++ arch/mips/kernel/setup.c | 8 ++++++++ 2 files changed, 12 insertions(+) commit e54ad8c56258af3b414a3e5707a45c18f1db69e1 Author: Rabin Vincent <rabinv@axis.com> Date: Thu Apr 28 11:03:08 2016 +0200 MIPS: Don't add leading spacing to command lines The leading spaces don't affect functionality but are unnecessary. Signed-off-by: Rabin Vincent <rabinv@axis.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13180/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/setup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 105c22c5cf3f420ce5ab792b3577ef330f1f6133 Author: James Hogan <james.hogan@imgtec.com> Date: Fri Apr 29 17:29:29 2016 +0100 MIPS: genex: Indent delay slots & clean whitespace Various branches and jumps in noreorder parts of genex.S don't have their delay slot instructions indented conventionally with the extra space. Fix these, as well as various other inconsistent whitespace problems in this file, such as spaces used after some opcodes instead of a tab. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13196/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/genex.S | 56 ++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) commit 2db003a5ddee986d4bc67c069ee3aa1b1b320f1d Author: Paul Burton <paul.burton@imgtec.com> Date: Fri May 6 14:36:24 2016 +0100 MIPS: Support extended ASIDs Add support for extended ASIDs as determined by the Config4.AE bit. Since the only supported CPUs known to implement this are Netlogic XLP and MIPS I6400, select this variable ASID support based upon CONFIG_CPU_XLP and CONFIG_CPU_MIPSR6. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Jayachandran C. <jchandra@broadcom.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13211/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 6 ++++++ arch/mips/include/asm/cpu-info.h | 14 ++++++++++++++ arch/mips/kernel/asm-offsets.c | 10 ++++++++++ arch/mips/kernel/cpu-probe.c | 13 +++++++++++++ arch/mips/kernel/genex.S | 2 +- arch/mips/kvm/locore.S | 14 ++++++++++++++ 6 files changed, 58 insertions(+), 1 deletion(-) commit 4edf00a46bee692f62578b5280c5774f9b65a08f Author: Paul Burton <paul.burton@imgtec.com> Date: Fri May 6 14:36:23 2016 +0100 MIPS: Retrieve ASID masks using function accepting struct cpuinfo_mips In preparation for supporting variable ASID masks, retrieve ASID masks using functions in asm/cpu-info.h which accept struct cpuinfo_mips. This will allow those functions to determine the ASID mask based upon the CPU in a later patch. This also allows for the r3k & r8k cases to be handled in Kconfig, which is arguably cleaner than the previous #ifdefs. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13210/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 11 ++++++++++ arch/mips/include/asm/cpu-info.h | 10 +++++++++ arch/mips/include/asm/mmu_context.h | 41 ++++++++++++++++--------------------- arch/mips/kernel/traps.c | 2 +- arch/mips/kvm/tlb.c | 30 +++++++++++++++++---------- arch/mips/lib/dump_tlb.c | 10 +++++---- arch/mips/lib/r3k_dump_tlb.c | 9 ++++---- arch/mips/mm/tlb-r3k.c | 24 +++++++++++++--------- arch/mips/mm/tlb-r4k.c | 2 +- arch/mips/mm/tlb-r8k.c | 2 +- 10 files changed, 86 insertions(+), 55 deletions(-) commit f1b711c638c7df56112eff8e9661c91202782516 Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 6 14:36:22 2016 +0100 MIPS: KVM/locore.S: Relax noat Now that the at register ($1) is no longer saved by __kvm_mips_vcpu_run(), relax the noat assembler directive so that it only applies around code where at is restored before entering guest, and saved after exiting guest. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13209/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kvm/locore.S | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 1300fcd5e1754b654954717410c7035c0daac605 Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 6 14:36:21 2016 +0100 MIPS: KVM/locore.S: Only preserve callee saved registers Update __kvm_mips_vcpu_run() to only save and restore callee saved registers. It is always called using the standard ABIs, so the caller will preserve any other registers that need preserving. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13208/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kvm/locore.S | 48 +----------------------------------------------- 1 file changed, 1 insertion(+), 47 deletions(-) commit ca64c2beecd43e9621f5265edf14a76f7a2ffd7b Author: Paul Burton <paul.burton@imgtec.com> Date: Fri May 6 14:36:20 2016 +0100 MIPS: KVM: Abstract guest ASID mask In preparation for supporting varied widths of ASID mask in the kernel in general, switch KVM's guest ASIDs to a new KVM_ENTRYHI_ASID definition based on the 8-bit MIPS_ENTRYHI_ASID instead of ASID_MASK. It could potentially be used to support extended guest ASIDs in the future. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13207/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/kvm_host.h | 5 +++-- arch/mips/kvm/emulate.c | 25 +++++++++++++------------ arch/mips/kvm/tlb.c | 3 ++- 3 files changed, 18 insertions(+), 15 deletions(-) commit 9b5c3399584b6f6aa755dbe11e3cef5776fd279d Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 6 14:36:19 2016 +0100 MIPS: Add & use CP0_EntryHi ASID definitions Add definitions for the ASID field in CP0_EntryHi (along with the soon to be used ASIDX field), and use them in a few previously hardcoded cases. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Manuel Lauss <manuel.lauss@gmail.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13205/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 2 ++ arch/mips/kernel/genex.S | 2 +- arch/mips/kvm/locore.S | 4 ++-- arch/mips/pci/pci-alchemy.c | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) commit 5fb59fd2e7f7ee6bfc20ab9c0ef82e33c0057be5 Author: James Hogan <james.hogan@imgtec.com> Date: Fri May 6 14:36:18 2016 +0100 MIPS: KVM/locore.S: Don't preserve host ASID around vcpu_run MIPS KVM uses different ASIDs for guest execution than for the host. The host ASID is saved on the stack when entering the guest with __kvm_mips_vcpu_run(), and restored again before returning back to the caller (exit to userland). - This does not take into account that pre-emption may have taken place during that time, which may have started a new ASID cycle and resulted in that process' ASID being invalidated and reused. - This does not take into account that the process may have migrated to a different CPU during that time, with a different ASID assignment since they are managed per-CPU. - It is actually redundant, since the host ASID will be restored correctly by kvm_arch_vcpu_put(), which is called almost immediately after kvm_arch_vcpu_ioctl_run() returns. Therefore drop this code from locore.S Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13206/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kvm/locore.S | 12 ------------ 1 file changed, 12 deletions(-) commit 97b921087fa76b1b0b2a20ae70d0e8b6d394c4ea Author: John Crispin <john@phrozen.org> Date: Thu May 5 09:57:56 2016 +0200 MIPS: Change my email address The old address is no longer valid. Use the my new one instead. Signed-off-by: John Crispin <john@phrozen.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13201/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mach-lantiq/falcon/lantiq_soc.h | 2 +- arch/mips/include/asm/mach-lantiq/lantiq.h | 2 +- arch/mips/include/asm/mach-lantiq/lantiq_platform.h | 2 +- arch/mips/include/asm/mach-lantiq/xway/irq.h | 2 +- arch/mips/include/asm/mach-lantiq/xway/lantiq_irq.h | 2 +- arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h | 2 +- arch/mips/include/asm/mach-lantiq/xway/xway_dma.h | 2 +- arch/mips/include/asm/mach-ralink/mt7620.h | 2 +- arch/mips/include/asm/mach-ralink/mt7621.h | 2 +- arch/mips/include/asm/mach-ralink/pinmux.h | 2 +- arch/mips/include/asm/mach-ralink/ralink_regs.h | 2 +- arch/mips/include/asm/mach-ralink/rt288x.h | 2 +- arch/mips/include/asm/mach-ralink/rt305x.h | 2 +- arch/mips/lantiq/Makefile | 2 +- arch/mips/lantiq/clk.c | 2 +- arch/mips/lantiq/clk.h | 2 +- arch/mips/lantiq/early_printk.c | 2 +- arch/mips/lantiq/falcon/prom.c | 2 +- arch/mips/lantiq/falcon/reset.c | 2 +- arch/mips/lantiq/falcon/sysctrl.c | 2 +- arch/mips/lantiq/irq.c | 2 +- arch/mips/lantiq/prom.c | 2 +- arch/mips/lantiq/prom.h | 2 +- arch/mips/lantiq/xway/clk.c | 2 +- arch/mips/lantiq/xway/dcdc.c | 2 +- arch/mips/lantiq/xway/dma.c | 2 +- arch/mips/lantiq/xway/gptu.c | 2 +- arch/mips/lantiq/xway/prom.c | 2 +- arch/mips/lantiq/xway/reset.c | 2 +- arch/mips/lantiq/xway/sysctrl.c | 2 +- arch/mips/lantiq/xway/vmmc.c | 2 +- arch/mips/lantiq/xway/xrx200_phy_fw.c | 4 ++-- arch/mips/pci/fixup-lantiq.c | 2 +- arch/mips/pci/ops-lantiq.c | 2 +- arch/mips/pci/pci-lantiq.c | 2 +- arch/mips/pci/pci-lantiq.h | 2 +- arch/mips/pci/pci-mt7620.c | 2 +- arch/mips/pci/pci-rt2880.c | 2 +- arch/mips/ralink/Makefile | 2 +- arch/mips/ralink/bootrom.c | 2 +- arch/mips/ralink/cevt-rt3352.c | 2 +- arch/mips/ralink/clk.c | 2 +- arch/mips/ralink/common.h | 2 +- arch/mips/ralink/ill_acc.c | 2 +- arch/mips/ralink/irq-gic.c | 2 +- arch/mips/ralink/irq.c | 2 +- arch/mips/ralink/mt7620.c | 2 +- arch/mips/ralink/mt7621.c | 2 +- arch/mips/ralink/of.c | 2 +- arch/mips/ralink/prom.c | 2 +- arch/mips/ralink/reset.c | 2 +- arch/mips/ralink/rt288x.c | 2 +- arch/mips/ralink/rt305x.c | 2 +- arch/mips/ralink/rt3883.c | 2 +- arch/mips/ralink/timer-gic.c | 2 +- arch/mips/ralink/timer.c | 4 ++-- 56 files changed, 58 insertions(+), 58 deletions(-) commit bdb40e8e8874476ad3396e96470639575416245c Author: John Crispin <john@phrozen.org> Date: Thu May 5 09:57:55 2016 +0200 MAINTAINERS: Change my email address The old address is no longer valid. Use the my new one instead. Signed-off-by: John Crispin <john@phrozen.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13200/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 87321fddaeb8706a91293dc244408697a0a24ece Author: Paul Burton <paul.burton@imgtec.com> Date: Fri May 6 13:35:03 2016 +0100 MIPS: Implement __arch_bitrev* using bitswap for MIPSr6 Release 6 of the MIPS architecture introduced the bitswap instruction, which reverses the bits within each byte of a word. Make use of this instruction to implement the __arch_bitrev* functions, which should be faster for most MIPSr6 CPUs, reduces code size slightly and allows us to avoid the lookup table used by the generic implementation, saving 256 bytes in the kernel binary by dropping that. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13204/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 1 + arch/mips/include/asm/bitrev.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) commit 015aa05f534adabff2e4380f5ae6ea0fe20ec321 Author: Anna-Maria Gleixner <anna-maria@linutronix.de> Date: Mon May 2 11:00:49 2016 +0200 MIPS: Remove no longer needed work_on_cpu() call Since commit 3b9d6da67e11 ("cpu/hotplug: Fix rollback during error-out in __cpu_disable()") it is ensured that callbacks of CPU_ONLINE and CPU_DOWN_PREPARE are processed on the hotplugged CPU. Due to this work_on_cpu() calls are no longer required. Replace work_on_cpu() with a direct call of mips_cdmm_bus_up() or mips_cdmm_bus_down(). Description of those functions are adapted. Signed-off-by: Anna-Maria Gleixner <anna-maria@linutronix.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: rt@linutronix.de Patchwork: https://patchwork.linux-mips.org/patch/13197/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/bus/mips_cdmm.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) commit e8b5325ca3d01c512be6f04d587869a01e0ea59f Author: Sergey Ryazanov <ryazanov.s.a@gmail.com> Date: Sat Aug 30 06:06:28 2014 +0400 MIPS: make PCI_DMA_BUS_IS_PHYS=1 constant No one of supported MIPS machines has an IOMMU unit, so we can safely define PCI_DMA_BUS_IS_PHYS = 1. Also remove iommu flag from the pci controller structure, since it is useless. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Cc: Linux MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/7604/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/pci.h | 10 ++++------ arch/mips/kernel/setup.c | 7 ------- arch/mips/pci/pci-ip32.c | 1 - arch/mips/pci/pci.c | 3 --- arch/mips/pnx833x/common/setup.c | 3 --- 5 files changed, 4 insertions(+), 20 deletions(-) commit 1e321fa917fb2d30d39ff1c6ea89d6f1cf4f34a5 Author: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Date: Thu May 14 18:34:43 2015 -0700 MIPS64: Support of at least 48 bits of SEGBITS SEGBITS is 40 bits or more, depending on CPU type. Introduces optional support for 48 bits of application virtual address space. Only 16K and 64K pages are supported. Enabling will result in a memory overhead of a small number of pages for small applications. For 64K pages a 3rd level of page tables is required which has some impact during software TLB refill. [ralf@linux-mips.org: Fixed things raised in the review of the version posted and changed kconfig to be a bit more userfriendly.] Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: aleksey.makarov@auriga.com Cc: james.hogan@imgtec.com Cc: paul.burton@imgtec.com Cc: david.daney@cavium.com Cc: peterz@infradead.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: davidlohr@hp.com Cc: kirill@shutemov.name Cc: akpm@linux-foundation.org Cc: mingo@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/10051/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 13 +++++++++++++ arch/mips/include/asm/pgtable-64.h | 18 +++++++++++------- arch/mips/include/asm/processor.h | 6 +++++- 3 files changed, 29 insertions(+), 8 deletions(-) commit 7939469da29a8dfa3947e5d9648d0f0501bc4ba0 Author: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Date: Mon Oct 19 11:39:55 2015 -0700 MIPS64: signal: Fix o32 sigaction syscall MIPS32 o32 ABI sigaction() processing on MIPS64 n64 kernel was incorrectly set to processing aka rt_sigaction() variant only. Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: paul.burton@imgtec.com Cc: richard@nod.at Cc: luto@amacapital.net Cc: alex.smith@imgtec.com Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: mpe@ellerman.id.au Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11321/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/signal.h | 12 +++++++++--- arch/mips/kernel/signal.c | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) commit cb80b2a38bd609b2f5a650e9ab87ea50105ad5ea Author: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Date: Thu Nov 19 17:38:21 2015 -0800 MIPS: remove aliasing alignment if HW has antialising support MIPS hardware may have an antialising support and it works even page size is small. Setup a shared memory aliasing mask to page size if hardware has an antialising support. Big shared memory mask forces a disruption in page address assignment and that corrupts Android library memory handling. Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: cernekee@gmail.com Cc: paul.gortmaker@windriver.com Cc: kumba@gentoo.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11516/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/c-r4k.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 201233e6b5d8c7adb84e3a718b0cb33f3665fb7c Author: Tony Wu <tung7970@gmail.com> Date: Fri Dec 4 19:41:12 2015 +0800 MIPS: traps: remove unused variable flags is indeed unused. Signed-off-by: Tony Wu <tung7970@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11699/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/traps.c | 1 - 1 file changed, 1 deletion(-) commit 1e820da3c9af4f5771d2ad47099919429b906ac6 Author: Huacai Chen <chenhc@lemote.com> Date: Thu Mar 3 09:45:13 2016 +0800 MIPS: Loongson-3: Introduce CONFIG_LOONGSON3_ENHANCEMENT New Loongson 3 CPU (since Loongson-3A R2, as opposed to Loongson-3A R1, Loongson-3B R1 and Loongson-3B R2) has many enhancements, such as FTLB, L1-VCache, EI/DI/Wait/Prefetch instruction, DSP/DSPv2 ASE, User Local register, Read-Inhibit/Execute-Inhibit, SFB (Store Fill Buffer), Fast TLB refill support, etc. This patch introduce a config option, CONFIG_LOONGSON3_ENHANCEMENT, to enable those enhancements which are not probed at run time. If you want a generic kernel to run on all Loongson 3 machines, please say 'N' here. If you want a high-performance kernel to run on new Loongson 3 machines only, please say 'Y' here. Some additional explanations: 1) SFB locates between core and L1 cache, it causes memory access out of order, so writel/outl (and other similar functions) need a I/O reorder barrier. 2) Loongson 3 has a bug that di instruction can not save the irqflag, so arch_local_irq_save() is modified. Since CPU_MIPSR2 is selected by CONFIG_LOONGSON3_ENHANCEMENT, generic kernel doesn't use ei/di at all. 3) CPU_HAS_PREFETCH is selected by CONFIG_LOONGSON3_ENHANCEMENT, so MIPS_CPU_PREFETCH (used by uasm) probing is also put in this patch. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Steven J . Hill <sjhill@realitydiluted.com> Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12755/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 18 ++++++++++++++++++ arch/mips/include/asm/hazards.h | 7 ++++--- arch/mips/include/asm/io.h | 10 +++++----- arch/mips/include/asm/irqflags.h | 5 +++++ .../include/asm/mach-loongson64/kernel-entry-init.h | 12 ++++++++++++ arch/mips/mm/c-r4k.c | 2 ++ arch/mips/mm/page.c | 9 +++++++++ 7 files changed, 55 insertions(+), 8 deletions(-) commit 380cd582c08831217ae693c86411902e6300ba6b Author: Huacai Chen <chenhc@lemote.com> Date: Thu Mar 3 09:45:12 2016 +0800 MIPS: Loongson-3: Fast TLB refill handler Loongson-3A R2 has pwbase/pwfield/pwsize/pwctl registers in CP0 (this is very similar to HTW) and lwdir/lwpte/lddir/ldpte instructions which can be used for fast TLB refill. [ralf@linux-mips.org: Resolve conflict.] Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Steven J . Hill <sjhill@realitydiluted.com> Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12754/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-features.h | 3 + arch/mips/include/asm/cpu.h | 1 + arch/mips/include/asm/mipsregs.h | 6 ++ arch/mips/include/asm/uasm.h | 3 +- arch/mips/include/uapi/asm/inst.h | 10 +++ arch/mips/kernel/cpu-probe.c | 2 +- arch/mips/mm/tlbex.c | 124 ++++++++++++++++++++++++++++++++++- arch/mips/mm/uasm-mips.c | 2 + arch/mips/mm/uasm.c | 3 + 9 files changed, 149 insertions(+), 5 deletions(-) commit 06e4814eec988f7ee01c29762f945b3ff59355fb Author: Huacai Chen <chenhc@lemote.com> Date: Thu Mar 3 09:45:11 2016 +0800 MIPS: Loongson: Invalidate special TLBs when needed Loongson-2 has a 4 entry itlb which is a subset of jtlb, Loongson-3 has a 4 entry itlb and a 4 entry dtlb which are subsets of jtlb. We should write diag register to invalidate itlb/dtlb when flushing jtlb because itlb/dtlb are not totally transparent to software. For Loongson-3A R2 (and newer), we should invalidate ITLB, DTLB, VTLB and FTLB before we enable/disable FTLB. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Steven J . Hill <sjhill@realitydiluted.com> Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12753/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 9 +++++++++ arch/mips/kernel/cpu-probe.c | 3 +++ arch/mips/mm/tlb-r4k.c | 27 +++++++++++++++------------ 3 files changed, 27 insertions(+), 12 deletions(-) commit 37fbe8faa94fa8cae889a3a793fd7b32508b26ab Author: Huacai Chen <chenhc@lemote.com> Date: Thu Mar 3 09:45:10 2016 +0800 MIPS: Loongson-3: Set cache flush handlers to cache_noop Loongson-3 maintains cache coherency by hardware, this means: 1) It's icache is coherent with dcache. 2) It's dcaches don't alias (maybe depend on PAGE_SIZE). 3) It maintains cache coherency across cores (and for DMA). So we can skip most cache flush operations by setting relevant handlers to `cache_noop' in `r4k_cache_init'. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Steven J . Hill <sjhill@realitydiluted.com> Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12752/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/c-r4k.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit b2edcfc814017eb278e29bfdc72844f0434dd8b1 Author: Huacai Chen <chenhc@lemote.com> Date: Thu Mar 3 09:45:09 2016 +0800 MIPS: Loongson: Add Loongson-3A R2 basic support Loongson-3 CPU family: Code-name Brand-name PRId Loongson-3A R1 Loongson-3A1000 0x6305 Loongson-3A R2 Loongson-3A2000 0x6308 Loongson-3B R1 Loongson-3B1000 0x6306 Loongson-3B R2 Loongson-3B1500 0x6307 Features of R2 revision of Loongson-3A: - Primary cache includes I-Cache, D-Cache and V-Cache (Victim Cache). - I-Cache, D-Cache and V-Cache are 16-way set-associative, linesize is 64 bytes. - 64 entries of VTLB (classic TLB), 1024 entries of FTLB (8-way set-associative). - Supports DSP/DSPv2 instructions, UserLocal register and Read-Inhibit/ Execute-Inhibit. [ralf@linux-mips.org: Resolved merge conflicts.] Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Steven J . Hill <sjhill@realitydiluted.com> Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12751/ Patchwork: https://patchwork.linux-mips.org/patch/13136/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 2 + arch/mips/include/asm/cacheops.h | 6 ++ arch/mips/include/asm/cpu-info.h | 1 + arch/mips/include/asm/cpu.h | 4 +- .../asm/mach-loongson64/cpu-feature-overrides.h | 18 +--- .../asm/mach-loongson64/kernel-entry-init.h | 6 +- arch/mips/include/asm/mipsregs.h | 2 + arch/mips/include/asm/pgtable.h | 4 +- arch/mips/kernel/cpu-probe.c | 38 +++++++- arch/mips/kernel/idle.c | 5 + arch/mips/kernel/traps.c | 3 +- arch/mips/loongson64/common/env.c | 7 +- arch/mips/loongson64/loongson-3/smp.c | 106 +++++++++++++++++++-- arch/mips/mm/c-r4k.c | 27 ++++++ drivers/platform/mips/cpu_hwmon.c | 4 +- 15 files changed, 201 insertions(+), 32 deletions(-) commit 24653515e5d2cb07772919599ad799ce50f8af4f Author: Huacai Chen <chenhc@lemote.com> Date: Thu Mar 17 20:41:07 2016 +0800 MIPS: Loongson-3: Adjust irq dispatch to speedup processing This patch adjust the logic in mach_irq_dispatch(), allow multiple IPs handled in the same dispatching. This can speedup interrupt processing. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Steven J . Hill <sjhill@realitydiluted.com> Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12891/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/loongson64/loongson-3/irq.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit d0514728247b91476a525a064f8b3c2f0c47bec4 Author: Huacai Chen <chenhc@lemote.com> Date: Wed Oct 7 14:08:00 2015 +0800 MIPS: Loongson-3: Move chipset ACPI code from drivers to arch SB700/SB710/SB800 chipset ACPI code is mostly Loongson-3 specific routines rather than a "platform driver". Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: John Crispin <john@phrozen.org> Cc: Steven J. Hill <sjhill@realitydiluted.com> Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11273/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/loongson64/loongson-3/Makefile | 2 +- arch/mips/loongson64/loongson-3/acpi_init.c | 150 ++++++++++++++++++++++++++++ drivers/platform/mips/Kconfig | 4 - drivers/platform/mips/Makefile | 1 - drivers/platform/mips/acpi_init.c | 150 ---------------------------- 5 files changed, 151 insertions(+), 156 deletions(-) commit 44896afe214e780e172f1bbbea7a2e6d087c908d Author: Antonio Ospite <ao2@ao2.it> Date: Wed Jan 27 14:56:06 2016 +0100 MIPS: BCM1480: bcm1480_regs.h: strip redundant comments Strip some comments which probably meant to repeat the same value of the define; they also contained a confusing 0x0x prefix. Signed-off-by: Antonio Ospite <ao2@ao2.it> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12254/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/sibyte/bcm1480_regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 50af501cd84b4e005fd54c351184ec89cfc940e4 Author: James Hogan <james.hogan@imgtec.com> Date: Tue Mar 1 22:19:39 2016 +0000 MIPS: Add and use watch register field definitions The files watch.c and ptrace.c contain various magic masks for WatchLo/WatchHi register fields. Add some definitions to mipsregs.h for these registers and make use of them in both watch.c and ptrace.c, hopefully making them more readable. Signed-off-by: James Hogan <james.hogan@imgtec.com> Reviewed-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12729/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 18 ++++++++++ arch/mips/kernel/ptrace.c | 7 ++-- arch/mips/kernel/watch.c | 74 ++++++++++++++++++++++------------------ 3 files changed, 63 insertions(+), 36 deletions(-) commit e233c733786a8ca70cd12cc30aeb80e5b390ad71 Author: James Hogan <james.hogan@imgtec.com> Date: Tue Mar 1 22:19:38 2016 +0000 MIPS: Add and use CAUSEF_WP definition do_watch() clears bit 22 of cause without using a CAUSEF_* definition from mipsregs.h. Add a definition for this bit (CAUSEF_WP) and make use of it. Also use clear_c0_cause() instead of manual read/modify/write. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12728/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mipsregs.h | 2 ++ arch/mips/kernel/traps.c | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) commit b0d8a082ce9c82600ebf8949dab937cf53019356 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Fri Feb 26 10:20:22 2016 -0700 watchdog: pic32-dmt: Add PIC32 deadman timer driver Adds support for the deadman timer peripheral found on PIC32 class devices. The primary function of the deadman timer (DMT) is to reset the processor in the event of a software malfunction. The DMT is a free-running instruction fetch timer, which is clocked whenever an instruction fetch occurs until a count match occurs. Instructions are not fetched when the processor is in sleep mode. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12703/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/watchdog/Kconfig | 13 +++ drivers/watchdog/Makefile | 1 + drivers/watchdog/pic32-dmt.c | 257 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 271 insertions(+) commit bfa43267bc1c6484fe63570774c381ddc7b32f40 Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Fri Feb 26 10:20:21 2016 -0700 dt/bindings: Add bindings for PIC32 deadman timer peripheral Document the devicetree bindings for the deadman timer peripheral found on Microchip PIC32 SoC class devices. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Guenter Roeck <linux@roeck-us.net> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12702/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> .../bindings/watchdog/microchip,pic32-dmt.txt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) commit 8f91fc56bc439a5baefae598040d263f48526596 Author: Joshua Henderson <joshua.henderson@microchip.com> Date: Fri Feb 26 10:19:28 2016 -0700 watchdog: pic32-wdt: Add PIC32 watchdog driver Add support for the watchdog peripheral found on PIC32 class devices. Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12701/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/watchdog/Kconfig | 13 +++ drivers/watchdog/Makefile | 1 + drivers/watchdog/pic32-wdt.c | 263 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 277 insertions(+) commit 80c2902b3f1b458d4f99e4355fb48e8616d9a088 Author: Joshua Henderson <joshua.henderson@microchip.com> Date: Fri Feb 26 10:19:27 2016 -0700 dt/bindings: Add bindings for PIC32 watchdog peripheral Document the devicetree bindings for the watchdog peripheral found on Microchip PIC32 SoC class devices. Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Wim Van Sebroeck <wim@iguana.be> Cc: Guenter Roeck <linux@roeck-us.net> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-watchdog@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12700/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> .../bindings/watchdog/microchip,pic32-wdt.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit ba837d387195ea043900d2101cf90bcc083cff1b Author: Andrzej Hajda <a.hajda@samsung.com> Date: Mon Feb 15 15:35:20 2016 +0100 MIPS: module: fix incorrect IS_ERR_VALUE macro usages IS_ERR_VALUE macro should be used only with unsigned long type. Specifically it works incorrectly with longer types. The patch follows conclusion from discussion on LKML [1][2]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2120927 [2]: http://permalink.gmane.org/gmane.linux.kernel/2150581 [ralf@linux-mips.org: While it may not immediately be obvious, the type of st_value in the end is an unsigned long equivalent so the invocation of IS_ERR_VALUE() was valid but I'm applying the patch anyway for clarity.] Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12553/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/module-rela.c | 2 +- arch/mips/kernel/module.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit acd9e20cd9d0e6af5680e1870a966d8082a1130a Author: Maciej W. Rozycki <macro@imgtec.com> Date: Fri Nov 13 00:48:48 2015 +0000 MIPS: math-emu: Always propagate sNaN payload in quieting Propagate sNaN payload in quieting in the legacy-NaN mode as well. If clearing the quiet bit would produce infinity, then set the next lower trailing significand field bit, matching the SB-1 and BMIPS5000 hardware implementations. Some other MIPS FPU hardware implementations do produce the default qNaN bit pattern instead. This reverts some changes made for semantics preservation with commit dc3ddf42 [MIPS: math-emu: Update sNaN quieting handlers], consequently bringing back most of the semantics from before commit fdffbafb [Lots of FPU bug fixes from Kjeld Borch Egevang.], except from the qNaN produced in the infinity case. Previously the default qNaN bit pattern was produced in that case. Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Matthew Fortune <Matthew.Fortune@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/11483/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/ieee754dp.c | 9 ++++++--- arch/mips/math-emu/ieee754sp.c | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) commit 2e5832ab589459265e70163a7dea3abdc1429eb7 Author: Maciej W. Rozycki <macro@imgtec.com> Date: Fri Nov 13 00:48:39 2015 +0000 MIPS: ELF: Restructure personality macros Update the ELF personality macros used for individual ABIs to make actions in the same order across all of them and match formatting too. Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Matthew Fortune <Matthew.Fortune@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/elf.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) commit 987e5b834467c9251ca584febda65ef8f66351a9 Author: James Hogan <james.hogan@imgtec.com> Date: Mon Feb 8 18:43:51 2016 +0000 MIPS: Fix uapi include in exported asm/siginfo.h Since commit 8cb48fe169dd ("MIPS: Provide correct siginfo_t.si_stime"), MIPS' uapi/asm/siginfo.h has included uapi/asm-generic/siginfo.h directly before defining MIPS' struct siginfo, in order to get the necessary definitions needed for the siginfo struct without the generic copy_siginfo() hitting compiler errors due to struct siginfo not yet being defined. Now that the generic copy_siginfo() is moved out to linux/signal.h we can safely include asm-generic/siginfo.h before defining the MIPS specific struct siginfo, which avoids the uapi/ include as well as breakage due to generic copy_siginfo() being defined before struct siginfo. Reported-by: Christopher Ferris <cferris@google.com> Fixes: 8cb48fe169dd ("MIPS: Provide correct siginfo_t.si_stime") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Petr Malat <oss@malat.biz> Cc: linux-mips@linux-mips.org Cc: <stable@vger.kernel.org> # 4.0- Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/uapi/asm/siginfo.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit ca9eb49aa9562eaadf3cea071ec7018ad6800425 Author: James Hogan <james.hogan@imgtec.com> Date: Mon Feb 8 18:43:50 2016 +0000 SIGNAL: Move generic copy_siginfo() to signal.h The generic copy_siginfo() is currently defined in asm-generic/siginfo.h, after including uapi/asm-generic/siginfo.h which defines the generic struct siginfo. However this makes it awkward for an architecture to use it if it has to define its own struct siginfo (e.g. MIPS and potentially IA64), since it means that asm-generic/siginfo.h can only be included after defining the arch-specific siginfo, which may be problematic if the arch-specific definition needs definitions from uapi/asm-generic/siginfo.h. It is possible to work around this by first including uapi/asm-generic/siginfo.h to get the constants before defining the arch-specific siginfo, and include asm-generic/siginfo.h after. However uapi headers can't be included by other uapi headers, so that first include has to be in an ifdef __kernel__, with the non __kernel__ case including the non-UAPI header instead. Instead of that mess, move the generic copy_siginfo() definition into linux/signal.h, which allows an arch-specific uapi/asm/siginfo.h to include asm-generic/siginfo.h and define the arch-specific siginfo, and for the generic copy_siginfo() to see that arch-specific definition. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Petr Malat <oss@malat.biz> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Christopher Ferris <cferris@google.com> Cc: linux-arch@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-ia64@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: <stable@vger.kernel.org> # 4.0- Patchwork: https://patchwork.linux-mips.org/patch/12478/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> include/asm-generic/siginfo.h | 15 --------------- include/linux/signal.h | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) commit 0e8c1a3247629ecb0e344655124fd59682410913 Author: Yang Shi <yang.shi@windriver.com> Date: Fri Feb 19 17:04:07 2016 -0800 MIPS: Octeon: Mark some functions __init in smp.c octeon_smp_setup and octeon_prepare_cpus are just used during initialization period, so mark them as __init. And, octeon_prepare_cpus is just used in smp.c, so make it static as well. Signed-off-by: Yang Shi <yang.shi@windriver.com> Cc: david.daney@cavium.com Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12574/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2d52ee82b4756d11565e94b8c09e77bb8c036a11 Author: Álvaro Fernández Rojas <noltari@gmail.com> Date: Sat Apr 9 12:57:49 2016 +0200 MIPS: BMIPS: Improve BCM6368 device tree - Remove unneeded leds0 alias. - Switch to bcm6345-l1-intc interrupt controller. - Use interrupt-controller instead of periph_intc and cpu_intc. - Add uart1 node. - Single ohci and ehci nodes. - Avoid using underscores in node names. - Rename uart aliases to serial. - Remove blank line in cpus node. [ralf@linux-mips.org: fix references in bcm96368mvwg.dts so the file keeps building.] Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/brcm/bcm6368.dtsi | 32 ++++++++++++++++++++------------ arch/mips/boot/dts/brcm/bcm96368mvwg.dts | 4 ++-- 2 files changed, 22 insertions(+), 14 deletions(-) commit e3b992d028f828621fa2441b445478fd86651cad Author: Álvaro Fernández Rojas <noltari@gmail.com> Date: Sat Apr 9 12:57:48 2016 +0200 MIPS: BMIPS: Improve BCM6328 device tree - Remove unneeded leds0 alias. - Switch to bcm6345-l1-intc interrupt controller. - Use interrupt-controller instead of periph_intc and cpu_intc. - Add uart1, ehci and ohci nodes. - Refactor syscon and syscon-reboot. - Avoid using underscores in node names. - Rename uart aliases to serial. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13043/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/brcm/bcm6328.dtsi | 50 ++++++++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 11 deletions(-) commit 3652acd2315562614826eba7d38fae51389636f9 Author: Álvaro Fernández Rojas <noltari@gmail.com> Date: Sat Apr 9 12:57:19 2016 +0200 MIPS: BMIPS: Add support for BCM63268 This SoC is very similar to BCM63168 and Broadcom usually refers to them as BCM63268. Add BCM63268 and missing BCM63168 to device tree documentation. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13042/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/mips/brcm/soc.txt | 1 + arch/mips/bmips/setup.c | 1 + 2 files changed, 2 insertions(+) commit 7537d273e2f3c95c17f6a2c8662209f5d18dbbbc Author: Álvaro Fernández Rojas <noltari@gmail.com> Date: Sat Apr 9 12:56:48 2016 +0200 MIPS: BMIPS: Add device tree example for BCM6358 This adds a device tree example for SFR Neufbox4 (Sercomm version), which also serves as a real example for brcm,bcm6358-leds. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13041/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> .../devicetree/bindings/mips/brcm/soc.txt | 2 +- arch/mips/bmips/Kconfig | 4 + arch/mips/boot/dts/brcm/Makefile | 2 + arch/mips/boot/dts/brcm/bcm6358.dtsi | 130 +++++++++++++++++++++ arch/mips/boot/dts/brcm/bcm96358nb4ser.dts | 46 ++++++++ 5 files changed, 183 insertions(+), 1 deletion(-) commit 3604b4510c17c16271b3446528807227dfb02b04 Author: Álvaro Fernández Rojas <noltari@gmail.com> Date: Sat Apr 9 12:56:47 2016 +0200 MIPS: BMIPS: Add BCM6358 support BCM6358 has a shared TLB which conflicts with current SMP support, so it must be disabled for now. BCM6358 uses >= 0xfffe0000 addresses for internal registers, which need to be remapped (by using a simplified version of BRCM63xx ioremap.h). However, 0xfff80000 is a better address, since it also covers BCM3368, leaving the possibility to add it in the future. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> Cc: f.fainelli@gmail.com Cc: jogo@openwrt.org Cc: cernekee@gmail.com Cc: robh@kernel.org Cc: simon@fire.lp0.eu Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13040/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/bmips/setup.c | 10 +++++++++ arch/mips/include/asm/mach-bmips/ioremap.h | 33 ++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) commit 65b2849a022031f7aa42770daa8478a943dbc123 Author: Kelvin Cheung <keguang.zhang@gmail.com> Date: Tue Apr 12 18:40:19 2016 +0800 CPUFREQ: Loongson1: Replace goto out with return in ls1x_cpufreq_probe() This patch replaces goto out with return in ls1x_cpufreq_probe(). Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: linux-pm@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13056/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/cpufreq/loongson1-cpufreq.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit 99bf2e68988f46d969329dc964950062e805ed1b Author: Kelvin Cheung <keguang.zhang@gmail.com> Date: Tue Apr 12 18:40:18 2016 +0800 CPUFREQ: Loongson1: Use devm_kzalloc() instead of global structure This patch uses devm_kzalloc() instead of global structure. Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: linux-pm@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13055/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/cpufreq/loongson1-cpufreq.c | 63 ++++++++++++++++++++----------------- 1 file changed, 35 insertions(+), 28 deletions(-) commit 25581d2b76ef8564d592bf3bc61a5d6d4f5f2ea2 Author: Kelvin Cheung <keguang.zhang@gmail.com> Date: Tue Apr 12 18:40:17 2016 +0800 CPUFREQ: Loongson1: Use dev_get_platdata() to get platform_data This patch uses dev_get_platdata() to get the platform_data instead of referencing it directly. Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: linux-pm@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13054/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/cpufreq/loongson1-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 379e38a763dd63838411cc2fa765515e7535570b Author: Kelvin Cheung <keguang.zhang@gmail.com> Date: Tue Apr 12 18:40:16 2016 +0800 CPUFREQ: Loongson1: Replace kzalloc() with kcalloc() This patch replaces kzalloc() with kcalloc() when allocating frequency table, and remove unnecessary 'out of memory' message. Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: linux-pm@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13053/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/cpufreq/loongson1-cpufreq.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 6a1d55ccd8bcb304f060987e265d71068724f0d2 Author: Kelvin Cheung <keguang.zhang@gmail.com> Date: Tue Apr 12 18:40:15 2016 +0800 CPUFREQ: Loongson1: Rename the file to loongson1-cpufreq.c This patch renames the file to loongson1-cpufreq.c, and also includes some minor updates. Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: linux-pm@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/13052/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/cpufreq/Makefile | 2 +- drivers/cpufreq/loongson1-cpufreq.c | 222 ++++++++++++++++++++++++++++++++++++ drivers/cpufreq/ls1x-cpufreq.c | 222 ------------------------------------ 3 files changed, 223 insertions(+), 223 deletions(-) commit 37808d62afcdc420d98875c4b514c178d56f6815 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Mon Apr 4 10:55:38 2016 -0700 MIPS: BMIPS: Pretty print BMIPS5200 processor name Just to ease debugging of multiplatform kernel, make sure we print "Broadcom BMIPS5200" for the BMIPS5200 implementation instead of Broadcom BMIPS5000. Fixes: 68e6a78373a6d ("MIPS: BMIPS: Add PRId for BMIPS5200 (Whirlwind)") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13014/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cpu-probe.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit f337967d6d87da39f6e59d90430f3bec0909edf5 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Mon Apr 4 10:55:37 2016 -0700 MIPS: BMIPS: Add cpu-feature-overrides.h BMIPS_GENERIC being multiplatform and intended to support BMIPS3200, BMIPS3300, BMIPS4350, BMIPS4380 and BMIPS5000-class processors, there is not much more we can put in there since they do not share the same I and D cache line sizes at all (doubled for every new generation essentially), some processors have a S-cache, some don't, some have a FPU, some don't. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13013/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mach-bmips/cpu-feature-overrides.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit f675843ddfdfdf467d08cc922201614a149e439e Author: Florian Fainelli <f.fainelli@gmail.com> Date: Mon Apr 4 10:55:36 2016 -0700 MIPS: BMIPS: local_r4k___flush_cache_all needs to blast S-cache local_r4k___flush_cache_all() is missing a special check for BMIPS5000 processors, we need to blast the S-cache, just like other MTI processors since we have an inclusive cache. We also need an additional __sync() to make sure this is completed. Fixes: d74b0172e4e2c ("MIPS: BMIPS: Add special cache handling in c-r4k.c") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13012/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/c-r4k.c | 5 +++++ 1 file changed, 5 insertions(+) commit 73c4ca047f440c79f545bc6133e3033f754cd239 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Mon Apr 4 10:55:35 2016 -0700 MIPS: BMIPS: Clear MIPS_CACHE_ALIASES earlier BMIPS5000 and BMIPS5200 processor have no D cache aliases, and this is properly handled by the per-CPU override added at the end of r4k_cache_init(), the problem is that the output of probe_pcache() disagrees with that, since this is too late: Primary instruction cache 32kB, VIPT, 4-way, linesize 64 bytes. Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes With the change moved earlier, we now have a consistent output with the settings we are intending to have: Primary instruction cache 32kB, VIPT, 4-way, linesize 64 bytes. Primary data cache 32kB, 4-way, VIPT, no aliases, linesize 32 bytes Fixes: d74b0172e4e2c ("MIPS: BMIPS: Add special cache handling in c-r4k.c") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13011/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/c-r4k.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit c130d2fd3d59fbd5d269f7d5827bd4ed1d94aec6 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Mon Apr 4 10:55:34 2016 -0700 MIPS: BMIPS: BMIPS5000 has I cache filing from D cache BMIPS5000 and BMIPS52000 processors have their I-cache filling from the D-cache. Since BMIPS_GENERIC does not provide (yet) a cpu-feature-overrides.h file, this was not set anywhere, so make sure the R4K cache detection takes care of that. Fixes: d74b0172e4e2c ("MIPS: BMIPS: Add special cache handling in c-r4k.c") Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13010/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/c-r4k.c | 4 ++++ 1 file changed, 4 insertions(+) commit 0201bfb1af4747f3642fa7a707fd81bbf78390b7 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Wed Jan 27 12:13:16 2016 -0800 MIPS: BMIPS: Enable partition parser in defconfig Enable CONFIG_MTD_BCM63XX_PARTS in arch/mips/configs/bmips_be_defconfig since this is a necessary option to parse the built-in flash partition table on BMIPS big-endian SoCs (Cable Modem and DSL). Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Cc: cernekee@gmail.com Cc: jogo@openwrt.org Cc: simon@fire.lp0.eu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12256/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/configs/bmips_be_defconfig | 1 + 1 file changed, 1 insertion(+) commit eb1472e7df2c0e1f1c3e207630ffdd008e98f271 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Wed Jan 27 12:13:15 2016 -0800 MIPS: BCM63xx: Enable partition parser in defconfig Enable CONFIG_MTD_BCM63XX_PARTS in arch/mips/configs/bcm63xx_defconfig since this is a necessary option to parse the built-in flash partition table on BCM63xx SoCs. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Brian Norris <computersforpeace@gmail.com> Cc: cernekee@gmail.com Cc: jogo@openwrt.org Cc: simon@fire.lp0.eu Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12255/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/configs/bcm63xx_defconfig | 1 + 1 file changed, 1 insertion(+) commit 413ef3f6c9746154db7b4daeed89cac94490391a Author: Kelvin Cheung <keguang.zhang@gmail.com> Date: Wed Apr 6 20:34:55 2016 +0800 MAINTAINERS: add Loongson1 architecture entry This patch adds Loongson1 architecture entry. Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Richard Weinberger <richard@nod.at> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Brian Norris <computersforpeace@gmail.com> Cc: linux-mips@linux-mips.org Cc: linux-clk@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: dmaengine@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: linux-mtd@lists.infradead.org Patchwork: https://patchwork.linux-mips.org/patch/13034/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) commit 9ec88b60cb481a6862dc98a78400a6945d9675ba Author: Kelvin Cheung <keguang.zhang@gmail.com> Date: Wed Apr 6 20:34:54 2016 +0800 MIPS: Loongson1B: Some updates/fixes for LS1B - Add DMA device - Add NAND device - Add GPIO device - Add LED device - Update the defconfig and rename it to loongson1b_defconfig - Fix ioremap size - Other minor fixes Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Viresh Kumar <viresh.kumar@linaro.org> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> Cc: Richard Weinberger <richard@nod.at> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Brian Norris <computersforpeace@gmail.com> Cc: linux-mips@linux-mips.org Cc: linux-clk@vger.kernel.org Cc: linux-pm@vger.kernel.org Cc: dmaengine@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: linux-mtd@lists.infradead.org Patchwork: https://patchwork.linux-mips.org/patch/13033/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 2 + arch/mips/configs/loongson1b_defconfig | 125 ++++++++++++++++++++++ arch/mips/configs/ls1b_defconfig | 110 ------------------- arch/mips/include/asm/mach-loongson32/cpufreq.h | 1 - arch/mips/include/asm/mach-loongson32/dma.h | 25 +++++ arch/mips/include/asm/mach-loongson32/irq.h | 1 - arch/mips/include/asm/mach-loongson32/loongson1.h | 4 +- arch/mips/include/asm/mach-loongson32/nand.h | 30 ++++++ arch/mips/include/asm/mach-loongson32/platform.h | 14 ++- arch/mips/include/asm/mach-loongson32/regs-clk.h | 24 ++--- arch/mips/include/asm/mach-loongson32/regs-mux.h | 84 +++++++-------- arch/mips/include/asm/mach-loongson32/regs-pwm.h | 12 +-- arch/mips/loongson32/common/platform.c | 105 +++++++++++++++++- arch/mips/loongson32/common/reset.c | 13 +-- arch/mips/loongson32/common/time.c | 27 ++--- arch/mips/loongson32/ls1b/board.c | 67 +++++++++++- 16 files changed, 440 insertions(+), 204 deletions(-) commit 0d61ed17dd30fc31533ce07750d03bdb34fb6d7a Author: Maciej W. Rozycki <macro@imgtec.com> Date: Thu Feb 11 14:25:43 2016 +0000 ld-version: Drop the 4th and 5th version components ... making upstream development binutils snapshots work as expected, e.g.: $ mips64el-linux-ld --version GNU ld (GNU Binutils) 2.20.1.20100303 [...] $ Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Acked-by: Michal Marek <mmarek@suse.cz> Cc: Michael S. Tsirkin <mst@redhat.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-kbuild@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12537/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> scripts/ld-version.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 69ca2b81c2f63eb48eccdf70a4433641c5041527 Author: Jaedon Shin <jaedon.shin@gmail.com> Date: Wed Apr 6 14:58:01 2016 +0900 MIPS: BMIPS: Fix interrupt and remove needless properties Fixes wrong bcm7425 SATA AHCI hardware interrupt property value with periph_intc and SATA PHY unit address, and removes needless brcm,broken-{ncq,phy} properties what are not used anywhere. Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Dragan Stancevic <dragan.stancevic@gmail.com> Cc: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/13017/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/brcm/bcm7346.dtsi | 4 +--- arch/mips/boot/dts/brcm/bcm7362.dtsi | 4 +--- arch/mips/boot/dts/brcm/bcm7425.dtsi | 6 ++---- 3 files changed, 4 insertions(+), 10 deletions(-) commit 5c40d493e2e63d2979610aed75df7e3744b87921 Author: Jaedon Shin <jaedon.shin@gmail.com> Date: Wed Apr 6 15:01:08 2016 +0900 MIPS: BMIPS: Add support UART, I2C, SATA device Add UART, I2C, SATA device tree nodes on Broadcom BCM7xxx MIPS-based platforms. Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Dragan Stancevic <dragan.stancevic@gmail.com> Cc: Linux-MIPS <linux-mips@linux-mips.org> Patchwork: https://patchwork.linux-mips.org/patch/13016/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/brcm/bcm7125.dtsi | 69 +++++++++++++++- arch/mips/boot/dts/brcm/bcm7346.dtsi | 2 - arch/mips/boot/dts/brcm/bcm7358.dtsi | 2 - arch/mips/boot/dts/brcm/bcm7360.dtsi | 42 +++++++++- arch/mips/boot/dts/brcm/bcm7362.dtsi | 2 - arch/mips/boot/dts/brcm/bcm7420.dtsi | 77 +++++++++++++++++- arch/mips/boot/dts/brcm/bcm7425.dtsi | 94 +++++++++++++++++++++- arch/mips/boot/dts/brcm/bcm7435.dtsi | 134 ++++++++++++++++++++++++++++++- arch/mips/boot/dts/brcm/bcm97125cbmb.dts | 24 ++++++ arch/mips/boot/dts/brcm/bcm97360svmb.dts | 8 ++ arch/mips/boot/dts/brcm/bcm97420c.dts | 28 +++++++ arch/mips/boot/dts/brcm/bcm97425svmb.dts | 28 +++++++ arch/mips/boot/dts/brcm/bcm97435svmb.dts | 36 +++++++++ 13 files changed, 530 insertions(+), 16 deletions(-) commit 23021b2bb98543d08e22725122650644d824bf18 Author: Yang Shi <yang.shi@windriver.com> Date: Fri Feb 19 15:42:11 2016 -0800 MIPS: Kconfig: replace OPROFILE=n to !OPROFILE In Kconfig "=n" is not correct syntax, "!" is the preferred way for false-positive expression. Signed-off-by: Yang Shi <yang.shi@windriver.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12572/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 919beb4eedc587b70f8c1390fedac10cda783c36 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:42 2016 +0100 MIPS: KASLR: Print relocation Information on boot When debugging a relocated kernel, the addresses of the relocated symbols and the offset applied is essential information. If the kernel is compiled with debugging information, then print this information during bootup using the same function as the panic notifier. [ralf@linux-mips.org: Fixed spelling mistake pointed out by Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>.] Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Aaro Koskinen <aaro.koskinen@nokia.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com> Cc: Jaedon Shin <jaedon.shin@gmail.com> Cc: Jonas Gorski <jogo@openwrt.org> Cc: Paul Burton <paul.burton@imgtec.com> 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/12989/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/setup.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 405bc8fd12f59ec865714447b2f6e1a961f49025 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:41 2016 +0100 MIPS: Kernel: Implement KASLR using CONFIG_RELOCATABLE This patch adds KASLR to the MIPS kernel. Entropy is derived from the banner, which will change every build and random_get_entropy() which should provide additional runtime entropy. Additionally the bootloader may pass entropy via the /chosen/kaslr-seed node in device tree. The kernel is relocated by up to RANDOMIZE_BASE_MAX_OFFSET bytes from its link address (PHYSICAL_START). Because relocation happens so early in the kernel boot, the amount of physical memory has not yet been determined. This means the only way to limit relocation within the available memory is via Kconfig. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> 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/12990/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 30 +++++++++ arch/mips/kernel/relocate.c | 146 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+) commit 5e7c1c918a4433c5dd1844d99f5648e17425fa16 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:40 2016 +0100 MIPS: Introduce plat_get_fdt a platform API to retrieve the FDT Early access to the kernel command line requires early access to the FDT for platforms which pass the command line within the device tree. There was no common way to retrieve the location of the FDT without incurring side effects, such as plat_mem_setup which, on Malta at least, initializes a bunch of other stuff. This patch adds plat_get_ftd() for IMG platforms. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> 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/12988/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/bootinfo.h | 18 ++++++++++++++++++ arch/mips/mti-malta/malta-setup.c | 7 ++++++- arch/mips/mti-sead3/sead3-setup.c | 5 +++++ 3 files changed, 29 insertions(+), 1 deletion(-) commit 8c530ea35caef8bc293b56580ab55352f7d86bfc Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:39 2016 +0100 MIPS: Add CONFIG_RELOCATABLE Kconfig option Add option to KConfig to enable the kernel to relocate itself at runtime. Relocation is supported R2 and later of the MIPS architecture, 32bit and 64bit. The platform is also required to provide support through plat_get_fdt() added in a later patch. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> 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/12987/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) commit 61cd52d4e44d7d8c55dad939b1877fd39d7103a2 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:38 2016 +0100 MIPS: bootmem: When relocatable, free memory below kernel The kernel reserves all memory before the _end symbol as bootmem, however, once the kernel can be relocated elsewhere in memory this may result in a large amount of wasted memory. The assumption is that the memory between the link and relocated address of the kernel may be released back to the available memory pool. Memory statistics for a Malta with the kernel relocating by 16Mb, without the patch: Memory: 105952K/131072K available (4604K kernel code, 242K rwdata, 892K rodata, 1280K init, 183K bss, 25120K reserved, 0K cma-reserved) And with the patch: Memory: 122336K/131072K available (4604K kernel code, 242K rwdata, 892K rodata, 1280K init, 183K bss, 8736K reserved, 0K cma-reserved) The 16Mb offset is removed from the reserved region and added back to the available region. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Aaro Koskinen <aaro.koskinen@nokia.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com> Cc: Jaedon Shin <jaedon.shin@gmail.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Jonas Gorski <jogo@openwrt.org> Cc: Paul Burton <paul.burton@imgtec.com> 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/12986/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/setup.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit af09ab5e3fa7b6e137b135325a2ca00d57b4aea2 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:37 2016 +0100 MIPS: Call relocate_kernel if CONFIG_RELOCATABLE=y If CONFIG_RELOCATABLE is enabled, call relocate_kernel. This function will return the entry point of the relocated kernel if copy/relocate is sucessful or the original entry point if not. The stack pointer must then be pointed into the new image. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Jonas Gorski <jogo@openwrt.org> 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/12984/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/head.S | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit 279b991b24d2439fbe9d2f093988b9c8aed2603d Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:36 2016 +0100 MIPS: Kernel: Add relocate.c arch/mips/kernel/relocate.c contains the functions necessary to relocate the kernel elsewhere in memory The kernel makes a copy of itself at the new address. It uses the relocation table inserted by the relocs tool to fix symbol references within the new image. If copy/relocation is sucessful then the entry point of the new kernel is returned, otherwise fall back to starting the kernel in place. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> 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/12985/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/Makefile | 2 + arch/mips/kernel/relocate.c | 240 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 242 insertions(+) commit e818fac595ab94900f0046baba1f1a0e2d5c2435 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:35 2016 +0100 MIPS: Generate relocation table when CONFIG_RELOCATABLE When CONFIG_RELOCATABLE is enabled (added in later patch) add --emit-relocs to vmlinux LDFLAGS so that fully linked vmlinux contains relocation information. Run the previously added relocs tool to fill in the .data.relocs section of vmlinux with a table of relocations. The relocs tool will also remove (mark as 0 length) the relocation sections added to vmlinux. When vmlinux is passed to the boot makefile for conversion into a boot image the now empty relocation sections will be removed and the populated relocation table will be included in the binary image. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> 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/12983/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 069fd766271de65ec4dc2eb8d15f7f44727b1ea1 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:34 2016 +0100 MIPS: Reserve space for relocation table When CONFIG_RELOCATABLE is enabled, add a new section in the memory map to be filled with relocation data. CONFIG_RELOCATION_TABLE_SIZE allows the amount of space reserved to be adjusted if necessary. The relocs tool will populate this reserved space with relocation information. The space is reserved within the elf by filling it with 0's, and an invalid entry is left at the start of the space such that kernel relocation will be aborted if the table is empty. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Aaro Koskinen <aaro.koskinen@nokia.com> Cc: David Daney <ddaney@caviumnetworks.com> Cc: Jonas Gorski <jogo@openwrt.org> 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/12982/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 16 ++++++++++++++++ arch/mips/kernel/vmlinux.lds.S | 21 +++++++++++++++++++++ 2 files changed, 37 insertions(+) commit aadeec4df9b33526f45a27e61df6891dd21b1e39 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:33 2016 +0100 MIPS: tools: Build relocs tool Build the relocs tool as part of the kbuild Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> 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/12980/ Patchwork: https://patchwork.linux-mips.org/patch/13242/ Patchwork: https://patchwork.linux-mips.org/patch/13233/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Makefile | 4 ++++ arch/mips/boot/tools/.gitignore | 1 + 2 files changed, 5 insertions(+) commit 766c580356ecca88b32c47b8128bec7d6d014533 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Thu Mar 31 10:05:32 2016 +0100 MIPS: tools: Add relocs tool This tool is based on the x86/boot/tools/relocs tool. It parses the relocations present in the vmlinux elf file, building a table of relocations that will be necessary to run the kernel from an address other than its link address. This table is inserted into the vmlinux elf, in the .data.relocs section. The table is subsequently used by the code in arch/mips/kernel/relocate.c (added later) to relocate the kernel. The tool, by default, also marks all relocation sections as 0 length. This is due to objcopy currently being unable to handle copying the relocations between 64 and 32 bit elf files as is done when building a 64 bit kernel. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> 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/12981/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/tools/Makefile | 8 + arch/mips/boot/tools/relocs.c | 680 +++++++++++++++++++++++++++++++++++++ arch/mips/boot/tools/relocs.h | 45 +++ arch/mips/boot/tools/relocs_32.c | 17 + arch/mips/boot/tools/relocs_64.c | 27 ++ arch/mips/boot/tools/relocs_main.c | 84 +++++ 6 files changed, 861 insertions(+) commit cb4253aa0f77f20be018970dbe5d01d78b930ef9 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Tue Mar 29 09:35:34 2016 +0100 secomp: Constify mode1 syscall whitelist These values are constant and should be marked as such. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Will Drewry <wad@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: IMG-MIPSLinuxKerneldevelopers@imgtec.com Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12979/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> kernel/seccomp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b1b4fad5cc678442c8184a7b91b6cfb0b8b461a5 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Tue Mar 29 09:35:33 2016 +0100 MIPS: seccomp: Support compat with both O32 and N32 Previously the seccomp would only support strict mode on O32 userland programs when the kernel had support for both O32 and N32 ABIs. Remove kludge and support both ABIs. With this patch in place, the seccomp_bpf self test now passes global.mode_strict_support with N32 userland. Suggested-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: IMG-MIPSLinuxKerneldevelopers@imgtec.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12917/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/seccomp.h | 47 +++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 21 deletions(-) commit c983f0e8677d5d686ea81de13f9c9ac34f21a2a7 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Tue Mar 29 09:35:32 2016 +0100 seccomp: Get compat syscalls from asm-generic header Move retrieval of compat syscall numbers into inline function defined in asm-generic header so that arches may override it. [ralf@linux-mips.org: Resolve merge conflict.] Suggested-by: Paul Burton <paul.burton@imgtec.com> Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: IMG-MIPSLinuxKerneldevelopers@imgtec.com Cc: Arnd Bergmann <arnd@arndb.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Will Drewry <wad@chromium.org> Cc: linux-arch@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12978/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> include/asm-generic/seccomp.h | 14 ++++++++++++++ kernel/seccomp.c | 9 +-------- 2 files changed, 15 insertions(+), 8 deletions(-) commit a400bed6d105c23d3673f763596e4b85de14e41a Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Tue Mar 29 09:35:31 2016 +0100 MIPS: scall: Handle seccomp filters which redirect syscalls Commit d218af78492a ("MIPS: scall: Always run the seccomp syscall filters") modified the syscall code to always call the seccomp filters, but missed the case where a filter may redirect the syscall, as revealed by the seccomp_bpf self test. The syscall path now restores the syscall from the stack after the filter rather than saving it locally. Syscall number checking and syscall function table lookup is done after the filter may have run such that redirected syscalls are also checked, and executed. The regular path of syscall number checking and pointer lookup is also made more consistent between ABIs with scall64-64.S being the reference. With this patch in place, the seccomp_bpf self test now passes TRACE_syscall.syscall_redirected and TRACE_syscall.syscall_dropped on all MIPS ABIs. Fixes: d218af78492a ("MIPS: scall: Always run the seccomp syscall filters") Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Eric B Munson <emunson@akamai.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mips@linux-mips.org Cc: IMG-MIPSLinuxKerneldevelopers@imgtec.com Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12916/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/scall32-o32.S | 11 +++++------ arch/mips/kernel/scall64-64.S | 3 +-- arch/mips/kernel/scall64-n32.S | 14 +++++++++----- arch/mips/kernel/scall64-o32.S | 14 +++++++++----- 4 files changed, 24 insertions(+), 18 deletions(-) commit 5050e91fa650ecd6260ef62bbed9dfc5b4d05dfa Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Tue Mar 29 09:35:30 2016 +0100 MIPS: Support sending SIG_SYS to 32bit userspace from 64bit kernel The seccomp_bpf self test revealed that a 64bit kernel delivered an invalid SIG_SYS to a 32bit userspace, because it was falling into the default of the switch statement. Add a case to handle delivering the signal. With this patch, the seccomp_bpf self test now passes the TRAP.handler case with O32 and N32 userlands. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Amanieu d'Antras <amanieu@gmail.com> Cc: Alex Smith <alex.smith@imgtec.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mips@linux-mips.org Cc: IMG-MIPSLinuxKerneldevelopers@imgtec.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12915/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/signal32.c | 6 ++++++ 1 file changed, 6 insertions(+) commit 0ce105bf9723e9a2dc7ec0a1e164c1b63aa64546 Author: Matt Redfearn <matt.redfearn@imgtec.com> Date: Tue Mar 29 09:35:29 2016 +0100 selftests/seccomp: add MIPS self-test support This adds self-test support on MIPS, based on RFC patch from Kees Cook. Modifications from the RFC: - support the O32 syscall which passes the real syscall number in a0. - Use PTRACE_{GET,SET}REGS - Because SYSCALL_NUM and SYSCALL_RET are the same register, it is not possible to test modifying the syscall return value when skipping, since both would need to set the same register. Therefore modify that test case to just detect the skipped test. Tested on MIPS32r2 / MIPS64r2 with O32, N32 and N64 userlands. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Acked-by: Kees Cook <keescook@chromium.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: Will Drewry <wad@chromium.org> Cc: IMG-MIPSLinuxKerneldevelopers@imgtec.com Cc: linux-kernel@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12977/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> tools/testing/selftests/seccomp/seccomp_bpf.c | 30 +++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) commit 8571e645d1d15a560a32d262817f3b1d901cedac Author: Martin Schiller <mschiller@tdt.de> Date: Thu Nov 26 11:00:08 2015 +0100 pinctrl/lantiq: update devicetree binding in dts file This patch updates the compatible string in the easy50712.dts file to the new "lantiq,danube-pinctrl". Signed-off-by: Martin Schiller <mschiller@tdt.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Cc: robh+dt@kernel.org Cc: pawel.moll@arm.com Cc: mark.rutland@arm.com Cc: ijc+devicetree@hellion.org.uk Cc: galak@codeaurora.org Cc: john@phrozen.org Cc: hauke@hauke-m.de Cc: jogo@openwrt.org Cc: daniel.schwierzeck@gmail.com Cc: linux-gpio@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11589/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/lantiq/easy50712.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e55d5312444087eb6bfb34c1cd5f6e0bf626cf26 Author: Daniel Wagner <daniel.wagner@bmw-carit.de> Date: Thu Feb 11 13:36:54 2016 +0100 crash_dump: Add vmcore_elf32_check_arch parse_crash_elf{32|64}_headers will check the headers via the elf_check_arch respectively vmcore_elf64_check_arch macro. The MIPS architecture implements those two macros differently. In order to make the differentiation more explicit, let's introduce an vmcore_elf32_check_arch to allow the archs to overwrite it. Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de> Suggested-by: Maciej W. Rozycki <macro@imgtec.com> Reviewed-by: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12535/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> fs/proc/vmcore.c | 2 +- include/linux/crash_dump.h | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) commit 331ae5fc3eb439b4ef2e26c25c8d1431d74b7a6f Author: Simon Arlott <simon@fire.lp0.eu> Date: Wed Dec 9 20:27:09 2015 +0000 irqchip: Add brcm, bcm6345-l1-intc device tree binding Add device tree binding for the BCM6345 interrupt controller. This controller is similar to the SMP-capable BCM7038 and the BCM3380 but with packed interrupt registers. Signed-off-by: Simon Arlott <simon@fire.lp0.eu> Acked-by: Rob Herring <robh@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: Jonas Gorski <jogo@openwrt.org> Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org> Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/11804/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> .../interrupt-controller/brcm,bcm6345-l1-intc.txt | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) commit e2c93cf14b40e8b8e755bb163ced004edb4691e2 Author: Borislav Petkov <bp@suse.de> Date: Wed Mar 30 13:42:45 2016 +0200 MIPS: defconfigs: Remove CONFIG_IPV6_PRIVACY Option is long gone, see 5d9efa7ee99e ("ipv6: Remove privacy config option.") Signed-off-by: Borislav Petkov <bp@suse.de> Cc: linux-mips@linux-mips.org Cc: LKML <linux-kernel@vger.kernel.org> Patchwork: https://patchwork.linux-mips.org/patch/12919/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/configs/bcm47xx_defconfig | 1 - arch/mips/configs/bigsur_defconfig | 1 - arch/mips/configs/decstation_defconfig | 1 - arch/mips/configs/ip22_defconfig | 1 - arch/mips/configs/ip27_defconfig | 1 - arch/mips/configs/jazz_defconfig | 1 - arch/mips/configs/lemote2f_defconfig | 1 - arch/mips/configs/mtx1_defconfig | 1 - arch/mips/configs/nlm_xlp_defconfig | 1 - arch/mips/configs/nlm_xlr_defconfig | 1 - arch/mips/configs/rm200_defconfig | 1 - 11 files changed, 11 deletions(-) commit 3d2ca73af4eb4a33ae021e37b5f395ac5631cb3f Author: Stephen Boyd <sboyd@codeaurora.org> Date: Wed Jan 27 14:23:36 2016 -0800 MIPS: Use generic clkdev.h header The generic header file is equivalent to the MIPS one, so use the generic one instead. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: linux-kernel@vger.kernel.org Cc: linux-clk@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12261/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/Kbuild | 1 + arch/mips/include/asm/clkdev.h | 27 --------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) commit 37d22a0d798b5c938b277d32cfd86dc231381342 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Mar 1 02:37:59 2016 +0000 MIPS: Sync icache & dcache in set_pte_at It's possible for pages to become visible prior to update_mmu_cache running if a thread within the same address space preempts the current thread or runs simultaneously on another CPU. That is, the following scenario is possible: CPU0 CPU1 write to page flush_dcache_page flush_icache_page set_pte_at map page update_mmu_cache If CPU1 maps the page in between CPU0's set_pte_at, which marks it valid & visible, and update_mmu_cache where the dcache flush occurs then CPU1s icache will fill from stale data (unless it fills from the dcache, in which case all is good, but most MIPS CPUs don't have this property). Commit 4d46a67a3eb8 ("MIPS: Fix race condition in lazy cache flushing.") attempted to fix that by performing the dcache flush in flush_icache_page such that it occurs before the set_pte_at call makes the page visible. However it has the problem that not all code that writes to pages exposed to userland call flush_icache_page. There are many callers of set_pte_at under mm/ and only 2 of them do call flush_icache_page. Thus the race window between a page becoming visible & being coherent between the icache & dcache remains open in some cases. To illustrate some of the cases, a WARN was added to __update_cache with this patch applied that triggered in cases where a page about to be flushed from the dcache was not the last page provided to flush_icache_page. That is, backtraces were obtained for cases in which the race window is left open without this patch. The 2 standout examples follow. When forking a process: [ 15.271842] [<80417630>] __update_cache+0xcc/0x188 [ 15.277274] [<80530394>] copy_page_range+0x56c/0x6ac [ 15.282861] [<8042936c>] copy_process.part.54+0xd40/0x17ac [ 15.289028] [<80429f80>] do_fork+0xe4/0x420 [ 15.293747] [<80413808>] handle_sys+0x128/0x14c When exec'ing an ELF binary: [ 14.445964] [<80417630>] __update_cache+0xcc/0x188 [ 14.451369] [<80538d88>] move_page_tables+0x414/0x498 [ 14.457075] [<8055d848>] setup_arg_pages+0x220/0x318 [ 14.462685] [<805b0f38>] load_elf_binary+0x530/0x12a0 [ 14.468374] [<8055ec3c>] search_binary_handler+0xbc/0x214 [ 14.474444] [<8055f6c0>] do_execveat_common+0x43c/0x67c [ 14.480324] [<8055f938>] do_execve+0x38/0x44 [ 14.485137] [<80413808>] handle_sys+0x128/0x14c These code paths write into a page, call flush_dcache_page then call set_pte_at without flush_icache_page inbetween. The end result is that the icache can become corrupted & userland processes may execute unexpected or invalid code, typically resulting in a reserved instruction exception, a trap or a segfault. Fix this race condition fully by performing any cache maintenance required to keep the icache & dcache in sync in set_pte_at, before the page is made valid. This has the added bonus of ensuring the cache maintenance always happens in one location, rather than being duplicated in flush_icache_page & update_mmu_cache. It also matches the way other architectures solve the same problem (see arm, ia64 & powerpc). Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reported-by: Ionela Voinescu <ionela.voinescu@imgtec.com> Cc: Lars Persson <lars.persson@axis.com> Fixes: 4d46a67a3eb8 ("MIPS: Fix race condition in lazy cache flushing.") Cc: Steven J. Hill <sjhill@realitydiluted.com> Cc: David Daney <david.daney@cavium.com> Cc: Huacai Chen <chenhc@lemote.com> Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jerome Marchand <jmarchan@redhat.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable <stable@vger.kernel.org> # v4.1+ Patchwork: https://patchwork.linux-mips.org/patch/12722/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cacheflush.h | 6 ------ arch/mips/include/asm/pgtable.h | 26 +++++++++++++++++++++----- arch/mips/mm/cache.c | 19 +++---------------- 3 files changed, 24 insertions(+), 27 deletions(-) commit f4281bba818105c7c91799abe40bc05c0dbdaa25 Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Mar 1 02:37:58 2016 +0000 MIPS: Handle highmem pages in __update_cache The following patch will expose __update_cache to highmem pages. Handle them by mapping them in for the duration of the cache maintenance, just like in __flush_dcache_page. The code for that isn't shared because we need the page address in __update_cache so sharing became messy. Given that the entirity is an extra 5 lines, just duplicate it. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Lars Persson <lars.persson@axis.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jerome Marchand <jmarchan@redhat.com> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: stable <stable@vger.kernel.org> # v4.1+ Patchwork: https://patchwork.linux-mips.org/patch/12721/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/cache.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 234859e49a15323cf1b2331bdde7f658c4cb45fb Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Mar 1 02:37:57 2016 +0000 MIPS: Flush highmem pages in __flush_dcache_page When flush_dcache_page is called on an executable page, that page is about to be provided to userland & we can presume that the icache contains no valid entries for its address range. However if the icache does not fill from the dcache then we cannot presume that the pages content has been written back as far as the memories that the dcache will fill from (ie. L2 or further out). This was being done for lowmem pages, but not for highmem which can lead to icache corruption. Fix this by mapping highmem pages & flushing their content from the dcache in __flush_dcache_page before providing the page to userland, just as is done for lowmem pages. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Lars Persson <lars.persson@axis.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12720/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/mm/cache.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 763fee97e743acb4f6e683a00fd2e7f5ad2484fb Author: Paul Burton <paul.burton@imgtec.com> Date: Tue Mar 1 02:37:56 2016 +0000 MIPS: Flush dcache for flush_kernel_dcache_page The flush_kernel_dcache_page function was previously essentially a nop. This is incorrect for MIPS, where if a page has been modified & either it aliases or it's executable & the icache doesn't fill from dcache then the content needs to be written back from dcache to the next level of the cache hierarchy (which is shared with the icache). Implement this by simply calling flush_dcache_page, treating this kmapped cache flush function (flush_kernel_dcache_page) exactly the same as its non-kmapped counterpart (flush_dcache_page). Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Lars Persson <lars.persson@axis.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12719/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cacheflush.h | 1 + 1 file changed, 1 insertion(+) commit b4f37b2f2f7ed83847c8010b2649ea03ff429f43 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Wed Mar 2 22:47:19 2016 +0200 MIPS: OCTEON: cavium_octeon_defconfig: enable all OCTEON SoC drivers Some drivers for SoC provided functionality are missing. Enable to those in defconfig to provide better build/testing coverage. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Daney <ddaney.cavm@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12750/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/configs/cavium_octeon_defconfig | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) commit b5a6455cde3d63466ac31bacdb42afcf30932f75 Author: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Date: Tue Mar 29 15:50:25 2016 +0100 MIPS: Detect DSP v3 support DSPv3 is supported on all MIPSr6 systems which indicate support for DSPv2. This doesn't require any changes to the kernel's handling of DSP resources. The patch is to detect support and indicate it in /proc/cpuinfo DSP v3 introduces a new instruction BPOSGE32C Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Reviewed-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12918/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-features.h | 4 ++++ arch/mips/include/asm/cpu.h | 1 + arch/mips/kernel/cpu-probe.c | 5 ++++- arch/mips/kernel/proc.c | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) commit 157b9394709ed5233288986a293405def22792ed Author: Andrei Pistirica <andrei.pistirica@microchip.com> Date: Wed Jan 13 18:15:43 2016 -0700 serial: pic32_uart: Add PIC32 UART driver This adds UART and a serial console driver for Microchip PIC32 class devices. [ralf@linux-mips.org: Resolved merge conflict.] Signed-off-by: Andrei Pistirica <andrei.pistirica@microchip.com> Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Reviewed-by: Alan Cox <alan@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.com> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: linux-serial@vger.kernel.org Cc: linux-api@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12101/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/tty/serial/Kconfig | 21 + drivers/tty/serial/Makefile | 1 + drivers/tty/serial/pic32_uart.c | 960 +++++++++++++++++++++++++++++++++++++++ drivers/tty/serial/pic32_uart.h | 126 +++++ include/uapi/linux/serial_core.h | 3 + 5 files changed, 1111 insertions(+) commit 81dfdd39c76dc65f3a0fd5e6a231c3cbca9c49bc Author: Andrei Pistirica <andrei.pistirica@microchip.com> Date: Wed Jan 13 18:15:42 2016 -0700 dt/bindings: Add bindings for PIC32 UART driver Document the devicetree bindings for the UART peripheral found on Microchip PIC32 class devices. Signed-off-by: Andrei Pistirica <andrei.pistirica@microchip.com> Signed-off-by: Joshua Henderson <joshua.henderson@microchip.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12100/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> .../bindings/serial/microchip,pic32-uart.txt | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit 0c94fa33b4de55a0dcb60519ba04a0fd49da124d Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 13 16:17:14 2015 +0100 MIPS: cpu: Convert MIPS_CPU_* defs to (1ull << x) The MIPS_CPU_* definitions have now filled the first 32-bits, and are getting longer since they're written in hex without zero padding. Adding my 8 extra MIPS_CPU_* definitions which I haven't upstreamed yet this is getting increasingly ugly as the comments get shifted progressively to the right. Its also error prone, and I've seen this cause mistakes on 3 separate occasions now, not helped by it being a conflict hotspot. Convert all the MIPS_CPU_* definitions to the form (1ull << x). Humans are better at incrementing than shifting. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10045/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu.h | 89 ++++++++++++++++++++++++--------------------- 1 file changed, 48 insertions(+), 41 deletions(-) commit c0291f7c735941f2cf5c8d5264c2cc2402b77869 Author: James Hogan <james.hogan@imgtec.com> Date: Wed May 13 16:17:13 2015 +0100 MIPS: cpu: Alter MIPS_CPU_* definitions to fill gap The MIPS_CPU_* definitions accidentally missed bits 27..30 when MIPS_CPU_EVA was added, and further definitions have continued from there. Shift all the definitions since MIPS_CPU_EVA right by 4 so there are no gaps. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/10044/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit 738a3f79027bef44b0bd3bfcc325f53b518749d4 Author: Florian Fainelli <f.fainelli@gmail.com> Date: Tue Feb 9 12:55:50 2016 -0800 MIPS: BMIPS: Add early CPU initialization code Port the stblinux-3.3 code to perform a bunch of CPU-specific initialization, make it compatible with run-time detection of the CPU, and unroll the brcmstb-specific macros: BDEV_RB(), BDEV_UNSET. The "pref 30" disabling is done as a quirk. This is a preliminary change to allow the use of the "rotr" instruction gated by cpu_has_rixi. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: john@phrozen.org Cc: cernekee@gmail.com Cc: jon.fraser@broadcom.com Cc: pgynther@google.com Cc: paul.burton@imgtec.com Cc: ddaney.cavm@gmail.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12504/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/bmips/setup.c | 1 + arch/mips/include/asm/bmips.h | 1 + arch/mips/kernel/smp-bmips.c | 87 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 89 insertions(+) commit 036aff91c30a6f15d5bf25f22827abc26b6d06c1 Author: Maciej W. Rozycki <macro@imgtec.com> Date: Sat Jan 30 09:09:43 2016 +0000 MIPS: math-emu: dsemul: Remove an unused bit in ADDIUPC emulation Avoid a reader's confusion, as the calculation is correct either way. Signed-off-by: Maciej W. Rozycki <macro@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12283/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/math-emu/dsemul.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c400d5ebec1828ee00acb53890741a62b45fb23b Author: Florian Fainelli <f.fainelli@gmail.com> Date: Sun Jan 31 12:29:27 2016 -0800 BUS: brcmstb_gisb: Hook to MIPS board_be_handler MIPS kernels allow platforms to invoke a custom Bus Error handler, add the necessary code to do this for Broadcom SoCs where the GISB bus error handler can be used. We may get a bus error from an address decoded outside of the GISB bus space, so we need to check the validity of such a capture before printing anything. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Cc: cernekee@gmail.com Cc: arnd@arndb.de Cc: jaedon.shin@gmail.com Cc: pgynther@google.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12284/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/bus/brcmstb_gisb.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) commit 885872b722b73b2026a48bdff4621f289be2b044 Author: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Date: Wed Feb 3 18:01:36 2016 +0000 MIPS: Octeon: Add Octeon III CN7xxx interface detection Add basic CN7XXX interface detection. This allows the kernel to boot with ethernet working as it initializes the ethernet ports with SGMII instead of defaulting to RGMII routines. Tested on the utm8 from Rhino Labs with a CN7130. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Acked-by: David Daney <david.daney@cavium.com> Cc: janne.huttunen@nokia.com Cc: aaro.koskinen@nokia.com Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12376/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/executive/cvmx-helper.c | 43 +++++++++++++++++++++++++ 1 file changed, 43 insertions(+) commit 04cc89d120f94131de89a6e20da27016db4782ce Author: Ralf Baechle <ralf@linux-mips.org> Date: Sun Mar 27 00:07:14 2016 +0100 MIPS: Make flush_thread Avoids function calls to an empty function. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/processor.h | 4 ++++ arch/mips/kernel/process.c | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) commit 5d3c792583b6040607e178925ccc8316a207210f Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Feb 4 13:05:05 2016 +0000 MIPS: Support R_MIPS_PC{16,21,26} rel-style relocs MIPS32 code uses rel-style relocs, and MIPS32r6 modules may include R_MIPS_PC16, R_MIPS_PC21 & R_MIPS_PC26 relocations. We thus need to support these relocations in order to load MIPS32r6 kernel modules. This patch adds such support, which is similar to the rela-style support in module-rela.c but making use of the implicit addend from the instruction encoding. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Steven J. Hill <sjhill@realitydiluted.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12435/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/module.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) commit ad8319ea4647c897c837643a611714a83d8f6a0f Author: Paul Burton <paul.burton@imgtec.com> Date: Thu Feb 4 13:05:04 2016 +0000 MIPS: Support R_MIPS_PC{21,26} rela-style relocs MIPS64 code uses rela-style relocs, and MIPS64r6 modules may include the new R_MIPS_PC21 & R_MIPS_PC26 relocations. We thus need to support these relocations in order to load MIPS64r6 kernel modules. They are similar to the existing R_MIPS_PC16 relocation but applying to a wider field. Implement support for them by genericising the existing R_MIPS_PC16 implementation such that it can be used for different field widths, and calling it for all 3 reloc types. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: Kees Cook <keescook@chromium.org> Cc: James Hogan <james.hogan@imgtec.com> Cc: Alex Smith <alex.smith@imgtec.com> Cc: Steven J. Hill <sjhill@realitydiluted.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12434/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/elf.h | 5 +++++ arch/mips/kernel/module-rela.c | 48 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 52 insertions(+), 1 deletion(-) commit 55d791f37c905b9ca68b96cdab89678654a5d16e Author: Steven J. Hill <Steven.Hill@imgtec.com> Date: Thu Feb 4 13:05:03 2016 +0000 MIPS: module: Make consistent use of pr_*() The module relocation handling code has inconsistent use of printk() and pr_*() functions. Convert printk() calls to use pr_err() and pr_warn(). [paul.burton@imgtec.com: Do the same thing in module.c] Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com> Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Andrey Konovalov <adech.fo@gmail.com> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12433/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/module-rela.c | 8 +++----- arch/mips/kernel/module.c | 7 +++---- 2 files changed, 6 insertions(+), 9 deletions(-) commit 43aff742b64d8756d5612f4805af89635ae6c622 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 16:17:30 2016 +0000 MIPS: Probe the M6250 CPU Support probing the M6250 CPU now that cases for handling it have been added where required in the core MIPS kernel code. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: Joshua Kinard <kumba@gentoo.org> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12375/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cpu-probe.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1dbf6a81c845a748e46b4bcaf25d958038624ad8 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 16:17:29 2016 +0000 MIPS: Add M6250 cases to CPU switch statements Add casses supporting the M6250 CPU to various switch statements in the core MIPS kernel code that define behaviour dependent upon the CPU. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Joshua Kinard <kumba@gentoo.org> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Maciej W. Rozycki <macro@codesourcery.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12374/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-type.h | 4 ++++ arch/mips/mm/c-r4k.c | 1 + 2 files changed, 5 insertions(+) commit df8b1a5ee9f7f5fbb5e8f0df9537c648481019ea Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 16:17:28 2016 +0000 MIPS: Add M6250 PRID & cpu_type_enum values Define the processor ID for the M6250 CPU and add a value to the enum cpu_type_enum for the core. [ralf@linux-mips.org: Fix merge conflict.] Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Joshua Kinard <kumba@gentoo.org> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12373/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit eba20a3a37ff9fe8a4ae99f108ee4ce52db61247 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:26:39 2016 +0000 MIPS: Probe the P6600 core Support probing the P6600 core now that cases for handling it have been added throughout the core MIPS kernel code. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12344/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cpu-probe.c | 4 ++++ 1 file changed, 4 insertions(+) commit 1091bfa20b94ba14a3c8a3eaf3a5b9d3df975da2 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:26:38 2016 +0000 MIPS: Add P6600 cases to CPU switch statements Add cases supporting the P6600 CPU to various switch statements in core MIPS kernel code that define behaviour dependent upon the CPU. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Joshua Kinard <kumba@gentoo.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Petri Gynther <pgynther@google.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12343/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-type.h | 1 + arch/mips/kernel/cpu-probe.c | 1 + arch/mips/kernel/perf_event_mipsxx.c | 6 ++++++ arch/mips/kernel/spram.c | 1 + arch/mips/kernel/traps.c | 1 + arch/mips/mm/c-r4k.c | 1 + arch/mips/mm/sc-mips.c | 1 + 7 files changed, 12 insertions(+) commit 5cd0d5beef2bf34e3ec850aa75637e73fd8f5f82 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:26:37 2016 +0000 MIPS: Add P6600 PRID & cpu_type_enum values Define the processor ID for the P6600 core and add a value to the enum cpu_type_enum for the core. [ralf@linux-mips.org: Fix merge conflict.] Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Joshua Kinard <kumba@gentoo.org> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12342/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit bff3d472b82300274cac16007d76a70d67c7a643 Author: Ralf Baechle <ralf@linux-mips.org> Date: Fri Mar 25 00:41:58 2016 +0100 MIPS: <asm/cpu.h>: Reformat to 80 columns. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit d4594b2763f2cb5bc13ca05e312a389d15462cdf Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 12:06:35 2016 +0000 MIPS: SEAD3 can support MIPS32r6 CPUs There are CPUs/bitfiles available for use with SEAD3 boards which implement release 6 of the MIPS architecture. Allow building the kernel for such a system. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12372/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 6609ccdc852f7bfbfa54300dd5b3cd89eb4ced6f Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:35 2016 +0000 MIPS: smp-cps: Stop printing EJTAG exceptions to UART When CONFIG_MIPS_CPS_NS16550 is enabled, some register state is dumped to the UART when an exception is taken via the BEV on secondary cores. EJTAG exceptions are architecturally expected to be handled by the BEV even when Status.BEV is 0. This effectively means that if userland executes an sdbbp instruction on a secondary core then the kernel dumps register state to the UART even though the exception is perfectly normal & expected. Prevent this by simply not dumping information to the UART for EJTAG exceptions. Fixes: 609cf6f2291a ("MIPS: CPS: Early debug using an ns16550-compatible UART") Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12341/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cps-vec.S | 1 - 1 file changed, 1 deletion(-) commit 6422a913856716be080dba4c2cb9d083d4e244ed Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:34 2016 +0000 MIPS: smp-cps: Add nothreads kernel parameter When debugging a new system or core it can be useful to disable the use of multithreading. Introduce a "nothreads" kernel command line parameter that can be set in order to do so. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Niklas Cassel <niklas.cassel@axis.com> Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12340/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/smp-cps.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 5a3e7c02d84fd31e6a2b1b242612363b6131a09e Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:33 2016 +0000 MIPS: smp-cps: Support MIPSr6 Virtual Processors Introduce support for bringing up Virtual Processors in MIPSr6 systems as CPUs, much like their VPE parallel from the now-deprecated MT ASE. The existing mips_cps_boot_vpes function fits the MIPSr6 architecture pretty well - it can now simply write the mask of running VPs to the VC_RUN register, rather than looping through each & starting or stopping as appropriate as is done for VPEs from the MT ASE. Thus the VP support is in general an extension & simplification of the existing MT ASE VPE (aka SMVP) support. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Niklas Cassel <niklas.cassel@axis.com> Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12339/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 2 +- arch/mips/include/asm/cpu-info.h | 4 +-- arch/mips/kernel/cps-vec.S | 53 ++++++++++++++++++++++++++++++++++++++-- arch/mips/kernel/smp-cps.c | 35 +++++++++++++++++++++++--- 4 files changed, 85 insertions(+), 9 deletions(-) commit 87a70bcdb41008decfcf7c217e26b0bcd7f52642 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:32 2016 +0000 MIPS: smp-cps: Skip core setup if coherent In preparation for supporting MIPSr6 multithreading (ie. VPs) which will begin execution from the core reset vector, skip core level setup if the core is already coherent. This is never the case when a core is first started, since boot_core explicitly clears the cores GCR_Cx_COH_EN register, and always the case when secondary VPs start since the first VP to start will have enabled coherence after initialising the core & its caches. One notable side effect of this patch is that eva_init gets called slightly earlier, prior to mips_cps_core_init rather than after it. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12338/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cps-vec.S | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) commit f12401d7219f5a1e361ded834016e5777a10262b Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:31 2016 +0000 MIPS: smp-cps: Pull boot config retrieval out of mips_cps_boot_vpes The mips_cps_boot_vpes function previously included code to retrieve pointers to the core & VPE boot configuration structs. These structures were used both by mips_cps_boot_vpes and by its mips_cps_core_entry callsite. In preparation for skipping the call to mips_cps_boot_vpes on some invocations of mips_cps_core_entry, pull the calculation of those pointers out into a separate function such that it can continue to be shared. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Niklas Cassel <niklas.cassel@axis.com> Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12337/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/smp-cps.h | 2 +- arch/mips/kernel/cps-vec.S | 74 +++++++++++++++++++++++++---------------- arch/mips/kernel/smp-cps.c | 7 ++-- 3 files changed, 52 insertions(+), 31 deletions(-) commit 3dbc9971618ba0e88f25f2168aa5731b53af6f0b Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:30 2016 +0000 MIPS: smp-cps: Pull cache init into a function In preparation for further modifications to mips_cps_core_entry, pull the L1 cache initialisation out into a separate function. This both makes the code in mips_cps_core_entry read more clearly, particularly when modifying it, and shortens it which will become important as code is added that needs to continue to fit within the reset vector. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12336/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/cps-vec.S | 143 ++++++++++++++++++++++++--------------------- 1 file changed, 76 insertions(+), 67 deletions(-) commit ba1c0a490a1fa61971b1cf9dd89acc7b4424e798 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:29 2016 +0000 MIPS: smp-cps: Ensure our VP ident calculation is correct When bringing up a CPU, ensure that its local ID as provided by the GIC matches up with our calculation of it. This is vital, since if the condition doesn't hold then we won't have configured interrupts correctly for the VP. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Niklas Cassel <niklas.cassel@axis.com> Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12335/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/smp-cps.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit 835d2b452969820fd67a755a2c01fb6e12822448 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:28 2016 +0000 irqchip: mips-gic: Provide VP ID accessor Provide a gic_read_local_vp_id() function to read the VCNUM field of the GICs local VP_IDENT register. This will be used by a further patch to check that the value reported by the GIC matches up with the kernels calculation. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Cc: Andrew Bresticker <abrestic@chromium.org> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: James Hogan <james.hogan@imgtec.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12334/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/irqchip/irq-mips-gic.c | 8 ++++++++ include/linux/irqchip/mips-gic.h | 17 +++++++++++++++++ 2 files changed, 25 insertions(+) commit d46812bb0bef04efa4e6cba677ba54c2e4f1ae59 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:27 2016 +0000 irqchip: mips-gic: Use HW IDs for VPE_OTHER_ADDR The Linux CPU number doesn't necessarily match up with the ID used for a VP by hardware. Convert the CPU number to the HW ID using mips_cm_vp_id when writing to the VP(E)_OTHER_ADDR register in order to ensure that we correctly access registers for the VPs of secondary cores. This most notably affects systems using CM3, such as those based around I6400. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Cc: Marc Zyngier <marc.zyngier@arm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12333/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> drivers/irqchip/irq-mips-gic.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit a60ae81e5e5918138703f22427dd8f2445985b55 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:26 2016 +0000 MIPS: CM: Fix mips_cm_max_vp_width for UP kernels Fix mips_cm_max_vp_width for UP kernels where it previously referenced smp_num_siblings, which is not declared for UP kernels. This led to build errors such as the following: drivers/built-in.o: In function `$L446': irq-mips-gic.c:(.text+0x1994): undefined reference to `smp_num_siblings' drivers/built-in.o:irq-mips-gic.c:(.text+0x199c): more undefined references to `smp_num_siblings' follow On UP kernels simply return 1, leaving the reference to smp_num_siblings in place only for SMP kernels. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12332/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mips-cm.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit db8e00af7b4a09ef5924140c1c42494fc88204ef Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:25 2016 +0000 MIPS: CM: Add CM GCR_BEV_BASE accessors Generate accessor functions for the GCR_BEV_BASE register introduced by CM3, for use by a later patch. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12331/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mips-cm.h | 1 + 1 file changed, 1 insertion(+) commit 88036557bac3c831a564dcd6c860da48ae55756f Author: Markos Chandras <markos.chandras@imgtec.com> Date: Wed Feb 3 03:15:24 2016 +0000 MIPS: CPC: Add start, stop and running CM3 CPC registers Add the new CM3 registers for controlling bringing up and powering down VPs on MIPSR6 cores. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12330/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/mips-cpc.h | 3 +++ 1 file changed, 3 insertions(+) commit 0f2a1484487407390196ca5b3c3a07bee6df15ad Author: Markos Chandras <markos.chandras@imgtec.com> Date: Wed Feb 3 03:15:23 2016 +0000 MIPS: pm-cps: Avoid offset overflow on MIPSr6 This is similar to commit 934c79231c1b ("MIPS: asm: r4kcache: Add MIPS R6 cache unroll functions"). The CACHE instruction has been redefined for MIPSr6 and it reduced its offset field to 8 bits. This leads to micro-assembler field overflow warnings when booting SMP MIPSr6 cores like the following one: Call Trace: [<ffffffff8010af88>] show_stack+0x68/0x88 [<ffffffff8056ddf0>] dump_stack+0x68/0x88 [<ffffffff801305bc>] warn_slowpath_common+0x8c/0xc8 [<ffffffff80130630>] warn_slowpath_fmt+0x38/0x48 [<ffffffff80125814>] build_insn+0x514/0x5c0 [<ffffffff806ee134>] cps_gen_cache_routine.isra.3+0xe0/0x1b8 [<ffffffff806ee570>] cps_pm_init+0x364/0x9ec [<ffffffff80100538>] do_one_initcall+0x90/0x1a8 [<ffffffff806e8c14>] kernel_init_freeable+0x160/0x21c [<ffffffff8056b6a0>] kernel_init+0x10/0xf8 [<ffffffff801059f8>] ret_from_kernel_thread+0x14/0x1c We fix this by incrementing the base register on every loop. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12329/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/pm-cps.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 04d83f948510f17f8f2ab320b2386f4b5fbd0bd4 Author: Markos Chandras <markos.chandras@imgtec.com> Date: Wed Feb 3 03:15:22 2016 +0000 MIPS: traps: Make sure secondary cores have a sane ebase register We shouldn't trust that the secondary cores will have a sane ebase register (either from the bootloader or during the hardware design phase) so use the ebase address as calculated by the boot CPU. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: James Hogan <james.hogan@imgtec.com> Cc: Petri Gynther <pgynther@google.com> Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12328/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/traps.c | 7 +++++++ 1 file changed, 7 insertions(+) commit f270d881fa552c9c21c37417af2bf95da9a74347 Author: Paul Burton <paul.burton@imgtec.com> Date: Wed Feb 3 03:15:21 2016 +0000 MIPS: Detect MIPSr6 Virtual Processor support MIPSr6 introduces support for "Virtual Processors", which are conceptually similar to VPEs from the now-deprecated MT ASE. Detect whether the system supports VPs using the VP bit in Config5, adding cpu_has_vp for use by later patches. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Maciej W. Rozycki <macro@imgtec.com> Cc: Joshua Kinard <kumba@gentoo.org> Cc: Steven J. Hill <sjhill@realitydiluted.com> Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12327/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu-features.h | 4 ++++ arch/mips/include/asm/cpu.h | 1 + arch/mips/include/asm/mipsregs.h | 1 + arch/mips/kernel/cpu-probe.c | 2 ++ 4 files changed, 8 insertions(+) commit 98c1c5078deba1feb9c040eb7708a299e41a8d84 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:25 2016 +0300 MIPS: ath79: add initial support for DPT-Module The following features are supported: * UART; * SPI-flash; * USB host; * GPIO key and LED. Links: * https://dptechnics.com/shop/index.php?route=product/product&path=59&product_id=50 * https://dptechnics.com/shop/index.php?route=product/product&path=59&product_id=63 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Daan Pape <daan@dptechnics.com> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12886/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/qca/Makefile | 1 + arch/mips/boot/dts/qca/ar9331_dpt_module.dts | 78 ++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) commit f40aec27ea9943c01db34ef95317768073e8d118 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:24 2016 +0300 devicetree: add DPTechnics vendor id Please see https://www.dptechnics.com/contact for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Daan Pape <daan@dptechnics.com> Cc: devicetree@vger.kernel.org Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12885/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 930c54ff39fcbe988c2eecf1ae52764c780fe893 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:23 2016 +0300 MIPS: ath79: add initial support for Onion Omega The following features are supported: * UART; * SPI-flash; * USB host; * GPIO key and LED. Please see https://onion.io/omega for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Alban Bedel <albeu@free.fr> Cc: L. D. Pinney <ldpinney@gmail.com> Cc: Boken Lin <bl@onion.io> Cc: Jacky Huang <huangfangcheng@163.com> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12884/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/qca/Makefile | 1 + arch/mips/boot/dts/qca/ar9331_omega.dts | 78 +++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) commit e454cc4943c9e7e0d46ef78c368dc0a630e02461 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:22 2016 +0300 devicetree: add Onion Corporation vendor id Please see https://onion.io/contact for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12883/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 3b9ec1b32585438eddd6ec28029fd9620213027d Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:21 2016 +0300 MIPS: ath79: add initial support for Dragino MS14 (Dragino 2) The following features are supported: * UART; * SPI-flash; * USB host; * GPIO keys and LEDs. Links: * http://www.dragino.com/products/mother-board/item/71-ms14-p.html * https://wiki.openwrt.org/toh/dragino/ms14 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Alban Bedel <albeu@free.fr> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12882/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/qca/Makefile | 1 + arch/mips/boot/dts/qca/ar9331_dragino_ms14.dts | 102 +++++++++++++++++++++++++ 2 files changed, 103 insertions(+) commit 4d536731f8169477ed0f908c9bc30a3a997841de Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:20 2016 +0300 devicetree: add Dragino vendor id Please see http://www.dragino.com/about/about.html for details. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12881/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 2c3694d2e6ead3964aafb31e4e529de219ced92b Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:19 2016 +0300 MIPS: ath79: add initial support for TP-LINK MR3020 The following features are supported: * UART; * SPI-flash; * USB host; * GPIO keys and LEDs. Links: * http://www.tp-link.com/en/products/details/?model=TL-MR3020 * http://wiki.openwrt.org/toh/tp-link/tl-mr3020 * https://wikidevi.com/wiki/TP-LINK_TL-MR3020 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Alban Bedel <albeu@free.fr> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12880/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/qca/Makefile | 1 + arch/mips/boot/dts/qca/ar9331_tl_mr3020.dts | 118 ++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) commit 5ae5c452e3361612cd8182eb8bdfecf0ebf42288 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:18 2016 +0300 MIPS: ath79: update devicetree clock support for AR9331 Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Alban Bedel <albeu@free.fr> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: linux-clk@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12879/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/clock.c | 96 +++++++++++++++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 34 deletions(-) commit 1e6a3492e7bb12aa8ee26050ff6829c39ebaa152 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:17 2016 +0300 MIPS: dts: qca: introduce AR9331 devicetree This patch introduces devicetree for Atheros AR9331 SoC (AKA Hornet). The AR9331 chip is a Wi-Fi System-On-Chip (WiSOC), typically used in very cheap Access Points and Routers. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Alban Bedel <albeu@free.fr> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12878/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/qca/ar9331.dtsi | 155 +++++++++++++++++++++++++++++++++++++ 1 file changed, 155 insertions(+) commit f4fe969d7f43d92505b09adad2ae93ccaa453ae0 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:16 2016 +0300 MIPS: ath79: Disable platform code for OF boards. For OF boards we have to skip platform initialization code so we can prove that OF code do all necessary initialization. [ralf@linux-mips.org: Fix merge conflict.] Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Reviewed-by: Marek Vasut <marex@denx.de> Cc: Alban Bedel <albeu@free.fr> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12877/ Patchwork: https://patchwork.linux-mips.org/patch/12920/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/setup.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 3bdf1071ba7de08c55a5cce54964ded7c0c8540d Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:15 2016 +0300 MIPS: ath79: update devicetree clock support for AR9132 Current ath79 clock.c code does not read reference clock and pll setup from devicetree. E.g. you can set any clock rate value in board DTS but it will have no effect on the real clk calculation. This patch fixes some AR9132 devicetree clock support defects: * clk initialization function ath79_clocks_init_dt_ng() is introduced; it actually gets pll block base register address and reference clock from devicetree; * pll register parsing code is moved to the separate ar724x_clk_init() function; this function can be called from platform code or from devicetree code. Also mips_hpt_frequency value is set from dt, so the appropriate clock parameter is added to the cpu@0 devicetree node. The same approach can be used for adding AR9331 devicetree support. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Alban Bedel <albeu@free.fr> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: linux-clk@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12876/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/clock.c | 96 ++++++++++++++++++++++++++++---------- arch/mips/ath79/setup.c | 36 ++++++++++++++ arch/mips/boot/dts/qca/ar9132.dtsi | 1 + 3 files changed, 108 insertions(+), 25 deletions(-) commit af5ad0de22480a452049e0e942b10af77ef60530 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:14 2016 +0300 MIPS: ath79: Introduce <dt-bindings/clock/ath79-clk.h> The include/dt-bindings/clock/ath79-clk.h header file is introduced so we can use symbolic identifiers for SoC clocks. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: Alban Bedel <albeu@free.fr> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: linux-mips@linux-mips.org Cc: linux-clk@vger.kernel.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12875/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/clock.c | 33 +++++++++++++++++---------------- arch/mips/boot/dts/qca/ar9132.dtsi | 8 +++++--- include/dt-bindings/clock/ath79-clk.h | 19 +++++++++++++++++++ 3 files changed, 41 insertions(+), 19 deletions(-) commit 83fe838466ec9bfcba4f477656cb9a67172d2c29 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:12 2016 +0300 MIPS: dts: qca: ar9132: use short references for dt nodes Here are some Sascha Hauer's arguments for using aliases in the dts files: - using aliases reduces the number of indentations in dts files; - dts files become independent of the layout of the dtsi files (it becomes possible to introduce another bus {} hierarchy between a toplevel bus and the devices when you have to); - less chances for typos. if &i2c2 does not exist you get an error. If instead you duplicate the whole path in the dts file a typo in the path will just create another node. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Cc: Alban Bedel <albeu@free.fr> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Rob Herring <robh+dt@kernel.org> Cc: Frank Rowand <frowand.list@gmail.com> Cc: Grant Likely <grant.likely@linaro.org> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12873/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/qca/ar9132.dtsi | 8 +- arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts | 94 ++++++++++++------------ 2 files changed, 49 insertions(+), 53 deletions(-) commit 2cdfec1bbb0a093836f6a471ca15e4e26f8b6401 Author: Antony Pavlov <antonynpavlov@gmail.com> Date: Thu Mar 17 06:34:11 2016 +0300 MIPS: dts: qca: ar9132_tl_wr1043nd_v1.dts: drop unused alias node The TP-LINK TL-WR1043ND board has only one serial port, so replacing the default of 0 with 0 does nothing useful. Moreover, the correct name for aliases node is "aliases" not "alias". An overview of the "aliases" node usage can be found on the device tree usage page at devicetree.org [1]. Also please see chapter 3.3 ("Aliases node") of the ePAPR 1.1 [2]. [1] http://devicetree.org/Device_Tree_Usage#aliases_Node [2] https://www.power.org/documentation/epapr-version-1-1/ Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Acked-by: Alban Bedel <albeu@free.fr> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12872/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/qca/ar9132_tl_wr1043nd_v1.dts | 4 ---- 1 file changed, 4 deletions(-) commit e791dfb5fb91c05ce027d147042c5061d0f5cf89 Author: Hauke Mehrtens <hauke@hauke-m.de> Date: Sat Mar 19 18:28:52 2016 +0100 MIPS: Lantiq: Make it possible to build in no device tree Now it is possible to build in no device tree at all and depend on the boot loader providing one or someone concatenating a device tree to the end of the image. This was copied from arch/mips/bmips/Kconfig Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: John Crispin <john@phrozen.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12899/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/lantiq/Kconfig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) commit 84f47cf49e3c8348f4a0a04e8fa2404f1e2722cc Author: Hauke Mehrtens <hauke@hauke-m.de> Date: Sat Mar 19 18:28:51 2016 +0100 MIPS: Lantiq: Add support for device tree file from boot loader This fetches the device tree file like it is specified in the MIPS UHI interface if one was found. This is also used when the device tree file was appended to the kernel image with cat. This code is copied from arch/mips/bmips/setup.c. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: John Crispin <john@phrozen.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12898/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/lantiq/prom.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 842c1e2c4aaa94ec314d2b0f6595cfb85f42b09d Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Tue Mar 8 23:32:27 2016 +0200 MIPS: Octeon: Add DTS for EdgeRouter Lite Add DTS for EdgeRouter Lite that is usable as is without any "pruning" with APPENDED_DTB. Compared to builtin generic DTB, we can avoid errors and delays from probing non-existent I2C devices. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/boot/dts/cavium-octeon/ubnt_e100.dts | 59 ++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) commit fa0a497b9e13cd3c494dbbb93b156752fd15fdd2 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Tue Mar 8 23:32:26 2016 +0200 MIPS: Octeon: Add DTS for D-Link DSR-1000N Add DTS for D-Link DSR-1000N that is usable as is without any "pruning" with APPENDED_DTB. Split out the common parts from octeon_3xxx.dts into octeon_3xxx.dtsi. Compared to builtin generic DTB, we can specificy fixed links properly and avoid probing non-existent I2C devices. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Daney <ddaney.cavm@gmail.com> Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12840/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> .../boot/dts/cavium-octeon/dlink_dsr-1000n.dts | 78 +++++++ arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dts | 205 +----------------- arch/mips/boot/dts/cavium-octeon/octeon_3xxx.dtsi | 231 +++++++++++++++++++++ 3 files changed, 312 insertions(+), 202 deletions(-) commit 99a7a234c890177c4d4f2b0fb02317ef19c364a2 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Wed Mar 9 22:08:42 2016 +0200 MIPS: panic immediately when panic_on_oops MIPS wants to sleep 5 seconds before panicking when panic_on_oops is set, with no apparent reason. Remove this feature, since some users may want their systems to fail as quickly as possible. Users who want to delay reboot after panic can use PANIC_TIMEOUT. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: James E.J. Bottomley <jejb@parisc-linux.org> Cc: Helge Deller <deller@gmx.de> Cc: linux-mips@linux-mips.org Cc: linux-parisc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12845/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/kernel/traps.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2ab71a02c56f8244ac611b5c6e6603c6fe83b966 Author: Rafał Miłecki <zajec5@gmail.com> Date: Mon Jan 25 09:50:29 2016 +0100 MIPS: BCM47xx: Move SPROM driver to drivers/firmware/ Broadcom ARM home routers store SPROM content in NVRAM just like MIPS ones. To share SPROM code we need to move it out of arch/mips/ to some common place. We already have bcm47xx_nvram in firmware path and SPROM should fit there as well. This driver is responsible for parsing SoC configuration data into a struct shared between ssb and bcma buses. This was tested with BCM4706 & BCM5357C0 (BCM47XX) and BCM4708A0 (ARCH_BCM_5301X). Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12210/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 1 + arch/mips/bcm47xx/Makefile | 2 +- arch/mips/bcm47xx/bcm47xx_private.h | 3 - arch/mips/bcm47xx/setup.c | 2 +- arch/mips/bcm47xx/sprom.c | 724 ----------------------------- drivers/firmware/broadcom/Kconfig | 11 + drivers/firmware/broadcom/Makefile | 1 + drivers/firmware/broadcom/bcm47xx_sprom.c | 737 ++++++++++++++++++++++++++++++ include/linux/bcm47xx_sprom.h | 24 + 9 files changed, 776 insertions(+), 729 deletions(-) commit b11d022767f78357f08bc3d548e99af1c6cf7808 Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Thu Feb 25 10:45:47 2016 +0100 MIPS: ralink: Make reset_control_ops const The reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: John Crispin <john@phrozen.org> Cc: linux-mips@linux-mips.org Cc: kernel@pengutronix.de Patchwork: https://patchwork.linux-mips.org/patch/12618/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ralink/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 24bc827beb2b0dea026015914924aede9c278a90 Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Thu Feb 25 10:45:46 2016 +0100 MIPS: lantiq: Make reset_control_ops const The reset_ops structure is never modified. Make it const. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Acked-by: John Crispin <john@phrozen.org> Cc: linux-mips@linux-mips.org Cc: kernel@pengutronix.de Patchwork: https://patchwork.linux-mips.org/patch/12619/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/lantiq/xway/reset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 2296cecf719caad9bcda3c8b82830fe3736ffa90 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Wed Feb 24 00:52:07 2016 +0200 MIPS: Octeon: device_tree_init: fill mac addresses when using appended dtb Fill MAC addresses from bootinfo when using appended DTB. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12590/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/setup.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 377de399a1ad191b1c67aca99cfbc65061639f07 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Wed Feb 24 00:52:06 2016 +0200 MIPS: Octeon: device_tree_init: don't fill mac if already set Don't fill MAC address if it's already set. This allows DTB to override the bootinfo. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12589/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/octeon-platform.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit 43349b9e4bb008a2fb7e92de53fe2aa1ccf8ea24 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Wed Feb 24 00:52:05 2016 +0200 MIPS: Octeon: device_tree_init: use separate pass to fill mac addresses Use separate pass to fill MAC addresses. This is needed because we want to do this also for the appended DTB. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Acked-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12588/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/octeon-platform.c | 86 +++++++++++++++++++++++++------ arch/mips/cavium-octeon/setup.c | 2 + 2 files changed, 72 insertions(+), 16 deletions(-) commit 1a1590ab1a4a0898fe0a6809e5bcd7c225e3b4d6 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Tue Feb 23 00:22:57 2016 +0200 MIPS: Octeon: Use model string from DTB for unknown board type Use model string from DTB for board type if the board is unknown. This is more informative, e.g. with EdgeRouter Pro the /proc/cpuinfo will display "ubnt,e200 (CN6120p1.1-1000-NSP)" instead of misleading "Unsupported Board". Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Daney <ddaney.cavm@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12582/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/setup.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 8f2068bc9e875540b5fb372294095833651ea1e2 Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Tue Feb 23 00:22:56 2016 +0200 MIPS: Octeon: Initialize system type string after device tree init. Initialize system type string after device tree init. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Daney <ddaney.cavm@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12583/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/setup.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 6ecffafe242ec6d2789631499452c54177f0bb4c Author: Aaro Koskinen <aaro.koskinen@iki.fi> Date: Tue Feb 23 00:22:55 2016 +0200 MIPS: Octeon: board_type_to_string: return NULL for unsupported board Return NULL for unsupported board. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Cc: David Daney <ddaney.cavm@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12581/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/setup.c | 9 +++++++-- arch/mips/include/asm/octeon/cvmx-bootinfo.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) commit 490f7548cfce36b63ec517a8ff7382287db86c29 Author: David Daney <david.daney@cavium.com> Date: Tue Feb 9 11:00:13 2016 -0800 MIPS: OCTEON: Simplify code in octeon_irq_ciu_gpio_set_type() Use the trigger type passed in to the function instead of reading it back out of the irq_data. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12501/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/octeon-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c6d2b22eb5211e96e932428bc1183c6ad57d5e54 Author: David Daney <david.daney@cavium.com> Date: Tue Feb 9 11:00:12 2016 -0800 MIPS: OCTEON: Add SMP support for OCTEON cn78xx et al. OCTEON chips with the CIU3 interrupt controller use a different IPI mechanism that previous models. Add plat_smp_ops for the cn78xx and probing code to choose between the two types of ops. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12499/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/setup.c | 4 +- arch/mips/cavium-octeon/smp.c | 145 +++++++++++++++++++++++++++++++--- arch/mips/include/asm/octeon/octeon.h | 6 ++ 3 files changed, 139 insertions(+), 16 deletions(-) commit ce210d35bb93c2c5c8857878123275ecdcfd7018 Author: David Daney <david.daney@cavium.com> Date: Tue Feb 9 11:00:11 2016 -0800 MIPS: OCTEON: Add support for OCTEON III interrupt controller. Add irq_chip support for both IPI and "normal" interrupts of the CIU3 controller. Document the device tree binding for the CIU3. Some functions are non-static as they will be used by follow-on support for MSI-X. Signed-off-by: David Daney <david.daney@cavium.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Rob Herring <robh+dt@kernel.org> Cc: Pawel Moll <pawel.moll@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Ian Campbell <ijc+devicetree@hellion.org.uk> Cc: Kumar Gala <galak@codeaurora.org> Cc: devicetree@vger.kernel.org Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12500/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> .../devicetree/bindings/mips/cavium/ciu3.txt | 27 + arch/mips/cavium-octeon/octeon-irq.c | 650 ++++++++++++++++++++- arch/mips/include/asm/octeon/octeon.h | 19 + 3 files changed, 695 insertions(+), 1 deletion(-) commit 9bc22239956e3877d085b843bfe89ab2a98ab50a Author: David Daney <david.daney@cavium.com> Date: Tue Feb 9 11:00:10 2016 -0800 MIPS: OCTEON: Don't attempt to use nonexistent registers on OCTEON III models. Attempts to read the nonexistent registers results in bus errors. Either use registers that exist, or don't do the access as appropriate. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12502/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/csrc-octeon.c | 13 +++++++++---- arch/mips/cavium-octeon/setup.c | 34 +++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 17 deletions(-) commit 182a6d1cd393226350ec22d973d2139adb194daa Author: David Daney <david.daney@cavium.com> Date: Tue Feb 9 11:00:09 2016 -0800 MIPS: OCTEON: Add model checking support for cn73xx, cnf75xx and cn78xx Follow on patchs need to be able to distinguish the new models. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12498/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/executive/octeon-model.c | 82 +++++++++++++++++++++++- arch/mips/include/asm/octeon/cvmx.h | 27 +++++++- arch/mips/include/asm/octeon/octeon-feature.h | 19 +++++- arch/mips/include/asm/octeon/octeon-model.h | 5 ++ 4 files changed, 125 insertions(+), 8 deletions(-) commit 2df11221bdc32f62ff1d8b6b945a8b19bf2a681c Author: David Daney <david.daney@cavium.com> Date: Tue Feb 9 11:00:08 2016 -0800 MIPS: OCTEON: Add register definitions for cn73xx, cnf75xx and cn78xx. These new members of the OCTEON III family have some new registers, update some of the definitions for use in follow on patches. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12497/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/octeon/cvmx-ciu3-defs.h | 353 ++++++++++++++++++++++ arch/mips/include/asm/octeon/cvmx-fpa-defs.h | 1 + arch/mips/include/asm/octeon/cvmx-mio-defs.h | 410 +++++++++++++++++++++++++- 3 files changed, 748 insertions(+), 16 deletions(-) commit 1d2753a66acbb101a0ec495cd13b9031ac1b171f Author: David Daney <david.daney@cavium.com> Date: Tue Feb 9 11:00:07 2016 -0800 MIPS: Select CONFIG_HANDLE_DOMAIN_IRQ and make it work. Per the subject, always select HANDLE_DOMAIN_IRQ, and implement set_irq_regs() so that it actually works. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12496/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 1 + arch/mips/include/asm/irq_regs.h | 10 ++++++++++ 2 files changed, 11 insertions(+) commit 2253e0b9d991e82210dd08c89bf91584ad25f993 Author: David Daney <david.daney@cavium.com> Date: Tue Feb 9 11:00:06 2016 -0800 MIPS: OCTEON: Remove some code limiting NR_IRQS to 255 Follow-on patches for OCTEON III will increase the number of irqs to potentially more than 256. Increase the width of the octeon_irq_ciu_to_irq to int to be able to handle this case. Remove the hacky code that verified that u8 would not be overflowed. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12495/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/octeon-irq.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) commit 7d52ab163c75bb830185f7ea12bae1db87f12b56 Author: David Daney <david.daney@cavium.com> Date: Mon Feb 1 17:46:54 2016 -0800 MIPS: OCTEON: Extend number of supported CPUs past 32 To support more than 48 CPUs, the bootinfo structure grows a new coremask structure. Add the definition of the structure and add it to struct cvmx_bootinfo. In prom_init(), copy the new coremask data into the sysinfo structure, and use it in smp_setup(). Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12319/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/setup.c | 19 +++++- arch/mips/cavium-octeon/smp.c | 4 +- arch/mips/include/asm/octeon/cvmx-bootinfo.h | 14 ++++- arch/mips/include/asm/octeon/cvmx-coremask.h | 89 ++++++++++++++++++++++++++++ arch/mips/include/asm/octeon/cvmx-sysinfo.h | 7 ++- 5 files changed, 125 insertions(+), 8 deletions(-) commit 58546e3b735cc9f695bba1559be76a68b072761f Author: David Daney <david.daney@cavium.com> Date: Mon Feb 1 17:46:53 2016 -0800 MIPS: OCTEON: Remove dead code from cvmx-sysinfo. Get rid of the long unused code. Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12318/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/executive/cvmx-sysinfo.c | 72 ++---------------------- arch/mips/include/asm/octeon/cvmx-sysinfo.h | 30 +--------- 2 files changed, 5 insertions(+), 97 deletions(-) commit b8c8f665076604762fd15eb815f2fd75eb511b2e Author: David Daney <david.daney@cavium.com> Date: Mon Feb 1 14:43:41 2016 -0800 MIPS: Add CPU identifiers and probing for Cavium CN73xx and CNF75xx processors. Add new processor identifiers for Cavium CN73xx and CNF75xx processors, and probe for them in cpu-probe.c Signed-off-by: David Daney <david.daney@cavium.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/12311/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/cpu.h | 2 ++ arch/mips/kernel/cpu-probe.c | 2 ++ 2 files changed, 4 insertions(+) commit 34ae8e3688fb8af2afaf52b78c6f20c74c6ae650 Author: Ralf Baechle <ralf@linux-mips.org> Date: Thu Jan 28 14:26:00 2016 +0100 MIPS: highmem: Turn flush_cache_kmaps into a no-op. It was calling flush_cache_all() which is a no-op since a long time anyway and which was overkill in the old days when it was actually doing something because only the D-cache needs to be flushed, never the I-cache, never the S-cache. Since however highmem on MIPS is still only supported on processors that don't suffer from cache aliases, we could turn flush_cache_kmaps() into a no-op - but for paranoia's sake we rather make it BUG_ON(cpu_has_dc_aliases()). Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/include/asm/highmem.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit 429365b2a1a90b593a730f54819a4c5dfd98553b Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Jan 27 19:02:12 2016 +0100 MIPS: Loongson64: Remove call to flush_cache_all(). flush_cache_all() is a nop and loongson 3 is fully coherent. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/loongson64/loongson-3/smp.c | 1 - 1 file changed, 1 deletion(-) commit a48ac3a131c1675de4c8293f59f6864db2a83240 Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Jan 27 18:39:33 2016 +0100 MIPS: VR41xx: Use __flush_cache_all instead of flush_cache_all. It's probably a good idea to flush caches before reset and by the time this code was written flush_cache_all did actually still do something. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/vr41xx/common/pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c8196fd43e41e7b699d2f7a54bafd10dd2f65bb Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Jan 27 18:16:15 2016 +0100 MIPS: MSP71xx: Use __flush_cache_all instead of flush_cache_all. Flushing caches is probably sensible on reset but flush_cache_all has been a no-op for a very long time. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/pmcs-msp71xx/msp_setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9329c154e4a8a253347829c1d8cc416061cc055a Author: Ralf Baechle <ralf@linux-mips.org> Date: Wed Jan 27 18:07:00 2016 +0100 MIPS: Octeon: Use __flush_cache_all instead of flush_cache_all. flush_cache_all will go away. Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/cavium-octeon/smp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 81424d0ad0d41f05049aac6d4959d17a5a3c69c8 Author: Alban Bedel <albeu@free.fr> Date: Tue Jan 26 09:39:30 2016 +0100 MIPS: ath79: Use the reset controller to restart OF machines Don't set _machine_restart() on OF machines as the reset driver now provides a system restart handler. Signed-off-by: Alban Bedel <albeu@free.fr> Cc: Felix Fietkau <nbd@openwrt.org> Cc: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12235/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/setup.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit b3f0a250d6eda645cee719cc11ea70e28f62145c Author: Alban Bedel <albeu@free.fr> Date: Tue Jan 26 09:38:29 2016 +0100 MIPS: ath79: Add zboot debug serial support Reuse the early printk code to support the serial in zboot. We copy early_printk.c instead of referencing it because we need to build a different object file for the normal kernel and zboot. Signed-off-by: Alban Bedel <albeu@free.fr> Cc: Andrew Bresticker <abrestic@chromium.org> Cc: Alex Smith <alex.smith@imgtec.com> Cc: Wu Zhangjin <wuzhangjin@gmail.com> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12234/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/Kconfig | 2 +- arch/mips/boot/compressed/Makefile | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) commit ea3a7085bfa85ad52118822df73123b7e7056dab Author: Alban Bedel <albeu@free.fr> Date: Tue Jan 26 08:27:16 2016 +0100 MIPS: ath79: Remove the builtin DTB support Now that appended DTB is usable we can drop the builtin DTB support. Signed-off-by: Alban Bedel <albeu@free.fr> Cc: Felix Fietkau <nbd@openwrt.org> Cc: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12231/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/Kconfig | 12 ------------ arch/mips/ath79/setup.c | 4 ---- arch/mips/boot/dts/qca/Makefile | 3 --- 3 files changed, 19 deletions(-) commit 8f4d4d1bfb47014f324309781917e4fd3eb6a316 Author: Alban Bedel <albeu@free.fr> Date: Tue Jan 26 08:27:15 2016 +0100 MIPS: ath79: Add support for DTB passed using the UHI boot protocol This is needed for bootloader supporting UHI and to support appended DTB. Signed-off-by: Alban Bedel <albeu@free.fr> Cc: Felix Fietkau <nbd@openwrt.org> Cc: Antony Pavlov <antonynpavlov@gmail.com> Cc: Gabor Juhos <juhosg@openwrt.org> Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Patchwork: https://patchwork.linux-mips.org/patch/12230/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org> arch/mips/ath79/setup.c | 2 ++ 1 file changed, 2 insertions(+) commit 4afd0565552c87f23834db9121dd9cf6955d0b43 Author: Mateusz Guzik <mguzik@redhat.com> Date: Tue May 10 22:56:43 2016 +0200 x86/arch_prctl/64: Restore accidentally removed put_cpu() in ARCH_SET_GS This fixes an oversight in: 731e33e39a5b95 ("Remove FSBASE/GSBASE < 4G optimization") Signed-off-by: Mateusz Guzik <mguzik@redhat.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Link: http://lkml.kernel.org/r/1462913803-29634-1-git-send-email-mguzik@redhat.com Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/kernel/process_64.c | 1 + 1 file changed, 1 insertion(+) commit a53dd258279c1e8bff205e3273a285bdd4b87406 Author: Andy Lutomirski <luto@kernel.org> Date: Wed May 11 16:57:47 2016 -0700 efifb: Don't show the mapping VA The framebuffer mapping virtual address leaks information about the kernel memory layout. Stop logging it. Cc: Peter Jones <pjones@redhat.com> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Peter Jones <pjones@redhat.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/video/fbdev/efifb.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9e9daa0a67d59df432664cdca1cf4659057fd00c Author: Wadim Egorov <w.egorov@phytec.de> Date: Tue May 10 15:18:55 2016 +0200 regulator: rk808: Migrate to regulator core's simplified DT parsing code A common simplified DT parsing code for regulators was introduced in commit a0c7b164ad11 ("regulator: of: Provide simplified DT parsing method") While at it also added RK8XX_DESC and RK8XX_DESC_SWITCH macros for the regulator_desc struct initialization. This just makes the driver more compact. Signed-off-by: Wadim Egorov <w.egorov@phytec.de> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/rk808-regulator.c | 250 ++++++++++++------------------------ 1 file changed, 79 insertions(+), 171 deletions(-) commit 027db2e122db81b055a2b569d72f2f1d29c4d007 Author: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Date: Tue May 3 14:14:00 2016 +0200 ASoC: fsl_ssi: Fix channel slipping on capture (or playback) restart in full duplex. Happened when the Playback (or Capture) is running continuously and Capture (or Playback) is restarted (xrun, manual stop/start...) Since the RX (or TX) FIFO are only reset when the whole SSI is disabled, pending samples from previous capture (or playback) session may still be present. They must be erased to not introduce channel slipping. FIFO Clear register fields are documented in IMX51, IMX35 reference manual. They are not documented in IMX50 or IMX6 RM, despite they are working as expected on IMX6SL and IMX6solo. Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Caleb Crome <caleb@crome.org> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_ssi.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) commit 61fcf10a0ee44763e0347b297a377137f8950772 Author: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Date: Tue May 3 14:13:59 2016 +0200 ASoC: fsl_ssi: Fix channel slipping in Playback at startup Previously, SCR.SSIEN and SCR.TE were enabled at once if no capture stream was also running. This may not give a chance for the DMA to write the first sample in TX FIFO before the streaming starts on the PCM bus, inserting void samples first. Those void samples are then responsible for slipping the channels. Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Caleb Crome <caleb@crome.org> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_ssi.c | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) commit d9f2a202877c15818d98268f47d6b4bcfcb84437 Author: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Date: Tue May 3 14:13:58 2016 +0200 ASoC: fsl_ssi: Fix samples being dropped at Playback startup If the capture is already running while playback is started, it is highly probable (>80% in a 8 channels scenario) that samples are lost between the DMA and TX fifo. The reason is that SIER.TDMAE is set before STCR.TFEN0, leaving a time window where the FIFO doesn't receive the samples written by the DMA. This particular case happened only if capture is already enabled as SCR.SSIEN is already set at the playback startup instant. Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Caleb Crome <caleb@crome.org> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_ssi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0096b693962d3abde4f41b13cf03c765f33e9d8d Author: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Date: Tue May 3 14:13:57 2016 +0200 ASoC: fsl_ssi: Save a dev reference for dev_err() purpose. Most of functions only receive the ssi_private reference and don't have a knowledge of 'dev' pointer, even for debug purpose. Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Tested-by: Caleb Crome <caleb@crome.org> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_ssi.c | 2 ++ 1 file changed, 2 insertions(+) commit e09745f2e6a1f692fc63db01850aacf025475aad Author: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Date: Tue May 3 14:13:56 2016 +0200 ASoC: fsl_ssi: The IPG/5 limitation concerns the bitclk, not the sysclk. im6sl reference manual 47.7.4: " Bit clock - Used to serially clock the data bits in and out of the SSI port. This clock is either generated internally (from SSI's sys clock) or taken from external clock source (through the Tx/Rx clock ports). [...] Care should be taken to ensure that the bit clock frequency (either internally generated by dividing the SSI's sys clock or sourced from external device through Tx/Rx clock ports) is never greater than 1/5 of the ipg_clk (from CCM) frequency. " Since, in master mode, the sysclk is a multiple of bitclk, we can easily reach a high sysclk value, whereas keeping a reasonable bitclk. ex: 8ch x 16bit x 48kHz = 6144000, requires a 24576000 sysclk (PM=1) yet ipg_clk/5 = 66Mhz/5 = 13.2 Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Caleb Crome <caleb@crome.org> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_ssi.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) commit 48a260eec301fd7a112d1737ca2755d91558a349 Author: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Date: Tue May 3 14:13:55 2016 +0200 ASoC: fsl_ssi: Real hardware channels max number is 32 The max number of slots in TDM mode is 32: - Frame Rate Divider Control is a 5bit value - Time slot mask registers control 32 slots. Signed-off-by: Arnaud Mouiche <arnaud.mouiche@invoxia.com> Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com> Tested-by: Caleb Crome <caleb@crome.org> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/fsl/fsl_ssi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2213fc350841e99598e52232b56add7b873529a0 Author: Jeremy McDermond <nh6z@nh6z.net> Date: Wed May 11 12:09:53 2016 -0700 ASoC: tlv320aic32x4: Properly implement the positive and negative pins into the mixers The TLV320AIC32x4 has a very flexible mixer on the inputs to the ADCs. Each mixer has an available set of available pins that can be connected to the ADC positive and negative pins via three different resistor values. This allows for configuration of differential inputs as well as doing level manipulation between sources going into the mixers. The current code only provides positive pins and I implemented the resistors in an earlier patch. It turns out that it appears to more accurately model what's happening to implement each of the pins as a MUX rather than on/off switches and a mixer. This way each pin can be set to its desired resistor value. Since there are no switches, the mixer is no longer necessary in the DAPM path. I set the DAPM paths such that the "off" position of any of the MUXes turns the path off. This should allow for any input confiuration available on the codec. Signed-off-by: Jeremy McDermond <nh6z@nh6z.net> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/tlv320aic32x4.c | 210 ++++++++++++++++++++++++++++++--------- 1 file changed, 161 insertions(+), 49 deletions(-) commit 21825ff11d683fa2fc0f5668cc2ec0a0652ee64b Author: Purna Chandra Mandal <purna.mandal@microchip.com> Date: Fri May 13 14:12:53 2016 +0530 spi: pic32-sqi: Fix linker error, undefined reference to `bad_dma_ops'. Even if DMA support is disabled code using DMA mapping APIs compiles fine, but fails in linking. ------- drivers/built-in.o: In function `ring_desc_ring_free': spi-pic32-sqi.c:(.text+0x2cfbe0): undefined reference to `bad_dma_ops' spi-pic32-sqi.c:(.text+0x2cfbe4): undefined reference to `bad_dma_ops' drivers/built-in.o: In function `pic32_sqi_probe': spi-pic32-sqi.c:(.text+0x2cfe48): undefined reference to `bad_dma_ops' spi-pic32-sqi.c:(.text+0x2cfeb0): undefined reference to `bad_dma_ops' spi-pic32-sqi.c:(.text+0x2cff38): undefined reference to `bad_dma_ops' -------- Correct dependency by adding 'depends on HAS_DMA' in Kconfig. Signed-off-by: Purna Chandra Mandal <purna.mandal@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 97d3ddd71fbf663a5da52897757333341a8b254f Author: Florian Meier <florian.meier@koalo.de> Date: Fri May 13 09:14:12 2016 +0000 ASoC: pcm5102a: Add support for PCM5102A codec Some definitions to support the PCM5102A codec by Texas Instruments. Signed-off-by: Florian Meier <florian.meier@koalo.de> Changes to original patch by Florian Meier: * rebased (Makefile and Kconfig * fixed checkpath errors (spaces, newlines) * added dt-binding documentation Signed-off-by: Martin Sperl <kernel@martin.sperl.org> Signed-off-by: Mark Brown <broonie@kernel.org> .../devicetree/bindings/sound/pcm5102a.txt | 13 ++++ sound/soc/codecs/Kconfig | 4 ++ sound/soc/codecs/Makefile | 2 + sound/soc/codecs/pcm5102a.c | 69 ++++++++++++++++++++++ 4 files changed, 88 insertions(+) commit b2047e996cd88d36eb0f4e84fe6aedab831a4b31 Author: Vinod Koul <vinod.koul@intel.com> Date: Thu May 12 08:58:55 2016 +0530 ASoC: hdac_hdmi: add link management Manage the hda idisp link using shiny new link APIs. We need to keep link On while we probe and also hold the reference in runtime resume and drop in suspend Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/hdac_hdmi.c | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) commit cce6c149eba3aabf678ffea91ac1e4103b9c185e Author: Vinod Koul <vinod.koul@intel.com> Date: Thu May 12 08:58:54 2016 +0530 ASoC: Intel: Skylake: add link management Use shiny new link APIs to manage the links. Also remove old link configuration logic from driver. We need to keep link and cmd dma to off during active suspend to allow system to enter low power state and turn it on if the link and cmd dma was on before active suspend in active resume. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/skylake/skl-pcm.c | 1 - sound/soc/intel/skylake/skl.c | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) commit 4446085d21e75dd6c0c45577f12db0bd7c7bf35f Author: Vinod Koul <vinod.koul@intel.com> Date: Thu May 12 08:58:53 2016 +0530 ALSA: hdac: add link pm and ref counting The HDA links can be switched off when not is use, similarly command DMA can be stopped as well. This calls for a reference counting mechanism on the link by it's users to manage the link power. The DMA can be turned off when all links are off For this we add two APIs snd_hdac_ext_bus_link_get snd_hdac_ext_bus_link_put They help users to turn up/down link and manage the DMA as well Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/hdaudio_ext.h | 13 ++++++++ sound/hda/ext/hdac_ext_bus.c | 3 ++ sound/hda/ext/hdac_ext_controller.c | 66 +++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) commit 40027b2fffc2dcef20080847b0913d210ef3ced0 Author: Peter Griffin <peter.griffin@linaro.org> Date: Wed May 11 17:21:59 2016 +0100 i2c: st: Implement bus clear >From I2C specifications: http://www.nxp.com/documents/user_manual/UM10204.pdf Chapter 3.1.16, when the i2c device held the SDA line low, the master should send 9 clocks pulses to try to recover. Signed-off-by: Frederic Pillon <frederic.pillon@st.com> Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/busses/i2c-st.c | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) commit 3a9ddaf4dca87f86f70b88d7710da20abfc9aca1 Author: Wolfram Sang <wsa@the-dreams.de> Date: Thu May 12 11:25:19 2016 +0200 i2c: only check scl functions when using generic recovery A custom recovery function doesn't need these pointers to be populated because it may work differently internally. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Tested-by: Peter Griffin <peter.griffin@linaro.org> drivers/i2c/i2c-core.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit d7e1633abf9b1cc198bb673a59a01a3767f16b94 Merge: 14717e2 b1a4286 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Fri May 13 11:48:22 2016 +0200 Merge branch 'kvm-ppc-next' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc into HEAD commit d4ab78d7076d2a58a2d690b2f4a03a24d978ac1c Merge: 2a2cd52 267c858 6e4f287 Author: Mark Brown <broonie@kernel.org> Date: Fri May 13 10:36:14 2016 +0100 Merge remote-tracking branches 'regmap/topic/doc' and 'regmap/topic/flat' into regmap-next commit 256b1cfb9a346bb4808cd27b7b8f9b120f96491e Author: Tadeusz Struk <tadeusz.struk@intel.com> Date: Wed May 11 13:21:29 2016 -0700 crypto: qat - change the adf_ctl_stop_devices to void Change the adf_ctl_stop_devices to a void function. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/qat/qat_common/adf_ctl_drv.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit ba16db36b5dd6a0f053ba7d50745f29678b4ca8f Author: Kedareswara rao Appana <appana.durga.rao@xilinx.com> Date: Fri May 13 12:33:31 2016 +0530 dmaengine: vdma: Add clock support Added basic clock support for axi dma's. The clocks are requested at probe and released at remove. Reviewed-by: Shubhrajyoti Datta <shubhraj@xilinx.com> Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/xilinx/xilinx_vdma.c | 226 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 224 insertions(+), 2 deletions(-) commit 4ac4e120677481277e092c5f44cb781266e7853e Author: Kedareswara rao Appana <appana.durga.rao@xilinx.com> Date: Fri May 13 12:33:30 2016 +0530 Documentation: DT: vdma: Add clock support for dmas This patch updates the binding doc with clock description for AXI DMA's. Acked-by: Rob Herring <robh@kernel.org> Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> .../devicetree/bindings/dma/xilinx/xilinx_vdma.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit fb2366675ec2221241bea83dc4ec57ed33ce3dcd Author: Kedareswara rao Appana <appana.durga.rao@xilinx.com> Date: Fri May 13 12:33:29 2016 +0530 dmaengine: vdma: Add config structure to differentiate dmas This patch adds config structure in the driver to differentiate AXI DMA's and to add more features(clock support etc..) to these DMA's. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/xilinx/xilinx_vdma.c | 83 ++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 32 deletions(-) commit 86e486a098b6251e3931ca04b7078aa037bfe5ad Author: Jon Hunter <jonathanh@nvidia.com> Date: Thu May 12 18:02:24 2016 +0100 MAINTAINERS: Update Tegra DMA maintainers Update the Tegra DMA driver maintainer field to include the newly added Tegra210 ADMA and add Jon Hunter as a co-maintainer for Tegra DMA. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> MAINTAINERS | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit f46b195799b5cb05338e7c44cb3617eacb56d755 Author: Jon Hunter <jonathanh@nvidia.com> Date: Thu May 12 18:02:23 2016 +0100 dmaengine: tegra-adma: Add support for Tegra210 ADMA Add support for the Tegra210 Audio DMA controller that is used for transferring data between system memory and the Audio sub-system. The driver only supports cyclic transfers because this is being solely used for audio. This driver is based upon the work by Dara Ramesh <dramesh@nvidia.com>. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/Kconfig | 14 + drivers/dma/Makefile | 1 + drivers/dma/tegra210-adma.c | 840 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 855 insertions(+) commit f4cb295ba6b3f95ea988dcf8ed8c39d249bfde21 Author: Jon Hunter <jonathanh@nvidia.com> Date: Thu May 12 18:02:22 2016 +0100 Documentation: DT: Add binding documentation for NVIDIA ADMA Add device-tree binding documentation for the Tegra210 Audio DMA controller. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> .../bindings/dma/nvidia,tegra210-adma.txt | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) commit ed7cbbce544856b20e5811de373cf92e92499771 Author: Alexander Duyck <aduyck@mirantis.com> Date: Thu May 12 16:23:44 2016 -0700 udp: Resolve NULL pointer dereference over flow-based vxlan device While testing an OpenStack configuration using VXLANs I saw the following call trace: RIP: 0010:[<ffffffff815fad49>] udp4_lib_lookup_skb+0x49/0x80 RSP: 0018:ffff88103867bc50 EFLAGS: 00010286 RAX: ffff88103269bf00 RBX: ffff88103269bf00 RCX: 00000000ffffffff RDX: 0000000000004300 RSI: 0000000000000000 RDI: ffff880f2932e780 RBP: ffff88103867bc60 R08: 0000000000000000 R09: 000000009001a8c0 R10: 0000000000004400 R11: ffffffff81333a58 R12: ffff880f2932e794 R13: 0000000000000014 R14: 0000000000000014 R15: ffffe8efbfd89ca0 FS: 0000000000000000(0000) GS:ffff88103fd80000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000000000488 CR3: 0000000001c06000 CR4: 00000000001426e0 Stack: ffffffff81576515 ffffffff815733c0 ffff88103867bc98 ffffffff815fcc17 ffff88103269bf00 ffffe8efbfd89ca0 0000000000000014 0000000000000080 ffffe8efbfd89ca0 ffff88103867bcc8 ffffffff815fcf8b ffff880f2932e794 Call Trace: [<ffffffff81576515>] ? skb_checksum+0x35/0x50 [<ffffffff815733c0>] ? skb_push+0x40/0x40 [<ffffffff815fcc17>] udp_gro_receive+0x57/0x130 [<ffffffff815fcf8b>] udp4_gro_receive+0x10b/0x2c0 [<ffffffff81605863>] inet_gro_receive+0x1d3/0x270 [<ffffffff81589e59>] dev_gro_receive+0x269/0x3b0 [<ffffffff8158a1b8>] napi_gro_receive+0x38/0x120 [<ffffffffa0871297>] gro_cell_poll+0x57/0x80 [vxlan] [<ffffffff815899d0>] net_rx_action+0x160/0x380 [<ffffffff816965c7>] __do_softirq+0xd7/0x2c5 [<ffffffff8107d969>] run_ksoftirqd+0x29/0x50 [<ffffffff8109a50f>] smpboot_thread_fn+0x10f/0x160 [<ffffffff8109a400>] ? sort_range+0x30/0x30 [<ffffffff81096da8>] kthread+0xd8/0xf0 [<ffffffff81693c82>] ret_from_fork+0x22/0x40 [<ffffffff81096cd0>] ? kthread_park+0x60/0x60 The following trace is seen when receiving a DHCP request over a flow-based VXLAN tunnel. I believe this is caused by the metadata dst having a NULL dev value and as a result dev_net(dev) is causing a NULL pointer dereference. To resolve this I am replacing the check for skb_dst(skb)->dev with just skb->dev. This makes sense as the callers of this function are usually in the receive path and as such skb->dev should always be populated. In addition other functions in the area where these are called are already using dev_net(skb->dev) to determine the namespace the UDP packet belongs in. Fixes: 63058308cd55 ("udp: Add udp6_lib_lookup_skb and udp4_lib_lookup_skb") Signed-off-by: Alexander Duyck <aduyck@mirantis.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv4/udp.c | 10 ++-------- net/ipv6/udp.c | 8 +++----- 2 files changed, 5 insertions(+), 13 deletions(-) commit b4411457d5c9062f07f0762f1ddb513d90dd1379 Author: Eric Dumazet <edumazet@google.com> Date: Thu May 12 21:41:39 2016 -0700 sunrpc: set SOCK_FASYNC sunrpc is using SOCKWQ_ASYNC_NOSPACE without setting SOCK_FASYNC, so the recent optimizations done in sk_set_bit() and sk_clear_bit() broke it. There is still the risk that a subsequent sock_fasync() call would clear SOCK_FASYNC, but sunrpc does not use this yet. Fixes: 9317bb69824e ("net: SOCKWQ_ASYNC_NOSPACE optimizations") Signed-off-by: Eric Dumazet <edumazet@google.com> Reported-by: Jiri Pirko <jiri@resnulli.us> Reported-by: Huang, Ying <ying.huang@intel.com> Tested-by: Jiri Pirko <jiri@resnulli.us> Tested-by: Huang, Ying <ying.huang@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/sunrpc/xprtsock.c | 3 +++ 1 file changed, 3 insertions(+) commit 12735f881952c32b31bc4e433768f18489f79ec9 Author: Jan Kara <jack@suse.cz> Date: Fri May 13 00:51:15 2016 -0400 ext4: pre-zero allocated blocks for DAX IO Currently ext4 treats DAX IO the same way as direct IO. I.e., it allocates unwritten extents before IO is done and converts unwritten extents afterwards. However this way DAX IO can race with page fault to the same area: ext4_ext_direct_IO() dax_fault() dax_io() get_block() - allocates unwritten extent copy_from_iter_pmem() get_block() - converts unwritten block to written and zeroes it out ext4_convert_unwritten_extents() So data written with DAX IO gets lost. Similarly dax_new_buf() called from dax_io() can overwrite data that has been already written to the block via mmap. Fix the problem by using pre-zeroed blocks for DAX IO the same way as we use them for DAX mmap. The downside of this solution is that every allocating write writes each block twice (once zeros, once data). Fixing the race with locking is possible as well however we would need to lock-out faults for the whole range written to by DAX IO. And that is not easy to do without locking-out faults for the whole file which seems too aggressive. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu> fs/ext4/ext4.h | 11 +++++++++-- fs/ext4/file.c | 4 ++-- fs/ext4/inode.c | 43 +++++++++++++++++++++++++++++++++---------- 3 files changed, 44 insertions(+), 14 deletions(-) commit 914f82a32d026884743fb3de9f6f0a5908a9d5dd Author: Jan Kara <jack@suse.cz> Date: Fri May 13 00:44:16 2016 -0400 ext4: refactor direct IO code Currently ext4 direct IO handling is split between ext4_ext_direct_IO() and ext4_ind_direct_IO(). However the extent based function calls into the indirect based one for some cases and for example it is not able to handle file extending. Previously it was not also properly handling retries in case of ENOSPC errors. With DAX things would get even more contrieved so just refactor the direct IO code and instead of indirect / extent split do the split to read vs writes. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu> fs/ext4/ext4.h | 2 - fs/ext4/indirect.c | 127 --------------------------------------------------- fs/ext4/inode.c | 131 ++++++++++++++++++++++++++++++++++++++++++++++------- 3 files changed, 114 insertions(+), 146 deletions(-) commit dbc427ce4028580f1244b5b57ca1cbea31aad1e7 Author: Jan Kara <jack@suse.cz> Date: Fri May 13 00:42:40 2016 -0400 ext4: fix race in transient ENOSPC detection When there are blocks to free in the running transaction, block allocator can return ENOSPC although the filesystem has some blocks to free. We use ext4_should_retry_alloc() to force commit of the current transaction and return whether anything was committed so that it makes sense to retry the allocation. However the transaction may get committed after block allocation fails but before we call ext4_should_retry_alloc(). So ext4_should_retry_alloc() returns false because there is nothing to commit and we wrongly return ENOSPC. Fix the race by unconditionally returning 1 from ext4_should_retry_alloc() when we tried to commit a transaction. This should not add any unnecessary retries since we had a transaction running a while ago when trying to allocate blocks and we want to retry the allocation once that transaction has committed anyway. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu> fs/ext4/balloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 7cb476f834d0dc2092e04eeafe9cbe509f6380eb Author: Jan Kara <jack@suse.cz> Date: Fri May 13 00:38:16 2016 -0400 ext4: handle transient ENOSPC properly for DAX ext4_dax_get_blocks() was accidentally omitted fixing get blocks handlers to properly handle transient ENOSPC errors. Fix it now to use ext4_get_blocks_trans() helper which takes care of these errors. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu> fs/ext4/inode.c | 75 +++++++++++++++------------------------------------------ 1 file changed, 20 insertions(+), 55 deletions(-) commit aef39ab1534d1a07061e0ee7e428499e127232eb Author: Jan Kara <jack@suse.cz> Date: Fri May 13 00:38:15 2016 -0400 dax: call get_blocks() with create == 1 for write faults to unwritten extents Currently, __dax_fault() does not call get_blocks() callback with create argument set, when we got back unwritten extent from the initial get_blocks() call during a write fault. This is because originally filesystems were supposed to convert unwritten extents to written ones using complete_unwritten() callback. Later this was abandoned in favor of using pre-zeroed blocks however the condition whether get_blocks() needs to be called with create == 1 remained. Fix the condition so that filesystems are not forced to zero-out and convert unwritten extents when get_blocks() is called with create == 0 (which introduces unnecessary overhead for read faults and can be problematic as the filesystem may possibly be read-only). Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu> fs/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5035cd5b666b7378e32e1985225aae5746a59ac9 Author: Vineet Gupta <vgupta@synopsys.com> Date: Tue May 3 14:53:40 2016 +0530 ARC: pae: STRICT_MM_TYPECHECKS was broken Signed-off-by: Vineet Gupta <vgupta@synopsys.com> arch/arc/include/asm/page.h | 4 ++++ 1 file changed, 4 insertions(+) commit c8b6056a504fa384f36e7577fc5a1c1684fcf18a Author: Andreas Gruenbacher <agruenba@redhat.com> Date: Fri Apr 22 14:43:49 2016 +0200 jfs: Switch to generic xattr handlers This is mostly the same as on other filesystems except for attribute names with an "os2." prefix: for those, the prefix is not stored on disk, and on-attribute names without a prefix have "os2." added. As on several other filesystems, the underlying function for setting/removing xattrs (__jfs_setxattr) removes attributes when the value is NULL, so the set xattr handlers will work as expected. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/jfs/file.c | 6 +- fs/jfs/jfs_xattr.h | 6 +- fs/jfs/namei.c | 6 +- fs/jfs/symlink.c | 12 ++-- fs/jfs/xattr.c | 170 ++++++++++++++++++++++------------------------------- 5 files changed, 84 insertions(+), 116 deletions(-) commit 6c8f980c75185f8ba897814363d21882f7453f53 Author: Andreas Gruenbacher <agruenba@redhat.com> Date: Fri Apr 22 14:43:48 2016 +0200 jfs: Clean up xattr name mapping Instead of stripping "os2." prefixes in __jfs_setxattr, make callers strip them, as __jfs_getxattr already does. With that change, use the same name mapping function in jfs_{get,set,remove}xattr. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/jfs/xattr.c | 80 ++++++++++++++++++---------------------------------------- 1 file changed, 25 insertions(+), 55 deletions(-) commit 1a39ba99b5d533647c5dac45cd6a3e0baa7cb66a Author: Al Viro <viro@zeniv.linux.org.uk> Date: Fri May 13 03:59:17 2016 +0200 gfs2: Switch to generic xattr handlers Switch to the generic xattr handlers and take the necessary glocks at the layer below. The following are the new xattr "entry points"; they are called with the glock held already in the following cases: gfs2_xattr_get: From SELinux, during lookups. gfs2_xattr_set: The glock is never held. gfs2_get_acl: From gfs2_create_inode -> posix_acl_create and gfs2_setattr -> posix_acl_chmod. gfs2_set_acl: From gfs2_setattr -> posix_acl_chmod. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/gfs2/acl.c | 58 ++++++++++++++++++++++++++++++++-------- fs/gfs2/acl.h | 1 + fs/gfs2/inode.c | 82 ++++++++------------------------------------------------- fs/gfs2/xattr.c | 46 +++++++++++++++++++++++++++----- 4 files changed, 99 insertions(+), 88 deletions(-) commit cf15fabd6f66e966ae5744f088538f7936df9a4d Merge: 7d02067 227e4f4 Author: Dave Airlie <airlied@redhat.com> Date: Fri May 13 11:48:01 2016 +1000 Merge tag 'drm/panel/for-4.7-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/panel: Changes for v4.7-rc1 This contains support for a bunch of new panels in the simple panel driver along with some cleanup and support for a new Analogix HDMI to DP bridge. * tag 'drm/panel/for-4.7-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: simple: Add support for TPK U.S.A. LLC Fusion 7" and 10.1" panels drm/bridge: Add Analogix anx78xx support devicetree: Add ANX7814 SlimPort transmitter binding of: Add vendor prefix for Analogix Semiconductor drm/dp: Add define to set 0.5% down-spread in MAX_DOWNSPREAD register drm/panel: simple: Add support for Innolux AT070TN92 drm/panel: simple: Remove useless drm_mode_set_name() drm/panel: simple: Set appropriate mode type drm/panel: simple: Add timings for the Olimex LCD-OLinuXino-4.3TS drm/panel: simple: Add the 7" DPI panel from Adafruit of: Add vendor prefix for On Tat Industrial Company. commit 5f9a8a51d8b95505d8de8b7191ae2ed8c504d4af Author: Filipe Manana <fdmanana@suse.com> Date: Thu May 12 13:53:36 2016 +0100 Btrfs: add semaphore to synchronize direct IO writes with fsync Due to the optimization of lockless direct IO writes (the inode's i_mutex is not held) introduced in commit 38851cc19adb ("Btrfs: implement unlocked dio write"), we started having races between such writes with concurrent fsync operations that use the fast fsync path. These races were addressed in the patches titled "Btrfs: fix race between fsync and lockless direct IO writes" and "Btrfs: fix race between fsync and direct IO writes for prealloc extents". The races happened because the direct IO path, like every other write path, does create extent maps followed by the corresponding ordered extents while the fast fsync path collected first ordered extents and then it collected extent maps. This made it possible to log file extent items (based on the collected extent maps) without waiting for the corresponding ordered extents to complete (get their IO done). The two fixes mentioned before added a solution that consists of making the direct IO path create first the ordered extents and then the extent maps, while the fsync path attempts to collect any new ordered extents once it collects the extent maps. This was simple and did not require adding any synchonization primitive to any data structure (struct btrfs_inode for example) but it makes things more fragile for future development endeavours and adds an exceptional approach compared to the other write paths. This change adds a read-write semaphore to the btrfs inode structure and makes the direct IO path create the extent maps and the ordered extents while holding read access on that semaphore, while the fast fsync path collects extent maps and ordered extents while holding write access on that semaphore. The logic for direct IO write path is encapsulated in a new helper function that is used both for cow and nocow direct IO writes. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/btrfs_inode.h | 10 ++++ fs/btrfs/inode.c | 134 +++++++++++++++++++------------------------------ fs/btrfs/tree-log.c | 51 ++++++------------- 3 files changed, 77 insertions(+), 118 deletions(-) commit f78c436c3931e7df713688028f2b4faf72bf9f2a Author: Filipe Manana <fdmanana@suse.com> Date: Mon May 9 13:15:41 2016 +0100 Btrfs: fix race between block group relocation and nocow writes Relocation of a block group waits for all existing tasks flushing dellaloc, starting direct IO writes and any ordered extents before starting the relocation process. However for direct IO writes that end up doing nocow (inode either has the flag nodatacow set or the write is against a prealloc extent) we have a short time window that allows for a race that makes relocation proceed without waiting for the direct IO write to complete first, resulting in data loss after the relocation finishes. This is illustrated by the following diagram: CPU 1 CPU 2 btrfs_relocate_block_group(bg X) direct IO write starts against an extent in block group X using nocow mode (inode has the nodatacow flag or the write is for a prealloc extent) btrfs_direct_IO() btrfs_get_blocks_direct() --> can_nocow_extent() returns 1 btrfs_inc_block_group_ro(bg X) --> turns block group into RO mode btrfs_wait_ordered_roots() --> returns and does not know about the DIO write happening at CPU 2 (the task there has not created yet an ordered extent) relocate_block_group(bg X) --> rc->stage == MOVE_DATA_EXTENTS find_next_extent() --> returns extent that the DIO write is going to write to relocate_data_extent() relocate_file_extent_cluster() --> reads the extent from disk into pages belonging to the relocation inode and dirties them --> creates DIO ordered extent btrfs_submit_direct() --> submits bio against a location on disk obtained from an extent map before the relocation started btrfs_wait_ordered_range() --> writes all the pages read before to disk (belonging to the relocation inode) relocation finishes bio completes and wrote new data to the old location of the block group So fix this by tracking the number of nocow writers for a block group and make sure relocation waits for that number to go down to 0 before starting to move the extents. The same race can also happen with buffered writes in nocow mode since the patch I recently made titled "Btrfs: don't do unnecessary delalloc flushes when relocating", because we are no longer flushing all delalloc which served as a synchonization mechanism (due to page locking) and ensured the ordered extents for nocow buffered writes were created before we called btrfs_wait_ordered_roots(). The race with direct IO writes in nocow mode existed before that patch (no pages are locked or used during direct IO) and that fixed only races with direct IO writes that do cow. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/ctree.h | 13 +++++++++++++ fs/btrfs/extent-tree.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ fs/btrfs/inode.c | 15 +++++++++++++- fs/btrfs/relocation.c | 1 + 4 files changed, 81 insertions(+), 1 deletion(-) commit 0b901916a00bc7b14ee83cc8e41c3b0d561a8f22 Author: Filipe Manana <fdmanana@suse.com> Date: Mon May 9 13:15:27 2016 +0100 Btrfs: fix race between fsync and direct IO writes for prealloc extents When we do a direct IO write against a preallocated extent (fallocate) that does not go beyond the i_size of the inode, we do the write operation without holding the inode's i_mutex (an optimization that landed in commit 38851cc19adb ("Btrfs: implement unlocked dio write")). This allows for a very tiny time window where a race can happen with a concurrent fsync using the fast code path, as the direct IO write path creates first a new extent map (no longer flagged as a prealloc extent) and then it creates the ordered extent, while the fast fsync path first collects ordered extents and then it collects extent maps. This allows for the possibility of the fast fsync path to collect the new extent map without collecting the new ordered extent, and therefore logging an extent item based on the extent map without waiting for the ordered extent to be created and complete. This can result in a situation where after a log replay we end up with an extent not marked anymore as prealloc but it was only partially written (or not written at all), exposing random, stale or garbage data corresponding to the unwritten pages and without any checksums in the csum tree covering the extent's range. This is an extension of what was done in commit de0ee0edb21f ("Btrfs: fix race between fsync and lockless direct IO writes"). So fix this by creating first the ordered extent and then the extent map, so that this way if the fast fsync patch collects the new extent map it also collects the corresponding ordered extent. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> fs/btrfs/inode.c | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) commit 5062af35c3c6e49110ab1ec99295339259298a3d Author: Filipe Manana <fdmanana@suse.com> Date: Thu May 5 10:26:26 2016 +0100 Btrfs: fix number of transaction units for renames with whiteout When we do a rename with the whiteout flag, we need to create the whiteout inode, which in the worst case requires 5 transaction units (1 inode item, 1 inode ref, 2 dir items and 1 xattr if selinux is enabled). So bump the number of transaction units from 11 to 16 if the whiteout flag is set. Signed-off-by: Filipe Manana <fdmanana@suse.com> fs/btrfs/inode.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit 376e5a57bf7f1466031a957d04bf8b8f6801ee6d Author: Filipe Manana <fdmanana@suse.com> Date: Thu May 5 02:08:56 2016 +0100 Btrfs: pin logs earlier when doing a rename exchange operation The btrfs_rename_exchange() started as a copy-paste from btrfs_rename(), which had a race fixed by my previous patch titled "Btrfs: pin log earlier when renaming", and so it suffers from the same problem. We pin the logs of the affected roots after we insert the new inode references, leaving a time window where concurrent tasks logging the inodes can end up logging both the new and old references, resulting in log trees that when replayed can turn the metadata into inconsistent states. This behaviour was added to btrfs_rename() in 2009 without any explanation about why not pinning the logs earlier, just leaving a comment about the posibility for the race. As of today it's perfectly safe and sane to pin the logs before we start doing any of the steps involved in the rename operation. Signed-off-by: Filipe Manana <fdmanana@suse.com> fs/btrfs/inode.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 86e8aa0e772caba5f0e0471d5f836b2b997dcb3e Author: Filipe Manana <fdmanana@suse.com> Date: Thu May 5 02:02:27 2016 +0100 Btrfs: unpin logs if rename exchange operation fails If rename exchange operations fail at some point after we pinned any of the logs, we end up aborting the current transaction but never unpin the logs, which leaves concurrent tasks that are trying to sync the logs (as part of an fsync request from user space) blocked forever and preventing the filesystem from being unmountable. Fix this by safely unpinning the log. Signed-off-by: Filipe Manana <fdmanana@suse.com> fs/btrfs/inode.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) commit c990161888f387db136856337c237aa8d5003292 Author: Filipe Manana <fdmanana@suse.com> Date: Thu May 5 01:41:57 2016 +0100 Btrfs: fix inode leak on failure to setup whiteout inode in rename If we failed to fully setup the whiteout inode during a rename operation with the whiteout flag, we ended up leaking the inode, not decrementing its link count nor removing all its items from the fs/subvol tree. Signed-off-by: Filipe Manana <fdmanana@suse.com> fs/btrfs/inode.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) commit cdd1fedf8261cd7a73c0596298902ff4f0f04492 Author: Dan Fuhry <dfuhry@datto.com> Date: Thu Mar 17 15:23:38 2016 +0100 btrfs: add support for RENAME_EXCHANGE and RENAME_WHITEOUT Two new flags, RENAME_EXCHANGE and RENAME_WHITEOUT, provide for new behavior in the renameat2() syscall. This behavior is primarily used by overlayfs. This patch adds support for these flags to btrfs, enabling it to be used as a fully functional upper layer for overlayfs. RENAME_EXCHANGE support was written by Davide Italiano originally submitted on 2 April 2015. Signed-off-by: Davide Italiano <dccitaliano@gmail.com> Signed-off-by: Dan Fuhry <dfuhry@datto.com> [ remove unlikely ] Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> fs/btrfs/inode.c | 264 +++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 257 insertions(+), 7 deletions(-) commit c4aba9545430ed0f842d0833072f990a42da90f0 Author: Filipe Manana <fdmanana@suse.com> Date: Fri Apr 29 13:14:42 2016 +0100 Btrfs: pin log earlier when renaming We were pinning the log right after the first step in the rename operation (inserting inode ref for the new name in the destination directory) instead of doing it before. This behaviour was introduced in 2009 for some reason that was not mentioned neither on the changelog nor any comment, with the drawback of a small time window where concurrent log writers can end up logging the new inode reference for the inode we are renaming while the rename operation is in progress (so that we can end up with a log containing both the new and old references). As of today there's no reason to not pin the log before that first step anymore, so just fix this. Signed-off-by: Filipe Manana <fdmanana@suse.com> fs/btrfs/inode.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) commit 3dc9e8f76720fbbd9c56a11775932733fe13d214 Author: Filipe Manana <fdmanana@suse.com> Date: Fri Apr 29 11:34:22 2016 +0100 Btrfs: unpin log if rename operation fails If rename operations fail at some point after we pinned the log, we end up aborting the current transaction but never unpin the log, which leaves concurrent tasks that are trying to sync the log (as part of an fsync request from user space) blocked forever and preventing the filesystem from being unmountable. Fix this by safely unpinning the log. Signed-off-by: Filipe Manana <fdmanana@suse.com> fs/btrfs/inode.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) commit 9cfa3e34e20e6798a671236000d9e97c8aa5d318 Author: Filipe Manana <fdmanana@suse.com> Date: Tue Apr 26 15:39:32 2016 +0100 Btrfs: don't do unnecessary delalloc flushes when relocating Before we start the actual relocation process of a block group, we do calls to flush delalloc of all inodes and then wait for ordered extents to complete. However we do these flush calls just to make sure we don't race with concurrent tasks that have actually already started to run delalloc and have allocated an extent from the block group we want to relocate, right before we set it to readonly mode, but have not yet created the respective ordered extents. The flush calls make us wait for such concurrent tasks because they end up calling filemap_fdatawrite_range() (through btrfs_start_delalloc_roots() -> __start_delalloc_inodes() -> btrfs_alloc_delalloc_work() -> btrfs_run_delalloc_work()) which ends up serializing us with those tasks due to attempts to lock the same pages (and the delalloc flush procedure calls the allocator and creates the ordered extents before unlocking the pages). These flushing calls not only make us waste time (cpu, IO) but also reduce the chances of writing larger extents (applications might be writing to contiguous ranges and we flush before they finish dirtying the whole ranges). So make sure we don't flush delalloc and just wait for concurrent tasks that have already started flushing delalloc and have allocated an extent from the block group we are about to relocate. This change also ends up fixing a race with direct IO writes that makes relocation not wait for direct IO ordered extents. This race is illustrated by the following diagram: CPU 1 CPU 2 btrfs_relocate_block_group(bg X) starts direct IO write, target inode currently has no ordered extents ongoing nor dirty pages (delalloc regions), therefore the root for our inode is not in the list fs_info->ordered_roots btrfs_direct_IO() __blockdev_direct_IO() btrfs_get_blocks_direct() btrfs_lock_extent_direct() locks range in the io tree btrfs_new_extent_direct() btrfs_reserve_extent() --> extent allocated from bg X btrfs_inc_block_group_ro(bg X) btrfs_start_delalloc_roots() __start_delalloc_inodes() --> does nothing, no dealloc ranges in the inode's io tree so the inode's root is not in the list fs_info->delalloc_roots btrfs_wait_ordered_roots() --> does not find the inode's root in the list fs_info->ordered_roots --> ends up not waiting for the direct IO write started by the task at CPU 2 relocate_block_group(rc->stage == MOVE_DATA_EXTENTS) prepare_to_relocate() btrfs_commit_transaction() iterates the extent tree, using its commit root and moves extents into new locations btrfs_add_ordered_extent_dio() --> now a ordered extent is created and added to the list root->ordered_extents and the root added to the list fs_info->ordered_roots --> this is too late and the task at CPU 1 already started the relocation btrfs_commit_transaction() btrfs_finish_ordered_io() btrfs_alloc_reserved_file_extent() --> adds delayed data reference for the extent allocated from bg X relocate_block_group(rc->stage == UPDATE_DATA_PTRS) prepare_to_relocate() btrfs_commit_transaction() --> delayed refs are run, so an extent item for the allocated extent from bg X is added to extent tree --> commit roots are switched, so the next scan in the extent tree will see the extent item sees the extent in the extent tree When this happens the relocation produces the following warning when it finishes: [ 7260.832836] ------------[ cut here ]------------ [ 7260.834653] WARNING: CPU: 5 PID: 6765 at fs/btrfs/relocation.c:4318 btrfs_relocate_block_group+0x245/0x2a1 [btrfs]() [ 7260.838268] Modules linked in: btrfs crc32c_generic xor ppdev raid6_pq psmouse sg acpi_cpufreq evdev i2c_piix4 tpm_tis serio_raw tpm i2c_core pcspkr parport_pc [ 7260.850935] CPU: 5 PID: 6765 Comm: btrfs Not tainted 4.5.0-rc6-btrfs-next-28+ #1 [ 7260.852998] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [ 7260.852998] 0000000000000000 ffff88020bf57bc0 ffffffff812648b3 0000000000000000 [ 7260.852998] 0000000000000009 ffff88020bf57bf8 ffffffff81051608 ffffffffa03c1b2d [ 7260.852998] ffff8800b2bbb800 0000000000000000 ffff8800b17bcc58 ffff8800399dd000 [ 7260.852998] Call Trace: [ 7260.852998] [<ffffffff812648b3>] dump_stack+0x67/0x90 [ 7260.852998] [<ffffffff81051608>] warn_slowpath_common+0x99/0xb2 [ 7260.852998] [<ffffffffa03c1b2d>] ? btrfs_relocate_block_group+0x245/0x2a1 [btrfs] [ 7260.852998] [<ffffffff810516d4>] warn_slowpath_null+0x1a/0x1c [ 7260.852998] [<ffffffffa03c1b2d>] btrfs_relocate_block_group+0x245/0x2a1 [btrfs] [ 7260.852998] [<ffffffffa039d9de>] btrfs_relocate_chunk.isra.29+0x66/0xdb [btrfs] [ 7260.852998] [<ffffffffa039f314>] btrfs_balance+0xde1/0xe4e [btrfs] [ 7260.852998] [<ffffffff8127d671>] ? debug_smp_processor_id+0x17/0x19 [ 7260.852998] [<ffffffffa03a9583>] btrfs_ioctl_balance+0x255/0x2d3 [btrfs] [ 7260.852998] [<ffffffffa03ac96a>] btrfs_ioctl+0x11e0/0x1dff [btrfs] [ 7260.852998] [<ffffffff811451df>] ? handle_mm_fault+0x443/0xd63 [ 7260.852998] [<ffffffff81491817>] ? _raw_spin_unlock+0x31/0x44 [ 7260.852998] [<ffffffff8108b36a>] ? arch_local_irq_save+0x9/0xc [ 7260.852998] [<ffffffff811876ab>] vfs_ioctl+0x18/0x34 [ 7260.852998] [<ffffffff81187cb2>] do_vfs_ioctl+0x550/0x5be [ 7260.852998] [<ffffffff81190c30>] ? __fget_light+0x4d/0x71 [ 7260.852998] [<ffffffff81187d77>] SyS_ioctl+0x57/0x79 [ 7260.852998] [<ffffffff81492017>] entry_SYSCALL_64_fastpath+0x12/0x6b [ 7260.893268] ---[ end trace eb7803b24ebab8ad ]--- This is because at the end of the first stage, in relocate_block_group(), we commit the current transaction, which makes delayed refs run, the commit roots are switched and so the second stage will find the extent item that the ordered extent added to the delayed refs. But this extent was not moved (ordered extent completed after first stage finished), so at the end of the relocation our block group item still has a positive used bytes counter, triggering a warning at the end of btrfs_relocate_block_group(). Later on when trying to read the extent contents from disk we hit a BUG_ON() due to the inability to map a block with a logical address that belongs to the block group we relocated and is no longer valid, resulting in the following trace: [ 7344.885290] BTRFS critical (device sdi): unable to find logical 12845056 len 4096 [ 7344.887518] ------------[ cut here ]------------ [ 7344.888431] kernel BUG at fs/btrfs/inode.c:1833! [ 7344.888431] invalid opcode: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC [ 7344.888431] Modules linked in: btrfs crc32c_generic xor ppdev raid6_pq psmouse sg acpi_cpufreq evdev i2c_piix4 tpm_tis serio_raw tpm i2c_core pcspkr parport_pc [ 7344.888431] CPU: 0 PID: 6831 Comm: od Tainted: G W 4.5.0-rc6-btrfs-next-28+ #1 [ 7344.888431] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS by qemu-project.org 04/01/2014 [ 7344.888431] task: ffff880215818600 ti: ffff880204684000 task.ti: ffff880204684000 [ 7344.888431] RIP: 0010:[<ffffffffa037c88c>] [<ffffffffa037c88c>] btrfs_merge_bio_hook+0x54/0x6b [btrfs] [ 7344.888431] RSP: 0018:ffff8802046878f0 EFLAGS: 00010282 [ 7344.888431] RAX: 00000000ffffffea RBX: 0000000000001000 RCX: 0000000000000001 [ 7344.888431] RDX: ffff88023ec0f950 RSI: ffffffff8183b638 RDI: 00000000ffffffff [ 7344.888431] RBP: ffff880204687908 R08: 0000000000000001 R09: 0000000000000000 [ 7344.888431] R10: ffff880204687770 R11: ffffffff82f2d52d R12: 0000000000001000 [ 7344.888431] R13: ffff88021afbfee8 R14: 0000000000006208 R15: ffff88006cd199b0 [ 7344.888431] FS: 00007f1f9e1d6700(0000) GS:ffff88023ec00000(0000) knlGS:0000000000000000 [ 7344.888431] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 7344.888431] CR2: 00007f1f9dc8cb60 CR3: 000000023e3b6000 CR4: 00000000000006f0 [ 7344.888431] Stack: [ 7344.888431] 0000000000001000 0000000000001000 ffff880204687b98 ffff880204687950 [ 7344.888431] ffffffffa0395c8f ffffea0004d64d48 0000000000000000 0000000000001000 [ 7344.888431] ffffea0004d64d48 0000000000001000 0000000000000000 0000000000000000 [ 7344.888431] Call Trace: [ 7344.888431] [<ffffffffa0395c8f>] submit_extent_page+0xf5/0x16f [btrfs] [ 7344.888431] [<ffffffffa03970ac>] __do_readpage+0x4a0/0x4f1 [btrfs] [ 7344.888431] [<ffffffffa039680d>] ? btrfs_create_repair_bio+0xcb/0xcb [btrfs] [ 7344.888431] [<ffffffffa037eeb4>] ? btrfs_writepage_start_hook+0xbc/0xbc [btrfs] [ 7344.888431] [<ffffffff8108df55>] ? trace_hardirqs_on+0xd/0xf [ 7344.888431] [<ffffffffa039728c>] __do_contiguous_readpages.constprop.26+0xc2/0xe4 [btrfs] [ 7344.888431] [<ffffffffa037eeb4>] ? btrfs_writepage_start_hook+0xbc/0xbc [btrfs] [ 7344.888431] [<ffffffffa039739b>] __extent_readpages.constprop.25+0xed/0x100 [btrfs] [ 7344.888431] [<ffffffff81129d24>] ? lru_cache_add+0xe/0x10 [ 7344.888431] [<ffffffffa0397ea8>] extent_readpages+0x160/0x1aa [btrfs] [ 7344.888431] [<ffffffffa037eeb4>] ? btrfs_writepage_start_hook+0xbc/0xbc [btrfs] [ 7344.888431] [<ffffffff8115daad>] ? alloc_pages_current+0xa9/0xcd [ 7344.888431] [<ffffffffa037cdc9>] btrfs_readpages+0x1f/0x21 [btrfs] [ 7344.888431] [<ffffffff81128316>] __do_page_cache_readahead+0x168/0x1fc [ 7344.888431] [<ffffffff811285a0>] ondemand_readahead+0x1f6/0x207 [ 7344.888431] [<ffffffff811285a0>] ? ondemand_readahead+0x1f6/0x207 [ 7344.888431] [<ffffffff8111cf34>] ? pagecache_get_page+0x2b/0x154 [ 7344.888431] [<ffffffff8112870e>] page_cache_sync_readahead+0x3d/0x3f [ 7344.888431] [<ffffffff8111dbf7>] generic_file_read_iter+0x197/0x4e1 [ 7344.888431] [<ffffffff8117773a>] __vfs_read+0x79/0x9d [ 7344.888431] [<ffffffff81178050>] vfs_read+0x8f/0xd2 [ 7344.888431] [<ffffffff81178a38>] SyS_read+0x50/0x7e [ 7344.888431] [<ffffffff81492017>] entry_SYSCALL_64_fastpath+0x12/0x6b [ 7344.888431] Code: 8d 4d e8 45 31 c9 45 31 c0 48 8b 00 48 c1 e2 09 48 8b 80 80 fc ff ff 4c 89 65 e8 48 8b b8 f0 01 00 00 e8 1d 42 02 00 85 c0 79 02 <0f> 0b 4c 0 [ 7344.888431] RIP [<ffffffffa037c88c>] btrfs_merge_bio_hook+0x54/0x6b [btrfs] [ 7344.888431] RSP <ffff8802046878f0> [ 7344.970544] ---[ end trace eb7803b24ebab8ae ]--- Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> fs/btrfs/ctree.h | 14 ++++++++++++ fs/btrfs/extent-tree.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++-- fs/btrfs/inode.c | 8 +++++++ fs/btrfs/relocation.c | 6 +----- 4 files changed, 79 insertions(+), 7 deletions(-) commit 578def7c50f236432ba140d35bb7ca4ef0a1b20b Author: Filipe Manana <fdmanana@suse.com> Date: Tue Apr 26 15:36:38 2016 +0100 Btrfs: don't wait for unrelated IO to finish before relocation Before the relocation process of a block group starts, it sets the block group to readonly mode, then flushes all delalloc writes and then finally it waits for all ordered extents to complete. This last step includes waiting for ordered extents destinated at extents allocated in other block groups, making us waste unecessary time. So improve this by waiting only for ordered extents that fall into the block group's range. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> fs/btrfs/dev-replace.c | 4 ++-- fs/btrfs/extent-tree.c | 11 +++++++---- fs/btrfs/ioctl.c | 2 +- fs/btrfs/ordered-data.c | 26 +++++++++++++++++++------- fs/btrfs/ordered-data.h | 6 ++++-- fs/btrfs/relocation.c | 4 +++- fs/btrfs/super.c | 2 +- fs/btrfs/transaction.c | 2 +- 8 files changed, 38 insertions(+), 19 deletions(-) commit 3f9749f6e9edcf8ec569fb542efc3be35e06e84a Author: Filipe Manana <fdmanana@suse.com> Date: Mon Apr 25 04:45:02 2016 +0100 Btrfs: fix empty symlink after creating symlink and fsync parent dir If we create a symlink, fsync its parent directory, crash/power fail and mount the filesystem, we end up with an empty symlink, which not only is useless it's also not allowed in linux (the man page symlink(2) is well explicit about that). So we just need to make sure to fully log an inode if it's a symlink, to ensure its inline extent gets logged, ensuring the same behaviour as ext3, ext4, xfs, reiserfs, f2fs, nilfs2, etc. Example reproducer: $ mkfs.btrfs -f /dev/sdb $ mount /dev/sdb /mnt $ mkdir /mnt/testdir $ sync $ ln -s /mnt/foo /mnt/testdir/bar $ xfs_io -c fsync /mnt/testdir <power fail> $ mount /dev/sdb /mnt $ readlink /mnt/testdir/bar <empty string> A test case for fstests follows soon. Signed-off-by: Filipe Manana <fdmanana@suse.com> fs/btrfs/tree-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 657ed1aa4898c8304500e0d13f240d5a67e8be5f Author: Filipe Manana <fdmanana@suse.com> Date: Wed Apr 6 17:11:56 2016 +0100 Btrfs: fix for incorrect directory entries after fsync log replay If we move a directory to a new parent and later log that parent and don't explicitly log the old parent, when we replay the log we can end up with entries for the moved directory in both the old and new parent directories. Besides being ilegal to have directories with multiple hard links in linux, it also resulted in the leaving the inode item with a link count of 1. A similar issue also happens if we move a regular file - after the log tree is replayed the file has a link in both the old and new parent directories, when it should be only at the new directory. Sample reproducer: $ mkfs.btrfs -f /dev/sdc $ mount /dev/sdc /mnt $ mkdir /mnt/x $ mkdir /mnt/y $ touch /mnt/x/foo $ mkdir /mnt/y/z $ sync $ ln /mnt/x/foo /mnt/x/bar $ mv /mnt/y/z /mnt/x/z < power fail > $ mount /dev/sdc /mnt $ ls -1Ri /mnt /mnt: 257 x 258 y /mnt/x: 259 bar 259 foo 260 z /mnt/x/z: /mnt/y: 260 z /mnt/y/z: $ umount /dev/sdc $ btrfs check /dev/sdc Checking filesystem on /dev/sdc UUID: a67e2c4a-a4b4-4fdc-b015-9d9af1e344be checking extents checking free space cache checking fs roots root 5 inode 260 errors 2000, link count wrong unresolved ref dir 257 index 4 namelen 1 name z filetype 2 errors 0 unresolved ref dir 258 index 2 namelen 1 name z filetype 2 errors 0 (...) Attempting to remove the directory becomes impossible: $ mount /dev/sdc /mnt $ rmdir /mnt/y/z $ ls -lh /mnt/y ls: cannot access /mnt/y/z: No such file or directory total 0 d????????? ? ? ? ? ? z $ rmdir /mnt/x/z rmdir: failed to remove ‘/mnt/x/z’: Stale file handle $ ls -lh /mnt/x ls: cannot access /mnt/x/z: Stale file handle total 0 -rw-r--r-- 2 root root 0 Apr 6 18:06 bar -rw-r--r-- 2 root root 0 Apr 6 18:06 foo d????????? ? ? ? ? ? z So make sure that on rename we set the last_unlink_trans value for our inode, even if it's a directory, to the value of the current transaction's ID and that if the new parent directory is logged that we fallback to a transaction commit. A test case for fstests is being submitted as well. Signed-off-by: Filipe Manana <fdmanana@suse.com> fs/btrfs/tree-log.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 0d5358330c20d50e52e3e65ff07a5db8007041fc Author: Linus Walleij <linus.walleij@linaro.org> Date: Fri May 13 02:45:04 2016 +0200 Revert "pinctrl: tegra: avoid parked_reg and parked_bank" This reverts commit 1d18a3f0f0809f6c71f1f6e9e268ee904ce0b588. drivers/pinctrl/tegra/pinctrl-tegra.c | 8 ++++---- drivers/pinctrl/tegra/pinctrl-tegra.h | 6 +++++- drivers/pinctrl/tegra/pinctrl-tegra114.c | 4 ++-- drivers/pinctrl/tegra/pinctrl-tegra124.c | 4 ++-- drivers/pinctrl/tegra/pinctrl-tegra20.c | 4 ++-- drivers/pinctrl/tegra/pinctrl-tegra210.c | 4 +++- drivers/pinctrl/tegra/pinctrl-tegra30.c | 4 ++-- 7 files changed, 20 insertions(+), 14 deletions(-) commit ae05327a00fd47c34dfe25294b359a3f3fef96e8 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 12 20:36:01 2016 -0400 ext4: switch to ->iterate_shared() Note that we need relax_dir() equivalent for directories locked shared. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/ext4/dir.c | 4 ++-- include/linux/fs.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) commit 9717a91b01feda644f45fd63624a641385ef8f2d Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 12 20:13:50 2016 -0400 hfs: switch to ->iterate_shared() exact parallel of hfsplus analogue Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/hfs/catalog.c | 3 +++ fs/hfs/dir.c | 12 +++++++++--- fs/hfs/hfs_fs.h | 1 + fs/hfs/inode.c | 2 ++ 4 files changed, 15 insertions(+), 3 deletions(-) commit 323ee8fc544d407eb053471b9607f95f987f5f12 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 12 20:02:09 2016 -0400 hfsplus: switch to ->iterate_shared() We need to protect the list of hfsplus_readdir_data against parallel insertions (in readdir) and removals (in release). Add a spinlock for that. Note that it has nothing to do with protection of hfsplus_readdir_data->key - we have an exclusion between hfsplus_readdir() and hfsplus_delete_cat() on directory lock and between several hfsplus_readdir() for the same struct file on ->f_pos_lock. The spinlock is strictly for list changes. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/hfsplus/catalog.c | 3 +++ fs/hfsplus/dir.c | 12 +++++++++--- fs/hfsplus/hfsplus_fs.h | 1 + fs/hfsplus/inode.c | 1 + fs/hfsplus/super.c | 1 + 5 files changed, 15 insertions(+), 3 deletions(-) commit 552a9d489f1412beb5914f0c64a54d921a9c6624 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 12 19:49:30 2016 -0400 hostfs: switch to ->iterate_shared() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/hostfs/hostfs_kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7d674b3195b854eec26724b8e85c97da79cdcf9d Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 12 19:44:04 2016 -0400 hpfs: switch to ->iterate_shared() NOTE: the only reason we can do that without ->i_rdir_offs races is that hpfs_lock() serializes everything in there anyway. It's not that hard to get rid of, but not as part of this series... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/hpfs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e82c3147554785414a10a2d424590758646972b2 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 12 19:35:57 2016 -0400 hpfs: handle allocation failures in hpfs_add_pos() pr_err() is nice, but we'd better propagate the error to caller and not proceed to violate the invariants (namely, "every file with f_pos tied to directory block should have its address visible in per-inode array"). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/hpfs/dir.c | 10 ++++++++-- fs/hpfs/dnode.c | 8 +++++--- fs/hpfs/hpfs_fn.h | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) commit b3d39032d7b33029373fbce6459aff6ac316e130 Author: Bjorn Andersson <bjorn.andersson@sonymobile.com> Date: Mon Mar 28 20:36:59 2016 -0700 remoteproc: Add additional crash reasons The Qualcomm WCNSS can crash by watchdog or a fatal software error. Add these types to the list of remoteproc crash reasons. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> drivers/remoteproc/remoteproc_core.c | 2 ++ include/linux/remoteproc.h | 4 ++++ 2 files changed, 6 insertions(+) commit e395f9ce49eb5a9fa69c3fd74b6de59a5cb5a300 Author: Bjorn Andersson <bjorn.andersson@sonymobile.com> Date: Mon Mar 28 20:36:58 2016 -0700 remoteproc: core: Make the loaded resource table optional Remote processors like the ones found in the Qualcomm SoCs does not have a resource table passed to them, so make it optional by only populating it if it does exist. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> drivers/remoteproc/remoteproc_core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit 9ffee1c4be7c1981e47e520172638a4b00881880 Author: Archit Taneja <architt@codeaurora.org> Date: Wed May 11 15:07:32 2016 +0530 clk: qcom: mmcc-8996: Remove clocks that should be controlled by RPM The branch clocks MMSS_MMAGIC_AXI_CLK and MMAGIC_BIMC_AXI_CLK are controlled by RPM when the APPs processor enable or disable the RPM_MMAXI_CLK. During the boot sequence, someone can enable the RPM_MMAXI_CLK, resulting in register status bits showing that these clocks are enabled, our clock driver may look at the enabled status of these clocks and try to disable them since it thinks they are unused. Don't make the clock driver touch these clocks. Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> drivers/clk/qcom/mmcc-msm8996.c | 32 -------------------------------- 1 file changed, 32 deletions(-) commit d8609a3a2e4f6fb1fa5cf2468547eb30507e78c4 Merge: 4afe2d1 3397c2c Author: Stephen Boyd <sboyd@codeaurora.org> Date: Wed May 11 11:39:17 2016 -0700 Merge tag 'imx-clk-fixes-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into clk-next Pull some non-critical i.MX clk fixes from Shawn Guo: * Fix the commit 3713e3f5e927 ("clk: imx35: define two clocks for rtc") which messed up the clock enumeration when adding new clock. * tag 'imx-clk-fixes-4.6-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: imx35: restore existing used clock enumeration clk: imx6q: fix typo in CAN clock definition commit 4afe2d1a6ed5cba794aeeaa816e7c97a45167b01 Author: Harvey Hunt <harvey.hunt@imgtec.com> Date: Mon May 9 17:29:52 2016 +0100 clk: ingenic: Allow divider value to be divided The JZ4780's MSC clock divider registers multiply the clock divider by 2. This means that MMC devices run at half their expected speed. Add the ability to divide the clock divider in order to solve this. Signed-off-by: Harvey Hunt <harvey.hunt@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> drivers/clk/ingenic/cgu.c | 11 ++++++++++- drivers/clk/ingenic/cgu.h | 6 +++++- drivers/clk/ingenic/jz4740-cgu.c | 24 ++++++++++++------------ drivers/clk/ingenic/jz4780-cgu.c | 40 ++++++++++++++++++++-------------------- 4 files changed, 47 insertions(+), 34 deletions(-) commit 5707291c6cada6db7344c90a548d02f427bf376c Merge: 98b8525 7e5385d Author: Stephen Boyd <sboyd@codeaurora.org> Date: Mon May 9 16:04:37 2016 -0700 Merge tag 'v4.7-rockchip-clk4' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into clk-next Pull rockchip clk updates from Heiko Stuebner: Another small rk3399 fixup as well as simplifications around our handling of the General-Register-Files syscon. * tag 'v4.7-rockchip-clk4' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: clk: rockchip: drop old_rate calculation on pll rate changes clk: rockchip: simplify GRF handling in pll clocks clk: rockchip: lookup General Register Files in rockchip_clk_init clk: rockchip: fix the rk3399 sdmmc sample / drv name commit 98b8525abb7f0d9a5ab942a2e044011d7e635490 Author: Maxime Ripard <maxime.ripard@free-electrons.com> Date: Mon Apr 25 15:22:42 2016 +0200 clk: sunxi: Add display and TCON0 clocks driver The A10 SoCs and its relatives has a special clock controller to drive the display engines (both frontend and backend), that have a lot in common with the clock to drive the first TCON channel. Add a driver to support both. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Rob Herring <robh@kernel.org> [sboyd@codeaurora.org: Silence variable sized array warning] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Documentation/devicetree/bindings/clock/sunxi.txt | 2 + drivers/clk/sunxi/Makefile | 1 + drivers/clk/sunxi/clk-sun4i-display.c | 261 ++++++++++++++++++++++ 3 files changed, 264 insertions(+) commit e7142c341c9ce3678f3533a2cfbf8477a09a95ad Author: Jon Paul Maloy <jon.maloy@ericsson.com> Date: Wed May 11 19:15:45 2016 -0400 tipc: eliminate risk of double link_up events When an ACTIVATE or data packet is received in a link in state ESTABLISHING, the link does not immediately change state to ESTABLISHED, but does instead return a LINK_UP event to the caller, which will execute the state change in a different lock context. This non-atomic approach incurs a low risk that we may have two LINK_UP events pending simultaneously for the same link, resulting in the final part of the setup procedure being executed twice. The only potential harm caused by this it that we may see two LINK_UP events issued to subsribers of the topology server, something that may cause confusion. This commit eliminates this risk by checking if the link is already up before proceeding with the second half of the setup. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/tipc/node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d1bb236bc2ffb3586d6cc73e58c0d8351758123 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Thu May 12 17:00:20 2016 -0400 gfs2: switch to ->iterate_shared() protected by glock and already used without locking the directory by gfs2_get_name() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/gfs2/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c4cb04300fa160e9d78335c74184c4e66a56437 Author: Omar Sandoval <osandov@fb.com> Date: Wed May 11 15:16:37 2016 -0700 coredump: only charge written data against RLIMIT_CORE Commit 9b56d54380ad ("dump_skip(): dump_seek() replacement taking coredump_params") introduced a regression with regard to RLIMIT_CORE. Previously, when a core dump was sparse, only the data that was actually written out would count against the limit. Now, the sparse ranges are also included, which leads to truncated core dumps when the actual disk usage is still well below the limit. Restore the old behavior by only counting what gets emitted and ignoring what gets skipped. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/coredump.c | 5 ++--- include/linux/binfmts.h | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) commit a00839395103d5e2d132a6c4a9680256580ed3d1 Author: Omar Sandoval <osandov@fb.com> Date: Wed May 11 15:16:36 2016 -0700 coredump: get rid of coredump_params->written cprm->written is redundant with cprm->file->f_pos, so use that instead. Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> arch/powerpc/platforms/cell/spufs/coredump.c | 5 +++-- fs/binfmt_elf.c | 2 +- fs/binfmt_elf_fdpic.c | 2 +- fs/coredump.c | 8 +++----- include/linux/binfmts.h | 1 - 5 files changed, 8 insertions(+), 10 deletions(-) commit f893a99e7e2125ed7874d69cb309ca40a0bea371 Author: Fabio Estevam <fabio.estevam@nxp.com> Date: Wed May 11 17:02:05 2016 -0300 phy: micrel: Use MICREL_PHY_ID_MASK definition Replace the hardcoded mask 0x00fffff0 with MICREL_PHY_ID_MASK for better readability. Suggested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/micrel.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) commit da73b4e9538b9be96498241ab3f13eab94181e96 Author: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Date: Wed May 11 18:48:32 2016 +0800 gre: Fix wrong tpi->proto in WCCP When dealing with WCCP in gre6 tunnel, it sets the wrong tpi->protocol, that is, ETH_P_IP instead of ETH_P_IPV6 for the encapuslated traffic. Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/gre.h | 2 +- net/ipv4/gre_demux.c | 6 +++--- net/ipv4/ip_gre.c | 4 ++-- net/ipv6/ip6_gre.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) commit 23f72215bc030d1eea437713abfef91c635e2e1f Author: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Date: Wed May 11 18:48:31 2016 +0800 ip6_gre: Fix get_size calculation for gre6 tunnel Do not include attribute IFLA_GRE_TOS. Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_gre.c | 3 --- 1 file changed, 3 deletions(-) commit a1f6ad14176d466c00e6a687f9c78ec6c7ad6bf8 Author: Enric Balletbo i Serra <enric.balletbo@collabora.com> Date: Fri May 6 23:02:34 2016 +0200 ARM: dts: igep0020: Add SD card write-protect pin. A host device that supports write protection should refuse to write to an SD card that is designated read-only when write-protect is set. This is an optional feature of the SD specification. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/boot/dts/omap3-igep0020-common.dtsi | 11 +++++++++++ 1 file changed, 11 insertions(+) commit b44f788cce4086da00fd2f14b6b4d5abcf85f842 Author: Enric Balletbo i Serra <enric.balletbo@collabora.com> Date: Fri May 6 23:02:33 2016 +0200 ARM: dts: igep00x0: Add SD card-detect. Fix SD card remove/insert detection by adding the correct card-detect pin. All IGEP OMAP3 based boards use the same card-detect pin. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/boot/dts/omap3-igep.dtsi | 1 + 1 file changed, 1 insertion(+) commit 65db875d110b8e517f81fa71c57a65fc6d0019ac Author: Dave Gerlach <d-gerlach@ti.com> Date: Thu May 12 13:20:52 2016 -0500 ARM: OMAP2+: AM43XX: Enable fixes for Cortex-A9 errata This patch explicitly enables the fixes for the below errata applicable for AM43x Socs as was done for OMAP4. 754322: Faulty MMU translations following ASID switch 775420: A data cache maintenance operation which aborts, followed by an ISB, without any DSB in-between, might lead to deadlock Signed-off-by: Dave Gerlach <d-gerlach@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/mach-omap2/Kconfig | 2 ++ 1 file changed, 2 insertions(+) commit 3d9f77be066ccf8d364928154552ed6ca910793b Author: Nishanth Menon <nm@ti.com> Date: Fri May 6 08:37:57 2016 -0500 ARM: dts: am57xx-idk-common: Fix input supply names Palmas Regulator is an exception and does not follow the standard "vin-supply" common definitions for all regulators, as a result of this, the input supplies are not reported to regulator framework, with the obvious result of not being appropriately mapped. Fix the same. Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/boot/dts/am57xx-idk-common.dtsi | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) commit 10ce2404ccab6828f86fb038e4888837f49f9f48 Author: Franklin S Cooper Jr <fcooper@ti.com> Date: Wed May 4 12:43:55 2016 -0500 ARM: dts: dra7: Add gpmc dma channel Add dma channel information to the gpmc. Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/boot/dts/dra7.dtsi | 2 ++ 1 file changed, 2 insertions(+) commit 1ddbef4d596ce51bf25825549bc5865de08a7e62 Author: Nicolas Chauvet <kwizart@gmail.com> Date: Tue May 10 12:14:58 2016 +0200 ARM: dts: disable mmc by default and enable when needed for dm814x This patch disable mmc nodes by default in the dm814x.dtsi and enable only when needed on a given dts v2: Disable un-used mmc nodes on the related boards dts files instead of from the included SOC dts Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/boot/dts/dm8148-evm.dts | 8 ++++++++ arch/arm/boot/dts/dm8148-t410.dts | 8 ++++++++ 2 files changed, 16 insertions(+) commit 54c78870e4d70420b887d712a3e73a6783d5b51d Author: Nicolas Chauvet <kwizart@gmail.com> Date: Tue May 10 12:14:57 2016 +0200 ARM: dts: Add non-removable to hsmmc on hp-t410 This will clean-up warnings at boot, since either that or cd-gpio{,s} are mandated by the dts specification of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@47810000[0]' of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@47810000[0]' v2: use the generic non-removable instead of ti,non-removable Signed-off-by: Nicolas Chauvet <kwizart@gmail.com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/boot/dts/dm8148-t410.dts | 1 + 1 file changed, 1 insertion(+) commit 6c05495d6d0507a6e7886265f82339bebf25cfed Author: Tony Lindgren <tony@atomide.com> Date: Thu May 12 13:29:48 2016 -0700 ARM: dts: Fix ldo7 source for HDMI on igepv5 Fix ldo7 source for HDMI on igepv5. Suggested-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/boot/dts/omap5-igep0050.dts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit e0e80d43fc0c5aace76a6c5f9462a1aec3e004f8 Author: Tony Lindgren <tony@atomide.com> Date: Thu May 12 13:29:48 2016 -0700 ARM: dts: Fix uart wakeirq on omap5 by removing WAKEUP_EN for omaps The padconf register WAKEUP_EN is now handled in a generic way using Linux wakeirqs where pinctrl-single toggles the WAKEUP_EN bit when a wakeirq is enabled or disabled. At least omap5 gets confused if the WAKEUP_EN bit is set and the pin is not claimed as a wakeirq. The end result is that wakeirqs don't work properly as there is nothing handling the wakeirq. So let's just remove the WAKEUP_EN usage from dts files. Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/boot/dts/omap3-evm-37xx.dts | 2 +- arch/arm/boot/dts/omap3-n900.dts | 4 ++-- arch/arm/boot/dts/omap3-n950-n9.dtsi | 6 +++--- arch/arm/boot/dts/omap3-zoom3.dts | 6 +++--- arch/arm/boot/dts/omap5-board-common.dtsi | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) commit 49111cd1c5498d2a356b0e51d74987dad0e88530 Author: Tony Lindgren <tony@atomide.com> Date: Thu May 12 13:29:48 2016 -0700 ARM: dts: Fix igepv5 audiopwon-gpio Playing audio works on omap5-uevm, but produces an "Unhandled fault: imprecise external abort (0x1406) at 0x00000000" error on igepv5. Looks like the twl6040 audpwron GPIO pin is different for these boards. Let's fix the issue by configuring the audpwron in the board specific dts file. Cc: Agustí Fontquerni <af@iseebcn.com> Cc: Eduard Gavin <egavin@iseebcn.com> Cc: Enric Balletbo i Serra <eballetbo@gmail.com> Acked-by: Peter Ujfalusi <peter.ujflausi@ti com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/boot/dts/omap5-board-common.dtsi | 3 ++- arch/arm/boot/dts/omap5-igep0050.dts | 10 ++++++++++ arch/arm/boot/dts/omap5-uevm.dts | 10 ++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) commit 0691a286d59183c44b68defd398cb7af0354bd00 Author: Christoph Hellwig <hch@lst.de> Date: Tue May 3 18:01:03 2016 +0200 IB/cma: pass the port number to ib_create_qp The new RW API will need this. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Tested-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+) commit 321aebb880d2bfdf9cff503f57207e930aee6b1d Merge: 80835cb 3849e44 Author: Doug Ledford <dledford@redhat.com> Date: Thu May 12 14:21:02 2016 -0400 Merge branches 'mlx5-1' and 'srp-1' into k.o/for-4.7 commit 80835cba4b857485b068e1ce83512e896e6f001e Author: Saeed Mahameed <saeedm@mellanox.com> Date: Wed Apr 13 19:11:04 2016 +0300 net/mlx5: Update mlx5_ifc hardware features Adding the needed mlx5_ifc hardware bits and structs for the following features: * Add vport to steering commands for SRIOV ACL support * Add mlcr, pcmr and mcia registers for dump module EEPROM * Add support for FCS, beacon led and disable_link bits to hca caps * Add CQE period mode bit in CQ context for CQE based CQ moderation support * Add umr SQ bit for fragmented memory registration * Add needed bits and caps for Striding RQ support In-order to avoid possible future conflicts between rdma and net-next we added all expected updates to this file for this release. If more changes will be submitted, we plan to do it only through one of the subsystems, probably net-next. All updated bits in this patch will be later used in the up-coming submissions to net-next and rdma trees. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Acked-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> include/linux/mlx5/mlx5_ifc.h | 146 +++++++++++++++++++++++++++++++++++------- 1 file changed, 124 insertions(+), 22 deletions(-) commit c16aea129bf788127465771cab97134a94af33e4 Author: Tariq Toukan <tariqt@mellanox.com> Date: Wed Apr 13 19:11:03 2016 +0300 net/mlx5: Fix mlx5 ifc cmd_hca_cap bad offsets All reserved fields after early_vf_enable are off by 1, since early_vf_enable was not explicitly declared as array of size 1. Reserved field before cqe_zip had a wrong size, it should be 0x80 + 0x3f. Fixes: b0844444590e ("net/mlx5_core: Introduce access function to read internal timer ") Fixes: b4ff3a36d3e4 ("net/mlx5: Use offset based reserved field names in the IFC header file") Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Matan Barak <matanb@mellanox.com> Acked-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com> include/linux/mlx5/mlx5_ifc.h | 107 ++++++++++++++++++++++-------------------- 1 file changed, 55 insertions(+), 52 deletions(-) commit 3849e44d1c4b11c9e0f0f0343a0360b5e9594fb6 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Fri Apr 22 14:15:04 2016 -0700 IB/srp: Move common code into the caller Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Cc: Laurence Oberman <loberman@redhat.com> Reviewed-by: Sagi Grimberg <sai@grimberg.m> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 1 - 1 file changed, 1 deletion(-) commit 3b59b7a693b0e5b2dc244bcd78899aa2585a434b Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Fri Apr 22 14:14:43 2016 -0700 IB/srp: Move code out of a loop Since all srp_map_finish_fr() callers pass a non-zero value as the fourth argument (sg_nents), the sg_nents == 0 check in that function can be removed. Add a count == 0 check in the caller of that function. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Cc: Laurence Oberman <loberman@redhat.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit ffc548bb3601f0250474afcfa10ceb0b8b8b9764 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Fri Apr 22 14:14:15 2016 -0700 IB/srp: Avoid that mapping failure triggers an infinite loop The srp_queuecommand() function translates ENOMEM into QUEUE_FULL which causes the SCSI mid-layer to retry the command. All other error codes are translated into DID_ERROR which causes the SCSI command to fail. Return E2BIG if mapping will always fail to prevent that the SCSI mid-layer keeps resubmitting a command forever. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Cc: Laurence Oberman <loberman@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 2 ++ 1 file changed, 2 insertions(+) commit fa9863f869202a4ccc673cbd8dd326bf54a8efff Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Fri Apr 22 14:13:57 2016 -0700 IB/srp: Introduce target->mr_pool_size This patch does not change any functionality. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Laurence Oberman <loberman@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 6 +++--- drivers/infiniband/ulp/srp/ib_srp.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) commit e012f3639c95498d4e8d7a9f44e33f1cd2f241b0 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Fri Apr 22 14:13:35 2016 -0700 IB/srp: Fix srp_map_data() error paths Ensure that req->nmdesc is set correctly in srp_map_sg() if mapping fails. Avoid that mapping failure causes a memory descriptor leak. Report srp_map_sg() failure to the caller. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Cc: Laurence Oberman <loberman@redhat.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) commit 77269cdfcab5f01ebd2095273f4060fbe1001e68 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Fri Apr 22 14:13:09 2016 -0700 IB/srp: Document srp_map_data() return value Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Laurence Oberman <loberman@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit 6ec2ba02e6b7fc4fcf8032bfd2bc6e6e20ca9c4a Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Fri Apr 22 14:12:47 2016 -0700 IB/srp: Fix a comment The free request list was removed through patch "IB/srp: Use block layer tags". Hence update a comment that refers to that free request list. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagi@grimberg.me> Cc: Laurence Oberman <loberman@redhat.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d3d98c4cf4698324d71b29c84dcdc7802444376 Author: Bart Van Assche <bart.vanassche@sandisk.com> Date: Fri Apr 22 14:12:10 2016 -0700 IB/srp: Fix a spelling error in a source code comment Change one occurrence of "boundries" into "boundaries". Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Laurence Oberman <loberman@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Doug Ledford <dledford@redhat.com> drivers/infiniband/ulp/srp/ib_srp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c0053bd50af57c4ebf032a9de1b07ca78c982452 Author: Nishanth Menon <nm@ti.com> Date: Thu Aug 6 10:54:24 2015 -0500 ARM: OMAP5 / DRA7: Introduce workaround for 801819 Add workaround for Cortex-A15 ARM erratum 801819 which says in summary that "A livelock can occur in the L2 cache arbitration that might prevent a snoop from completing. Under certain conditions this can cause the system to deadlock. " Recommended workaround is as follows: Do both of the following: 1) Do not use the write-back no-allocate memory type. 2) Do not issue write-back cacheable stores at any time when the cache is disabled (SCTLR.C=0) and the MMU is enabled (SCTLR.M=1). Because it is implementation defined whether cacheable stores update the cache when the cache is disabled it is not expected that any portable code will execute cacheable stores when the cache is disabled. For implementations of Cortex-A15 configured without the “L2 arbitration register slice” option (typically one or two core systems), you must also do the following: 3) Disable write-streaming in each CPU by setting ACTLR[28:25] = 0b1111 So, we provide an option to disable write streaming on OMAP5 and DRA7. It is a rare condition to occur and may be enabled selectively based on platform acceptance of risk. Applies to: A15 revisions r2p0, r2p1, r2p2, r2p3 or r2p4 and REVIDR[3] is set to 0. Based on ARM errata Document revision 18.0 (22 Nov 2013) Note: the configuration for the workaround needs to be done with each CPU bringup, since CPU0 bringup is done by bootloader, it is recommended to have the workaround in the bootloader, kernel also does ensure that CPU0 has the workaround and makes the workaround active when CPU1 gets active. With CONFIG_SMP disabled, it is expected to be done by the bootloader. This does show significant degradation in synthetic tests such as mbw (https://packages.qa.debian.org/m/mbw.html) mbw -n 100 100|grep AVG (on a test platform) Without enabling the erratum: AVG Method: MEMCPY Elapsed: 0.13406 MiB: 100.00000 Copy: 745.913 MiB/s AVG Method: DUMB Elapsed: 0.06746 MiB: 100.00000 Copy: 1482.357 MiB/s AVG Method: MCBLOCK Elapsed: 0.03058 MiB: 100.00000 Copy: 3270.569 MiB/s After enabling the erratum: AVG Method: MEMCPY Elapsed: 0.13757 MiB: 100.00000 Copy: 726.913 MiB/s AVG Method: DUMB Elapsed: 0.12024 MiB: 100.00000 Copy: 831.668 MiB/s AVG Method: MCBLOCK Elapsed: 0.09243 MiB: 100.00000 Copy: 1081.942 MiB/s Most benchmarks are designed for specific performance analysis, so overall usecase must be considered before making a decision to enable/disable the erratum workaround. Pending internal investigation, the erratum is kept disabled by default. Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Tony Lindgren <tony@atomide.com> Suggested-by: Richard Woodruff <r-woodruff2@ti.com> Suggested-by: Brad Griffis <bgriffis@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> arch/arm/mach-omap2/Kconfig | 8 +++++++ arch/arm/mach-omap2/omap-secure.h | 1 + arch/arm/mach-omap2/omap-smp.c | 48 +++++++++++++++++++++++++++++++++++---- 3 files changed, 52 insertions(+), 5 deletions(-) commit 27ee441a43392ebe5b027fe5d78640e839673d21 Author: Pablo Neira <pablo@netfilter.org> Date: Thu May 12 17:16:31 2016 +0200 gtp: put back reference to netns when not required anymore This patch fixes a netns leak. Fixes: 93edb8c7f94f ("gtp: reload GTPv1 header after pskb_may_pull()") Reported-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/gtp.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 639db596165746ca87bbcb56559b094fd9042890 Author: Takashi Iwai <tiwai@suse.de> Date: Thu May 12 18:04:16 2016 +0200 ALSA: au88x0: Fix zero clear of stream->resources There are a few calls of memset() to stream->resources, but they all are called in a wrong size, sizeof(unsigned char) * VORTEX_RESOURCE_LAST, while this field is a u32 array. This may leave the memories not zero-cleared. Fix it by replacing them with a simpler sizeof(stream->resources) instead. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/pci/au88x0/au88x0_core.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit 7598469a6184e1017a77ebe78b5b66c52a6afc1c Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 11 15:42:08 2016 +0200 ata: dwc: add DMADEVICES dependency The dwc_460ex SATA driver has become available on non-powerpc architectures and may cause randconfig build errors when CONFIG_DMADEVICES is not set and SATA_DWC_OLD_DMA is enabled: warning: (SATA_DWC_OLD_DMA) selects DW_DMAC_CORE which has unmet direct dependencies (DMADEVICES) ERROR: "dw_dma_probe" [drivers/ata/sata_dwc_460ex.ko] undefined! ERROR: "dw_dma_remove" [drivers/ata/sata_dwc_460ex.ko] undefined! This adds an explcit Kconfig dependency to CONFIG_SATA_DWC so we cannot run into broken configurations. While it would also be possible to build the driver with both CONFIG_DMADEVICES and SATA_DWC_OLD_DMA disabled, that case is not useful because there is no fallback to PIO mode when the DMA engine is not usable. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 50b433753df6 ("ata: sata_dwc_460ex: use "dmas" DT property to find dma channel") Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 7fd38193d0473acc6e8f108107d0466f07768853 Merge: 4889929 46fa38e Author: David S. Miller <davem@davemloft.net> Date: Thu May 12 11:46:58 2016 -0400 Merge tag 'mac80211-next-for-davem-2016-05-12' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Johannes Berg says: ==================== Some more work for 4.7, notably: * completion and fixups of nla_put_64_64bit() work * remove a/b/g/n from wext nickname to avoid confusion with 11ac (which wouldn't even fit fully there due to string length restrictions) along with some other minor changes/cleanups. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit a7f1884554b81bd68cd435d72f09a3527629ac43 Author: Florian Westphal <fw@strlen.de> Date: Thu May 12 14:43:54 2016 +0200 netfilter: nfnetlink_queue: fix timestamp attribute Since 4.4 we erronously use timestamp of the netlink skb (which is zero). Bugzilla: https://bugzilla.netfilter.org/show_bug.cgi?id=1066 Fixes: b28b1e826f818c30ea7 ("netfilter: nfnetlink_queue: use y2038 safe timestamp") Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> net/netfilter/nfnetlink_queue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 951b8e4e673196932fa4c3b87d719644636e5ac9 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:24 2016 +0300 powerpc/4xx: Device tree update for the 460ex DWC SATA Device tree update for the Applied micro processor 460ex on-chip SATA to use "dmas" property. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> arch/powerpc/boot/dts/canyonlands.dts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit bb08ab6a4c9cee6e544aeb5de3ed92cd78c6ede4 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:23 2016 +0300 ata: sata_dwc_460ex: make debug messages neat There is a duplication in the debug messages when accessing SCR registers. Remove duplication to make the messages neat. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit d6ecf0c27d71666a4be46e13a1b234d17c63eb98 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:18 2016 +0300 ata: sata_dwc_460ex: supply physical address of FIFO to DMA DMA operates with physical addresses which is not exactly the same as ioremap() returns. Introduce variable to keep physical address of the SATA FIFO register and supply it when prepare DMA channel. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) commit 73ec1b5ab3a713141318ee845d8b0cc822db65b1 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:22 2016 +0300 ata: sata_dwc_460ex: use devm_ioremap This simplifies error handling and cleanup by using devm to manage IO mappings. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) commit af50f3a8b61cfdfcf4a01b01ec2759200d362605 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:21 2016 +0300 ata: sata_dwc_460ex: tidy up sata_dwc_clear_dmacr() This consolidates the reads from each of the if/else branches to one place making the code a lot nicer to look at. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) commit ee81d6cc8e8aa667aabce72f39a4b806419e1d55 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:20 2016 +0300 ata: sata_dwc_460ex: use readl/writel_relaxed() Rename the register access macros and use standard _relaxed() ops instead of __raw variants with explicit byte swapping. The original driver used the ppc-specific in/out_le32(). When it was adapted to other systems, these were added to the driver under ifdefs. However, those names are not defined as macros on ppc, so it ended up replacing them there as well with altered semantics. This patch restores the original semantics on ppc and makes the accesses no less strict on other systems. Also fixes too many sparse warnings to count. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 91 +++++++++++++++++++++----------------------- 1 file changed, 43 insertions(+), 48 deletions(-) commit 9e8b855e9841eeb9c13e79d50f70dc000b0dfbfd Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:19 2016 +0300 ata: sata_dwc_460ex: switch to new dmaengine_terminate_* API Convert dmaengine_terminate_all() calls to synchronous and asynchronous versions where appropriate. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit de1965159a34951a86267d13db4f2a67234139d3 Author: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Date: Thu May 12 01:36:40 2016 +0300 rcar: src: skip disabled-SRC nodes The current device tree representation of the R-Car Sample Rate Converters (SRC) assumes that they are numbered consecutively, starting from 0. Alas, this is not the case with the R8A7794 SoC where SRC0 isn't present. In order to keep the existing device trees working, I'm suggesting to use a disabled node for SRC0. Teach the SRC probe to just skip disabled nodes. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sh/rcar/src.c | 4 ++++ 1 file changed, 4 insertions(+) commit b9c17f13ba484d8492278c67cd95b7207def776f Author: Vinod Koul <vinod.koul@intel.com> Date: Thu May 12 09:38:50 2016 +0530 ASoC: rt298: Add DMI match for Broxton-P reference platform Broxton-P 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: Ramesh Babu <ramesh.babu@intel.com> Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/rt298.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) commit bb7cb54b388d8d0fbb3af27f14b121ee9c92e867 Author: Vinod Koul <vinod.koul@intel.com> Date: Thu May 12 09:38:49 2016 +0530 ASoC: rt298: fix null deref on acpi driver data ACPI driver data can be NULL so we need to check that before dereference the driver data. Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/rt298.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 32902177f7f6ae70e1d5e71d935aa1bfcae7f01c Author: John Keeping <john@metanate.com> Date: Thu May 12 13:55:53 2016 +0100 ASoC: dapm: deprecate MICBIAS widget type Commit 086d7f804e26 ("ASoC: Convert WM8962 MICBIAS to a supply widget", 2011-09-23) says: A supply widget is generally clearer than a MICBIAS widget and a mic bias is just a type of supply so use a supply widget for the MICBIAS. This also avoids confusion with the routing when connected to multiple inputs. but this has never been documented as a policy. Add some comments to make it clear. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> include/sound/soc-dapm.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit e6d9a52543338603e25e71e0e4942f05dae0dd8a Author: Colin Ian King <colin.king@canonical.com> Date: Wed May 11 17:56:54 2016 +0100 arm64: do not enforce strict 16 byte alignment to stack pointer copy_thread should not be enforcing 16 byte aligment and returning -EINVAL. Other architectures trap misaligned stack access with SIGBUS so arm64 should follow this convention, so remove the strict enforcement check. For example, currently clone(2) fails with -EINVAL when passing a misaligned stack and this gives little clue to what is wrong. Instead, it is arguable that a SIGBUS on the fist access to a misaligned stack allows one to figure out that it is a misaligned stack issue rather than trying to figure out why an unconventional (and undocumented) -EINVAL is being returned. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/kernel/process.c | 3 --- 1 file changed, 3 deletions(-) commit e2724e9d969294879936daf7833d4adda26c8efc Author: Jeremy Compostella <jeremy.compostella@intel.com> Date: Wed May 11 17:23:34 2016 +0200 x86/tsc: Add missing Cherrytrail frequency to the table Intel Cherrytrail is based on Airmont core so MSR_FSB_FREQ[2:0] = 4 means that the CPU reference clock runs at 80MHz. Add this missing frequency to the table. Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Link: http://lkml.kernel.org/r/87y47gty89.fsf@intel.com Signed-off-by: Thomas Gleixner <tglx@linutronix.de> arch/x86/kernel/tsc_msr.c | 3 +++ 1 file changed, 3 insertions(+) commit c5076cfe768998e9d395bc8486b29b18b0f99fd9 Author: Tomasz Nowicki <tn@semihalf.com> Date: Wed May 11 17:34:51 2016 -0500 PCI, of: Move PCI I/O space management to PCI core code No functional changes in this patch. PCI I/O space mapping code does not depend on OF; therefore it can be moved to PCI core code. This way we will be able to use it, e.g., in ACPI PCI code. Suggested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Tomasz Nowicki <tn@semihalf.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> CC: Arnd Bergmann <arnd@arndb.de> CC: Liviu Dudau <Liviu.Dudau@arm.com> drivers/of/address.c | 116 +-------------------------------------------- drivers/pci/pci.c | 115 ++++++++++++++++++++++++++++++++++++++++++++ include/linux/of_address.h | 9 ---- include/linux/pci.h | 5 ++ 4 files changed, 121 insertions(+), 124 deletions(-) commit 1958e7173df14ff50d75ed2fbd24b349d25caf80 Author: Jayachandran C <jchandra@broadcom.com> Date: Wed May 11 17:34:46 2016 -0500 PCI: generic, thunder: Use generic ECAM API Use functions provided by drivers/pci/ecam.h for mapping the config space in drivers/pci/host/pci-host-common.c, and update its users to use 'struct pci_config_window' and 'struct pci_ecam_ops'. The changes are mostly to use 'struct pci_config_window' in place of 'struct gen_pci'. Some of the fields of gen_pci were only used temporarily and can be eliminated by using local variables or function arguments, these are not carried over to struct pci_config_window. pci-thunder-ecam.c and pci-thunder-pem.c are the only users of the pci_host_common_probe function and the gen_pci structure; these have been updated to use the new API as well. The patch does not introduce any functional changes other than a very minor one: with the new code, on 64-bit platforms, we do just a single ioremap for the whole config space. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> drivers/pci/ecam.h | 5 ++ drivers/pci/host/Kconfig | 1 + drivers/pci/host/pci-host-common.c | 114 +++++++++++++++--------------------- drivers/pci/host/pci-host-common.h | 47 --------------- drivers/pci/host/pci-host-generic.c | 52 ++++------------ drivers/pci/host/pci-thunder-ecam.c | 39 +++--------- drivers/pci/host/pci-thunder-pem.c | 92 ++++++++++++++--------------- 7 files changed, 113 insertions(+), 237 deletions(-) commit 1d4e89cf0a4e819fbde428e9e5286e7141a02e06 Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Thu May 12 15:47:10 2016 +1000 powerpc/powernv/npu: Add PE to PHB's list Before commit 3e68dc57 "powerpc/powernv: Remove DMA32 PE list", NPU PEs were linked to the NPU PHB via phb->ioda.pe_dma_list; after that fix, the phb->ioda.pe_list is used. During the pe_dma_list removal, list_add_tail(&phb->ioda.pe_dma_list) was removed, however no list_add() was added so does this patch. Fixes: 3e68dc57219a ("powerpc/powernv: Remove DMA32 PE list") Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 3 +++ 1 file changed, 3 insertions(+) commit 92a86756904b127a3450262b33c0b9f8e99f6b36 Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Thu May 12 15:47:09 2016 +1000 powerpc/powernv: Fix insufficient memory allocation The pnv_pci_init_ioda_phb() helper allocates a blob to store auxilary data such PE and M32/M64 segment allocation maps; this single blob has few partitions, size of each is derived from the PE number - phb->ioda.total_pe_num. It was assumed that the minimum PE number is 8, however it is 4 for NPU so the pe_alloc part was missing in the allocated blob. It was invisible till recently as we were not tracking used M64 segments and NPUs do not use M32 segments so the phb->ioda.m32_segmap (which was pointing to the same address as phb->ioda.pe_alloc) has never been written to leaving the pe_alloc memory intact. After commit 401203ac2d "powerpc/powernv: Track M64 segment consumption" the pe_alloc gets corrupted and PE allocation cannot work. This fixes the issue by enforcing the minimum PE number to 8. Fixes: 401203ac2d15 ("powerpc/powernv: Track M64 segment consumption") Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 8445a87f7092bc8336ea1305be9306f26b846d93 Author: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Date: Mon Apr 11 16:17:23 2016 -0300 powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism Commit 39baadbf36ce ("powerpc/eeh: Remove eeh information from pci_dn") changed the pci_dn struct by removing its EEH-related members. As part of this clean-up, DDW mechanism was modified to read the device configuration address from eeh_dev struct. As a consequence, now if we disable EEH mechanism on kernel command-line for example, the DDW mechanism will fail, generating a kernel oops by dereferencing a NULL pointer (which turns to be the eeh_dev pointer). This patch just changes the configuration address calculation on DDW functions to a manual calculation based on pci_dn members instead of using eeh_dev-based address. No functional changes were made. This was tested on pSeries, both in PHyp and qemu guest. Fixes: 39baadbf36ce ("powerpc/eeh: Remove eeh information from pci_dn") Cc: stable@vger.kernel.org # v3.4+ Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/pseries/iommu.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) commit c2078d9ef600bdbe568c89e5ddc2c6f15b7982c8 Author: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Date: Mon Apr 11 16:17:22 2016 -0300 Revert "powerpc/eeh: Fix crash in eeh_add_device_early() on Cell" This reverts commit 89a51df5ab1d38b257300b8ac940bbac3bb0eb9b. The function eeh_add_device_early() is used to perform EEH initialization in devices added later on the system, like in hotplug/DLPAR scenarios. Since the commit 89a51df5ab1d ("powerpc/eeh: Fix crash in eeh_add_device_early() on Cell") a new check was introduced in this function - Cell has no EEH capabilities which led to kernel oops if hotplug was performed, so checking for eeh_enabled() was introduced to avoid the issue. However, in architectures that EEH is present like pSeries or PowerNV, we might reach a case in which no PCI devices are present on boot time and so EEH is not initialized. Then, if a device is added via DLPAR for example, eeh_add_device_early() fails because eeh_enabled() is false, and EEH end up not being enabled at all. This reverts the aforementioned patch since a new verification was introduced by the commit d91dafc02f42 ("powerpc/eeh: Delay probing EEH device during hotplug") and so the original Cell issue does not happen anymore. Cc: stable@vger.kernel.org # v4.1+ Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/eeh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6d63d720db3a63dd45142c2ce7978b52e0e684f Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Wed Apr 27 11:14:53 2016 +1000 powerpc/eeh: Drop unnecessary label in eeh_pe_change_owner() The label "reset" in eeh_pe_change_owner() is used only for once. No need to keep it and just drop it. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/eeh.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit 2efc771f2492dfce71ce281efb9cc93c3ae8f2fc Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Wed Apr 27 11:14:52 2016 +1000 powerpc/eeh: Ignore handlers in eeh_pe_reset_and_recover() The function eeh_pe_reset_and_recover() is used to recover EEH error when the passthrough device are transferred to guest and backwards, meaning the device's driver is vfio-pci or none. In both cases, the handlers triggered by eeh_report_reset() and eeh_report_resume() shouldn't be called. This ignores the error handlers from eeh_report_reset() and eeh_report_resume(). Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/eeh_driver.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) commit 5a0cdbfd17b90a89c64a71d8aec9773ecdb20d0d Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Wed Apr 27 11:14:51 2016 +1000 powerpc/eeh: Restore initial state in eeh_pe_reset_and_recover() The function eeh_pe_reset_and_recover() is used to recover EEH error when the passthrou device are transferred to guest and backwards. The content in the device's config space will be lost on PE reset issued in the middle of the recovery. The function saves/restores it before/after the reset. However, config access to some adapters like Broadcom BCM5719 at this point will causes fenced PHB. The config space is always blocked and we save 0xFF's that are restored at late point. The memory BARs are totally corrupted, causing another EEH error upon access to one of the memory BARs. This restores the config space on those adapters like BCM5719 from the content saved to the EEH device when it's populated, to resolve above issue. Fixes: 5cfb20b9 ("powerpc/eeh: Emulate EEH recovery for VFIO devices") Cc: stable@vger.kernel.org #v3.18+ Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/eeh_driver.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit affeb0f2d3a9af419ad7ef4ac782e1540b2f7b28 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Wed Apr 27 11:14:50 2016 +1000 powerpc/eeh: Don't report error in eeh_pe_reset_and_recover() The function eeh_pe_reset_and_recover() is used to recover EEH error when the passthrough device are transferred to guest and backwards, meaning the device's driver is vfio-pci or none. When the driver is vfio-pci that provides error_detected() error handler only, the handler simply stops the guest and it's not expected behaviour. On the other hand, no error handlers will be called if we don't have a bound driver. This ignores the error handler in eeh_pe_reset_and_recover() that reports the error to device driver to avoid the exceptional behaviour. Fixes: 5cfb20b9 ("powerpc/eeh: Emulate EEH recovery for VFIO devices") Cc: stable@vger.kernel.org #v3.18+ Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Russell Currey <ruscur@russell.cc> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/eeh_driver.c | 3 --- 1 file changed, 3 deletions(-) commit 848912e547c4569445a61203a7df402646a88c25 Author: Michael Ellerman <mpe@ellerman.id.au> Date: Thu May 12 19:43:37 2016 +1000 Revert "powerpc/powernv: Exclude root bus in pnv_pci_reset_secondary_bus()" This reverts commit c8ceacc22bce95d3a9cff198c9c27a30105a16b8. Gavin says: I missed the fact that it affects the PCI passthrou path as reported by Alexey: When passing GPU (0003:01:00.0) which seats behind the root port, the reset request is routed to skiboot in original code. In skiboot, the link bouncing events are masked during the reset. So we don't see EEH (freeze all) error even link bouncing happens. With the changes included, the reset is done by kernel and the link bouncing events aren't masked by altering content of PHB3 (or P7IOC) specific hardware registers which are invisible to kernel (skiboot hides the hardware specific). It means the link bouncing is seen by the root port and it causes a EEH (freeze all) error. The PCI passthrough on GPU device cannot work. Requested-by: Alexey Kardashevskiy <aik@ozlabs.ru> Requested-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/eeh-powernv.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) commit 227e4f4079e198695b9b5df344aa0e29676a5a29 Author: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Date: Thu May 5 11:47:07 2016 +0530 drm/panel: simple: Add support for TPK U.S.A. LLC Fusion 7" and 10.1" panels Add support for TPK U.S.A. LLC Fusion 7", 10.1" panels to the DRM simple panel driver. Signed-off-by: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com> .../bindings/display/panel/tpk,f07a-0102.txt | 8 ++++ .../bindings/display/panel/tpk,f10a-0102.txt | 8 ++++ .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/gpu/drm/panel/panel-simple.c | 51 ++++++++++++++++++++++ 4 files changed, 68 insertions(+) commit 0647e7dd3f7ab2e0490691eae185ab0c49fc266f Author: Enric Balletbo i Serra <enric.balletbo@collabora.com> Date: Mon May 2 09:54:26 2016 +0200 drm/bridge: Add Analogix anx78xx support Although there are other chips from the same family that can reuse this driver, at the moment we only tested ANX7814 chip. The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter designed for portable devices. This driver adds initial support for HDMI to DP pass-through mode. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Tested-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Cc: Emil Velikov <emil.l.velikov@gmail.com> Cc: Rob Herring <robh@kernel.org> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Daniel Kurtz <djkurtz@chromium.org> Cc: Nicolas Boichat <drinkcat@chromium.org> Cc: Thierry Reding <treding@nvidia.com> [treding@nvidia.com: coding style, propagate regulator_get() errors] Signed-off-by: Thierry Reding <treding@nvidia.com> drivers/gpu/drm/bridge/Kconfig | 10 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/analogix-anx78xx.c | 1514 +++++++++++++++++++++++++++++ drivers/gpu/drm/bridge/analogix-anx78xx.h | 719 ++++++++++++++ 4 files changed, 2244 insertions(+) commit 6060fd42a24d1c3fd6282659da3b097582dc1bca Author: Enric Balletbo i Serra <enric.balletbo@collabora.com> Date: Mon May 2 09:54:25 2016 +0200 devicetree: Add ANX7814 SlimPort transmitter binding The ANX7814 is an ultra-low power Full-HD (1080p60) SlimPort transmitter designed for portable devices. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com> .../devicetree/bindings/video/bridge/anx7814.txt | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) commit ae4927ffc7f7090ddb4c833b88f6f09f294502cd Author: Enric Balletbo i Serra <enric.balletbo@collabora.com> Date: Mon May 2 09:54:24 2016 +0200 of: Add vendor prefix for Analogix Semiconductor Analogix Semiconductor Inc. develops analog and mixed-signal devices for digital media and communications interconnect applications. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 56c5da00271e656466d34b853d6c2b5f3ce3ee5a Author: Enric Balletbo i Serra <enric.balletbo@collabora.com> Date: Mon May 2 09:54:23 2016 +0200 drm/dp: Add define to set 0.5% down-spread in MAX_DOWNSPREAD register Support of 0.5% down-spread is required for DisplayPort Specification Version 1.1 Sink. Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> [treding@nvidia.com: rename to DP_MAX_DOWNSPREAD_0_5] Signed-off-by: Thierry Reding <treding@nvidia.com> include/drm/drm_dp_helper.h | 1 + 1 file changed, 1 insertion(+) commit 4fc24ab3a13b071b2574ef6e0f28b8f2cd2e85a8 Author: Riccardo Bortolato <bortolato@navaltechitalia.it> Date: Wed Apr 20 15:37:15 2016 +0200 drm/panel: simple: Add support for Innolux AT070TN92 Add support for the Innolux AT070TN92 panel. Signed-off-by: Riccardo Bortolato <bortolato@navaltechitalia.it> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Thierry Reding <treding@nvidia.com> .../bindings/display/panel/innolux,at070tn92.txt | 7 ++++++ drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit 844e2f5290799e9eac04951371593efcf2ad4660 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Thu Apr 30 16:38:36 2015 +0200 drm/panel: simple: Remove useless drm_mode_set_name() drm_display_mode_from_videomode() already calls drm_mode_set_name() on the provided mode. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> [treding@nvidia.com: slightly reword commit message] Signed-off-by: Thierry Reding <treding@nvidia.com> drivers/gpu/drm/panel/panel-simple.c | 2 -- 1 file changed, 2 deletions(-) commit cda553725c92b9f908f6f69e9bc05de81384d817 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Fri Apr 15 18:23:33 2016 +0200 drm/panel: simple: Set appropriate mode type All modes exposed by simple panels should be tagged as driver defined modes. Moreover, if a panel supports only one mode, this mode is obviously the preferred one. Doing this also fix a problem occurring when a 'video=' parameter is passed on the kernel command line. In some cases the user provided mode will be preferred over the simple panel ones, which might result in unpredictable behavior. Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com> Tested-by: Nicolas Ferre <nicolas.ferre@atmel.com> [treding@nvidia.com: reshuffle some code for consistency] Signed-off-by: Thierry Reding <treding@nvidia.com> drivers/gpu/drm/panel/panel-simple.c | 11 +++++++++++ 1 file changed, 11 insertions(+) commit cf5c9e6dc70d9d8af00ea45b4ebd67e1fc35764e Author: Maxime Ripard <maxime.ripard@free-electrons.com> Date: Wed Mar 23 17:38:34 2016 +0100 drm/panel: simple: Add timings for the Olimex LCD-OLinuXino-4.3TS Add support for the Olimex LCD-OLinuXino-4.3TS panel to the DRM simple panel driver. It is a 480x272 panel connected through a 24-bits RGB interface. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com> .../display/panel/olimex,lcd-olinuxino-43-ts.txt | 7 ++++++ drivers/gpu/drm/panel/panel-simple.c | 26 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) commit e8b6f561b2eeb667aff932d9a5af5a6279221283 Author: Eric Anholt <eric@anholt.net> Date: Thu Mar 24 17:23:48 2016 -0700 drm/panel: simple: Add the 7" DPI panel from Adafruit This is a basic TFT panel with a 40-pin FPC connector on it. The specification doesn't define timings, but the Adafruit instructions were setting up 800x480 CVT. v2: Add .bus_format and vsync/hsync flags. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Rob Herring <robh@kernel.org> [treding@nvidia.com: keep entries properly sorted] Signed-off-by: Thierry Reding <treding@nvidia.com> .../bindings/display/panel/ontat,yx700wv03.txt | 7 ++++ drivers/gpu/drm/panel/panel-simple.c | 37 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) commit 686cfbd18668eaab303b28de2b45a1ffaf1e6247 Author: Eric Anholt <eric@anholt.net> Date: Thu Mar 24 17:23:47 2016 -0700 of: Add vendor prefix for On Tat Industrial Company. This is the vendor for a 7" DPI panel sold by Adafruit which I'd like to describe in DT. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Thierry Reding <treding@nvidia.com> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) commit 46fa38e84b656f80edf83d21144221b0cad18d61 Author: Johannes Berg <johannes.berg@intel.com> Date: Tue May 3 16:58:00 2016 +0300 mac80211: allow software PS-Poll/U-APSD with AP_LINK_PS When using RSS, frames might not be processed in the correct order, and thus AP_LINK_PS must be used; most likely with firmware keeping track of the powersave state, this is the case in iwlwifi now. In this case, the driver can use ieee80211_sta_ps_transition() to still have mac80211 manage powersave buffering. However, for U-APSD and PS-Poll this isn't sufficient. If the device can't manage that entirely on its own, mac80211's code should be used. To allow this, export two functions: ieee80211_sta_uapsd_trigger() and ieee80211_sta_pspoll(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> include/net/mac80211.h | 27 +++++++++++++++++++ net/mac80211/rx.c | 70 +++++++++++++++++++++++++++++++------------------- 2 files changed, 71 insertions(+), 26 deletions(-) commit 53873f134d285191ef6435882d55837093a36c53 Author: Johannes Berg <johannes.berg@intel.com> Date: Tue May 3 16:52:04 2016 +0300 cfg80211: make wdev_list accessible to drivers There's no harm in having drivers read the list, since they can use RCU protection or RTNL locking; allow this to not require each and every driver to also implement its own bookkeeping. Signed-off-by: Johannes Berg <johannes.berg@intel.com> include/net/cfg80211.h | 5 +++++ net/wireless/chan.c | 2 +- net/wireless/core.c | 17 ++++++++++------- net/wireless/core.h | 3 +-- net/wireless/nl80211.c | 16 ++++++++-------- net/wireless/reg.c | 2 +- net/wireless/sme.c | 4 ++-- net/wireless/sysfs.c | 2 +- net/wireless/util.c | 4 ++-- 9 files changed, 31 insertions(+), 24 deletions(-) commit 8b9b2f06998f33bdd1774a9860ec60e945977384 Author: Johannes Berg <johannes.berg@intel.com> Date: Tue May 3 16:26:40 2016 +0300 cfg80211: remove erroneous comment The devlist_mtx mutex was removed about two years ago, in favour of just using RTNL/RCU protection. Remove the comment still referencing it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/wireless/core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e9ea43905597d9ba79b421b87c7851b8350717c Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Tue May 3 16:08:07 2016 +0300 cfg80211: allow finding vendor with OUI without specifying the OUI type This allows finding vendor IE from a specific vendor. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> include/net/cfg80211.h | 4 ++-- net/wireless/scan.c | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit f631a77ba920f7153a1094d09cd8f2ebbffd0328 Author: Sara Sharon <sara.sharon@intel.com> Date: Tue May 3 15:59:44 2016 +0300 mac80211: allow same PN for AMSDU sub-frames Some hardware (iwlwifi an example) de-aggregate AMSDUs and copy the IV as is to the generated MPDUs, so the same PN appears in multiple packets without being a replay attack. Allow driver to explicitly indicate that a frame is allowed to have the same PN as the previous frame. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> include/net/mac80211.h | 6 +++++- net/mac80211/wpa.c | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) commit 20eb7ea93f7ffaaa24b19b8bfc411b1f7605759f Author: David Spinadel <david.spinadel@intel.com> Date: Tue May 3 16:05:02 2016 +0300 mac80211: remove disconnected APs from BSS table In some cases, after a sudden AP disappearing and reconnection to another AP in the same ESS, user space gets the old AP in scan results (cached). User space may decide to roam to that old AP which will cause a disconnection and longer recovery. Remove APs that are probably out of range from BSS table. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> net/mac80211/mlme.c | 5 +++++ 1 file changed, 5 insertions(+) commit 2c1984f244838477aab4e5882f4479491ae1084a Author: David Sterba <dsterba@suse.com> Date: Thu May 12 11:05:03 2016 +0200 btrfs: build fixup for qgroup_account_snapshot The macro btrfs_std_error got renamed to btrfs_handle_fs_error in an independent branch for the same merge target (4.7). To make the code compilable for bisectability reasons, add a temporary stub. Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/transaction.c | 5 +++++ 1 file changed, 5 insertions(+) commit 6426c7ad697df4bddf1d222685e6802e7616feaa Author: Qu Wenruo <quwenruo@cn.fujitsu.com> Date: Wed May 11 12:53:52 2016 -0700 btrfs: qgroup: Fix qgroup accounting when creating snapshot Current btrfs qgroup design implies a requirement that after calling btrfs_qgroup_account_extents() there must be a commit root switch. Normally this is OK, as btrfs_qgroup_accounting_extents() is only called inside btrfs_commit_transaction() just be commit_cowonly_roots(). However there is a exception at create_pending_snapshot(), which will call btrfs_qgroup_account_extents() but no any commit root switch. In case of creating a snapshot whose parent root is itself (create a snapshot of fs tree), it will corrupt qgroup by the following trace: (skipped unrelated data) ====== btrfs_qgroup_account_extent: bytenr = 29786112, num_bytes = 16384, nr_old_roots = 0, nr_new_roots = 1 qgroup_update_counters: qgid = 5, cur_old_count = 0, cur_new_count = 1, rfer = 0, excl = 0 qgroup_update_counters: qgid = 5, cur_old_count = 0, cur_new_count = 1, rfer = 16384, excl = 16384 btrfs_qgroup_account_extent: bytenr = 29786112, num_bytes = 16384, nr_old_roots = 0, nr_new_roots = 0 ====== The problem here is in first qgroup_account_extent(), the nr_new_roots of the extent is 1, which means its reference got increased, and qgroup increased its rfer and excl. But at second qgroup_account_extent(), its reference got decreased, but between these two qgroup_account_extent(), there is no switch roots. This leads to the same nr_old_roots, and this extent just got ignored by qgroup, which means this extent is wrongly accounted. Fix it by call commit_cowonly_roots() after qgroup_account_extent() in create_pending_snapshot(), with needed preparation. Mark: I added a check at the top of qgroup_account_snapshot() to skip this code if qgroups are turned off. xfstest btrfs/122 exposes this problem. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Mark Fasheh <mfasheh@suse.de> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/transaction.c | 129 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 105 insertions(+), 24 deletions(-) commit 3f56e687a138481894a1088d5aa7d41951bdb020 Author: Alexander Shishkin <alexander.shishkin@linux.intel.com> Date: Tue May 10 16:18:33 2016 +0300 perf/core: Disable the event on a truncated AUX record When the PMU driver reports a truncated AUX record, it effectively means that there is no more usable room in the event's AUX buffer (even though there may still be some room, so that perf_aux_output_begin() doesn't take action). At this point the consumer still has to be woken up and the event has to be disabled, otherwise the event will just keep spinning between perf_aux_output_begin() and perf_aux_output_end() until its context gets unscheduled. Again, for cpu-wide events this means never, so once in this condition, they will be forever losing data. Fix this by disabling the event and waking up the consumer in case of a truncated AUX record. Reported-by: Markus Metzger <markus.t.metzger@intel.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: vince@deater.net Link: http://lkml.kernel.org/r/1462886313-13660-3-git-send-email-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/events/ring_buffer.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 5fbe4788b55540a6c4fe2c47e05482ac356eaf74 Author: Alexander Shishkin <alexander.shishkin@linux.intel.com> Date: Tue May 10 16:18:32 2016 +0300 perf/x86/intel/pt: Generate PMI in the STOP region as well Currently, the PT driver always sets the PMI bit one region (page) before the STOP region so that we can wake up the consumer before we run out of room in the buffer and have to disable the event. However, we also need an interrupt in the last output region, so that we actually get to disable the event (if no more room from new data is available at that point), otherwise hardware just quietly refuses to start, but the event is scheduled in and we end up losing trace data till the event gets removed. For a cpu-wide event it is even worse since there may not be any re-scheduling at all and no chance for the ring buffer code to notice that its buffer is filled up and the event needs to be disabled (so that the consumer can re-enable it when it finishes reading the data out). In other words, all the trace data will be lost after the buffer gets filled up. This patch makes PT also generate a PMI when the last output region is full. Reported-by: Markus Metzger <markus.t.metzger@intel.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@infradead.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vince Weaver <vincent.weaver@maine.edu> Cc: vince@deater.net Link: http://lkml.kernel.org/r/1462886313-13660-2-git-send-email-alexander.shishkin@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/events/intel/pt.c | 2 ++ 1 file changed, 2 insertions(+) commit 5319e5ad0c4ed416d00515c96f493653f9929c65 Merge: 9ab975a 6d6f283 Author: Ingo Molnar <mingo@kernel.org> Date: Thu May 12 10:14:45 2016 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 50605ffbdaf6d7ccab70d4631fd8347fc78af14f Author: Thomas Gleixner <tglx@linutronix.de> Date: Wed May 11 14:23:31 2016 +0200 sched/core: Provide a tsk_nr_cpus_allowed() helper tsk_nr_cpus_allowed() is an accessor for task->nr_cpus_allowed which allows us to change the representation of ->nr_cpus_allowed if required. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1462969411-17735-2-git-send-email-bigeasy@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org> include/linux/sched.h | 5 +++++ kernel/sched/core.c | 2 +- kernel/sched/deadline.c | 28 ++++++++++++++-------------- kernel/sched/rt.c | 24 ++++++++++++------------ 4 files changed, 32 insertions(+), 27 deletions(-) commit ade42e092b5d1fb9a77b026f019b9953d66f1573 Author: Thomas Gleixner <tglx@linutronix.de> Date: Wed May 11 14:23:30 2016 +0200 sched/core: Use tsk_cpus_allowed() instead of accessing ->cpus_allowed Use the future-safe accessor for struct task_struct's. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1462969411-17735-1-git-send-email-bigeasy@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/sched/cpudeadline.c | 4 ++-- kernel/sched/cpupri.c | 4 ++-- kernel/sched/deadline.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 20878232c52329f92423d27a60e48b6a6389e0dd Author: Vik Heyndrickx <vik.heyndrickx@veribox.net> Date: Thu Apr 28 20:46:28 2016 +0200 sched/loadavg: Fix loadavg artifacts on fully idle and on fully loaded systems Systems show a minimal load average of 0.00, 0.01, 0.05 even when they have no load at all. Uptime and /proc/loadavg on all systems with kernels released during the last five years up until kernel version 4.6-rc5, show a 5- and 15-minute minimum loadavg of 0.01 and 0.05 respectively. This should be 0.00 on idle systems, but the way the kernel calculates this value prevents it from getting lower than the mentioned values. Likewise but not as obviously noticeable, a fully loaded system with no processes waiting, shows a maximum 1/5/15 loadavg of 1.00, 0.99, 0.95 (multiplied by number of cores). Once the (old) load becomes 93 or higher, it mathematically can never get lower than 93, even when the active (load) remains 0 forever. This results in the strange 0.00, 0.01, 0.05 uptime values on idle systems. Note: 93/2048 = 0.0454..., which rounds up to 0.05. It is not correct to add a 0.5 rounding (=1024/2048) here, since the result from this function is fed back into the next iteration again, so the result of that +0.5 rounding value then gets multiplied by (2048-2037), and then rounded again, so there is a virtual "ghost" load created, next to the old and active load terms. By changing the way the internally kept value is rounded, that internal value equivalent now can reach 0.00 on idle, and 1.00 on full load. Upon increasing load, the internally kept load value is rounded up, when the load is decreasing, the load value is rounded down. The modified code was tested on nohz=off and nohz kernels. It was tested on vanilla kernel 4.6-rc5 and on centos 7.1 kernel 3.10.0-327. It was tested on single, dual, and octal cores system. It was tested on virtual hosts and bare hardware. No unwanted effects have been observed, and the problems that the patch intended to fix were indeed gone. Tested-by: Damien Wyart <damien.wyart@free.fr> Signed-off-by: Vik Heyndrickx <vik.heyndrickx@veribox.net> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: <stable@vger.kernel.org> Cc: Doug Smythies <dsmythies@telus.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Fixes: 0f004f5a696a ("sched: Cure more NO_HZ load average woes") Link: http://lkml.kernel.org/r/e8d32bff-d544-7748-72b5-3c86cc71f09f@veribox.net Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/sched/loadavg.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) commit cfa10334318d8212d007da8c771187643c9cef35 Author: Morten Rasmussen <morten.rasmussen@arm.com> Date: Fri Apr 29 20:32:40 2016 +0100 sched/fair: Correct unit of load_above_capacity In calculate_imbalance() load_above_capacity currently has the unit [capacity] while it is used as being [load/capacity]. Not only is it wrong it also makes it unlikely that load_above_capacity is ever used as the subsequent code picks the smaller of load_above_capacity and the avg_load This patch ensures that load_above_capacity has the right unit [load/capacity]. Signed-off-by: Morten Rasmussen <morten.rasmussen@arm.com> [ Changed changelog to note it was in capacity unit; +rebase. ] Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Dietmar Eggemann <dietmar.eggemann@arm.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1461958364-675-4-git-send-email-dietmar.eggemann@arm.com Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/sched/fair.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1be0eb2a97d756fb7dd8c9baf372d81fa9699c09 Author: Peter Zijlstra <peterz@infradead.org> Date: Fri May 6 12:21:23 2016 +0200 sched/fair: Clean up scale confusion Wanpeng noted that the scale_load_down() in calculate_imbalance() was weird. I agree, it should be SCHED_CAPACITY_SCALE, since we're going to compare against busiest->group_capacity, which is in [capacity] units. Reported-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Morten Rasmussen <morten.rasmussen@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Yuyang Du <yuyang.du@intel.com> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/sched/fair.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 444969223c81c7d0a95136b7b4cfdcfbc96ac5bd Author: Wanpeng Li <wanpeng.li@hotmail.com> Date: Wed May 4 14:45:34 2016 +0800 sched/nohz: Fix affine unpinned timers mess The following commit: 9642d18eee2c ("nohz: Affine unpinned timers to housekeepers")' intended to affine unpinned timers to housekeepers: unpinned timers(full dynaticks, idle) => nearest busy housekeepers(otherwise, fallback to any housekeepers) unpinned timers(full dynaticks, busy) => nearest busy housekeepers(otherwise, fallback to any housekeepers) unpinned timers(houserkeepers, idle) => nearest busy housekeepers(otherwise, fallback to itself) However, the !idle_cpu(i) && is_housekeeping_cpu(cpu) check modified the intention to: unpinned timers(full dynaticks, idle) => any housekeepers(no mattter cpu topology) unpinned timers(full dynaticks, busy) => any housekeepers(no mattter cpu topology) unpinned timers(housekeepers, idle) => any busy cpus(otherwise, fallback to any housekeepers) This patch fixes it by checking if there are busy housekeepers nearby, otherwise falls to any housekeepers/itself. After the patch: unpinned timers(full dynaticks, idle) => nearest busy housekeepers(otherwise, fallback to any housekeepers) unpinned timers(full dynaticks, busy) => nearest busy housekeepers(otherwise, fallback to any housekeepers) unpinned timers(housekeepers, idle) => nearest busy housekeepers(otherwise, fallback to itself) Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> [ Fixed the changelog. ] Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Fixes: 'commit 9642d18eee2c ("nohz: Affine unpinned timers to housekeepers")' Link: http://lkml.kernel.org/r/1462344334-8303-1-git-send-email-wanpeng.li@hotmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/sched/core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 2f950354e6d535b892f133d20bd6a8b09430424c Author: Peter Zijlstra <peterz@infradead.org> Date: Wed May 11 19:27:56 2016 +0200 sched/fair: Fix fairness issue on migration Pavan reported that in the presence of very light tasks (or cgroups) the placement of migrated tasks can cause severe fairness issues. The problem is that enqueue_entity() places the task before it updates time, thereby it can place the task far in the past (remember that light tasks will shoot virtual time forward at a high speed, so in relation to the pre-existing light task, we can land far in the past). This is done because update_curr() needs the current task, and we might be placing the current task. The obvious solution is to differentiate between the current and any other task; placing the current before we update time, and placing any other task after, such that !curr tasks end up at the current moment in time, and not in the past. This commit re-introduces the previously reverted commit: 3a47d5124a95 ("sched/fair: Fix fairness issue on migration") ... which is now safe to do, after we've also fixed another underlying bug first, in: sched/fair: Prepare to fix fairness problems on migration and cleaned up other details in the migration code: sched/core: Kill sched_class::task_waking Reported-by: Pavan Kondeti <pkondeti@codeaurora.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/sched/fair.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) commit 59efa0bac9cf8b2ef8d08f7632826c6d90f6a9bb Author: Peter Zijlstra <peterz@infradead.org> Date: Tue May 10 18:24:37 2016 +0200 sched/core: Kill sched_class::task_waking to clean up the migration logic With sched_class::task_waking being called only when we do set_task_cpu(), we can make sched_class::migrate_task_rq() do the work and eliminate sched_class::task_waking entirely. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Hunter <ahh@google.com> Cc: Ben Segall <bsegall@google.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Mike Galbraith <efault@gmx.de> Cc: Mike Galbraith <umgwanakikbuti@gmail.com> Cc: Morten Rasmussen <morten.rasmussen@arm.com> Cc: Paul Turner <pjt@google.com> Cc: Pavan Kondeti <pkondeti@codeaurora.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: byungchul.park@lge.com Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/sched/core.c | 9 +------- kernel/sched/fair.c | 58 +++++++++++++++++++++++++--------------------------- kernel/sched/sched.h | 7 +++---- 3 files changed, 32 insertions(+), 42 deletions(-) commit b5179ac70de85ef477cedf8b026a57913754cf1e Author: Peter Zijlstra <peterz@infradead.org> Date: Wed May 11 16:10:34 2016 +0200 sched/fair: Prepare to fix fairness problems on migration Mike reported that our recent attempt to fix migration problems: 3a47d5124a95 ("sched/fair: Fix fairness issue on migration") broke interactivity and the signal starve test. We reverted that commit and now let's try it again more carefully, with some other underlying problems fixed first. One problem is that I assumed ENQUEUE_WAKING was only set when we do a cross-cpu wakeup (migration), which isn't true. This means we now destroy the vruntime history of tasks and wakeup-preemption suffers. Cure this by making my assumption true, only call sched_class::task_waking() when we do a cross-cpu wakeup. This avoids the indirect call in the case we do a local wakeup. Reported-by: Mike Galbraith <mgalbraith@suse.de> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Hunter <ahh@google.com> Cc: Ben Segall <bsegall@google.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Mike Galbraith <efault@gmx.de> Cc: Morten Rasmussen <morten.rasmussen@arm.com> Cc: Paul Turner <pjt@google.com> Cc: Pavan Kondeti <pkondeti@codeaurora.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: byungchul.park@lge.com Cc: linux-kernel@vger.kernel.org Fixes: 3a47d5124a95 ("sched/fair: Fix fairness issue on migration") Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/sched/core.c | 29 +++++++++++++++++++++-------- kernel/sched/fair.c | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 8 deletions(-) commit c58d25f371f5e4b2dfbec3a7bd6f3c24dd79095b Author: Peter Zijlstra <peterz@infradead.org> Date: Thu May 12 09:19:59 2016 +0200 sched/fair: Move record_wakee() Since I want to make ->task_woken() conditional on the task getting migrated, we cannot use it to call record_wakee(). Move it to select_task_rq_fair(), which gets called in almost all the same conditions. The only exception is if the woken task (@p) is CPU-bound (as per the nr_cpus_allowed test in select_task_rq()). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Andrew Hunter <ahh@google.com> Cc: Ben Segall <bsegall@google.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Matt Fleming <matt@codeblueprint.co.uk> Cc: Mike Galbraith <efault@gmx.de> Cc: Mike Galbraith <umgwanakikbuti@gmail.com> Cc: Morten Rasmussen <morten.rasmussen@arm.com> Cc: Paul Turner <pjt@google.com> Cc: Pavan Kondeti <pkondeti@codeaurora.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: byungchul.park@lge.com Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org> kernel/sched/fair.c | 61 +++++++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 28 deletions(-) commit 4eb867651721228ee2eeae142c53378375303e8b Merge: eb60b3e e5ef27d Author: Ingo Molnar <mingo@kernel.org> Date: Thu May 12 09:51:36 2016 +0200 Merge branch 'smp/hotplug' into sched/core, to resolve conflicts Conflicts: kernel/sched/core.c Signed-off-by: Ingo Molnar <mingo@kernel.org> commit eb60b3e5e8dfdd590e586a6fc22daf2f63a7b7e6 Merge: 58fe9c4 53d3bc7 Author: Ingo Molnar <mingo@kernel.org> Date: Thu May 12 09:18:13 2016 +0200 Merge branch 'sched/urgent' into sched/core to pick up fixes Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 754a92305980b1fecffe033dd3fdc49c37f8e4b0 Author: Yazen Ghannam <Yazen.Ghannam@amd.com> Date: Wed May 11 14:58:29 2016 +0200 x86/RAS: Add SMCA support to AMD Error Injector Use SMCA MSRs when writing to MCA_{STATUS,ADDR,MISC} and MCA_DE{STAT,ADDR} when injecting Deferred Errors on SMCA platforms. Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Aravind Gopalakrishnan <aravindksg.lkml@gmail.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1462971509-3856-8-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/ras/mce_amd_inj.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) commit a348ed83d9efe8c11ecc85c15d7329825b97431e Author: Yazen Ghannam <Yazen.Ghannam@amd.com> Date: Wed May 11 14:58:28 2016 +0200 EDAC, mce_amd: Detect SMCA using X86_FEATURE_SMCA Use X86_FEATURE_SMCA when detecting if SMCA is available instead of directly using CPUID 0x80000007_EBX. Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1462971509-3856-7-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org> drivers/edac/mce_amd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) commit 14cddfd5308b0880abd6e58b6660f5cc8e8020f9 Author: Yazen Ghannam <Yazen.Ghannam@amd.com> Date: Wed May 11 14:58:27 2016 +0200 x86/mce: Update AMD mcheck init to use cpu_has() facilities Use cpu_has() facilities to find available RAS features rather than directly reading CPUID 0x80000007_EBX. Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com> [ Use the struct cpuinfo_x86 ptr instead. ] Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1462971509-3856-6-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/kernel/cpu/mcheck/mce.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) commit 71faad43060d3d2040583635fbf7d1bdb3d04118 Author: Yazen Ghannam <Yazen.Ghannam@amd.com> Date: Wed May 11 14:58:26 2016 +0200 x86/cpu: Add detection of AMD RAS Capabilities Add a new CPUID leaf to hold the contents of CPUID 0x80000007_EBX (RasCap). Define bits that are currently in use: Bit 0: McaOverflowRecov Bit 1: SUCCOR Bit 3: ScalableMca Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com> [ Shorten comment. ] Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1462971509-3856-5-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/include/asm/cpufeature.h | 1 + arch/x86/include/asm/cpufeatures.h | 7 ++++++- arch/x86/kernel/cpu/common.c | 10 +++++++--- 3 files changed, 14 insertions(+), 4 deletions(-) commit e128b4f4833cc1e0ce46dfb978763b260f166188 Author: Borislav Petkov <bp@suse.de> Date: Wed May 11 14:58:25 2016 +0200 x86/mce/AMD: Save an indentation level in prepare_threshold_block() Do the !SMCA work first and then save us an indentation level for the SMCA code. No functionality change. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Aravind Gopalakrishnan <aravindksg.lkml@gmail.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: Yazen Ghannam <Yazen.Ghannam@amd.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1462971509-3856-4-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/kernel/cpu/mcheck/mce_amd.c | 78 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 40 deletions(-) commit 32544f060326bffa60dade49ce4595652df4d3ab Author: Yazen Ghannam <Yazen.Ghannam@amd.com> Date: Wed May 11 14:58:24 2016 +0200 x86/mce/AMD: Disable LogDeferredInMcaStat for SMCA systems Disable Deferred Error logging in MCA_{STATUS,ADDR} additionally for SMCA systems as this information will retrieved from MCA_DE{STAT,ADDR} on those systems. Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com> [ Simplify, drop SMCA_MCAX_EN_OFF define too. ] Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Aravind Gopalakrishnan <aravindksg.lkml@gmail.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1462971509-3856-3-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/kernel/cpu/mcheck/mce_amd.c | 38 +++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) commit 34102009580a047c02b21f089f7fc7f65e605887 Author: Yazen Ghannam <Yazen.Ghannam@amd.com> Date: Wed May 11 14:58:23 2016 +0200 x86/mce/AMD: Log Deferred Errors using SMCA MCA_DE{STAT,ADDR} registers Scalable MCA provides new registers for all banks for logging deferred errors: MCA_DESTAT and MCA_DEADDR. Deferred errors are always logged to these registers. Update the AMD deferred error handler to use these registers, if available. Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com> [ Sanity-check __log_error() args, massage a bit. ] Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Aravind Gopalakrishnan <aravindksg.lkml@gmail.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Tony Luck <tony.luck@intel.com> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/1462971509-3856-2-git-send-email-bp@alien8.de Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/include/asm/mce.h | 4 ++++ arch/x86/kernel/cpu/mcheck/mce_amd.c | 32 ++++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) commit 9ab975a029ec96b47c2f830aef6efd0e24f5c304 Merge: 38f5d8b d65444d Author: Ingo Molnar <mingo@kernel.org> Date: Thu May 12 08:57:52 2016 +0200 Merge tag 'perf-core-for-mingo-20160511' 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: - Fix symbol insertion and callchain behavior in db-export (Chris Phlipot) Infrastructure changes: - Add libunwind build test (feature query), working towards supporting cross-platform DWARF callchains, starting with arm/arm64 (He Kuang) - Use lsdir() more extensively (Masami Hiramatsu) - Use SBUILD_ID_SIZE in places where the equivalent expression was being used (Masami Hiramatsu) - Split some more 'perf trace' syscall arg beautifiers (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> commit b1a4286b8f3393857a205ec89607683161b75f90 Author: Paul Mackerras <paulus@ozlabs.org> Date: Wed May 4 21:07:52 2016 +1000 KVM: PPC: Book3S HV: Re-enable XICS fast path for irqfd-generated interrupts Commit c9a5eccac1ab ("kvm/eventfd: add arch-specific set_irq", 2015-10-16) added the possibility for architecture-specific code to handle the generation of virtual interrupts in atomic context where possible, without having to schedule a work function. Since we can easily generate virtual interrupts on XICS without having to do anything worse than take a spinlock, we define a kvm_arch_set_irq_inatomic() for XICS. We also remove kvm_set_msi() since it is not used any more. The one slightly tricky thing is that with the new interface, we don't get told whether the interrupt is an MSI (or other edge sensitive interrupt) vs. level-sensitive. The difference as far as interrupt generation is concerned is that for LSIs we have to set the asserted flag so it will continue to fire until it is explicitly cleared. In fact the XICS code gets told which interrupts are LSIs by userspace when it configures the interrupt via the KVM_DEV_XICS_GRP_SOURCES attribute group on the XICS device. To store this information, we add a new "lsi" field to struct ics_irq_state. With that we can also do a better job of returning accurate values when reading the attribute group. Signed-off-by: Paul Mackerras <paulus@samba.org> arch/powerpc/kvm/book3s_xics.c | 25 +++++++++++++++---------- arch/powerpc/kvm/book3s_xics.h | 1 + 2 files changed, 16 insertions(+), 10 deletions(-) commit 07b0e7d49cbcadebad9d3b986f3298e33286dea2 Author: Kedareswara rao Appana <appana.durga.rao@xilinx.com> Date: Thu Apr 7 10:59:45 2016 +0530 dmaengine: vdma: Add Support for Xilinx AXI Central Direct Memory Access Engine This patch adds support for the AXI Central Direct Memory Access (AXI CDMA) core to the existing vdma driver, AXI CDMA is a soft Xilinx IP core that provides high-bandwidth Direct Memory Access(DMA) between a memory-mapped source address and a memory-mapped destination address. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/xilinx/xilinx_vdma.c | 236 ++++++++++++++++++++++++++++++++++++++- include/linux/dma/xilinx_dma.h | 2 + 2 files changed, 236 insertions(+), 2 deletions(-) commit 3843dc282e2b48730c4dc669d7d5671331155c2f Author: Kedareswara rao Appana <appana.durga.rao@xilinx.com> Date: Thu Apr 7 10:59:44 2016 +0530 Documentation: DT: vdma: update binding doc for AXI CDMA This patch updates the device-tree binding doc for adding support for AXI CDMA. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Documentation/devicetree/bindings/dma/xilinx/xilinx_vdma.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit c0bba3a99f0709c24c2c7ada7cb098966b1d791f Author: Kedareswara rao Appana <appana.durga.rao@xilinx.com> Date: Thu Apr 7 10:59:43 2016 +0530 dmaengine: vdma: Add Support for Xilinx AXI Direct Memory Access Engine This patch adds support for the AXI Direct Memory Access (AXI DMA) core in the existing vdma driver, AXI DMA Core is a soft Xilinx IP core that provides high-bandwidth direct memory access between memory and AXI4-Stream type target peripherals. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/xilinx/xilinx_vdma.c | 474 +++++++++++++++++++++++++++++++++++---- include/linux/dma/xilinx_dma.h | 12 + 2 files changed, 444 insertions(+), 42 deletions(-) commit 7e4cda70c0be3c82c0248aee5c4c255e46469fd7 Author: Kedareswara rao Appana <appana.durga.rao@xilinx.com> Date: Thu Apr 7 10:59:42 2016 +0530 Documentation: DT: vdma: update binding doc for AXI DMA This patch updates the device-tree binding doc for adding support for AXI DMA. Also this patch differentiates required properties b/w DMA and VDMA. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> .../devicetree/bindings/dma/xilinx/xilinx_vdma.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) commit 42c1a2ede4f6a320d6843fc846f5466bff836a0c Author: Kedareswara rao Appana <appana.durga.rao@xilinx.com> Date: Thu Apr 7 10:59:41 2016 +0530 dmaengine: vdma: Rename xilinx_vdma_ prefix to xilinx_dma This patch renames the xilinx_vdma_ prefix to xilinx_dma for the API's and masks that will be shared b/w three DMA IP cores. Signed-off-by: Kedareswara rao Appana <appanad@xilinx.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/xilinx/xilinx_vdma.c | 632 +++++++++++++++++++-------------------- 1 file changed, 316 insertions(+), 316 deletions(-) commit dd4e91d538b3d16d5241575a3fb654a9aa50392c Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue May 10 20:43:34 2016 +0300 dmaengine: slave means at least one of DMA_SLAVE, DMA_CYCLIC When check for capabilities recognize slave support by either DMA_SLAVE or DMA_CYCLIC bit set. If we don't do that the user can't get a normally worked DMA support for engines that doesn't have one of the mentioned bits set. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> drivers/dma/dmaengine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 488992916c50890fbe5e7057e29681a4c4fdf1f8 Merge: 631ad4a 831bfb0 Author: David S. Miller <davem@davemloft.net> Date: Thu May 12 00:04:08 2016 -0400 Merge branch 'qed-sriov' Yuval Mintz says: ==================== qed*: Add SR-IOV support This patch adds SR-IOV support to qed/qede drivers, adding a new PCI device ID for a VF that is shared between all the various PFs that support IOV. This is quite a massive series - the first 7 parts of the series add the infrastructure of supporting vfs in qed - mainly adding support in a HW-based vf<->pf channel, as well as diverging all existing configuration flows based on the pf/vf decision. I.e., while PF-originated requests head directly to HW/FW, the VF requests first have to traverse to the PF which will perform the configuration. The 8th patch is the one that adds the support for the VF device in qede. The remaining 6 patches each adds some user-based API support related to VFs that can be used over the PF - forcing mac/vlan, changing speed, etc. Dave, Sorry in advance for the length of the series. Most of the bulk here is in the infrastructure patches that have to go together [or at least, it makes little sense to try splitting them up]. Please consider applying this to `net-next'. Thanks, Yuval Changes from previous revision: ------------------------------ - V2 - Replace aligned_u64 with regular u64; This was possible as the shared structures [between PF and VF] were already sufficiently padded as-is in the API, making this redundant. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 831bfb0e88b54726d6e027a1d547066ffeb8b27e Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:25 2016 +0300 qed*: Tx-switching configuration Device should be configured by default to VEB once VFs are active. This changes the configuration of both PFs' and VFs' vports into enabling tx-switching once sriov is enabled. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dev.c | 3 ++- drivers/net/ethernet/qlogic/qed/qed_l2.c | 4 ++++ drivers/net/ethernet/qlogic/qed/qed_l2.h | 1 + drivers/net/ethernet/qlogic/qed/qed_main.c | 1 + drivers/net/ethernet/qlogic/qed/qed_sp.h | 3 ++- drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 5 ++++- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 1 + drivers/net/ethernet/qlogic/qed/qed_vf.c | 12 ++++++++++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 24 ++++++++++++++++++++++- include/linux/qed/qed_eth_if.h | 2 ++ include/linux/qed/qed_if.h | 1 + 11 files changed, 53 insertions(+), 4 deletions(-) commit 73390ac9d82bf9f0c849ff57b06a03145fbf05d6 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:24 2016 +0300 qed*: support ndo_get_vf_config Allows the user to view the VF configuration by observing the PF's device. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_sriov.c | 93 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 12 ++++ include/linux/qed/qed_iov_if.h | 3 + 3 files changed, 108 insertions(+) commit 6ddc7608258d57d61e16d55461400bb6eff18d72 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:23 2016 +0300 qed*: IOV support spoof-checking Add support in `ndo_set_vf_spoofchk' for allowing PF control over its VF spoof-checking configuration. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_l2.c | 4 ++ drivers/net/ethernet/qlogic/qed/qed_l2.h | 2 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 91 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 2 + drivers/net/ethernet/qlogic/qede/qede_main.c | 11 ++++ include/linux/qed/qed_iov_if.h | 2 + 6 files changed, 112 insertions(+) commit 733def6a04bf3d2810dd675e1240f8df94d633c3 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:22 2016 +0300 qed*: IOV link control This adds support in 2 ndo that allow PF to tweak the VF's view of the link - `ndo_set_vf_link_state' to allow it a view independent of the PF's, and `ndo_set_vf_rate' which would allow the PF to limit the VF speed. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed.h | 2 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 76 +++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 164 +++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 6 + drivers/net/ethernet/qlogic/qede/qede_main.c | 26 +++++ include/linux/qed/qed_iov_if.h | 6 + 6 files changed, 280 insertions(+) commit eff169608c250193e72089dc4ab15cb79e0bd68c Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:21 2016 +0300 qed*: Support forced MAC Allows the PF to enforce the VF's mac. i.e., by using `ip link ... vf <x> mac <value>'. While a MAC is forced, PF would prevent the VF from configuring any other MAC. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_l2.c | 9 ++ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 120 +++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 1 + drivers/net/ethernet/qlogic/qed/qed_vf.c | 47 +++++++++++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 21 +++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 31 +++++++ include/linux/qed/qed_eth_if.h | 3 + include/linux/qed/qed_iov_if.h | 2 + 8 files changed, 234 insertions(+) commit 08feecd7fc709077ce92d21a979f522a5f57170a Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:20 2016 +0300 qed*: Support PVID configuration This adds support for PF control over the VF vlan configuration. I.e., `ip link ... vf <x> vlan <vid>' should now be supported. 1. <vid> != 0 => VF receives [unknowingly] only traffic tagged by <vid> and tags all outgoing traffic sent by VF with <vid>. 2. <vid> == 0 ==> Remove the pvid configuration, reverting to previous. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dev.c | 9 +- drivers/net/ethernet/qlogic/qed/qed_l2.c | 14 +- drivers/net/ethernet/qlogic/qed/qed_l2.h | 6 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 364 ++++++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 26 ++ drivers/net/ethernet/qlogic/qed/qed_vf.c | 18 +- drivers/net/ethernet/qlogic/qed/qed_vf.h | 19 +- drivers/net/ethernet/qlogic/qede/qede_main.c | 18 ++ include/linux/qed/qed_iov_if.h | 1 + 9 files changed, 468 insertions(+), 7 deletions(-) commit fefb0202cc5c12172abba78a8404e69c6d82d680 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:19 2016 +0300 qede: Add VF support Adding a PCI callback for `sriov_configure' and a new PCI device id for the VF [+ Some minor changes to accomodate differences between PF and VF at the qede]. Following this, VF creation should be possible and the entire subset of existing PF functionality that's allow to VFs should be supported. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qede/qede.h | 4 ++ drivers/net/ethernet/qlogic/qede/qede_ethtool.c | 43 +++++++++++++++++++- drivers/net/ethernet/qlogic/qede/qede_main.c | 52 +++++++++++++++++++++---- 3 files changed, 90 insertions(+), 9 deletions(-) commit 17b235c1456e4ab203c39050c5535e28fe7d0de9 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:18 2016 +0300 qed: Align TLVs As the VF infrastructure is supposed to offer backward/forward compatibility, the various types associated with VF<->PF communication should be aligned across all various platforms that support IOV on our family of adapters. This adds a couple of currently missing values, specifically aligning the enum for the various TLVs possible in the communication between them. It then adds the PF implementation for some of those missing VF requests. This support isn't really necessary for the Linux VF as those VFs aren't requiring it [at least today], but are required by VFs running on other OSes. LRO is an example of one such configuration. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_l2.c | 92 ++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_l2.h | 52 +++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.c | 169 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 4 + drivers/net/ethernet/qlogic/qed/qed_vf.c | 6 + drivers/net/ethernet/qlogic/qed/qed_vf.h | 54 ++++++++- 6 files changed, 375 insertions(+), 2 deletions(-) commit 36558c3d77032feb2a49ff7818338256378a774f Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:17 2016 +0300 qed: Bulletin and Link Up to this point, VF and PF communication always originates from VF. As a result, VF cannot be notified of any async changes, and specifically cannot be informed of the current link state. This introduces the bulletin board, the mechanism through which the PF is going to communicate async notifications back to the VF. basically, it's a well-defined structure agreed by both PF and VF which the VF would continuously poll and into which the PF would DMA messages when needed. [Bulletin board is actually allocated and communicated in previous patches but never before used] Based on the bulletin infrastructure, the VF can query its link status and receive said async carrier changes. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_main.c | 12 ++- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 136 +++++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 5 + drivers/net/ethernet/qlogic/qed/qed_vf.c | 122 ++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 156 ++++++++++++++++++++++++++++ 5 files changed, 425 insertions(+), 6 deletions(-) commit dacd88d6f6851510735e8db7a5981d4abcda6cb2 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:16 2016 +0300 qed: IOV l2 functionality This adds sufficient changes to allow VFs l2-configuration flows to work. While the fastpath of the VF and the PF are meant to be exactly the same, the configuration of the VF is done by the PF. This diverges all VF-related configuration flows that originate from a VF, making them pass through the VF->PF channel and adding sufficient logic on the PF side to support them. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed.h | 1 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 10 +- drivers/net/ethernet/qlogic/qed/qed_l2.c | 456 ++++++++-------- drivers/net/ethernet/qlogic/qed/qed_l2.h | 178 +++++++ drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 2 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 704 +++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 24 + drivers/net/ethernet/qlogic/qed/qed_vf.c | 445 ++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 383 +++++++++++++- 9 files changed, 1957 insertions(+), 246 deletions(-) commit 0b55e27d563f493665693b494735574e68c3c5b9 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:15 2016 +0300 qed: IOV configure and FLR While previous patches have already added the necessary logic to probe VFs as well as enabling them in the HW, this patch adds the ability to support VF FLR & SRIOV disable. It then wraps both flows together into the first IOV callback to be provided to the protocol driver - `configure'. This would later to be used to enable and disable SRIOV in the adapter. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed_dev.c | 17 +- drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 4 +- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 11 +- drivers/net/ethernet/qlogic/qed/qed_l2.c | 7 + drivers/net/ethernet/qlogic/qed/qed_main.c | 1 + drivers/net/ethernet/qlogic/qed/qed_mcp.c | 72 +++ drivers/net/ethernet/qlogic/qed/qed_mcp.h | 12 + drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 10 + drivers/net/ethernet/qlogic/qed/qed_sp.h | 1 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 660 +++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 33 +- drivers/net/ethernet/qlogic/qed/qed_vf.c | 97 ++++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 45 ++ include/linux/qed/qed_eth_if.h | 4 + include/linux/qed/qed_iov_if.h | 20 + 15 files changed, 983 insertions(+), 11 deletions(-) commit 1408cc1fa48c5450c0dc4b40cbd9718ecb09d1c9 Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:14 2016 +0300 qed: Introduce VFs This adds the qed VFs for the first time - The vfs are limited functions, with a very different PCI bar structure [when compared with PFs] to better impose the related security demands associated with them. This patch includes the logic neccesary to allow VFs to successfully probe [without actually adding the ability to enable iov]. This includes diverging all the flows that would occur as part of the pci probe of the driver, preventing VF from accessing registers/memories it can't and instead utilize the VF->PF channel to query the PF for needed information. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/Makefile | 2 +- drivers/net/ethernet/qlogic/qed/qed.h | 5 + drivers/net/ethernet/qlogic/qed/qed_cxt.c | 186 +++++++++-- drivers/net/ethernet/qlogic/qed/qed_cxt.h | 3 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 182 +++++++++-- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 47 ++- drivers/net/ethernet/qlogic/qed/qed_hw.c | 12 +- drivers/net/ethernet/qlogic/qed/qed_init_ops.c | 4 + drivers/net/ethernet/qlogic/qed/qed_int.c | 101 +++++- drivers/net/ethernet/qlogic/qed/qed_int.h | 16 + drivers/net/ethernet/qlogic/qed/qed_l2.c | 57 +++- drivers/net/ethernet/qlogic/qed/qed_main.c | 192 +++++++---- drivers/net/ethernet/qlogic/qed/qed_mcp.c | 83 ++++- drivers/net/ethernet/qlogic/qed/qed_mcp.h | 27 +- drivers/net/ethernet/qlogic/qed/qed_reg_addr.h | 6 + drivers/net/ethernet/qlogic/qed/qed_sp.h | 2 + drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 8 + drivers/net/ethernet/qlogic/qed/qed_spq.c | 3 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 379 +++++++++++++++++++++- drivers/net/ethernet/qlogic/qed/qed_sriov.h | 49 +++ drivers/net/ethernet/qlogic/qed/qed_vf.c | 357 ++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 229 +++++++++++++ drivers/net/ethernet/qlogic/qede/qede_main.c | 13 +- include/linux/qed/common_hsi.h | 57 ++++ include/linux/qed/qed_if.h | 10 +- 25 files changed, 1842 insertions(+), 188 deletions(-) commit 37bff2b9c6addf6216c8d04e95be596678e8deff Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:13 2016 +0300 qed: Add VF->PF channel infrastructure Communication between VF and PF is based on a dedicated HW channel; VF will prepare a messge, and by signaling the HW the PF would get a notification of that message existance. The PF would then copy the message, process it and DMA an answer back to the VF as a response. The messages themselves are TLV-based - allowing easier backward/forward compatibility. This patch adds the infrastructure of the channel on the PF side - starting with the arrival of the notification and ending with DMAing the response back to the VF. It also adds a dummy-response as reference, as it only lays the groundwork of the communication; it doesn't really add support of any actual messages. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/qed/qed.h | 6 + drivers/net/ethernet/qlogic/qed/qed_dev_api.h | 27 +- drivers/net/ethernet/qlogic/qed/qed_hsi.h | 2 +- drivers/net/ethernet/qlogic/qed/qed_hw.c | 44 ++- drivers/net/ethernet/qlogic/qed/qed_main.c | 10 +- drivers/net/ethernet/qlogic/qed/qed_spq.c | 16 +- drivers/net/ethernet/qlogic/qed/qed_sriov.c | 385 ++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 53 ++++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 52 ++++ include/linux/qed/common_hsi.h | 5 + 10 files changed, 585 insertions(+), 15 deletions(-) commit 32a47e72c9eb17e3b1bb507184e788b10d69ad4b Author: Yuval Mintz <Yuval.Mintz@qlogic.com> Date: Wed May 11 16:36:12 2016 +0300 qed: Add CONFIG_QED_SRIOV Add support for a new Kconfig option for qed* driver which would allow [eventually] the support in VFs. This patch adds the necessary logic in the PF to learn about the possible VFs it will have to support [Based on PCI configuration space and HW], and prepare a database with an entry per-VF as infrastructure for future interaction with said VFs. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/qlogic/Kconfig | 10 + drivers/net/ethernet/qlogic/qed/Makefile | 1 + drivers/net/ethernet/qlogic/qed/qed.h | 7 + drivers/net/ethernet/qlogic/qed/qed_dev.c | 19 ++ drivers/net/ethernet/qlogic/qed/qed_hw.c | 11 + drivers/net/ethernet/qlogic/qed/qed_hw.h | 10 + drivers/net/ethernet/qlogic/qed/qed_sriov.c | 366 ++++++++++++++++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_sriov.h | 185 ++++++++++++++ drivers/net/ethernet/qlogic/qed/qed_vf.h | 41 ++++ 9 files changed, 650 insertions(+) commit 7d020672615d09cf6ec42c500f34d70adf6758a9 Merge: 9530697 b4eeed5 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 12 11:16:55 2016 +1000 Merge branch 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux into drm-next More amdgpu fixes for 4.7. Highlights: - enable async pageflips - UVD fixes for polaris - lots of GPUVM fixes - whitespace and code cleanups - misc bug fixes * 'drm-next-4.7' of git://people.freedesktop.org/~agd5f/linux: (32 commits) drm/amd/powerplay: rewrite pp_sw_init to make code readable drm/amdgpu/dce11: fix audio offset for asics with >7 audio pins drm/amdgpu: fix and cleanup user fence handling v2 drm/amdgpu: move VM fields into job drm/amdgpu: move the context from the IBs into the job drm/amdgpu: move context switch handling into common code v2 drm/amdgpu: move preamble IB handling into common code drm/amdgpu/gfx7: fix pipeline sync amdgpu/uvd: separate context buffer from DPB drm/amdgpu: use fence_context to judge ctx switch v2 drm/amd/amdgpu: Added more named DRM info messages for debugging drm/amd/amdgpu: Add name field to amd_ip_funcs (v2) drm/amdgpu: Support DRM_MODE_PAGE_FLIP_ASYNC (v2) drm/amdgpu/dce11: don't share PLLs on Polaris drm/amdgpu: Drop unused parameter for *get_sleep_divider_id_from_clock drm/amdgpu: Simplify calculation in *get_sleep_divider_id_from_clock drm/amdgpu: Use max macro in *get_sleep_divider_id_from_clock drm/amd/powerplay: Use defined constants for minium engine clock drm/amdgpu: add missing licenses on a couple of files drm/amdgpu: fetch cu_info once at init ... commit 95306975e9dd38ba2775dd96cb29987ecc7d9360 Merge: 93f517c 057eab2 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 12 11:15:18 2016 +1000 Merge tag 'drm/tegra/for-4.7-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.7-rc1 Two small changes, one getting rid of the bogus gamma table size and another removing Terje from the MAINTAINERS file since he no longer does any work on host1x or display. * tag 'drm/tegra/for-4.7-rc1' of git://anongit.freedesktop.org/tegra/linux: MAINTAINERS: Remove Terje Bergström as Tegra DRM maintainer drm/tegra: Don't set a gamma table size commit 93f517c4a76ffba270c42c9bf0bc32801572c077 Merge: 6d23abf 165cccc Author: Dave Airlie <airlied@redhat.com> Date: Thu May 12 11:11:03 2016 +1000 Merge branch 'drm-hisilicon-next' of github.com:xin3liang/linux into drm-next misc hisilicon cleanups. * 'drm-hisilicon-next' of github.com:xin3liang/linux: drm/hisilicon: Fix DRM_INFO printed issue drm/hisilicon: Make kirin_drm_unbind sufficient drm/hisilicon: Use drm_connector_register_all commit 6d23abf58a9afd3bc28aaf0384155b04c4b77912 Merge: 19ea5da dd65a68 Author: Dave Airlie <airlied@redhat.com> Date: Thu May 12 10:10:53 2016 +1000 Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Summary: - expose HDMI-PHY clock to other drivers. . this patch was included in below patch series but I missed. http://www.spinics.net/lists/dri-devel/msg103097.html - some fixups about DECON5433 driver . this patch corrects vblank handling and fixes up trigger configuration. - use generic functions - gem_prime_mmap and dma_buf_mmap. - use DMA-Mapping API instead of specific one. - some code cleanups and fixeups. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos/decon5433: fix trigger configuration drm/exynos/dsi: use of_graph_get_endpoint_by_regs helper drm/exynos/dpi: use of_graph_get_endpoint_by_regs helper drm/exynos: Nuke dummy fb->dirty callback drm/exynos: use directly DMA mapping APIs on g2d drm/exynos/hdmi: Don't print error on deferral due to regulators drm/exynos: fix imported dma-buf to be mapped drm/exynos: support gem_prime_mmap drm/exynos: fimd: harden fimd_calc_clkdiv() drm/exynos: fix cancel page flip code drm/exynos/decon5433: do not use unnecessary software trigger drm/exynos/decon5433: handle vblank in vblank interrupt drm/exynos/hdmi: expose HDMI-PHY clock as pipeline clock commit 631ad4a3e74d998b089e75983c0c5bf893c94b62 Merge: 6a47a57 b31d510 Author: David S. Miller <davem@davemloft.net> Date: Wed May 11 20:00:54 2016 -0400 Merge tag 'nfc-next-4.7-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next Samuel Ortiz says: ==================== NFC 4.7 pull request This is the first NFC pull request for 4.7. With this one we mainly have: - Support for NXP's pn532 NFC chipset. The pn532 is based on the same microcontroller as the pn533, but it talks to the host through i2c instead of USB. By separating the pn533 driver into core and PHY parts, we can not add the i2c layer and support the pn532 chipset. - Support for NCI's loopback mode. This is a testing mode where each packet received by the NFCC is sent back to the DH, allowing the host to test that the controller can receive and send data. - A few ACPI related fixes for the STMicro drivers, in order to match the device tree naming scheme. - A bunch of cleanups for the st-nci and the st21nfca STMicro drivers. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 6a47a570321fdcd2b6fc9e6537b2a3650d0fd04b Merge: c1869d5 b797a68 Author: David S. Miller <davem@davemloft.net> Date: Wed May 11 19:42:39 2016 -0400 Merge branch 'mlx5-next' Saeed Mahameed says: ==================== Mellanox 100G mlx5 CQE compression Introducing ConnectX-4 CQE (Completion Queue Entry) compression feature for mlx5 etherent driver. CQE Compressing reduces PCI overhead by coalescing and compressing multiple CQEs into a single merged CQE. Successful compressing improves message rate especially for small packet traffic. CQE Compressing in details: Instead of writing full CQEs to memory, multiple almost identical CQEs are merged and compressed. Information that is shared between the CQEs is written once, regardless of the number of compressed CQEs. In addition, only the unique information (small amount of bytes compared to full CQE size) is written per CQE. CQE Compression Block: This block contains multiple compressed CQEs. CQE Compression Block contains a single copy of CQEs properties which are shared between all the compressed CQEs (called Title, see below) and multiple mini CQEs (CQEs in compressed form). Title: The Title holds information which is shared between all the compressed CQEs in the CQE Compression Block. In each Compression Block there is only a single Title regardless of the number of compressed CQEs. Mini CQE: A CQE in compressed form that holds some data needed to extract a single full CQE, for example 8 Bytes instead of 64 Bytes. The shared information between all compressed CQEs, which belong to the same CQE Compression Block called Title, is written once, and only the unique information in each compressed CQE, for example 8 bytes, is written per compressed CQE, called mini CQE. Since CQE Compression can add overhead to the software (CPU), it will be only enabled on "weak/slow" PCI slots, where it can actually help. Applied on top: c047c3b1af62 ('netfilter: conntrack: remove uninitialized shadow variable') ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit b797a684b0ddeb6f78193c9b1bfae6bd824ec01a Author: Saeed Mahameed <saeedm@mellanox.com> Date: Wed May 11 00:29:16 2016 +0300 net/mlx5e: Enable CQE compression when PCI is slower than link We turn the feature ON, only for servers with PCI BW < MAX LINK BW, as it helps reducing PCI pressure on weak PCI slots, but it adds some software overhead. Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx5/core/en.h | 1 + .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 19 ++++++++ drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 52 ++++++++++++++++++++++ 3 files changed, 72 insertions(+) commit d9d9f156f3807b07bb84c1cfb074d620383c016a Author: Tariq Toukan <tariqt@mellanox.com> Date: Wed May 11 00:29:15 2016 +0300 net/mlx5e: Expand WQE stride when CQE compression is enabled Make the MPWQE/Striding RQ default configuration dynamic and not statically set at compile time. Now at driver load we set stride size and num strides dynamically. By default we use same values as before, but when CQE compression is enabled, we set larger stride size to benefit from CQE compression for larger packets. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx5/core/en.h | 13 ++++---- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 23 ++++++++++--- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 39 ++++++++++++----------- 3 files changed, 46 insertions(+), 29 deletions(-) commit 7219ab34f184b5d864be38f5ada7cdff1ab5b18a Author: Tariq Toukan <tariqt@mellanox.com> Date: Wed May 11 00:29:14 2016 +0300 net/mlx5e: CQE compression CQE compression feature is meant to save PCIe bandwidth by compressing few CQEs into smaller amount of bytes on PCIe. CQE compression can be selectively enabled per CQ. By default is disabled for now and will be enabled later on. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx5/core/en.h | 10 ++ drivers/net/ethernet/mellanox/mlx5/core/en_clock.c | 4 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 6 + drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 151 ++++++++++++++++++++- drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 8 ++ include/linux/mlx5/device.h | 34 +++++ 6 files changed, 211 insertions(+), 2 deletions(-) commit c1869d584a9d1e51544d747524662d5d2b8bf63f Merge: cb9b902 f8cd875 Author: David S. Miller <davem@davemloft.net> Date: Wed May 11 19:36:29 2016 -0400 Merge branch 'more-dsa-probing' Andrew Lunn says: ==================== More enabler patches for DSA probing The complete set of patches for the reworked DSA probing is too big to post as once. These subset contains some enablers which are easy to review. Eventually, the Marvell driver will instantiate its own internal MDIO bus, rather than have the framework do it, thus allows devices on the bus to be listed in the device tree. Initialize the main mutex as soon as it is created, to avoid lifetime issues with the mdio bus. A previous patch renamed all the DSA probe functions to make room for a true device probe. However the recent merging of all the Marvell switch drivers resulted in mv88e6xxx going back to the old probe name. Rename it again, so we can have a driver probe function. Add minimum support for the Marvell switch driver to probe as an MDIO device, as well as an DSA driver. Later patches will then register this device with the new DSA core framework. Move the GPIO reset code out of the DSA code. Different drivers may need different reset mechanisms, e.g. via a reset controller for memory mapped devices. Don't clutter up the core with this. Let each driver implement what it needs. master_dev is no longer needed in the switch drivers, since they have access to a device pointer from the probe function. Remove it. Let the switch parse the eeprom length from its one device tree node. This is required with the new binding when the central DSA platform device no longer exists. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit f8cd8753def081b92b93209265bce68a73885ed0 Author: Andrew Lunn <andrew@lunn.ch> Date: Tue May 10 23:27:25 2016 +0200 dsa: mv88e6xxx: Handle eeprom-length property A switch can export an attached EEPROM using the standard ethtool API. However the switch itself cannot determine the size of the EEPROM, and multiple sizes are allowed. Thus a device tree property is supported to indicate the length of the EEPROM. Parse this property during device probe, and implement a callback function to retrieve it. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6xxx.c | 17 +++++++++++++++++ drivers/net/dsa/mv88e6xxx.h | 3 +++ 2 files changed, 20 insertions(+) commit ff04955c2f678a2c4c3207e0184c4c389da9d1e2 Author: Andrew Lunn <andrew@lunn.ch> Date: Tue May 10 23:27:24 2016 +0200 dsa: Rename switch chip data to cd The dsa_switch structure contains a dsa_chip_data member called pd. However in the rest of the code, pd is used for dsa_platform_data. This is confusing. Rename it cd, which is already often used in dsa.c and slave.c for this data type. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/bcm_sf2.c | 4 ++-- drivers/net/dsa/mv88e6xxx.c | 4 ++-- include/net/dsa.h | 4 ++-- net/dsa/dsa.c | 18 +++++++++--------- net/dsa/slave.c | 10 +++++----- 5 files changed, 20 insertions(+), 20 deletions(-) commit c33063d6a0d83a553faacf32f3cb834e63d8ecd7 Author: Andrew Lunn <andrew@lunn.ch> Date: Tue May 10 23:27:23 2016 +0200 dsa: Remove master_dev from switch structure The switch drivers only use the master_dev member for dev_info() messages. Now that the device is passed to the old style probe, and new style drivers are probed as true linux drivers, this is no longer needed. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6xxx.c | 1 + include/net/dsa.h | 7 ++----- net/dsa/dsa.c | 2 +- net/dsa/slave.c | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) commit 52638f71fcff9386fe64c83a18a129b122333fdf Author: Andrew Lunn <andrew@lunn.ch> Date: Tue May 10 23:27:22 2016 +0200 dsa: Move gpio reset into switch driver Resetting the switch is something the driver does, not the framework. So move the parsing of this property into the driver. There are no in kernel users of this property, so moving it does not break anything. There is however a board which will make use of this property making its way into the kernel. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> Documentation/devicetree/bindings/net/dsa/dsa.txt | 2 -- Documentation/devicetree/bindings/net/dsa/marvell.txt | 8 ++++++++ drivers/net/dsa/mv88e6xxx.c | 14 +++++++++++++- drivers/net/dsa/mv88e6xxx.h | 7 +++++++ include/net/dsa.h | 8 -------- net/dsa/dsa.c | 16 ---------------- 6 files changed, 28 insertions(+), 27 deletions(-) commit 14c7b3c3877075e6df22e071d4619cbdeac82ffd Author: Andrew Lunn <andrew@lunn.ch> Date: Tue May 10 23:27:21 2016 +0200 dsa: Add mdio device support to Marvell switches Allow Marvell switches to be mdio devices. Currently the driver just allocate the private structure and detects what device is on the bus. Later patches will make them register with the DSA framework. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> .../devicetree/bindings/net/dsa/marvell.txt | 27 +++++++ drivers/net/dsa/mv88e6xxx.c | 90 +++++++++++++++++----- 2 files changed, 99 insertions(+), 18 deletions(-) commit fcdce7d0751096bbc863d5db12726e9253abbc3c Author: Andrew Lunn <andrew@lunn.ch> Date: Tue May 10 23:27:20 2016 +0200 dsa: mv88e6xxx: Rename probe function to fit the normal pattern All other DSA drivers use _drv_ in there DSA probe function name, thus allowing for a true linux driver probe function to use the conventional name. Make mv88e6xxx fit this pattern. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6xxx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit b681957ad439daf1ea67111463df783d3113c2da Author: Andrew Lunn <andrew@lunn.ch> Date: Tue May 10 23:27:19 2016 +0200 dsa: mv88e6xxx: Initialise the mutex as soon as it is created By initialising immediately it, we don't run the danger of using it before it is initialised. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6xxx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cb9b9020fca5fd34ab2e21fb36fc2c7a85329426 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Tue May 10 15:44:29 2016 -0400 net: dsa: mv88e6xxx: add STU capability Some switch models have a STU (per VLAN port state database). Add a new capability flag to switches info, instead of checking their family. Also if the 6165 family has an STU, it must have a VTU, so add the MV88E6XXX_FLAG_VTU to its family flags. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6xxx.c | 14 ++------------ drivers/net/dsa/mv88e6xxx.h | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 14 deletions(-) commit 15d7d7d435cfe1faa1abf62459d6269bb734cfe7 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Tue May 10 15:44:28 2016 -0400 net: dsa: mv88e6xxx: abstract VTU/STU data access Both VTU and STU operations use the same routine to access their (common) data registers, with a different offset. Add VTU and STU specific read and write functions to the data registers to abstract the required offset. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6xxx.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit c3f1010b30f7fc611139cfb702a8685741aa6827 Merge: ca4aa97 0b922b7 Author: David S. Miller <davem@davemloft.net> Date: Wed May 11 19:31:40 2016 -0400 Merge branch 'vrf-pktinfo' David Ahern says: ==================== net: vrf: Fixup PKTINFO to return enslaved device index Applications such as OSPF and BFD need the original ingress device not the VRF device; the latter can be derived from the former. To that end move the packet intercept from an rx handler that is invoked by __netif_receive_skb_core to the ipv4 and ipv6 receive processing. IPv6 already saves the skb_iif to the control buffer in ipv6_rcv. Since the skb->dev has not been switched the cb has the enslaved device. Make the same happen for IPv4 by adding the skb_iif to inet_skb_parm and set it in ipv4 code after clearing the skb control buffer similar to IPv6. From there the pktinfo can just pull it from cb with the PKTINFO_SKB_CB cast. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 0b922b7a829c06e3b0790c58cd9ca026de86096e Author: David Ahern <dsa@cumulusnetworks.com> Date: Tue May 10 11:19:51 2016 -0700 net: original ingress device index in PKTINFO Applications such as OSPF and BFD need the original ingress device not the VRF device; the latter can be derived from the former. To that end add the skb_iif to inet_skb_parm and set it in ipv4 code after clearing the skb control buffer similar to IPv6. From there the pktinfo can just pull it from cb with the PKTINFO_SKB_CB cast. The previous patch moving the skb->dev change to L3 means nothing else is needed for IPv6; it just works. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/ip.h | 1 + net/ipv4/ip_input.c | 1 + net/ipv4/ip_sockglue.c | 7 ++++++- 3 files changed, 8 insertions(+), 1 deletion(-) commit 74b20582ac389ee9f18a6fcc0eef244658ce8de0 Author: David Ahern <dsa@cumulusnetworks.com> Date: Tue May 10 11:19:50 2016 -0700 net: l3mdev: Add hook in ip and ipv6 Currently the VRF driver uses the rx_handler to switch the skb device to the VRF device. Switching the dev prior to the ip / ipv6 layer means the VRF driver has to duplicate IP/IPv6 processing which adds overhead and makes features such as retaining the ingress device index more complicated than necessary. This patch moves the hook to the L3 layer just after the first NF_HOOK for PRE_ROUTING. This location makes exposing the original ingress device trivial (next patch) and allows adding other NF_HOOKs to the VRF driver in the future. dev_queue_xmit_nit is exported so that the VRF driver can cycle the skb with the switched device through the packet taps to maintain current behavior (tcpdump can be used on either the vrf device or the enslaved devices). Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/vrf.c | 189 ++++++++++++++++++++++------------------------ include/linux/ipv6.h | 17 ++++- include/linux/netdevice.h | 2 + include/net/l3mdev.h | 42 +++++++++++ include/net/tcp.h | 4 +- net/core/dev.c | 3 +- net/ipv4/ip_input.c | 7 ++ net/ipv6/ip6_input.c | 7 ++ 8 files changed, 170 insertions(+), 101 deletions(-) commit ca4aa976f04d14bc7da60dce0e2afc34c9f0f1d2 Author: Nicolas Dichtel <nicolas.dichtel@6wind.com> Date: Tue May 10 16:08:17 2016 +0200 ipv6: fix 4in6 tunnel receive path Protocol for 4in6 tunnel is IPPROTO_IPIP. This was wrongly changed by the last cleanup. CC: Tom Herbert <tom@herbertland.com> Fixes: 0d3c703a9d17 ("ipv6: Cleanup IPv6 tunnel receive path") Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 35ff9477d880986441981010585399c1d7201fee Author: Jayachandran C <jchandra@broadcom.com> Date: Tue May 10 17:19:51 2016 +0200 PCI: Provide common functions for ECAM mapping Add config option PCI_ECAM and file drivers/pci/ecam.c to provide generic functions for accessing memory-mapped PCI config space. The API is defined in drivers/pci/ecam.h and is written to replace the API in drivers/pci/host/pci-host-common.h. The file defines a new 'struct pci_config_window' to hold the information related to a PCI config area and its mapping. This structure is expected to be used as sysdata for controllers that have ECAM based mapping. Helper functions are provided to setup the mapping, free the mapping and to implement the map_bus method in 'struct pci_ops' Signed-off-by: Jayachandran C <jchandra@broadcom.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> drivers/pci/Kconfig | 3 + drivers/pci/Makefile | 2 + drivers/pci/ecam.c | 164 +++++++++++++++++++++++++++++++++++++++++++++++++++ drivers/pci/ecam.h | 62 +++++++++++++++++++ 4 files changed, 231 insertions(+) commit 1aa7a6e2b8105f22a5f7d6def281f776459c95ba Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Wed May 11 19:11:26 2016 +0200 intel_pstate: Clean up get_target_pstate_use_performance() The comments and the core_busy variable name in get_target_pstate_use_performance() are totally confusing, so modify them to reflect what's going on. The results of the computations should be the same as before. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/intel_pstate.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) commit 8edb0a6e48d147bb2aa466c58e03c52d2b0d6ee7 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Wed May 11 19:10:42 2016 +0200 intel_pstate: Use sample.core_avg_perf in get_avg_pstate() Notice that get_avg_pstate() can use sample.core_avg_perf instead of carrying the same division again, so make it do that. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/intel_pstate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a1c9787dc38097d554f9da8372031b3d6f8c140a Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Wed May 11 19:09:12 2016 +0200 intel_pstate: Clarify average performance computation The core_pct_busy field of struct sample actually contains the average performace during the last sampling period (in percent) and not the utilization of the core as suggested by its name which is confusing. For this reason, change the name of that field to core_avg_perf and rename the function that computes its value accordingly. Also notice that storing this value as percentage requires a costly integer multiplication to be carried out in a hot path, so instead store it as an "extended fixed point" value with more fraction bits and update the code using it accordingly (it is better to change the name of the field along with its meaning in one go than to make those two changes separately, as that would likely lead to more confusion). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/intel_pstate.c | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) commit 4578ee7e1defe534582fe3afdb747b86023207f0 Author: Chen Yu <yu.c.chen@intel.com> Date: Wed May 11 14:33:08 2016 +0800 intel_pstate: Avoid unnecessary synchronize_sched() during initialization Currently, in intel_pstate_clear_update_util_hook(), after clearing the utilization update hook, we leverage synchronize_sched() to deal with synchronization, which is a little bit time-costly because synchronize_sched() has to wait for all the CPUs to go through a grace period. Actually, the synchronize_sched() is not necessary if the utilization update hook has not been set for the given CPU yet, so make the driver check if that's the case and avoid the synchronize_sched() call then. Link: https://bugzilla.kernel.org/show_bug.cgi?id=116371 Tested-by: Tian Ye <yex.tian@intel.com> Signed-off-by: Chen Yu <yu.c.chen@intel.com> [ rjw : Rebase ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/intel_pstate.c | 9 +++++++++ 1 file changed, 9 insertions(+) commit c29af6f1a4e6f54e806fed1c40e7d338650b7791 Merge: 0bc10b9 cfe9492 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Wed May 11 22:48:20 2016 +0200 Merge branch 'pm-cpufreq-sched' into pm-cpufreq commit cfe9492fdf04d1191e7ac3a43e6df5e20c3f4164 Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 11 14:52:01 2016 +0200 cpufreq: schedutil: Make default depend on CONFIG_SMP CPU_FREQ_GOV_SCHEDUTIL gained a dependency on SMP, so now we get a warning if it gets selected by CPU_FREQ_DEFAULT_GOV_SCHEDUTIL without SMP: warning: (CPU_FREQ_DEFAULT_GOV_SCHEDUTIL) selects CPU_FREQ_GOV_SCHEDUTIL which has unmet direct dependencies (CPU_FREQ && SMP) This adds another dependency to avoid the problem. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: bf7cdff19429 (cpufreq: schedutil: Make it depend on CONFIG_SMP) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 14717e2031862d9aa2512b24a7df42cf68a977ec Author: Alex Williamson <alex.williamson@redhat.com> Date: Thu May 5 11:58:35 2016 -0600 kvm: Conditionally register IRQ bypass consumer If we don't support a mechanism for bypassing IRQs, don't register as a consumer. This eliminates meaningless dev_info()s when the connect fails between producer and consumer, such as on AMD systems where kvm_x86_ops->update_pi_irte is not implemented Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/x86/kvm/x86.c | 19 ++++++++----------- include/linux/kvm_host.h | 1 + virt/kvm/eventfd.c | 18 ++++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) commit b52f3ed02221252d8ee2c7d756e76fad4a5e84f6 Author: Alex Williamson <alex.williamson@redhat.com> Date: Thu May 5 11:58:29 2016 -0600 irqbypass: Disallow NULL token A NULL token is meaningless and can only lead to unintended problems. Error on registration with a NULL token, ignore de-registrations with a NULL token. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> include/linux/irqbypass.h | 4 ++-- virt/lib/irqbypass.c | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) commit 0b1b1dfd52a67f4f09a18cb82337199bc90ad7fb Author: Greg Kurz <gkurz@linux.vnet.ibm.com> Date: Mon May 9 18:13:37 2016 +0200 kvm: introduce KVM_MAX_VCPU_ID The KVM_MAX_VCPUS define provides the maximum number of vCPUs per guest, and also the upper limit for vCPU ids. This is okay for all archs except PowerPC which can have higher ids, depending on the cpu/core/thread topology. In the worst case (single threaded guest, host with 8 threads per core), it limits the maximum number of vCPUS to KVM_MAX_VCPUS / 8. This patch separates the vCPU numbering from the total number of vCPUs, with the introduction of KVM_MAX_VCPU_ID, as the maximal valid value for vCPU ids plus one. The corresponding KVM_CAP_MAX_VCPU_ID allows userspace to validate vCPU ids before passing them to KVM_CREATE_VCPU. This patch only implements KVM_MAX_VCPU_ID with a specific value for PowerPC. Other archs continue to return KVM_MAX_VCPUS instead. Suggested-by: Radim Krcmar <rkrcmar@redhat.com> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Documentation/virtual/kvm/api.txt | 10 ++++++++-- arch/powerpc/include/asm/kvm_host.h | 3 +++ include/linux/kvm_host.h | 4 ++++ include/uapi/linux/kvm.h | 1 + virt/kvm/kvm_main.c | 4 +++- 5 files changed, 19 insertions(+), 3 deletions(-) commit 9b9e3fc4d5a31f6050508f2404369beac4356867 Author: Greg Kurz <gkurz@linux.vnet.ibm.com> Date: Mon May 9 18:11:54 2016 +0200 KVM: remove NULL return path for vcpu ids >= KVM_MAX_VCPUS Commit c896939f7cff ("KVM: use heuristic for fast VCPU lookup by id") added a return path that prevents vcpu ids to exceed KVM_MAX_VCPUS. This is a problem for powerpc where vcpu ids can grow up to 8*KVM_MAX_VCPUS. This patch simply reverses the logic so that we only try fast path if the vcpu id can be tried as an index in kvm->vcpus[]. The slow path is not affected by the change. Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> include/linux/kvm_host.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit bdb4094eb57aeab6683ea9c90d8b29271bf34405 Merge: 6ac0f61 0648505 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Wed May 11 22:37:37 2016 +0200 Merge tag 'kvm-arm-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm into HEAD KVM/ARM Changes for Linux v4.7 Reworks our stage 2 page table handling to have page table manipulation macros separate from those of the host systems as the underlying hardware page tables can be configured to be noticably different in layout from the stage 1 page tables used by the host. Adds 16K page size support based on the above. Adds a generic firmware probing layer for the timer and GIC so that KVM initializes using the same logic based on both ACPI and FDT. Finally adds support for hardware updating of the access flag. commit 52776a700b53969345a3cc5daed1c797d016a188 Merge: d9739a2 ee9ca14 Author: Kalle Valo <kvalo@codeaurora.org> Date: Wed May 11 23:23:51 2016 +0300 Merge ath-next from ath.git ath.git patches for 4.7. Major changes: ath6kl * add ability to set debug uart baud rate with a module parameter wil6210 * add debugfs file to configure firmware led functionality commit 5f0dfb7a9bcc8139958f59ecb9bbd7e738ae702d Author: Chaitra P B <chaitra.basappa@broadcom.com> Date: Fri May 6 14:29:31 2016 +0530 mpt3sas: Used "synchronize_irq()"API to synchronize timed-out IO & TMs Replaced mpt3sas_base_flush_reply_queues() with mpt3sas_base_sync_reply_irqs(),as mpt3sas_base_flush_reply_queues() skips over reply queues that are currently busy (i.e. being handled by interrupt processing in another core). If a reply queue is busy, then call to synchronize_irq()in mpt3sas_base_sync_reply_irqs()make sures the other core has finished flushing the queue and completed any calls to the mid-layer scsi_done() routine. Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpt3sas/mpt3sas_base.c | 15 +++++++-------- drivers/scsi/mpt3sas/mpt3sas_base.h | 3 ++- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 4 +++- 3 files changed, 12 insertions(+), 10 deletions(-) commit 6c197093847e8cdec844df39a373bfe1f9a1ac8a Author: Chaitra P B <chaitra.basappa@broadcom.com> Date: Fri May 6 14:29:30 2016 +0530 mpt3sas: Set maximum transfer length per IO to 4MB for VDs Set maximum transfer length per IO on RAID volumes to 4MB by setting VD's queue's max_sector to 8192. Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpt3sas/mpt3sas_base.h | 2 ++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 8 ++++++++ 2 files changed, 10 insertions(+) commit b2500d76a0dbaa8993cd6b43941d23d31a312831 Author: Chaitra P B <chaitra.basappa@broadcom.com> Date: Fri May 6 14:29:29 2016 +0530 mpt3sas: Updating mpt3sas driver version to 13.100.00.00 Bump mpt3sas driver version from 12.100.00.00 to 13.100.00.00 Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 648512ccd7d42ccf761f515b7c0cb456a48c477a Author: Chaitra P B <chaitra.basappa@broadcom.com> Date: Fri May 6 14:29:28 2016 +0530 mpt3sas: Fix initial Reference tag field for 4K PI drives. Modified driver code to use scsi_prot_ref_tag() API instead of scsi_get_lba(), while initializing reference tag field in the CDB. Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpt3sas/mpt3sas_scsih.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a470a51cd6481373cdf2b5934b1b9f7853688de9 Author: Chaitra P B <chaitra.basappa@broadcom.com> Date: Fri May 6 14:29:27 2016 +0530 mpt3sas: Handle active cable exception event In-order to handle this 'MPI2_EVENT_ACTIVE_CABLE_EXCEPTION' event, driver need to follow below steps, 1. Unmask the 'MPI2_EVENT_ACTIVE_CABLE_EXCEPTION' event, so that FW can notify this event to host driver. 2. After receiving this event, add this event to AEN event queue, for notifying this event to applications. 3. Then Print below message in kernel logs if the event data's reason code is zero, "Currently an active cable with ReceptacleID <ID_Value> cannot be powered and devices connected to this active cable will not be seen. This active cable requires <PowerValue_in_mW> of power" This event is only for Intruder/Cutlass HBAs. Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpt3sas/mpt3sas_base.c | 5 +++++ drivers/scsi/mpt3sas/mpt3sas_scsih.c | 13 +++++++++++++ 2 files changed, 18 insertions(+) commit 4fe6bc97efebdc5083aa749850928fad1740a60d Author: Chaitra P B <chaitra.basappa@broadcom.com> Date: Fri May 6 14:29:26 2016 +0530 mpt3sas: Update MPI header to 2.00.42 Updated MPI version and MPI header files. ChangeList: * Added SATADeviceWaitTime to SAS IO Unit Page 4 * Added EEDPObservedValue added to SCSI IO Reply message * Added MPI2_EVENT_ACTIVE_CABLE_EXCEPTION and MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/mpt3sas/mpi/mpi2.h | 7 +++++-- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 18 +++++++++++----- drivers/scsi/mpt3sas/mpi/mpi2_init.h | 15 +++++++++++--- drivers/scsi/mpt3sas/mpi/mpi2_ioc.h | 40 +++++++++++++++++++++++++++++++----- 4 files changed, 65 insertions(+), 15 deletions(-) commit d65c8fff867a6450c58ce31572e883148a445ddf Author: Martin K. Petersen <martin.petersen@oracle.com> Date: Mon May 9 21:39:43 2016 -0400 Revert "lpfc: Delete unnecessary checks before the function call mempool_destroy" This reverts commit 9be321819c43417432a8376428b90fe3fe3a3510 which caused a regression on hardware using the SLI3 interface. Reported-by: Dick Kennedy <dick.kennedy@broadcom.com> Cc: <stable@vger.kernel.org> # 4.6+ Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <jejb@linux.vnet.ibm.com> drivers/scsi/lpfc/lpfc_mem.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit ee9ca147c59c0ee128bbf7fc079ee49401070086 Author: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com> Date: Mon May 9 21:57:14 2016 +0300 ath10k: Fix survey reporting with QCA4019 In QCA4019, cycle counter wraparound in same fashion as QCA988X. When the cycle counter wraparound it resets to 0x7fffffff. Set has_shifted_cc_wraparound to true for QCA4019 to enable the code path to handle cycle counter wraparound for consistent survey report. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> drivers/net/wireless/ath/ath10k/core.c | 1 + 1 file changed, 1 insertion(+) commit 36bd39bb0ae8544e3f5b9c1af45f39f51075611b Author: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com> Date: Mon May 9 21:57:14 2016 +0300 ath10k: suppress warnings when getting wmi peer_rate_code_list event In 10.4, fw sends WMI PEER_RATECODE_LIST_EVENTID after successful peer_assoc cmd. As of now this event is not of much use and not implemented. Change the debug level and messsage as appropriate to suppress "Unknown eventid: 36898". Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> drivers/net/wireless/ath/ath10k/wmi.c | 1 + 1 file changed, 1 insertion(+) commit 10d599ad84a1b98450c8867ce548ea4bf0f6df1a Author: Maya Erez <qca_merez@qca.qualcomm.com> Date: Mon May 9 21:57:11 2016 +0300 wil6210: add support for device led configuration Add the ability to configure the device led to be used for notifying the AP activity (60G device supports leds 0-2). The host can also configure the blinking frequency of the led in three states. Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> drivers/net/wireless/ath/wil6210/debugfs.c | 115 +++++++++++++++++++++++++++++ drivers/net/wireless/ath/wil6210/main.c | 3 + drivers/net/wireless/ath/wil6210/wil6210.h | 25 +++++++ drivers/net/wireless/ath/wil6210/wmi.c | 77 +++++++++++++++++++ drivers/net/wireless/ath/wil6210/wmi.h | 61 +++++++++++++++ 5 files changed, 281 insertions(+) commit d9739a26fbcaa11c026dd79bc310af96003f20d8 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Tue May 10 22:21:17 2016 +0300 atmel: potential underflow in atmel_set_freq() Smatch complains that we cap the upper bound of "fwrq->m" but not the lower bound. I don't know if it can actually happen but it's simple enough to check for negatives. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/atmel/atmel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 03ba4a1b718e3a018f38f1ee030de4cd052bb3f3 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Tue May 10 22:20:37 2016 +0300 airo: prevent potential underflow in airo_set_freq() I'm not sure if this can underflow but Smatch complains. It seems harmless to add a check for negatives. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/cisco/airo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 50d4d8feb9133abb5b8fcb22c48ec509295fdc43 Author: Wei-Ning Huang <wnhuang@chromium.org> Date: Tue May 10 14:21:23 2016 +0800 mwifiex: fixup error messages Use dev_err instead of pr_err and add newline character at the end. Signed-off-by: Wei-Ning Huang <wnhuang@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/marvell/mwifiex/sdio.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) commit cf968937d27751296920e6b82ffa89735e3a0023 Author: wang yanqing <udknight@gmail.com> Date: Sat May 7 00:33:53 2016 +0800 rtlwifi: pci: use dev_kfree_skb_irq instead of kfree_skb in rtl_pci_reset_trx_ring We can't use kfree_skb in irq disable context, because spin_lock_irqsave make sure we are always in irq disable context, use dev_kfree_skb_irq instead of kfree_skb is better than dev_kfree_skb_any. This patch fix below kernel warning: [ 7612.095528] ------------[ cut here ]------------ [ 7612.095546] WARNING: CPU: 3 PID: 4460 at kernel/softirq.c:150 __local_bh_enable_ip+0x58/0x80() [ 7612.095550] Modules linked in: rtl8723be x86_pkg_temp_thermal btcoexist rtl_pci rtlwifi rtl8723_common [ 7612.095567] CPU: 3 PID: 4460 Comm: ifconfig Tainted: G W 4.4.0+ #4 [ 7612.095570] Hardware name: LENOVO 20DFA04FCD/20DFA04FCD, BIOS J5ET48WW (1.19 ) 08/27/2015 [ 7612.095574] 00000000 00000000 da37fc70 c12ce7c5 00000000 da37fca0 c104cc59 c19d4454 [ 7612.095584] 00000003 0000116c c19d4784 00000096 c10508a8 c10508a8 00000200 c1b42400 [ 7612.095594] f29be780 da37fcb0 c104ccad 00000009 00000000 da37fcbc c10508a8 f21f08b8 [ 7612.095604] Call Trace: [ 7612.095614] [<c12ce7c5>] dump_stack+0x41/0x5c [ 7612.095620] [<c104cc59>] warn_slowpath_common+0x89/0xc0 [ 7612.095628] [<c10508a8>] ? __local_bh_enable_ip+0x58/0x80 [ 7612.095634] [<c10508a8>] ? __local_bh_enable_ip+0x58/0x80 [ 7612.095640] [<c104ccad>] warn_slowpath_null+0x1d/0x20 [ 7612.095646] [<c10508a8>] __local_bh_enable_ip+0x58/0x80 [ 7612.095653] [<c16b7d34>] destroy_conntrack+0x64/0xa0 [ 7612.095660] [<c16b300f>] nf_conntrack_destroy+0xf/0x20 [ 7612.095665] [<c1677565>] skb_release_head_state+0x55/0xa0 [ 7612.095670] [<c16775bb>] skb_release_all+0xb/0x20 [ 7612.095674] [<c167760b>] __kfree_skb+0xb/0x60 [ 7612.095679] [<c16776f0>] kfree_skb+0x30/0x70 [ 7612.095686] [<f81b869d>] ? rtl_pci_reset_trx_ring+0x22d/0x370 [rtl_pci] [ 7612.095692] [<f81b869d>] rtl_pci_reset_trx_ring+0x22d/0x370 [rtl_pci] [ 7612.095698] [<f81b87f9>] rtl_pci_start+0x19/0x190 [rtl_pci] [ 7612.095705] [<f81970e6>] rtl_op_start+0x56/0x90 [rtlwifi] [ 7612.095712] [<c17e3f16>] drv_start+0x36/0xc0 [ 7612.095717] [<c17f5ab3>] ieee80211_do_open+0x2d3/0x890 [ 7612.095725] [<c16820fe>] ? call_netdevice_notifiers_info+0x2e/0x60 [ 7612.095730] [<c17f60bd>] ieee80211_open+0x4d/0x50 [ 7612.095736] [<c16891b3>] __dev_open+0xa3/0x130 [ 7612.095742] [<c183fa53>] ? _raw_spin_unlock_bh+0x13/0x20 [ 7612.095748] [<c1689499>] __dev_change_flags+0x89/0x140 [ 7612.095753] [<c127c70d>] ? selinux_capable+0xd/0x10 [ 7612.095759] [<c1689589>] dev_change_flags+0x29/0x60 [ 7612.095765] [<c1700b93>] devinet_ioctl+0x553/0x670 [ 7612.095772] [<c12db758>] ? _copy_to_user+0x28/0x40 [ 7612.095777] [<c17018b5>] inet_ioctl+0x85/0xb0 [ 7612.095783] [<c166e647>] sock_ioctl+0x67/0x260 [ 7612.095788] [<c166e5e0>] ? sock_fasync+0x80/0x80 [ 7612.095795] [<c115c99b>] do_vfs_ioctl+0x6b/0x550 [ 7612.095800] [<c127c812>] ? selinux_file_ioctl+0x102/0x1e0 [ 7612.095807] [<c10a8914>] ? timekeeping_suspend+0x294/0x320 [ 7612.095813] [<c10a256a>] ? __hrtimer_run_queues+0x14a/0x210 [ 7612.095820] [<c1276e24>] ? security_file_ioctl+0x34/0x50 [ 7612.095827] [<c115cef0>] SyS_ioctl+0x70/0x80 [ 7612.095832] [<c1001804>] do_fast_syscall_32+0x84/0x120 [ 7612.095839] [<c183ff91>] sysenter_past_esp+0x36/0x55 [ 7612.095844] ---[ end trace 97e9c637a20e8348 ]--- Signed-off-by: Wang YanQing <udknight@gmail.com> Cc: Stable <stable@vger.kernel.org> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/realtek/rtlwifi/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9e96aa70e9acd03eee61c2094b4755b80a386c47 Author: Charlie Mooney <charliemooney@chromium.org> Date: Mon May 2 08:57:17 2016 +0800 platform/chrome: chromeos_laptop - Add Elan touchpad for Wolf The upcoming Elan Wolf (Dell Chromebook 11) devices need to know to look for Elan touchpads on the i2c bus so that they will be functional. Based on the chromeos-kernel commit : https://chromium-review.googlesource.com/198283 Signed-off-by: Charlie Mooney <charliemooney@chromium.org> Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/chromeos_laptop.c | 2 ++ 1 file changed, 2 insertions(+) commit 9bd9a90b013c647ed88ed4fa69b664b770924cf0 Author: Benson Leung <bleung@chromium.org> Date: Mon May 2 08:57:16 2016 +0800 platform/chrome: chromeos_laptop - Add elan trackpad option for C720 Add the elan trackpad to the Acer C720 (peppy) list, as it is an alternate trackpad option. It may exist at i2c address 0x15. Based on this change from the chromeos kernel : https://chromium-review.googlesource.com/186253 Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/chromeos_laptop.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 2521ea3e0d1b285cea371a38772d3eefa0490c71 Author: Guenter Roeck <linux@roeck-us.net> Date: Thu Apr 14 19:35:29 2016 -0700 platform/chrome: cros_ec_dev - Populate compat_ioctl compat_ioctl has to be populated for 32 bit userspace applications to work with 64 bit kernels. Signed-off-by: Guenter Roeck <linux@roeck-us.net> Tested-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/cros_ec_dev.c | 3 +++ 1 file changed, 3 insertions(+) commit d940f3065c120af233d36933e94ebb577a695b44 Author: Clinton Sprain <clintonsprain@gmail.com> Date: Wed May 11 11:05:35 2016 -0700 platform/chrome: cros_ec_lightbar - use name instead of ID to hide lightbar attributes Lightbar attributes are hidden if the ID of the device is not 0 (the assumption being that 0 = cros_ec = might have a lightbar, 1 = cros_pd = hide); however, sometimes these devices get IDs 1 and 2 (or something else) instead of IDs 0 and 1. This prevents the lightbar attributes from appearing when they should. Proposed change is to instead check whether the name assigned to the device is CROS_EC_DEV_NAME (true for cros_ec, false for cros_pd). Signed-off-by: Clinton Sprain <clintonsprain@gmail.com> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/cros_ec_lightbar.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit 5d749d0bbe811c10d9048cde6dfebc761713abfd Author: Gwendal Grignou <gwendal@chromium.org> Date: Tue Mar 8 09:13:52 2016 -0800 platform/chrome: cros_ec_dev - Fix security issue Prevent memory scribble by checking that ioctl buffer size parameters are sane. Without this check, on 32 bits system, if .insize = 0xffffffff - 20 and .outsize the amount to scribble, we would overflow, allocate a small amounts and be able to write outside of the malloc'ed area. Adding a hard limit allows argument checking of the ioctl. With the current EC, it is expected .insize and .outsize to be at around 512 bytes or less. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/cros_ec_dev.c | 4 ++++ drivers/platform/chrome/cros_ec_proto.c | 4 ++-- include/linux/mfd/cros_ec.h | 6 ++++-- 3 files changed, 10 insertions(+), 4 deletions(-) commit 492ef7829d2d09428803bffb187d5781bbc12ca5 Author: Simon Que <sque@chromium.org> Date: Tue Mar 8 11:12:46 2016 -0800 platform/chrome: Add Chrome OS keyboard backlight LEDs support This is a driver for ACPI-based keyboard backlight LEDs found on Chromebooks. The driver locates \\_SB.KBLT ACPI device and exports backlight as "chromeos::kbd_backlight" LED class device in sysfs. Signed-off-by: Simon Que <sque@chromium.org> Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Tested-by: Evan McClain <aeroevan@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/Kconfig | 10 ++ drivers/platform/chrome/Makefile | 15 +-- drivers/platform/chrome/cros_kbd_led_backlight.c | 122 +++++++++++++++++++++++ 3 files changed, 140 insertions(+), 7 deletions(-) commit 48b9b6d4699e23cda45756b6a1fe5d481ba45914 Author: Geliang Tang <geliangtang@163.com> Date: Sun Dec 27 21:15:45 2015 +0800 platform/chrome: use to_platform_device() Use to_platform_device() instead of open-coding it. Signed-off-by: Geliang Tang <geliangtang@163.com> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/cros_ec_lightbar.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit f929efb06578d2f9afd869911a8b4cc21b2e6e73 Author: Olof Johansson <olofj@chromium.org> Date: Tue Feb 16 08:25:16 2016 +0100 platform/chrome: pstore: Move to larger record size. Accidentally specified a smaller record size, bring it back to the same size as we had when we used the config file. Signed-off-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Sameer Nanda <snanda@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/chromeos_pstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59a356d2f1e6e2fbb700c9a9cda1658f5934c7d2 Author: Aaron Durbin <adurbin@chromium.org> Date: Tue Feb 16 08:25:15 2016 +0100 platform/chrome: pstore: probe for ramoops buffer using acpi In order to handle the firmware placing the ramoops buffer in a different location than the kernel is configured to look probe for an ACPI device specified by GOOG9999 acpi id. If no device is found or the first memory resource is not defined properly fall back to the configured base and length. Signed-off-by: Aaron Durbin <adurbin@chromium.org> Signed-off-by: Ben Zhang <benzh@chromium.org> Signed-off-by: Filipe Brandenburger <filbranden@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Reviewed-by: Olof Johansson <olofj@chromium.org> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/chromeos_pstore.c | 53 ++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) commit bff3c624dc7261a084a4d25a0b09c3fb0fec872a Author: Gene Chen <gene.chen@intel.com> Date: Tue Feb 16 08:25:14 2016 +0100 platform/chrome: chromeos_laptop: Add Leon Touch Add support for Leon touch devices, which is the same as slippy/falco/peppy/wolf on the same buses using the LynxPoint-LP I2C via the i2c-designware-pci driver. Based on the following patch: https://chromium-review.googlesource.com/#/c/168351/ Signed-off-by: Gene Chen <gene.chen@intel.com> Reviewed-by: Benson Leung <bleung@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com> Signed-off-by: Olof Johansson <olof@lixom.net> drivers/platform/chrome/chromeos_laptop.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) commit 976aff5fc94b0a505ccd85391f0e82c3d2d031e9 Author: wang yanqing <udknight@gmail.com> Date: Thu May 5 23:08:22 2016 +0800 rtlwifi: Remove double check for cnt_after_linked rtl_lps_enter does two successive check for cnt_after_linked to make sure some time has elapsed after linked. The second check isn't necessary, because if cnt_after_linked is bigger than 5, it is bigger than 2 of course! This patch remove the second check code. Signed-off-by: Wang YanQing <udknight@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/realtek/rtlwifi/ps.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) commit 496aec577b5183716ed9d8bcc853ad9003485fe8 Author: Christian Daudt <csd@broadcom.com> Date: Wed May 4 17:55:20 2016 -0700 brcmfmac: Add 4356 sdio support This adds support for the 4356-sdio wireless chip. Signed-off-by: Christian Daudt <csd@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/chip.c | 1 + drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 4 +++- include/linux/mmc/sdio_ids.h | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) commit 2f8514b8b03643a598706bf88214b10153324d11 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Wed May 4 09:16:39 2016 +0300 rtlwifi: rtl818x: silence uninitialized variable warning What about if "rtlphy->pwrgroup_cnt" is 2? In that case we would use an uninitialized "chnlgroup" variable and probably crash. Maybe that can't happen for some reason which is not obvious but in that case this patch is harmless. Setting it to zero seems like a standard default in the surrounding code so it's probably fine here as well. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/realtek/rtlwifi/rtl8192se/rf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 30cfe9f61c2e78b55b33c780bc0a57f9adb00e62 Author: Lukas Wunner <lukas@wunner.de> Date: Tue May 3 21:44:40 2016 +0200 mwifiex: Drop unnecessary include pcieport_if.h This header file is only needed for drivers binding to a PCI bridge device allocated by drivers/pci/pcie/portdrv_core.c. The mwifiex driver doesn't do that nor use any symbols defined in pcieport_if.h. Cc: Amitkumar Karwar <akarwar@marvell.com> Cc: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/marvell/mwifiex/pcie.h | 1 - 1 file changed, 1 deletion(-) commit 873ffe154ae074c46ed2d72dbd9a2a99f06f55b4 Author: wang yanqing <udknight@gmail.com> Date: Tue May 3 00:38:36 2016 +0800 rtlwifi: Fix logic error in enter/exit power-save mode In commit a269913c52ad ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue"), the tests for enter/exit power-save mode were inverted. With this change applied, the wifi connection becomes much more stable. Fixes: a269913c52ad ("rtlwifi: Rework rtl_lps_leave() and rtl_lps_enter() to use work queue") Signed-off-by: Wang YanQing <udknight@gmail.com> CC: Stable <stable@vger.kernel.org> [3.10+] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/realtek/rtlwifi/base.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 756ee1729b2feb3a45767da29e338f70f2086ba3 Author: Lawrence Brakmo <brakmo@fb.com> Date: Wed May 11 10:02:13 2016 -0700 tcp: replace cnt & rtt with struct in pkts_acked() Replace 2 arguments (cnt and rtt) in the congestion control modules' pkts_acked() function with a struct. This will allow adding more information without having to modify existing congestion control modules (tcp_nv in particular needs bytes in flight when packet was sent). As proposed by Neal Cardwell in his comments to the tcp_nv patch. Signed-off-by: Lawrence Brakmo <brakmo@fb.com> Acked-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/tcp.h | 7 ++++++- net/ipv4/tcp_bic.c | 6 +++--- net/ipv4/tcp_cdg.c | 14 +++++++------- net/ipv4/tcp_cubic.c | 6 +++--- net/ipv4/tcp_htcp.c | 10 +++++----- net/ipv4/tcp_illinois.c | 21 +++++++++++---------- net/ipv4/tcp_input.c | 8 ++++++-- net/ipv4/tcp_lp.c | 6 +++--- net/ipv4/tcp_vegas.c | 6 +++--- net/ipv4/tcp_vegas.h | 2 +- net/ipv4/tcp_veno.c | 7 ++++--- net/ipv4/tcp_westwood.c | 7 ++++--- net/ipv4/tcp_yeah.c | 7 ++++--- 13 files changed, 60 insertions(+), 47 deletions(-) commit 1bfcfdcca142f6468c665016b2b58c3012196af0 Author: Julia Lawall <Julia.Lawall@lip6.fr> Date: Sun May 1 21:57:44 2016 +0200 rtlwifi: rtl818x: constify rtl_intf_ops structures The rtl_intf_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/realtek/rtlwifi/pci.c | 2 +- drivers/net/wireless/realtek/rtlwifi/pci.h | 2 +- drivers/net/wireless/realtek/rtlwifi/usb.c | 2 +- drivers/net/wireless/realtek/rtlwifi/wifi.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit ff38e0c70adce96de0be0bf470cbb9e283ba6965 Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Wed May 11 07:35:09 2016 +0900 ALSA: firewire-lib: drop skip argument from helper functions to queue a packet On most of audio and music units on IEEE 1394 bus which ALSA firewire stack supports (or plans to support), CIP with two quadlets header is used. Thus, there's no cases to queue packets with blank payload. If such packets are going to be queued, it means that they're for skips of the cycle. This commit simplifies helper functions to queue a packet. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/amdtp-stream.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit a9c4284bf5a95c4788e7fbf3c46b14dcbfda3a6d Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Wed May 11 07:33:27 2016 +0900 ALSA: firewire-lib: add context information to tracepoints In current implementation, packet processing is done in both of software IRQ contexts of IR/IT contexts and process contexts. This is usual interrupt handling of IR/IT context for 1394 OHCI. (in hardware IRQ context) irq_handler() (drivers/firewire/ohci.c) ->tasklet_schedule() (in software IRQ context) handle_it_packet() or handle_ir_packet_per_buffer() (drivers/firewire/ohci.c) ->flush_iso_completions() ->struct fw_iso_context.callback.sc() = out_stream_callback() or in_stream_callback() However, we have another chance for packet processing. It's done in PCM frame handling via ALSA PCM interfaces. (in process context) ioctl(i.e. SNDRV_PCM_IOCTL_HWSYNC) ->snd_pcm_hwsync() (sound/core/pcm_native.c) ->snd_pcm_update_hw_ptr() (sound/core/pcm_lib.c) ->snd_pcm_update_hw_ptr0() ->struct snd_pcm_ops.pointer() = amdtp_stream_pcm_pointer() ->fw_iso_context_flush_completions() (drivers/firewire/core-iso.c) ->struct fw_card_driver.flush_iso_completions() = ohci_flush_iso_completions() (drivers/firewire/ohci.c) ->flush_iso_completions() ->struct fw_iso_context.callback.sc() = out_stream_callback() or in_stream_callback() This design is for a better granularity of PCM pointer. When ioctl(2) is executed with some commands for ALSA PCM interface, queued packets are handled at first. Then, the latest number of handled PCM frames is reported. The number can represent PCM frames transferred in most near isochronous cycle. Current tracepoints include no information to distinguish running contexts. When tracing the interval of software IRQ context, this is not good. This commit adds more information for current context. Additionally, the index of packet processed in one context is added in a case that packet processing is executed in continuous context of the same kind, As a result, the output includes 11 fields with additional two fields to commit 0c95c1d6197f ("ALSA: firewire-lib: add tracepoints to dump a part of isochronous packet data"): 17131.9186: out_packet: 07 7494 ffc0 ffc1 00 000700c0 9001a496 058 45 1 13 17131.9186: out_packet: 07 7495 ffc0 ffc1 00 000700c8 9001ba00 058 46 1 14 17131.9186: out_packet: 07 7496 ffc0 ffc1 00 000700d0 9001ffff 002 47 1 15 17131.9189: out_packet: 07 7497 ffc0 ffc1 00 000700d0 9001d36a 058 00 0 00 17131.9189: out_packet: 07 7498 ffc0 ffc1 00 000700d8 9001e8d4 058 01 0 01 17131.9189: out_packet: 07 7499 ffc0 ffc1 00 000700e0 9001023e 058 02 0 00 17131.9206: in_packet: 07 7447 ffc1 ffc0 01 3f070072 9001783d 058 32 1 00 17131.9206: in_packet: 07 7448 ffc1 ffc0 01 3f070072 90ffffff 002 33 1 01 17131.9206: in_packet: 07 7449 ffc1 ffc0 01 3f07007a 900191a8 058 34 1 02 (Here, some common fields are omitted so that a line is within 80 characters.) The legend is: - The second of cycle scheduled for the packet - The count of cycle scheduled for the packet - The ID of node as source (hex) - The ID of node as destination (hex) - The value of isochronous channel - The first quadlet of CIP header (hex) - The second quadlet of CIP header (hex) - The number of included quadlets - The index of packet in a buffer maintained by this module - 0 in process context, 1 in IRQ context - The index of packet processed in the context Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/amdtp-stream-trace.h | 28 ++++++++++++++++++++-------- sound/firewire/amdtp-stream.c | 14 ++++++++------ 2 files changed, 28 insertions(+), 14 deletions(-) commit 1dba9db0eaa64d362d9d9afb5eeaececdaef948d Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Thu May 12 02:17:39 2016 +0900 ALSA: firewire-lib: permit to flush queued packets only in process context for better PCM period granularity These three commits were merged to improve PCM pointer granularity. commit 76fb87894828 ("ALSA: firewire-lib: taskletize the snd_pcm_period_elapsed() call") commit e9148dddc3c7 ("ALSA: firewire-lib: flush completed packets when reading PCM position") commit 92b862c7d685 ("ALSA: firewire-lib: optimize packet flushing") The point of them is to handle queued packets not only in software IRQ context of IR/IT contexts, but also in process context. As a result of handling packets, period tasklet is scheduled when acrossing PCM period boundary. This is to prevent recursive call of 'struct snd_pcm_ops.pointer()' in the same context. When the pointer callback is executed in the process context, it's better to avoid the second callback in the software IRQ context. The software IRQ context runs immediately after scheduled in the process context because few packets are queued yet. For the aim, 'pointer_flush' is used, however it causes a race condition between the process context and software IRQ context of IR/IT contexts. Practically, this race is not so critical because it influences process context to skip flushing queued packet and to get worse granularity of PCM pointer. The race condition is quite rare but it should be improved for stable service. The similar effect can be achieved by using 'in_interrupt()' macro. This commit obsoletes 'pointer_flush' with it. Acked-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/amdtp-stream.c | 23 +++++++++++++++++------ sound/firewire/amdtp-stream.h | 1 - 2 files changed, 17 insertions(+), 7 deletions(-) commit 6fe813e3d5618a1fdc77497f8d74938e975b63fa Author: Guy Mishol <guym@ti.com> Date: Thu Apr 14 11:58:17 2016 +0300 wlcore/wl12xx: Fix fw logger over sdio The commit fb724ed5c617 ("wlcore: Fix regression in wlcore_set_partition()") fixed wl12xx functionality. However, it reverted the support in fw logger over sdio in wl18xx. This patch reverts the changes made and also fixes the original functionality issue introduced in wl12xx. Fixes: fb724ed5c617 ("wlcore: Fix regression in wlcore_set_partition()") Signed-off-by: Guy Mishol <guym@ti.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/ti/wl12xx/main.c | 4 ++-- drivers/net/wireless/ti/wlcore/io.c | 17 ++++++++++++++--- drivers/net/wireless/ti/wlcore/io.h | 3 ++- 3 files changed, 18 insertions(+), 6 deletions(-) commit 2befc4e003a6093db8dce34c7dc9dee8426c973b Merge: 251a960 af5e964 Author: Kalle Valo <kvalo@codeaurora.org> Date: Wed May 11 20:54:07 2016 +0300 Merge tag 'iwlwifi-next-for-kalle-2016-05-10' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next * work for RX multiqueue continues (Sara); * dynamic queue allocation work continues (Liad); * add Luca as maintainer; * a bunch of fixes and improvements all over; commit f4833c4fd4d76ddee9e647814a64251801844db7 Author: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Date: Thu Apr 21 10:40:18 2016 -0400 drm/amdgpu: Encapsulate some VM table update parameters (v2) Bundle some VM table parameters into amdgpu_vm_update_params structure, so that number of function parameters can be reduced. Only structural change, no logic change. v2: agd: squash in fix from Harish Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 111 ++++++++++++++++++--------------- 1 file changed, 62 insertions(+), 49 deletions(-) commit f84e63f2ffed8a12ba58a154dc17a5ed6d31d61d Author: Marek Olšák <marek.olsak@amd.com> Date: Thu Apr 28 14:32:44 2016 +0200 drm/amdgpu: fix TC cache flushing TC_WB_ACTION must be set according to the docs Signed-off-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) commit b4eeed590deeff13a53db641129f0301d70248f3 Author: Huang Rui <ray.huang@amd.com> Date: Mon May 9 17:29:41 2016 +0800 drm/amd/powerplay: rewrite pp_sw_init to make code readable Actually, pp_sw_init executes pptable_init and backend_init orderly if they are initialized successfully. So rewrite it to make code more readable. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) commit 67b1fcc9ac3f05660809e14cf76a046fc1cc7e41 Author: Alex Deucher <alexander.deucher@amd.com> Date: Tue May 10 09:29:56 2016 -0400 drm/amdgpu/dce11: fix audio offset for asics with >7 audio pins Missing offset in the audio offset array. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vid.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 758ac17f963f3497aae4e767d3a9eb68fea71f71 Author: Christian König <christian.koenig@amd.com> Date: Fri May 6 22:14:00 2016 +0200 drm/amdgpu: fix and cleanup user fence handling v2 We leaked the BO in the error pass, additional to that we only have one user fence for all IBs in a job. v2: remove white space changes Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 19 +++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 55 +++++++++++++++------------------ drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 9 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +- 4 files changed, 38 insertions(+), 47 deletions(-) commit d88bf583bd06eecb31f82871c90ef6a5a09b5766 Author: Christian König <christian.koenig@amd.com> Date: Fri May 6 17:50:03 2016 +0200 drm/amdgpu: move VM fields into job They are the same for all IBs. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 15 +++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 36 +++++++++++++++------------------ drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 19 +++++++++-------- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 12 ++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h | 3 ++- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 10 +++++---- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 10 +++++---- drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 5 +++-- drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 3 ++- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 3 ++- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 3 ++- 14 files changed, 66 insertions(+), 66 deletions(-) commit 92f250989b7098f4b52d50183a7b2fc4e010731b Author: Christian König <christian.koenig@amd.com> Date: Fri May 6 15:57:42 2016 +0200 drm/amdgpu: move the context from the IBs into the job We only have one context for all IBs. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 10 +++++----- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 22 +++++++++++++++------- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 7 +++---- 4 files changed, 24 insertions(+), 17 deletions(-) commit f153d2867bf74f84d47f67c377a8e3a34865e562 Author: Christian König <christian.koenig@amd.com> Date: Fri May 6 15:31:19 2016 +0200 drm/amdgpu: move context switch handling into common code v2 It was a source of bugs to repeat that in each IP version. v2: rename parameter Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 16 +++++++--------- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.h | 2 +- drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 9 ++++----- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 9 ++++----- 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/uvd_v4_2.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 2 +- 12 files changed, 25 insertions(+), 29 deletions(-) commit 9f8fb5a2b339ba83493991ca8f1173a939a696d3 Author: Christian König <christian.koenig@amd.com> Date: Fri May 6 14:52:57 2016 +0200 drm/amdgpu: move preamble IB handling into common code This fixes the handling which was completely broken when you ad more than one preamble IB. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 8 +++++++- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 4 ---- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 ---- 3 files changed, 7 insertions(+), 9 deletions(-) commit 914f9e18c859d9413058c3632aba54d348a6527e Author: Chunming Zhou <David1.Zhou@amd.com> Date: Mon May 9 17:29:39 2016 +0800 drm/amdgpu/gfx7: fix pipeline sync Need to wait on the fence as well. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 8e008dd70e0cf5b0fd7a5a29e00f613370e5ca74 Author: Sonny Jiang <sonny.jiang@amd.com> Date: Wed May 11 13:29:48 2016 -0400 amdgpu/uvd: separate context buffer from DPB Updated to handle latest UVD ucode. Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 62 +++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 3 deletions(-) commit 3208a1ccb23018c650ff9e08c4bd1c8b01f6d8f1 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Tue May 10 20:59:58 2016 +0200 spi: dw-pci: Spelling s/paltforms/platforms/g Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Mark Brown <broonie@kernel.org> drivers/spi/spi-dw-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit ab47036d8f7227361cad7894adee8e66ab6f95b2 Author: Chao Yu <yuchao0@huawei.com> Date: Wed May 11 19:48:44 2016 +0800 f2fs: fix deadlock when flush inline data Below backtrace info was reported by Yunlei He: Call Trace: [<ffffffff817a9395>] schedule+0x35/0x80 [<ffffffff817abb7d>] rwsem_down_read_failed+0xed/0x130 [<ffffffff813c12a8>] call_rwsem_down_read_failed+0x18/0x [<ffffffff817ab1d0>] down_read+0x20/0x30 [<ffffffffa02a1a12>] f2fs_evict_inode+0x242/0x3a0 [f2fs] [<ffffffff81217057>] evict+0xc7/0x1a0 [<ffffffff81217cd6>] iput+0x196/0x200 [<ffffffff812134f9>] __dentry_kill+0x179/0x1e0 [<ffffffff812136f9>] dput+0x199/0x1f0 [<ffffffff811fe77b>] __fput+0x18b/0x220 [<ffffffff811fe84e>] ____fput+0xe/0x10 [<ffffffff81097427>] task_work_run+0x77/0x90 [<ffffffff81074d62>] exit_to_usermode_loop+0x73/0xa2 [<ffffffff81003b7a>] do_syscall_64+0xfa/0x110 [<ffffffff817acf65>] entry_SYSCALL64_slow_path+0x25/0x25 Call Trace: [<ffffffff817a9395>] schedule+0x35/0x80 [<ffffffff81216dc3>] __wait_on_freeing_inode+0xa3/0xd0 [<ffffffff810bc300>] ? autoremove_wake_function+0x40/0x4 [<ffffffff8121771d>] find_inode_fast+0x7d/0xb0 [<ffffffff8121794a>] ilookup+0x6a/0xd0 [<ffffffffa02bc740>] sync_node_pages+0x210/0x650 [f2fs] [<ffffffff8122e690>] ? do_fsync+0x70/0x70 [<ffffffffa02b085e>] block_operations+0x9e/0xf0 [f2fs] [<ffffffff8137b795>] ? bio_endio+0x55/0x60 [<ffffffffa02b0942>] write_checkpoint+0x92/0xba0 [f2fs] [<ffffffff8117da57>] ? mempool_free_slab+0x17/0x20 [<ffffffff8117de8b>] ? mempool_free+0x2b/0x80 [<ffffffff8122e690>] ? do_fsync+0x70/0x70 [<ffffffffa02a53e3>] f2fs_sync_fs+0x63/0xd0 [f2fs] [<ffffffff8129630f>] ? ext4_sync_fs+0xbf/0x190 [<ffffffff8122e6b0>] sync_fs_one_sb+0x20/0x30 [<ffffffff812002e9>] iterate_supers+0xb9/0x110 [<ffffffff8122e7b5>] sys_sync+0x55/0x90 [<ffffffff81003ae9>] do_syscall_64+0x69/0x110 [<ffffffff817acf65>] entry_SYSCALL64_slow_path+0x25/0x25 With following excuting serials, we will set inline_node in inode page after inode was unlinked, result in a deadloop described as below: 1. open file 2. write file 3. unlink file 4. write file 5. close file Thread A Thread B - dput - iput_final - inode->i_state |= I_FREEING - evict - f2fs_evict_inode - f2fs_sync_fs - write_checkpoint - block_operations - f2fs_lock_all (down_write(cp_rwsem)) - f2fs_lock_op (down_read(cp_rwsem)) - sync_node_pages - ilookup - find_inode_fast - __wait_on_freeing_inode (wait on I_FREEING clear) Here, we change to set inline_node flag only for linked inode for fixing. Reported-by: Yunlei He <heyunlei@huawei.com> Signed-off-by: Chao Yu <yuchao0@huawei.com> Tested-by: Jaegeuk Kim <jaegeuk@kernel.org> Cc: stable@vger.kernel.org # v4.6 Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 3b9b10f9ce61b574c63d71ff3eeec9cf5dbe763f Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Wed May 11 09:13:13 2016 -0700 f2fs: avoid f2fs_bug_on during recovery We don't need to use f2fs_bug_on() to treat with any error case when allocating a block during recovery. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/recovery.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 652be55162dcf3eb4440a4f7536ffedbe0352dcf Author: Jaegeuk Kim <jaegeuk@kernel.org> Date: Tue May 10 19:13:50 2016 -0700 f2fs: show # of orphan inodes This adds debug information for # of orphan inodes. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/debug.c | 5 ++++- fs/f2fs/f2fs.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) commit 6e9619499f53b22ead972e476c0e8341c997d929 Author: Chao Yu <yuchao0@huawei.com> Date: Mon May 9 19:56:31 2016 +0800 f2fs: support in batch fzero in dnode page This patch tries to speedup fzero_range by making space preallocation and address removal of blocks in one dnode page as in batch operation. In virtual machine, with zram driver: dd if=/dev/zero of=/mnt/f2fs/file bs=1M count=4096 time xfs_io -f /mnt/f2fs/file -c "fzero 0 4096M" Before: real 0m3.276s user 0m0.008s sys 0m3.260s After: real 0m1.568s user 0m0.000s sys 0m1.564s Signed-off-by: Chao Yu <yuchao0@huawei.com> [Jaegeuk Kim: consider ENOSPC case] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/file.c | 72 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 56 insertions(+), 16 deletions(-) commit 46008c6d42328710f9beaf5c2b47dc92b1cc1a75 Author: Chao Yu <yuchao0@huawei.com> Date: Mon May 9 19:56:30 2016 +0800 f2fs: support in batch multi blocks preallocation This patch introduces reserve_new_blocks to make preallocation of multi blocks as in batch operation, so it can avoid lots of redundant operation, result in better performance. In virtual machine, with rotational device: time fallocate -l 32G /mnt/f2fs/file Before: real 0m4.584s user 0m0.000s sys 0m4.580s After: real 0m0.292s user 0m0.000s sys 0m0.272s In x86, with SSD: time fallocate -l 500G $MNT/testfile Before : 24.758 s After : 1.604 s Signed-off-by: Chao Yu <yuchao0@huawei.com> [Jaegeuk Kim: fix bugs and add performance numbers measured in x86.] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/data.c | 132 +++++++++++++++++++++++++++++++------------- fs/f2fs/f2fs.h | 20 ++++--- include/trace/events/f2fs.h | 14 +++-- 3 files changed, 117 insertions(+), 49 deletions(-) commit 0fac558b96584799876498248020dc49a98bd131 Author: Chao Yu <yuchao0@huawei.com> Date: Mon May 9 19:56:33 2016 +0800 f2fs: make atomic/volatile operation exclusive atomic/volatile ioctl interfaces are exposed to user like other file operation interface, it needs to make them getting exclusion against to each other to avoid potential conflict among these operations in concurrent scenario. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/file.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 7fb17fe44b70c854d380686d8b7e63217f9f1dcf Author: Chao Yu <yuchao0@huawei.com> Date: Mon May 9 19:56:32 2016 +0800 f2fs: use mnt_{want,drop}_write_file in ioctl In interfaces of ioctl, mnt_{want,drop}_write_file should be used for: - get exclusion against file system freezing which may used by lvm snapshot. - do telling filesystem that a write is about to be performed on it, and make sure that the writes are permitted. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> fs/f2fs/file.c | 117 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 87 insertions(+), 30 deletions(-) commit 9ecb549867d7f642f0379f574f0e52870009a8bf Author: Noralf Trønnes <noralf@tronnes.org> Date: Wed May 11 18:09:21 2016 +0200 drm/atomic: Add drm_atomic_helper_best_encoder() Add (struct drm_connector_helper_funcs *)->best_encoder callback helper for connectors that support exactly 1 encoder, statically determined at driver init time. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462982962-10530-6-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_atomic_helper.c | 17 +++++++++++++++++ include/drm/drm_atomic_helper.h | 2 ++ 2 files changed, 19 insertions(+) commit 2827635e39a35f7263fc290c0a39ea3d1dbe35fa Author: Noralf Trønnes <noralf@tronnes.org> Date: Wed May 11 18:09:20 2016 +0200 drm/atomic: Don't skip drm_bridge_*() calls if !drm_encoder_helper_funcs Don't skip drm_bridge_*() calls if encoder->helper_private is NULL. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462982962-10530-5-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_atomic_helper.c | 39 ++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 22 deletions(-) commit 994aae32b13e373dcbe001af33d5b01379483463 Author: Keerthy <j-keerthy@ti.com> Date: Tue May 10 09:34:39 2016 +0530 regulator: lp873x: Add support for lp873x PMIC regulators The regulators set consists of 2 BUCKs and 2 LDOs. The output voltages are configurable and are meant to supply power to the main processor and other components. The ramp delay is configurable for both BUCKs. Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> drivers/regulator/Kconfig | 9 ++ drivers/regulator/Makefile | 1 + drivers/regulator/lp873x-regulator.c | 241 +++++++++++++++++++++++++++++++++++ 3 files changed, 251 insertions(+) commit 02da16d0fbe2cde3d7befb8a907c167c4a79a681 Author: Noralf Trønnes <noralf@tronnes.org> Date: Wed May 11 18:09:18 2016 +0200 drm/fb-cma-helper: Hook up to DocBook and fix some docs Hook up fb_cma_helper to DocBook. Remove mention of CONFIG_FB_DEFERRED_IO in the docs, which was forgotten in the latest version of the deferred_io patch. Use & when referencing drm_mode_config_funcs in docs. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462982962-10530-3-git-send-email-noralf@tronnes.org Documentation/DocBook/gpu.tmpl | 5 +++++ drivers/gpu/drm/drm_fb_cma_helper.c | 8 +++----- 2 files changed, 8 insertions(+), 5 deletions(-) commit 2dad551cfb72f85c4f08b0c06e777f23a4df2f33 Author: Noralf Trønnes <noralf@tronnes.org> Date: Wed May 11 18:09:17 2016 +0200 drm/fb-helper: Remove mention of CONFIG_FB_DEFERRED_IO in docs This was forgotten to fixup in the latest version of the deferred_io patch which made FB_DEFERRED_IO mandatory. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462982962-10530-2-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_fb_helper.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) commit aa3b73f67bda66637f17c3d847a8a36d3649f3f8 Author: Christian König <christian.koenig@amd.com> Date: Tue May 3 15:17:40 2016 +0200 drm/amdgpu: use fence_context to judge ctx switch v2 Use of the ctx pointer is not safe, because they are likely already be assigned to another ctx when doing comparing. v2: recreate from scratch, avoid all unnecessary changes. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Monk.Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) commit 822b2cef4d9ffe680b880ec39734ad8a1d178b02 Author: Tom St Denis <tom.stdenis@amd.com> Date: Thu May 5 10:23:40 2016 -0400 drm/amd/amdgpu: Added more named DRM info messages for debugging Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) commit 88a907d67c03e80a71c49681bbccf3bfebe74ab4 Author: Tom St Denis <tom.stdenis@amd.com> Date: Wed May 4 14:28:35 2016 -0400 drm/amd/amdgpu: Add name field to amd_ip_funcs (v2) Add name that we can print out in kernel messages to aid in debugging. v2: drop DAL changes for upstream Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 1 + drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/cik.c | 1 + drivers/gpu/drm/amd/amdgpu/cik_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/cik_sdma.c | 1 + drivers/gpu/drm/amd/amdgpu/cz_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/cz_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 1 + drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/fiji_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 1 + drivers/gpu/drm/amd/amdgpu/iceland_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c | 1 + drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/tonga_dpm.c | 1 + drivers/gpu/drm/amd/amdgpu/tonga_ih.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c | 1 + drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/vi.c | 1 + drivers/gpu/drm/amd/include/amd_shared.h | 2 ++ drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 1 + 32 files changed, 33 insertions(+), 1 deletion(-) commit cb9e59d7e999c68b79f23d6016b08fc5d0bb8a8d Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu May 5 16:03:57 2016 -0400 drm/amdgpu: Support DRM_MODE_PAGE_FLIP_ASYNC (v2) When this flag is set, we program the hardware to execute the flip during horizontal blank (i.e. for the next scanline) instead of during vertical blank (i.e. for the next frame). Ported from radeon commit: drm/radeon: Support DRM_MODE_PAGE_FLIP_ASYNC v2: drop DAL change for upstream Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 +- drivers/gpu/drm/amd/amdgpu/dce_v10_0.c | 25 +++++++++++++++++-------- drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 26 ++++++++++++++++++-------- drivers/gpu/drm/amd/amdgpu/dce_v8_0.c | 20 ++++++++++++-------- 6 files changed, 52 insertions(+), 27 deletions(-) commit a71dd897599c94d38eb1c4d6c8d9f8e3275e82ce Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu May 5 11:17:22 2016 -0400 drm/amdgpu/dce11: don't share PLLs on Polaris They are part of the phy so you can't share them. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 4 ---- 1 file changed, 4 deletions(-) commit 438498a862723b36369858611321478d8b444ee9 Author: Nils Wallménius <nils.wallmenius@gmail.com> Date: Thu May 5 09:07:48 2016 +0200 drm/amdgpu: Drop unused parameter for *get_sleep_divider_id_from_clock Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 6 ++---- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 6 +++--- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) commit 354ef928a0e67166249c0136cdba21fdfef31702 Author: Nils Wallménius <nils.wallmenius@gmail.com> Date: Thu May 5 09:07:47 2016 +0200 drm/amdgpu: Simplify calculation in *get_sleep_divider_id_from_clock a / (1 << b) is equivalent to a >> b for unsigned values Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 7 +------ drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) commit 9887e425f91b063d68ee1fbec76dea15d6a82085 Author: Nils Wallménius <nils.wallmenius@gmail.com> Date: Thu May 5 09:07:46 2016 +0200 drm/amdgpu: Use max macro in *get_sleep_divider_id_from_clock Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 3 +-- drivers/gpu/drm/amd/amdgpu/kv_dpm.c | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 3 +-- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) commit 859b8b6a27eb6f22d082282f5fd234d6323f849d Author: Nils Wallménius <nils.wallmenius@gmail.com> Date: Thu May 5 09:07:45 2016 +0200 drm/amd/powerplay: Use defined constants for minium engine clock Replacing magic numbers in calculation of sleep divider id for fiji and polaris. Signed-off-by: Nils Wallménius <nils.wallmenius@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 3 ++- drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) commit f9fbac64ebb0306d2b88479325aaa4e61f359cb6 Author: Alex Deucher <alexander.deucher@amd.com> Date: Thu May 5 09:04:38 2016 -0400 drm/amdgpu: add missing licenses on a couple of files Noticed by n1s on IRC. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/powerplay/hwmgr/pp_acpi.c | 23 ++++++++++++++++++++++ .../gpu/drm/amd/powerplay/inc/smu_ucode_xfer_cz.h | 22 +++++++++++++++++++++ 2 files changed, 45 insertions(+) commit 7dae69a2905c34a97678645c8e4c95095f5390b8 Author: Alex Deucher <alexander.deucher@amd.com> Date: Tue May 3 16:25:53 2016 -0400 drm/amdgpu: fetch cu_info once at init Fetch this info once at init and just store the results for future requests. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 20 +++++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 9 ++++----- drivers/gpu/drm/amd/amdgpu/cik.c | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c | 23 +++++++---------------- drivers/gpu/drm/amd/amdgpu/gfx_v7_0.h | 1 - drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 ++++------- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.h | 1 - drivers/gpu/drm/amd/amdgpu/vi.c | 1 - 9 files changed, 25 insertions(+), 46 deletions(-) commit edf600dac65eecb6c8bcf21fa986db30ee21a2ac Author: Christian König <christian.koenig@amd.com> Date: Tue May 3 15:54:54 2016 +0200 drm/amd: cleanup remaining spaces and tabs v2 This is the result of running the following commands: find drivers/gpu/drm/amd/ -name "*.h" -exec sed -i 's/[ \t]\+$//' {} \; find drivers/gpu/drm/amd/ -name "*.c" -exec sed -i 's/[ \t]\+$//' {} \; find drivers/gpu/drm/amd/ -name "*.h" -exec sed -i 's/ \+\t/\t/' {} \; find drivers/gpu/drm/amd/ -name "*.c" -exec sed -i 's/ \+\t/\t/' {} \; v2: drop changes to DAL and internal headers Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 12 ++++++------ drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_gds.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/atom.h | 2 +- drivers/gpu/drm/amd/amdgpu/ci_dpm.c | 2 +- drivers/gpu/drm/amd/amdgpu/cik_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/cikd.h | 4 ++-- drivers/gpu/drm/amd/amdgpu/cz_ih.c | 2 +- drivers/gpu/drm/amd/amdgpu/cz_smumgr.h | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 6 +++--- drivers/gpu/drm/amd/amdgpu/vid.h | 2 +- drivers/gpu/drm/amd/powerplay/hwmgr/fiji_hwmgr.c | 6 +++--- drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 8 ++++---- drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 4 ++-- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.c | 8 ++++---- drivers/gpu/drm/amd/powerplay/hwmgr/tonga_hwmgr.h | 18 +++++++++--------- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 2 +- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 2 +- 23 files changed, 56 insertions(+), 56 deletions(-) commit b1c8a81fdd346274e3c38909740eec7182ef8f8a Author: Christian König <christian.koenig@amd.com> Date: Wed May 4 10:34:03 2016 +0200 drm/amdgpu: remove define for reserved client ID Just set it to zero instead. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) commit 79aa03893df937967201b6ea34e8d4216b893a38 Author: Christian König <christian.koenig@amd.com> Date: Wed May 4 10:33:11 2016 +0200 drm/amdgpu: remove owner cleanup v2 The client ID is now unique, so no need to resert the owner fields any more. v2: remove unused variables as well Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1) Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 ------------- 1 file changed, 13 deletions(-) commit 0ea54b9b6c4ebc04cc6f68246b03577a25dbd4bb Author: Christian König <christian.koenig@amd.com> Date: Wed May 4 10:20:01 2016 +0200 drm/amdgpu: make the VMID owner always 64bit Otherwise we could (in theory) run into problems on 32bit systems. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) commit 4d9c514d8ccff2b4bd0db5d3e178c0c0b3f3bc77 Author: Christian König <christian.koenig@amd.com> Date: Tue May 3 18:46:19 2016 +0200 drm/amdgpu: two minor 80 char fixes Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 10 ++++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c | 7 ++++--- 3 files changed, 12 insertions(+), 8 deletions(-) commit 794ff5710eb1d8bea4acc79cd005f6342623ec46 Author: Monk Liu <Monk.Liu@amd.com> Date: Wed May 4 16:27:41 2016 +0800 drm/amdgpu: hdp flush&inval should always do This fixes Tonga vm-fault issue when running disaster (a multiple context GL heavy tests), We should always flush & invalidate hdp no matter vm used or not. Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <David1.Zhou@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) commit f0f3a8fbdb1e40a37ec44b1df5f82341272c1871 Author: Tom St Denis <tom.stdenis@amd.com> Date: Tue May 3 10:36:28 2016 -0400 drm/amd/amdgpu: Enable CG for UVD6 on Carrizo Tested via vdpau/mpv. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit fe707664879b15b9caafd3b9f0f9897aa26a7edd Author: Chunming Zhou <David1.Zhou@amd.com> Date: Wed Apr 27 18:07:41 2016 +0800 drm/amdgpu: add pipeline sync for compute job hardware ring is async processed, the job is executed in parallel. In some case, this will result vm fault, like jobs with different vmids. This works around a CPC hw issue which will eventually be fixed in fw. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c5637837ba5d5b5e962e73f5a1a7c5456fa85a68 Author: Monk Liu <Monk.Liu@amd.com> Date: Tue Apr 19 20:11:32 2016 +0800 drm/amdgpu: keep vm in job instead of ib (v2) ib.vm is a legacy way to get vm, after scheduler implemented vm should be get from job, and all ibs from one job share the same vm, no need to keep ib.vm just move vm field to job. this patch as well add job as paramter to ib_schedule so it can get vm from job->vm. v2: agd: sqaush in: drm/amdgpu: check if ring emit_vm_flush exists in vm flush No vm flush on engines that don't support VM. bug: https://bugs.freedesktop.org/show_bug.cgi?id=95195 Signed-off-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 16 ++++------------ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 9 +++++---- drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 ++- drivers/gpu/drm/amd/amdgpu/cik_sdma.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 +- 12 files changed, 25 insertions(+), 30 deletions(-) commit 1f207f81e371bed8aa4c898de091d5cfbf68f59e Author: Chunming Zhou <David1.Zhou@amd.com> Date: Mon Apr 25 10:23:34 2016 +0800 drm/amdgpu: make vmid owner be client_id Using the pointer is not adequate. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 031e2983e8e385b9c99367586decabf6323ae049 Author: Chunming Zhou <David1.Zhou@amd.com> Date: Mon Apr 25 10:19:13 2016 +0800 drm/amdgpu: add client id for every vm This adds a unique id for each vm client so we can properly track them. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++++++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++ 2 files changed, 8 insertions(+) commit 444066b915c1b9d0aa4ec7b2d2bbe627e08bf7a6 Author: Chunming Zhou <David1.Zhou@amd.com> Date: Mon Apr 25 10:28:24 2016 +0800 drm/amdgpu: fix wrong release of vmid owner The release of the vmid owner was not handled correctly. We need to take the lock and walk the lru list. Signed-off-by: Chunming Zhou <David1.Zhou@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Monk Liu <monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) commit bfb7802a06ac1855096a3f248822e8f943e6574d Author: Stephen Rothwell <sfr@canb.auug.org.au> Date: Wed May 11 11:07:02 2016 +1000 ASoC: Intel: fix up for DAI link's be_id change Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/boards/bxt_rt298.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 7a1be1a5536242bbd15b227173a89d28607a27a8 Merge: 396cbeb 2f0ad49 Author: Mark Brown <broonie@kernel.org> Date: Wed May 11 17:11:22 2016 +0100 Merge branch 'topic/dai-link' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-intel commit d65444d2fba98dcd4fa028ffada39c36a46f0038 Author: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Date: Wed May 11 22:52:17 2016 +0900 perf buildid-cache: Use lsdir() for looking up buildid caches Use new lsdir() for looking up buildid caches. This changes logic a bit to ignore all dot files, since the build-id cache must not start with dot. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160511135217.23943.94596.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/build-id.c | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) commit c48903b816e6cdffb09b473352851bf199d0c582 Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Wed May 11 22:52:08 2016 +0900 perf symbols: Use lsdir() for the search in kcore cache directory Use lsdir() to search in kcore cache directory. This also avoids checking hidden dot directory entries, because kcore cache directories must always have the name from timestamps when taking the kcore snapshots, and it never start with dot. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160511135208.23943.68071.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/symbol.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) commit b5d8bbe8601a45b908f7952707bbb30bf221ca3b Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Wed May 11 22:51:59 2016 +0900 perf tools: Use SBUILD_ID_SIZE where applicable Use the existing SBUILD_ID_SIZE macro instead of the equivalent BUILD_ID_SIZE * 2 + 1 expression for allocating a buffer for build-id strings. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160511135159.23943.57120.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/annotate.c | 2 +- tools/perf/util/dso.c | 4 ++-- tools/perf/util/header.c | 2 +- tools/perf/util/map.c | 2 +- tools/perf/util/scripting-engines/trace-event-python.c | 2 +- tools/perf/util/symbol.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) commit 357a54f32a065835d3e6a08b07a91a57e52f32c7 Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Wed May 11 22:51:27 2016 +0900 perf tools: Fix lsdir to set errno correctly Fix lsdir() to set correct positive error number (ENOMEM). Since "errno" must have a positive error number instead of negative number, fix lsdir to set it correctly. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Fixes: e1ce726e1db2 ("perf tools: Add lsdir() helper to read a directory") Link: http://lkml.kernel.org/r/20160511135127.23943.40644.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f5cd95ea6082d389be3337bea16c65d4220614fc Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Wed May 11 10:32:20 2016 -0300 perf trace: Move seccomp args beautifiers to tools/perf/trace/beauty/ To reduce the size of builtin-trace.c. Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/n/tip-ovxifncj34ynrjjseg33lil3@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-trace.c | 53 +-------------------------------------- tools/perf/trace/beauty/seccomp.c | 52 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 52 deletions(-) commit af37d21a3245c4a54d608c1d85588203ebfe1ef9 Author: Axel Lin <axel.lin@ingics.com> Date: Wed May 11 11:48:11 2016 +0800 ASoC: max98371 Remove duplicate entry in max98371_reg Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/max98371.c | 1 - 1 file changed, 1 deletion(-) commit 8bf382ce0aef999663bf8d2b02bbfa7da1e9d272 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Wed May 11 10:29:36 2016 -0300 perf trace: Move flock op beautifier to tools/perf/trace/beauty/ To reduce the size of builtin-trace.c. Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/n/tip-c4c47w2a2jx13terl2p2hros@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-trace.c | 32 +------------------------------- tools/perf/trace/beauty/flock.c | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 31 deletions(-) commit f9be7eefcce9de7323c922bea6b45183eb9ef5f0 Author: He Kuang <hekuang@huawei.com> Date: Tue May 10 07:40:32 2016 +0000 perf build: Add build-test for debug-frame on arm/arm64 Debug-frame for remote platforms is not related to the host platform, so we should test each platform separately. Signed-off-by: He Kuang <hekuang@huawei.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1462866037-30382-5-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/Makefile.feature | 4 +++- tools/build/feature/Makefile | 7 +++++++ tools/build/feature/test-libunwind-debug-frame-aarch64.c | 16 ++++++++++++++++ tools/build/feature/test-libunwind-debug-frame-arm.c | 16 ++++++++++++++++ 4 files changed, 42 insertions(+), 1 deletion(-) commit b1d960000ca12508c25776f1fd375ee81578ae1f Author: He Kuang <hekuang@huawei.com> Date: Tue May 10 07:40:31 2016 +0000 perf build: Add build-test for libunwind cross-platforms support Currently only test for local libunwind. We should check all supported platforms so we can use them to parse perf.data with callchain info on different machines. Signed-off-by: He Kuang <hekuang@huawei.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ekaterina Tumanova <tumanova@linux.vnet.ibm.com> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1462866037-30382-4-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/build/Makefile.feature | 4 ++++ tools/build/feature/Makefile | 16 ++++++++++++++++ tools/build/feature/test-libunwind-aarch64.c | 26 ++++++++++++++++++++++++++ tools/build/feature/test-libunwind-arm.c | 27 +++++++++++++++++++++++++++ tools/build/feature/test-libunwind-x86.c | 27 +++++++++++++++++++++++++++ tools/build/feature/test-libunwind-x86_64.c | 27 +++++++++++++++++++++++++++ 6 files changed, 127 insertions(+) commit 83302e79b18f75266e4a44281e8432f61d57d441 Author: Chris Phlipot <cphlipot0@gmail.com> Date: Tue May 10 20:26:49 2016 -0700 perf script: Fix export of callchains with recursion in db-export When an IP with an unresolved symbol occurs in the callchain more than once (ie. recursion), then duplicate symbols can be created because the callchain nodes are never updated after they are first created. To fix this issue we call dso__find_symbol whenever we encounter a NULL symbol, in case we already added a symbol at that IP since we started traversing the callchain. This change prevents duplicate symbols from being exported when duplicate IPs are present in the callchain. Signed-off-by: Chris Phlipot <cphlipot0@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1462937209-6032-5-git-send-email-cphlipot0@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/db-export.c | 4 ++++ 1 file changed, 4 insertions(+) commit 7a2544c004a6c576b1e307f30925b165affe6a22 Author: Chris Phlipot <cphlipot0@gmail.com> Date: Tue May 10 20:26:48 2016 -0700 perf script: Fix callchain addresses in db-export Remove the call to map_ip() to adjust al.addr, because it has already been called when assembling the callchain, in: thread__resolve_callchain_sample(perf_sample) add_callchain_ip(ip = perf_sample->callchain->ips[j]) thread__find_addr_location(addr = ip) thread__find_addr_map(addr) { al->addr = addr if (al->map) al->addr = al->map->map_ip(al->map, al->addr); } Calling it a second time can result in incorrect addresses being used. This can have effects such as duplicate symbols being created and exported. Signed-off-by: Chris Phlipot <cphlipot0@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1462937209-6032-4-git-send-email-cphlipot0@gmail.com [ Show the callchain where it is done, to help reviewing this change down the line ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/db-export.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) commit bd0a51dd2794f1d17d4e7a34ad66db845cef3e5a Author: Chris Phlipot <cphlipot0@gmail.com> Date: Tue May 10 20:26:47 2016 -0700 perf script: Fix symbol insertion behavior in db-export Use the dso__insert_symbol function instead of symbols__insert() in order to properly update the dso symbol cache. If the cache is not updated, then duplicate symbols can be unintentionally created, inserted, and exported. This change prevents duplicate symbols from being exported due to dso__find_symbol() using a stale symbol cache. Signed-off-by: Chris Phlipot <cphlipot0@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1462937209-6032-3-git-send-email-cphlipot0@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/db-export.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit ae93a6c70838b87151ac12589dc507dbf4f2f067 Author: Chris Phlipot <cphlipot0@gmail.com> Date: Tue May 10 20:26:46 2016 -0700 perf symbols: Add dso__insert_symbol function The current method for inserting symbols is to use the symbols__insert() function. However symbols__insert() does not update the dso symbol cache. This causes problems in the following scenario: 1. symbol not found at addr using dso__find_symbol 2. symbol inserted at addr using the existing symbols__insert function 3. symbol still not found at addr using dso__find_symbol() because cache isn't updated. This is undesired behavior. The undesired behavior in (3) is addressed by creating a new function, dso__insert_symbol() to both insert the symbol and update the symbol cache if necessary. If dso__insert_symbol() is used in (2) instead of symbols__insert(), then the undesired behavior in (3) is avoided. Signed-off-by: Chris Phlipot <cphlipot0@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1462937209-6032-2-git-send-email-cphlipot0@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/symbol.c | 12 ++++++++++++ tools/perf/util/symbol.h | 3 +++ 2 files changed, 15 insertions(+) commit 62665dff754a80e2fdd214ef2ed21abb2a7d03a2 Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Tue May 10 12:33:52 2016 -0300 perf scripting python: Use Py_FatalError instead of die() It probably is equivalent, but that seems to be the "pythonic" way of dieing? Anyway, one less die() in the tools/perf codebase. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Cc: Chris Phlipot <cphlipot0@gmail.com> Link: http://lkml.kernel.org/n/tip-nlzgepdv2818zs4e7faif9tu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/scripting-engines/trace-event-python.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit ef51d3ff0da445a2de8f836f0e81881465a18200 Author: Michele Curti <michele.curti@gmail.com> Date: Wed Apr 27 21:37:51 2016 +0200 i2c: algo-bit: declare i2c_bit_quirk_no_clk_stretch as static i2c_bit_quirk_no_clk_stretch is used in i2c-algo-bit.c only, so declare it as static. Signed-off-by: Michele Curti <michele.curti@gmail.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/algos/i2c-algo-bit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 38f5d8b32f36bcac1f54d4511a81e02ed8771a29 Merge: d295015 452e8401 Author: Ingo Molnar <mingo@kernel.org> Date: Tue May 10 22:23:34 2016 +0200 Merge tag 'perf-core-for-mingo-20160510' 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: - Recording 'dwarf' callchains do not need DWARF unwinding support (He Kuang) - Print recently added perf_event_attr.write_backward bit flag in -vv verbose mode (Arnaldo Carvalho de Melo) - Fix incorrect python db-export error message in 'perf script' (Chris Phlipot) - Fix handling of zero-length symbols (Chris Phlipot) - perf stat: Scale values by unit before metrics (Andi Kleen) Infrastructure changes: - Rewrite strbuf not to die(), making tools using it to check its return value instead (Masami Hiramatsu) - Support reading from backward ring buffer, add a 'perf test' entry for it (Wang Nan) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org> commit d2950158d0d7bc376503393ca5f73f6f8d27c56b Merge: ea7c285 e9d848c Author: Ingo Molnar <mingo@kernel.org> Date: Wed May 11 16:56:38 2016 +0200 Merge branch 'perf/urgent' into perf/core, to pick up fixes Signed-off-by: Ingo Molnar <mingo@kernel.org> commit 21e9efd92bb5e205b6243166b0fd38d3a5be8235 Author: Shardar Shariff Md <smohammed@nvidia.com> Date: Mon Apr 25 19:08:36 2016 +0530 i2c: tegra: disable clock before returning error Disable clock before returning error in tegra_i2c_init() as its leaves i2c clock ON in case of error and never turns off again as it will have unbalanced clock enable/disable Signed-off-by: Shardar Shariff Md <smohammed@nvidia.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> drivers/i2c/busses/i2c-tegra.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 396cbebeeb9734aee8efe39431d3b96655bf1e94 Author: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Date: Tue May 10 09:08:57 2016 +0300 ASoC: Intel: Fix printk formatting Format number after 0x in hex. Cc: Jie Yang <yang.jie@linux.intel.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: Mark Brown <broonie@kernel.org> Cc: Jaroslav Kysela <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/haswell/sst-haswell-pcm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1135ef1139b3ebd5dc762b6b02384f8a7a84f8d4 Author: Peter Ujfalusi <peter.ujfalusi@ti.com> Date: Wed May 11 14:14:05 2016 +0300 ASoC: twl6040: Select LPPLL during standby When the codec is in standby we do not need to keep the HPPLL active. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/twl6040.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit 75aeddd12f205d07b36ed76db3426e974b8f2a21 Author: David Howells <dhowells@redhat.com> Date: Wed May 11 14:36:14 2016 +0100 MAINTAINERS: Update keyrings record and add asymmetric keys record Add some stuff to the coverage of the keyrings record and add an asymmetric keys record. Signed-off-by: David Howells <dhowells@redhat.com> MAINTAINERS | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit cc74545a8b67fb193d01f4639d0b93dc913c3c4c Author: Tudor Ambarus <tudor-dan.ambarus@nxp.com> Date: Fri Apr 29 17:48:08 2016 +0300 lib: asn1_decoder - add MODULE_LICENSE("GPL") A kernel taint results when loading the rsa_generic module: root@(none):~# modprobe rsa_generic asn1_decoder: module license 'unspecified' taints kernel. Disabling lock debugging due to kernel taint "Tainting" of the kernel is (usually) a way of indicating that a proprietary module has been inserted, which is not the case here. Signed-off-by: Tudor Ambarus <tudor-dan.ambarus@nxp.com> Signed-off-by: David Howells <dhowells@redhat.com> lib/asn1_decoder.c | 3 +++ 1 file changed, 3 insertions(+) commit 3c8f2278716dc862c420d3d256a83ce30fd12e74 Author: David Howells <dhowells@redhat.com> Date: Wed May 11 14:31:55 2016 +0100 KEYS: The PKCS#7 test key type should use the secondary keyring The PKCS#7 test key type should use the secondary keyring instead of the built-in keyring if available as the source of trustworthy keys. Signed-off-by: David Howells <dhowells@redhat.com> crypto/asymmetric_keys/pkcs7_key_type.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit d6d5c125350dae960a22b45a4ffad46c4abb3ecc Author: Alexander Müller <serveralex@gmail.com> Date: Sun May 8 19:59:49 2016 +0200 pinctrl: meson: Fix eth_tx_en bit index Fix pinctrl eth_tx_en bit index according to Hardkernel ODROID-C1 datasheet. Signed-off-by: Alexander Müller <serveralex@gmail.com> Acked-by: Carlo Caione <carlo@endlessm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/meson/pinctrl-meson8b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ef659a30055e5ec914b51f5294789ea2a92b08c Author: Arnd Bergmann <arnd@arndb.de> Date: Wed May 11 14:11:13 2016 +0200 ARM: aspeed: adapt defconfigs for new CONFIG_PRINTK_TIME Commit 94ea9c7a579f ("lib, switch CONFIG_PRINTK_TIME to int") changes the type of CONFIG_PRINTK_TIME and adapts all existing defconfig files, while we add two new defconfig files with d0bc3483da87 ("arm/configs: Add Aspeed defconfig"), with the old type. This changes the two new defconfig files to match the other ones. As a result, we get harmless warnings for the arm-soc defconfig branch by itself, but everything will work when 4.7-rc1 is out. Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm/configs/aspeed_g4_defconfig | 2 +- arch/arm/configs/aspeed_g5_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b5cb9ab1a00b112fcb96164c814f1f111deeafba Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:24 2016 +1000 powerpc/powernv/npu: Enable NVLink pass through IBM POWER8 NVlink systems come with Tesla K40-ish GPUs each of which also has a couple of fast speed links (NVLink). The interface to links is exposed as an emulated PCI bridge which is included into the same IOMMU group as the corresponding GPU. In the kernel, NPUs get a separate PHB of the PNV_PHB_NPU type and a PE which behave pretty much as the standard IODA2 PHB except NPU PHB has just a single TVE in the hardware which means it can have either 32bit window or 64bit window or DMA bypass but never two of these. In order to make these links work when GPU is passed to the guest, these bridges need to be passed as well; otherwise performance will degrade. This implements and exports API to manage NPU state in regard to VFIO; it replicates iommu_table_group_ops. This defines a new pnv_pci_ioda2_npu_ops which is assigned to the IODA2 bridge if there are NPUs for a GPU on the bridge. The new callbacks call the default IODA2 callbacks plus new NPU API. This adds a gpe_table_group_to_npe() helper to find NPU PE for the IODA2 table_group, it is not expected to fail as the helper is only called from the pnv_pci_ioda2_npu_ops. This does not define NPU-specific .release_ownership() so after VFIO is finished, DMA on NPU is disabled which is ok as the nvidia driver sets DMA mask when probing which enable 32 or 64bit DMA on NPU. This adds a pnv_pci_npu_setup_iommu() helper which adds NPUs to the GPU group if any found. The helper uses helpers to look for the "ibm,gpu" property in the device tree which is a phandle of the corresponding GPU. This adds an additional loop over PEs in pnv_ioda_setup_dma() as the main loop skips NPU PEs as they do not have 32bit DMA segments. As pnv_npu_set_window() and pnv_npu_unset_window() are started being used by the new IODA2-NPU IOMMU group, this makes the helpers public and adds the DMA window number parameter. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-By: Alistair Popple <alistair@popple.id.au> [mpe: Add pnv_pci_ioda_setup_iommu_api() to fix build with IOMMU_API=n] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/npu-dma.c | 64 +++++++++++++++-- arch/powerpc/platforms/powernv/pci-ioda.c | 112 ++++++++++++++++++++++++++++++ arch/powerpc/platforms/powernv/pci.h | 6 ++ 3 files changed, 176 insertions(+), 6 deletions(-) commit 85674868cecebdf6eb7239ecf9c32b6273208d03 Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:23 2016 +1000 powerpc/powernv/npu: Rework TCE Kill handling The pnv_ioda_pe struct keeps an array of peers. At the moment it is only used to link GPU and NPU for 2 purposes: 1. Access NPU quickly when configuring DMA for GPU - this was addressed in the previos patch by removing use of it as DMA setup is not what the kernel would constantly do. 2. Invalidate TCE cache for NPU when it is invalidated for GPU. GPU and NPU are in different PE. There is already a mechanism to attach multiple iommu_table_group to the same iommu_table (used for VFIO), we can reuse it here so does this patch. This gets rid of peers[] array and PNV_IODA_PE_PEER flag as they are not needed anymore. While we are here, add TCE cache invalidation after enabling bypass. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/npu-dma.c | 71 +++++++++---------------------- arch/powerpc/platforms/powernv/pci-ioda.c | 62 +++------------------------ arch/powerpc/platforms/powernv/pci.h | 6 --- 3 files changed, 27 insertions(+), 112 deletions(-) commit b575c731fe58c1ecb1247c6a334ba6c7b4c0b480 Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:22 2016 +1000 powerpc/powernv/npu: Add set/unset window helpers The upcoming NVLink passthrough support will require NPU code to cope with two DMA windows. This adds a pnv_npu_set_window() helper which programs 32bit window to the hardware. This also adds multilevel TCE support. This adds a pnv_npu_unset_window() helper which removes the DMA window from the hardware. This does not make difference now as the caller - pnv_npu_dma_set_bypass() - enables bypass in the hardware but the next patch will use it to manage TCE table lists for TCE Kill handling. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/npu-dma.c | 65 +++++++++++++++++++++++++++----- 1 file changed, 55 insertions(+), 10 deletions(-) commit 7d623e42560ea69eb248d48a1b1b105f28807e6e Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:21 2016 +1000 powerpc/powernv/ioda2: Export debug helper pe_level_printk() This exports debugging helper pe_level_printk() and corresponding macroses so they can be used in npu-dma.c. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 9 +-------- arch/powerpc/platforms/powernv/pci.h | 9 +++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) commit f9f834567432e4d21f26debe10e1ca0ab52446e5 Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:20 2016 +1000 powerpc/powernv/npu: Simplify DMA setup NPU devices are emulated in firmware and mainly used for NPU NVLink training; one NPU device is per a hardware link. Their DMA/TCE setup must match the GPU which is connected via PCIe and NVLink so any changes to the DMA/TCE setup on the GPU PCIe device need to be propagated to the NVLink device as this is what device drivers expect and it doesn't make much sense to do anything else. This makes NPU DMA setup explicit. pnv_npu_ioda_controller_ops::pnv_npu_dma_set_mask is moved to pci-ioda, made static and prints warning as dma_set_mask() should never be called on this function as in any case it will not configure GPU; so we make this explicit. Instead of using PNV_IODA_PE_PEER and peers[] (which the next patch will remove), we test every PCI device if there are corresponding NVLink devices. If there are any, we propagate bypass mode to just found NPU devices by calling the setup helper directly (which takes @bypass) and avoid guessing (i.e. calculating from DMA mask) whether we need bypass or not on NPU devices. Since DMA setup happens in very rare occasion, this will not slow down booting or VFIO start/stop much. This renames pnv_npu_disable_bypass to pnv_npu_dma_set_32 to make it more clear what the function really does which is programming 32bit table address to the TVT ("disabling bypass" means writing zeroes to the TVT). This removes pnv_npu_dma_set_bypass() from pnv_npu_ioda_fixup() as the DMA configuration on NPU does not matter until dma_set_mask() is called on GPU and that will do the NPU DMA configuration. This removes phb->dma_dev_setup initialization for NPU as pnv_pci_ioda_dma_dev_setup is no-op for it anyway. This stops using npe->tce_bypass_base as it never changes and values other than zero are not supported. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/npu-dma.c | 87 ++++++++++++++----------------- arch/powerpc/platforms/powernv/pci-ioda.c | 30 +++++------ arch/powerpc/platforms/powernv/pci.h | 3 +- 3 files changed, 52 insertions(+), 68 deletions(-) commit 6969af73521a9042d91c9efd41f22cf7be7f1ba9 Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:19 2016 +1000 powerpc/powernv/npu: Use the correct IOMMU page size This uses the page size from iommu_table instead of hard-coded 4K. This should cause no change in behavior. While we are here, move bits around to prepare for further rework which will define and use iommu_table_group_ops. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/npu-dma.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 0bbcdb437da0c4acba582058d3d1a84b93bc081d Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:18 2016 +1000 powerpc/powernv/npu: TCE Kill helpers cleanup NPU PHB TCE Kill register is exactly the same as in the rest of POWER8 so let's reuse the existing code for NPU. The only bit missing is a helper to reset the entire TCE cache so this moves such a helper from NPU code and renames it. Since pnv_npu_tce_invalidate() does really invalidate the entire cache, this uses pnv_pci_ioda2_tce_invalidate_entire() directly for NPU. This adds an explicit comment for workaround for invalidating NPU TCE cache. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/npu-dma.c | 41 ------------------------------- arch/powerpc/platforms/powernv/pci-ioda.c | 29 ++++++++++++++++++---- arch/powerpc/platforms/powernv/pci.h | 7 +----- 3 files changed, 25 insertions(+), 52 deletions(-) commit bef9253f551189febf0052a06dc079eb34137a58 Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:17 2016 +1000 powerpc/powernv: Define TCE Kill flags This replaces magic constants for TCE Kill IODA2 register with macros. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) commit a7cf13caad8bf368a28f31dbb4807d61bc9ace18 Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:16 2016 +1000 powerpc/powernv: Rename pnv_pci_ioda2_tce_invalidate_entire As in fact pnv_pci_ioda2_tce_invalidate_entire() invalidates TCEs for the specific PE rather than the entire cache, rename it to pnv_pci_ioda2_tce_invalidate_pe(). In later patches we will add a proper pnv_pci_ioda2_tce_invalidate_entire(). Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 54de285beb9ef8b85cf240f7cda161bd6ae5d04c Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 18:55:15 2016 +1000 vfio/spapr: Relax the IOMMU compatibility check We are going to have multiple different types of PHB on the same system with POWER8 + NVLink and PHBs will have different IOMMU ops. However we only really care about one callback - create_table - so we can relax the compatibility check here. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> drivers/vfio/vfio_iommu_spapr_tce.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c8ceacc22bce95d3a9cff198c9c27a30105a16b8 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:45 2016 +1000 powerpc/powernv: Exclude root bus in pnv_pci_reset_secondary_bus() The function pnv_pci_reset_secondary_bus() is called like below. It's impossible for call the function on root bus. So it's safe to remove the root bus case in the function. No functional changes introduced. pci_parent_bus_reset() / pci_bus_reset() / pci_try_reset_bus() pci_reset_bridge_secondary_bus() pcibios_reset_secondary_bus() pnv_pci_reset_secondary_bus() Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/eeh-powernv.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) commit 4fad494321351f0ac412945c6a464109ad96734a Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:44 2016 +1000 powerpc/powernv: Simplify pnv_eeh_reset() This drops unnecessary nested if statements in pnv_eeh_reset() to improve the code readability. After the changes, the unused local variable "ret" is dropped as well. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/eeh-powernv.c | 67 +++++++++++++--------------- 1 file changed, 31 insertions(+), 36 deletions(-) commit 4a5954ed7726497415ae49204cfc8e38ee8b127e Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:43 2016 +1000 powerpc/pci: Don't scan empty slot In hotplug case, function pci_add_pci_devices() is called to rescan the specified PCI bus, which might not have any child devices. Access to the PCI bus's child device node will cause kernel crash without exception. This adds one more check to skip scanning PCI bus that doesn't have any subordinate devices from device-tree, in order to avoid kernel crash. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/pci-hotplug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit cdddc577d956d55a62581ba3681f8ba66eca3873 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:42 2016 +1000 powerpc/pci: Export pci_traverse_device_nodes() This renames traverse_pci_devices() to pci_traverse_device_nodes(). The function traverses all subordinate device nodes of the specified one. Also, below cleanup applied to the function. No logical changes introduced. * Rename "pre" to "fn". * Avoid assignment in if condition reported from checkpatch.pl. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/ppc-pci.h | 6 +++--- arch/powerpc/kernel/pci_dn.c | 15 ++++++++++----- arch/powerpc/platforms/pseries/msi.c | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) commit de5a28ac5a2d9619dc82286b08dadca577133bbe Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:41 2016 +1000 powerpc/pci: Introduce pci_remove_device_node_info() This implements and exports pci_remove_device_node_info(). It's used to remove the pdn (struct pci_dn) for the indicated device node. The function is going to be used by PowerNV PCI hotplug driver. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/pci-bridge.h | 1 + arch/powerpc/kernel/pci_dn.c | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+) commit d8f66f411e2dc1c27413f0ba73f49bccfa998f1b Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:40 2016 +1000 powerpc/pci: Export pci_add_device_node_info() This renames update_dn_pci_info() to pci_add_device_node_info() with corresponding adjustment on the parameter type and exports it. The function is used to create pdn (struct pci_dn) for the indicated device node. Another function add_pdn(), almost wrapper of pci_add_device_node_info(), to be used in traverse_pci_devices(). No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/pci-bridge.h | 3 ++- arch/powerpc/kernel/pci_dn.c | 30 +++++++++++++++++++----------- arch/powerpc/platforms/pseries/setup.c | 2 +- 3 files changed, 22 insertions(+), 13 deletions(-) commit 6384d97780c123d2e167242862ed4ea9051210e4 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:39 2016 +1000 powerpc/pci: Move pci_find_bus_by_node() around This moves pci_find_bus_by_node() from arch/powerpc/platforms/ pseries/pci_dlpar.c to arch/powerpc/kernel/pci-hotplug.c so that the function can be used by pSeries and PowerNV platform at the same time. Also, below cleanup applied. No functional changes introduced. * Remove variable "busdn" in find_bus_among_children() * Use PCI_DN() to convert device node to pci_dn Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/pci-hotplug.c | 29 ++++++++++++++++++++++++++++ arch/powerpc/platforms/pseries/pci_dlpar.c | 31 ------------------------------ 2 files changed, 29 insertions(+), 31 deletions(-) commit 3773dd258e91e1e14d95cdf17b9d83a1a7b27af1 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:38 2016 +1000 powerpc/pci: Rename pcibios_find_pci_bus() This renames pcibios_find_pci_bus() to pci_find_bus_by_node() to avoid conflicts with those PCI subsystem weak function names, which have prefix "pcibios". No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/pci-bridge.h | 2 +- arch/powerpc/platforms/pseries/pci_dlpar.c | 5 ++--- drivers/pci/hotplug/rpadlpar_core.c | 6 +++--- drivers/pci/hotplug/rpaphp_pci.c | 2 +- 4 files changed, 7 insertions(+), 8 deletions(-) commit bd251b893d46240fc12d9fa9316d9ea6ec2b69a7 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:37 2016 +1000 powerpc/pci: Rename pcibios_{add, remove}_pci_devices() This renames pcibios_{add,remove}_pci_devices() to avoid conflicts with names of the weak functions in PCI subsystem, which have the prefix "pcibios". No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-By: Alistair Popple <alistair@popple.id.au> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/pci-bridge.h | 4 ++-- arch/powerpc/kernel/eeh_driver.c | 12 ++++++------ arch/powerpc/kernel/pci-hotplug.c | 15 +++++++-------- drivers/pci/hotplug/rpadlpar_core.c | 2 +- drivers/pci/hotplug/rpaphp_core.c | 4 ++-- drivers/pci/hotplug/rpaphp_pci.c | 2 +- 6 files changed, 19 insertions(+), 20 deletions(-) commit 1e9167726c41b8d2126327379f4f82acbd548ba8 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:36 2016 +1000 powerpc/powernv: Use PE instead of number during setup and release In current implementation, the PEs that are allocated or picked from the reserved list are identified by PE number. The PE instance has to be picked according to the PE number eventually. We have same issue when PE is released. For pnv_ioda_pick_m64_pe() and pnv_ioda_alloc_pe(), this returns PE instance so that pnv_ioda_setup_bus_PE() can use the allocated or reserved PE instance directly. Also, pnv_ioda_setup_bus_PE() returns the reserved/allocated PE instance to be used in subsequent patches. On the other hand, pnv_ioda_free_pe() uses PE instance (not number) as its argument. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 104 +++++++++++++++++------------- arch/powerpc/platforms/powernv/pci.h | 2 +- 2 files changed, 59 insertions(+), 47 deletions(-) commit 2b923ed1bd96cc471bb0f0eddfed6ae4753d717b Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Thu May 5 12:04:16 2016 +1000 powerpc/powernv/ioda1: Improve DMA32 segment track In current implementation, the DMA32 segments required by one specific PE isn't calculated with the information hold in the PE independently. It conflicts with the PCI hotplug design: PE centralized, meaning the PE's DMA32 segments should be calculated from the information hold in the PE independently. This introduces an array (@dma32_segmap) for every PHB to track the DMA32 segmeng usage. Besides, this moves the logic calculating PE's consumed DMA32 segments to pnv_pci_ioda1_setup_dma_pe() so that PE's DMA32 segments are calculated/allocated from the information hold in the PE (DMA32 weight). Also the logic is improved: we try to allocate as much DMA32 segments as we can. It's acceptable that number of DMA32 segments less than the expected number are allocated. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 115 ++++++++++++++++-------------- arch/powerpc/platforms/powernv/pci.h | 7 +- 2 files changed, 66 insertions(+), 56 deletions(-) commit 801846d1deff943114f6f468b21386247b008321 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:34 2016 +1000 powerpc/powernv: Remove DMA32 PE list PEs are put into PHB DMA32 list (phb->ioda.pe_dma_list) according to their DMA32 weight. The PEs on the list are iterated to setup their TCE32 tables at system booting time. The list is used for once at boot time and no need to keep it. This moves the logic calculating DMA32 weight of PHB and PE to pnv_ioda_setup_dma() to drop PHB's DMA32 list. Also, every PE traces the consumed DMA32 segment by @tce32_seg and @tce32_segcount are useless and they're removed. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 171 ++++++++++++++---------------- arch/powerpc/platforms/powernv/pci.h | 19 ---- 2 files changed, 78 insertions(+), 112 deletions(-) commit acce971c0e72c63cc2247e2412375e13a0be1ee1 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:33 2016 +1000 powerpc/powernv/ioda1: Introduce PNV_IODA1_DMA32_SEGSIZE Currently, there is one macro (TCE32_TABLE_SIZE) representing the TCE table size for one DMA32 segment. The constant representing the DMA32 segment size (1 << 28) is still used in the code. This defines PNV_IODA1_DMA32_SEGSIZE representing one DMA32 segment size. the TCE table size can be calcualted when the page has fixed 4KB size. So all the related calculation depends on one macro (PNV_IODA1_DMA32_SEGSIZE). No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-By: Alistair Popple <alistair@popple.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) commit b30d936f6f3ee357e48b7f50754b0855d87f1cce Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:32 2016 +1000 powerpc/powernv/ioda1: Rename pnv_pci_ioda_setup_dma_pe() This renames pnv_pci_ioda_setup_dma_pe() to pnv_pci_ioda1_setup_dma_pe() as it's the counter-part of IODA2's pnv_pci_ioda2_setup_dma_pe(). No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 9945155143926c1191bc0a1178ac2bb290467370 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Thu May 5 12:02:13 2016 +1000 powerpc/powernv/ioda1: M64 support on P7IOC This enables M64 window on P7IOC, which has been enabled on PHB3. Different from PHB3 where 16 M64 BARs are supported and each of them can be owned by one particular PE# exclusively or divided evenly to 256 segments, every P7IOC PHB has 16 M64 BARs and each of them are divided to 8 segments. So every P7IOC PHB supports 128 M64 segments in total. P7IOC has M64DT, which helps mapping one particular M64 segment# to arbitrary PE#. PHB3 doesn't have M64DT, indicating that one M64 segment can only be pinned to the fixed PE#. In order to unified M64 support M64 on P7IOC and PHB3, we just provide 128 M64 segments on every P7IOC PHB and each of them is pinned to the fixed PE# by bypassing the function of M64DT. In turn, we just need different phb->init_m64() for P7IOC and PHB3 and maps M64 segment in pnv_ioda_reserve_m64_pe() for P7IOC, most of the code are shared by them. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alistair Popple <alistair@popple.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 89 +++++++++++++++++++++++++++++-- 1 file changed, 86 insertions(+), 3 deletions(-) commit c430670ad11aa8c5a9f9706bf6f7376310af7f4b Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:30 2016 +1000 powerpc/powernv: Rename M64 related functions This renames those functions picking PE number based on consumed M64 segments, mapping M64 segments to PEs as those functions are going to be shared by IODA1/IODA2 in next patch. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) commit 93289d8c08dc038a3efccf6b7fa563e1683cd868 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:29 2016 +1000 powerpc/powernv: Track M64 segment consumption When unplugging PCI devices, their parent PEs might be offline. The consumed M64 resource by the PEs should be released at that time. As we track M32 segment consumption, this introduces an array to the PHB to track the mapping between M64 segment and PE number. Note: M64 mapping isn't covered by pnv_ioda_setup_pe_seg() as IODA2 doesn't support the mapping explicitly while it's supported on IODA1. Until now, no M64 is supported on IODA1 in software. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 10 ++++++++-- arch/powerpc/platforms/powernv/pci.h | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) commit 69d733e72ddae1680ffd3b5c648ff31cb46d9cc9 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:28 2016 +1000 powerpc/powernv: IO and M32 mapping based on PCI device resources Currently, the IO and M32 segments are mapped to the corresponding PE based on the windows of the parent bridge of PE's primary bus. It's not going to work when the windows of root port or upstream port of the PCIe switch behind root port are extended to PHB's apertures in order to support hotplug in subsequent patch. This fixes the issue by mapping IO and M32 segments based on the resources of the PCI devices included in the PE, instead of the windows of the parent bridge of the PE's primary bus. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) commit 23e79425fe7caaa93ddcee18ac4c57069f0fb4b6 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:27 2016 +1000 powerpc/powernv: Simplify pnv_ioda_setup_pe_seg() pnv_ioda_setup_pe_seg() associates the IO and M32 segments with the owner PE. The code mapping segments should be fixed and immune from logic changes introduced to pnv_ioda_setup_pe_seg(). This moves the code mapping segments to helper pnv_ioda_setup_pe_res(). The data type for @rc is changed to "int64_t". Also, argument @hose is removed from pnv_ioda_setup_pe() as it can be got from @pe. No functional changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-By: Alistair Popple <alistair@popple.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 121 +++++++++++++++--------------- 1 file changed, 62 insertions(+), 59 deletions(-) commit 3fa23ff8ff3f0fa4f187bc46f81c69b1fdeecd9a Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:26 2016 +1000 powerpc/powernv: Fix initial IO and M32 segmap There are two arrays for IO and M32 segment maps on every PHB. The index of the arrays are segment number and the value stored in the corresponding element is PE number, indicating the segment is assigned to the PE. Initially, all elements in those two arrays are zeroes, meaning all segments are assigned to PE#0. It's wrong. This fixes the initial values in the elements of those two arrays to IODA_INVALID_PE, meaning all segments aren't assigned to any PE. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit 689ee8c95f399998f52eda827849b7771629a53c Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:25 2016 +1000 powerpc/powernv: Data type unsigned int for PE number This changes the data type of PE number from "int" to "unsigned int" in order to match the fact PE number is never negative: * The number of PE to which the specified PCI device is attached. * The PE number map for SRIOV VFs. * The returned PE number from pnv_ioda_alloc_pe(). * The returned PE number from pnv_ioda2_pick_m64_pe(). Suggested-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-By: Alistair Popple <alistair@popple.id.au> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/pci-bridge.h | 6 +++--- arch/powerpc/platforms/powernv/pci-ioda.c | 8 ++++---- arch/powerpc/platforms/powernv/pci.c | 2 +- arch/powerpc/platforms/powernv/pci.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) commit 92b8f137b3620b0a07c71b1bd191f9a22d0cf0ab Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:24 2016 +1000 powerpc/powernv: Rename PE# fields in struct pnv_phb This renames the fields related to PE number in "struct pnv_phb" for better reflecting of their usages as Alexey suggested. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/eeh-powernv.c | 2 +- arch/powerpc/platforms/powernv/pci-ioda.c | 58 ++++++++++++++-------------- arch/powerpc/platforms/powernv/pci.c | 2 +- arch/powerpc/platforms/powernv/pci.h | 4 +- 4 files changed, 33 insertions(+), 33 deletions(-) commit 13ce7598b6c0d9b3734fb070242de21b05aedd0d Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:23 2016 +1000 powerpc/powernv: Reorder fields in struct pnv_phb This moves those fields in struct pnv_phb that are related to PE allocation around. No logical change. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) commit 475d92c27f3b32ea31f5f7c4ed7009a7b895b9e7 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:22 2016 +1000 powerpc/powernv: Drop phb->bdfn_to_pe() The last usage of pnv_phb::bdfn_to_pe() was removed in ff57b454ddb9 ("powerpc/eeh: Do probe on pci_dn"), so drop it. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 9 --------- arch/powerpc/platforms/powernv/pci.h | 1 - 2 files changed, 10 deletions(-) commit cb4224c501802940c41e2f46ae57de08fd0ca119 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:21 2016 +1000 powerpc/powernv: Cleanup on pci_controller_ops instances This cleans up on below data struct instances to use tab instead of space indent of statement to avoid complains from scripts/checkpatch.pl. No logical changes introduced. @pnv_pci_ioda_controller_ops @pnv_npu_ioda_controller_ops Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Acked-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci-ioda.c | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) commit 062b26ba3e6c5bc80f01056f5aa8546d18a2eb85 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Tue May 3 15:41:20 2016 +1000 powerpc/pci: Cleanup on struct pci_controller_ops Each PHB has one instance of "struct pci_controller_ops" that includes various callbacks called by PCI subsystem. In the definition of this struct, some callbacks have explicit names for its arguments, but the left don't have. This adds all explicit names of the arguments to the callbacks in "struct pci_controller_ops" so that the code looks consistent. Also, argument name @dev is replaced by @pdev as the later one is the preferred name for PCI device. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Daniel Axtens <dja@axtens.net> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/pci-bridge.h | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) commit 16aab321872400a4ce35b90ba40484fcb5d636ba Author: Rashmica Gupta <rashmicy@gmail.com> Date: Wed Dec 23 16:49:54 2015 +1100 selftests/powerpc: Add test to check if TM SPRs are corrupted Testing that the TM SPRs are behaving the way they should. Uses more threads than cpus to see if the following register values persist with context switching: - the FS (failure summary) flag in TEXASR - TFIAR and TFHAR Signed-off-by: Rashmica Gupta <rashmicy@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> tools/testing/selftests/powerpc/tm/.gitignore | 1 + tools/testing/selftests/powerpc/tm/Makefile | 3 +- tools/testing/selftests/powerpc/tm/tm-tmspr.c | 143 ++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 1 deletion(-) commit dbccb4940c9c9c8c93fcf733445e96dd2d6890d6 Author: Rashmica Gupta <rashmicy@gmail.com> Date: Wed Dec 23 16:49:53 2015 +1100 selftests/powerpc: Add TM test to check if TAR is corrupted If the transaction is aborted, the TAR should be rolled back to the checkpointed value before the transaction began. The value written to the TAR when the transaction is suspended should only remain there if the transaction completes successfully. Signed-off-by: Rashmica Gupta <rashmicy@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> tools/testing/selftests/powerpc/tm/.gitignore | 1 + tools/testing/selftests/powerpc/tm/Makefile | 2 +- tools/testing/selftests/powerpc/tm/tm-tar.c | 90 +++++++++++++++++++++++++++ 3 files changed, 92 insertions(+), 1 deletion(-) commit d95be4ca3e457044be55c8b1c1b5ac64f17d8a92 Author: Rashmica Gupta <rashmicy@gmail.com> Date: Wed Dec 23 16:49:52 2015 +1100 selftests/powerpc: Add test for forking inside transaction This test does a fork syscall inside a transaction. Basic sniff test to see if we can enter the kernel during a transaction. Signed-off-by: Rashmica Gupta <rashmicy@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> tools/testing/selftests/powerpc/tm/.gitignore | 1 + tools/testing/selftests/powerpc/tm/Makefile | 2 +- tools/testing/selftests/powerpc/tm/tm-fork.c | 42 +++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) commit da3ddc3b5fea695f7b2fa89c4ca17dfd529293d2 Author: Rashmica Gupta <rashmicy@gmail.com> Date: Wed Dec 23 16:49:51 2015 +1100 selftests/powerpc: Standardise TM calls Currently tbegin, tend etc are written as opcodes or asm instructions. So standardise these to asm instructions. Signed-off-by: Rashmica Gupta <rashmicy@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> tools/testing/selftests/powerpc/tm/tm-resched-dscr.c | 16 +++++----------- tools/testing/selftests/powerpc/tm/tm-signal-stack.c | 4 ++-- 2 files changed, 7 insertions(+), 13 deletions(-) commit 2d59b3b25659463a24f05df367574d90b3cd7145 Author: Rashmica Gupta <rashmicy@gmail.com> Date: Wed Dec 23 16:49:50 2015 +1100 selftests/powerpc: Make reg.h common to all powerpc selftests Currently there is a reg.h in pmu/ebb that has defines that are useful in other powerpc selftests so move this up into selftests/powerpc folder. Also include in utils.h - as this is often used in self tests. Add in some other useful register defines. Signed-off-by: Rashmica Gupta <rashmicy@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> tools/testing/selftests/powerpc/pmu/ebb/ebb.c | 1 - tools/testing/selftests/powerpc/pmu/ebb/reg.h | 49 ------------------- .../selftests/powerpc/pmu/ebb/reg_access_test.c | 1 - tools/testing/selftests/powerpc/reg.h | 55 ++++++++++++++++++++++ tools/testing/selftests/powerpc/utils.h | 1 + 5 files changed, 56 insertions(+), 51 deletions(-) commit 2513767d2255acfec707328948dcaefe887f6044 Author: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Date: Tue Mar 1 11:17:46 2016 +0530 powerpc/powernv: Rename machine_check_pSeries_early() to powernv The routine machine_check_pSeries_early() is only used on powernv, not pseries. Hence rename machine_check_pSeries_early() to machine_check_powernv_early(). Reported-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/exceptions-64s.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 266eab8f32cc43b688c2e9aaab63c2565a3998c2 Author: Christophe Lombard <clombard@linux.vnet.ibm.com> Date: Fri Apr 22 15:39:22 2016 +0200 cxl: Check periodically the coherent platform function's state In the PowerVM environment, the PHYP CoherentAccel component manages the state of the Coherent Accelerator Processor Interface adapter and virtualizes CAPI resources, handles CAPP, PSL, PSL Slice errors - and interrupts - and provides a new set of hcalls for the OS APIs to utilize Accelerator Function Unit (AFU). During the course of operation, a coherent platform function can encounter errors. Some possible reason for errors are: • Hardware recoverable and unrecoverable errors • Transient and over-threshold correctable errors PHYP implements its own state model for the coherent platform function. The state of the AFU is available through a hcall. The current implementation of the cxl driver, for the PowerVM environment, checks this state of the AFU only when an action is requested - open a device, ioctl command, memory map, attach/detach a process - from an external driver - cxlflash, libcxl. If an error is detected the cxl driver handles the error according the content of the Power Architecture Platform Requirements document. But in case of low-level troubles (or error injection), the PHYP component may reset the card and change the AFU state. The PHYP interface doesn't provide any way to be notified when that happens thus implies that the cxl driver: • cannot handle immediatly the state change of the AFU. • cannot notify other drivers (cxlflash, ...) The purpose of this patch is to wake up the cpu periodically to check the current state of each AFU and to see if we need to enter an error recovery path. Signed-off-by: Christophe Lombard <clombard@linux.vnet.ibm.com> Acked-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> drivers/misc/cxl/cxl.h | 4 +++- drivers/misc/cxl/guest.c | 57 +++++++++++++++++++++++++----------------------- 2 files changed, 33 insertions(+), 28 deletions(-) commit 7a0d85d313c2066712e530e668bc02bb741a685c Author: Ian Munsie <imunsie@au1.ibm.com> Date: Fri May 6 17:46:36 2016 +1000 cxl: Add kernel API to allow a context to operate with relocate disabled cxl devices typically access memory using an MMU in much the same way as the CPU, and each context includes a state register much like the MSR in the CPU. Like the CPU, the state register includes a bit to enable relocation, which we currently always enable. In some cases, it may be desirable to allow a device to access memory using real addresses instead of effective addresses, so this adds a new API, cxl_set_translation_mode, that can be used to disable relocation on a given kernel context. This can allow for the creation of a special privileged context that the device can use if it needs relocation disabled, and can use regular contexts at times when it needs relocation enabled. This interface is only available to users of the kernel API for obvious reasons, and will never be supported in a virtualised environment. This will be used by the upcoming cxl support in the mlx5 driver. Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> drivers/misc/cxl/api.c | 19 +++++++++++++++++++ drivers/misc/cxl/cxl.h | 1 + drivers/misc/cxl/guest.c | 3 +++ drivers/misc/cxl/native.c | 5 +++-- include/misc/cxl.h | 8 ++++++++ 5 files changed, 34 insertions(+), 2 deletions(-) commit 3c206fa77aaaac8cd7d4cfcd840c82495b01b288 Author: Ian Munsie <imunsie@au1.ibm.com> Date: Wed May 4 14:52:58 2016 +1000 cxl: Ensure PSL interrupt is configured for contexts with no AFU IRQs In the cxl kernel API, it is possible to create a context and start it without allocating any interrupts. Since we assign or allocate the PSL interrupt when allocating AFU interrupts this will lead to a situation where we start the context with no means to take any faults. The user API is not affected as it always goes through the cxl interrupt allocation code paths and will have the PSL interrupt allocated or assigned, even if no AFU interrupts were requested. This checks that at least one interrupt is configured at the time of attach, and if not it will assign the multiplexed PSL interrupt for powernv, or allocate a single interrupt for PowerVM. Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Reviewed-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> drivers/misc/cxl/guest.c | 12 ++++++++++++ drivers/misc/cxl/native.c | 9 +++++++++ 2 files changed, 21 insertions(+) commit 0e5b5ba17ac33a05d9f4a48b5eb8b5e30f2274d7 Author: Ian Munsie <imunsie@au1.ibm.com> Date: Wed May 4 14:48:32 2016 +1000 cxl: Remove duplicate #defines These defines are not used, but other equivalent definitions (CXL_SPA_SW_CMD_*) are used. Remove the unused defines. Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> drivers/misc/cxl/cxl.h | 9 --------- 1 file changed, 9 deletions(-) commit 895a79805c287df73142f1b424b22ea5190734c2 Author: Ian Munsie <imunsie@au1.ibm.com> Date: Wed May 4 14:46:30 2016 +1000 cxl: Handle num_of_processes larger than can fit in the SPA num_of_process is a 16 bit field, theoretically allowing an AFU to support 16K processes, however the scheduled process area currently has a maximum size of 1MB, which limits the maximum number of processes to 7704. Some AFUs may not necessarily care what the limit is and just want to be able to use the maximum by setting the field to 16K. To allow these to work, detect this situation and use the maximum size for the SPA. Downgrade the WARN_ON to a dev_warn. Signed-off-by: Ian Munsie <imunsie@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> drivers/misc/cxl/native.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) commit 171cb719dacd0f102b39bd5ab5eea0ce11813853 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Fri Feb 26 11:26:26 2016 +1100 powerpc/mm: Improve readability of update_mmu_cache() The function is used to update the MMU with software PTE. It can be called by data access exception handler (0x300) or instruction access exception handler (0x400). If the function is called by 0x400 handler, the local variable @access is set to _PAGE_EXEC to indicate the software PTE should have that flag set. When the function is called by 0x300 handler, @access is set to zero. This improves the readability of the function by replacing if statements with switch. No logical changes introduced. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/mem.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) commit dd0b52c47a2d71b7960c9a5ce7d51f17ed03d9f5 Author: Oliver O'Halloran <oohall@gmail.com> Date: Thu May 5 17:54:08 2016 +1000 powerpc/mm: define TOP_ZONE as a constant The zone that contains the top of memory will be either ZONE_NORMAL or ZONE_HIGHMEM depending on the kernel config. There are two functions that require this information and both of them use an #ifdef to set a local variable (top_zone). This is a little silly so lets just make it a constant. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Cc: linux-mm@kvack.org Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/mem.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) commit 66707836062db62756b395d1fb16ab02ff162862 Author: Oliver O'Halloran <oohall@gmail.com> Date: Tue Feb 16 17:31:53 2016 +1100 powerpc/sstep: Fix emulation fall-through There is a switch fallthough in instr_analyze() which can cause an invalid instruction to be emulated as a different, valid, instruction. The rld* (opcode 30) case extracts a sub-opcode from bits 3:1 of the instruction word. However, the only valid values of this field are 001 and 000. These cases are correctly handled, but the others are not which causes execution to fall through into case 31. Breaking out of the switch causes the instruction to be marked as unknown and allows the caller to deal with the invalid instruction in a manner consistent with other invalid instructions. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/lib/sstep.c | 1 + 1 file changed, 1 insertion(+) commit dd21731022faf43c1250050e5d28d11add599149 Author: Lennart Sorensen <lsorense@csclub.uwaterloo.ca> Date: Thu May 5 16:44:44 2016 -0400 powerpc/sstep: Fix sstep.c compile on powerpcspe Commit be96f63375a1 ("powerpc: Split out instruction analysis part of emulate_step()") introduced ldarx and stdcx into the instructions in sstep.c, which are not accepted by the assembler on powerpcspe, but does seem to be accepted by the normal powerpc assembler even in 32 bit mode. Wrap these two instructions in a __powerpc64__ check like it is everywhere else in the file. Fixes: be96f63375a1 ("powerpc: Split out instruction analysis part of emulate_step()") Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/lib/sstep.c | 4 ++++ 1 file changed, 4 insertions(+) commit 31cdd0c39c7544ced79da53aa0b7e989f3a39582 Author: Paul Mackerras <paulus@ozlabs.org> Date: Wed Apr 13 21:31:24 2016 +1000 powerpc/xmon: Fix SPR read/write commands and add command to dump SPRs xmon has commands for reading and writing SPRs, but they don't work currently for several reasons. They attempt to synthesize a small function containing an mfspr or mtspr instruction and call it. However, the instructions are on the stack, which is usually not executable. Also, for 64-bit we set up a procedure descriptor, which is fine for the big-endian ABIv1, but not correct for ABIv2. Finally, the code uses the infrastructure for catching memory errors, but that only catches data storage interrupts and machine check interrupts, but a failed mfspr/mtspr can generate a program interrupt or a hypervisor emulation assist interrupt, or be a no-op. Instead of trying to synthesize a function on the fly, this adds two new functions, xmon_mfspr() and xmon_mtspr(), which take an SPR number as an argument and read or write the SPR. Because there is no Power ISA instruction which takes an SPR number in a register, we have to generate one of each possible mfspr and mtspr instruction, for all 1024 possible SPRs. Thus we get just over 8k bytes of code for each of xmon_mfspr() and xmon_mtspr(). However, this 16kB of code pales in comparison to the > 130kB of PPC opcode tables used by the xmon disassembler. To catch interrupts caused by the mfspr/mtspr instructions, we add a new 'catch_spr_faults' flag. If an interrupt occurs while it is set, we come back into xmon() via program_check_interrupt(), _exception() and die(), see that catch_spr_faults is set and do a longjmp to bus_error_jmp, back into read_spr() or write_spr(). This adds a couple of other nice features: first, a "Sa" command that attempts to read and print out the value of all 1024 SPRs. If any mfspr instruction acts as a no-op, then the SPR is not implemented and not printed. Secondly, the Sr and Sw commands detect when an SPR is not implemented (i.e. mfspr is a no-op) and print a message to that effect rather than printing a bogus value. Signed-off-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/xmon/Makefile | 2 +- arch/powerpc/xmon/spr_access.S | 45 ++++++++++++++ arch/powerpc/xmon/xmon.c | 136 +++++++++++++++++++++++------------------ 3 files changed, 122 insertions(+), 61 deletions(-) commit f47822078dece7189cad0a5f472f148e5e916736 Author: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Date: Thu Apr 28 15:01:10 2016 +0530 perf tools: Fix perf regs mask generation On some architectures (powerpc in particular), the number of registers exceeds what can be represented in an integer bitmask. Ensure we generate the proper bitmask on such platforms. Fixes: 71ad0f5e4 ("perf tools: Support for DWARF CFI unwinding on post processing") Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> tools/perf/util/perf_regs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit c4522469e6418fb547fbcd9d3aeb73bea0f6f859 Author: Chandan Kumar <chandan.kumar@linux.vnet.ibm.com> Date: Thu Apr 28 15:01:09 2016 +0530 perf/powerpc: Add support for unwinding perf-stackdump Adds support for unwinding user stack dump by linking with libunwind. Signed-off-by: Chandan Kumar <chandan.kumar@linux.vnet.ibm.com> Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> tools/perf/arch/powerpc/util/Build | 1 + tools/perf/arch/powerpc/util/unwind-libunwind.c | 96 +++++++++++++++++++++++++ tools/perf/config/Makefile | 1 + 3 files changed, 98 insertions(+) commit 17ed7c38427ff84ef77eac15724b6faf35e5492e Author: Chandan Kumar <chandan.kumar@linux.vnet.ibm.com> Date: Thu Apr 28 15:01:08 2016 +0530 powerpc: Add HAVE_PERF_USER_STACK_DUMP support With perf regs support enabled for powerpc, in commit ed4a4ef85cf5 ("powerpc/perf: Add support for sampling interrupt register state"), the support for obtaining perf user stack dump is already enabled. This patch declares the support for same and also updates documentation to mark the support for perf-regs and perf-stackdump. Signed-off-by: Chandan Kumar <chandan.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Documentation/features/perf/perf-regs/arch-support.txt | 2 +- Documentation/features/perf/perf-stackdump/arch-support.txt | 2 +- arch/powerpc/Kconfig | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) commit aac55d7573c5d46ed9a62818d5d3e69dd2060105 Author: Michael Ellerman <mpe@ellerman.id.au> Date: Fri May 6 16:47:12 2016 +1000 powerpc/mm/hash64: Fix subpage protection with 4K HPTE config With Linux page size of 64K and hardware only supporting 4K HPTE, if we use subpage protection, we always fail for the subpage 0 as shown below (using the selftest subpage_prot test): 520175565: (4520111850): Failed at 0x3fffad4b0000 (p=13,sp=0,w=0), want=fault, got=pass ! 4520890210: (4520826495): Failed at 0x3fffad5b0000 (p=29,sp=0,w=0), want=fault, got=pass ! 4521574251: (4521510536): Failed at 0x3fffad6b0000 (p=45,sp=0,w=0), want=fault, got=pass ! 4522258324: (4522194609): Failed at 0x3fffad7b0000 (p=61,sp=0,w=0), want=fault, got=pass ! This is because hash preload wrongly inserts the HPTE entry for subpage 0 without looking at the subpage protection information. Fix it by teaching should_hash_preload() not to preload if we have subpage protection configured for that range. It appears this has been broken since it was introduced in 2008. Fixes: fa28237cfcc5 ("[POWERPC] Provide a way to protect 4k subpages when using 64k pages") Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> [mpe: Rework into should_hash_preload() to avoid build fails w/SLICES=n] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/hash_utils_64.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) commit 8bbc9b7b001eaab8abf7e9e24edf1bb285c8d825 Author: Michael Ellerman <mpe@ellerman.id.au> Date: Fri May 6 16:46:00 2016 +1000 powerpc/mm/hash64: Factor out hash preload psize check Currently we have a check in hash_preload() against the psize, which is only included when CONFIG_PPC_MM_SLICES is enabled. We want to expand this check in a subsequent patch, so factor it out to allow that. As a bonus it removes the #ifdef in the C code. Unfortunately we can't put this in the existing CONFIG_PPC_MM_SLICES block because it would require a forward declaration. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/hash_utils_64.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) commit 925e2d1ded80fcc92210c9a9e5009887553dd83f Author: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Date: Thu Apr 28 15:34:55 2016 +1000 powerpc: Update of_remove_property() call sites to remove null checking After obtaining a property from of_find_property() and before calling of_remove_property() most code checks to ensure that the property returned from of_find_property() is not null. The previous patch moved this check to the start of the function of_remove_property() in order to avoid the case where this check isn't done and a null value is passed. This ensures the check is always conducted before taking locks and attempting to remove the property. Thus it is no longer necessary to perform a check for null values before invoking of_remove_property(). Update of_remove_property() call sites in order to remove redundant checking for null property value as check is now performed within the of_remove_property function(). Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> [mpe: Unbreak some lines which are just >80 chars for readability] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/machine_kexec.c | 18 +++++------------- arch/powerpc/kernel/machine_kexec_64.c | 9 ++------- arch/powerpc/platforms/pseries/mobility.c | 4 ++-- arch/powerpc/platforms/pseries/reconfig.c | 5 +---- 4 files changed, 10 insertions(+), 26 deletions(-) commit 201b3fe586361c0241105f6e3de2c4749010f897 Author: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Date: Thu Apr 28 15:34:54 2016 +1000 drivers/of: Add check for null property in of_remove_property() The validity of the property input argument to of_remove_property() is never checked within the function and thus it is possible to pass a null value. It happens that this will be picked up in __of_remove_property() as no matching property of the device node will be found and thus an error will be returned, however once again there is no explicit check for a null value. By the time this is detected 2 locks have already been acquired which is completely unnecessary if the property to remove is null. Add an explicit check in the function of_remove_property() for a null property value and return -ENODEV in this case, this is consistent with what the previous return value would have been when the null value was not detected and passed to __of_remove_property(). By moving an explicit check for the property paramenter into the of_remove_property() function, this will remove the need to perform this check in calling code before invocation of the of_remove_property() function. Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> drivers/of/base.c | 3 +++ 1 file changed, 3 insertions(+) commit b2ed059642875a699a195cb136b2e57e7e07cedf Author: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Date: Thu Apr 28 15:53:45 2016 +1000 powerpc/pseries: Add null property check to pseries_discover_pic() The return value of of_get_property() isn't checked before it is passed to the strstr() function, if it happens that the return value is null then this will result in a null pointer being dereferenced. Add a check to see if the return value of of_get_property() is null and if it is continue straight on to the next node. Signed-off-by: Suraj Jitindar Singh <sjitindarsingh@gmail.com> Reviewed-by: Chris Smart <chris@distroguy.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/pseries/setup.c | 2 ++ 1 file changed, 2 insertions(+) commit 9e44754755528f78dbc3a5e64cd48dadf4773777 Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Mon May 2 17:06:12 2016 +1000 powerpc/powernv/pci: Fix cfg_dbg() & replace with pr_devel() When cfg_dbg() is enabled (i.e. mapped to printk()), gcc produces errors as the __func__ parameter is missing (pnv_pci_cfg_read() has one); this adds the missing parameter. cfg_dbg() is just an inferior version of pr_devel() so use the latter instead. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/powernv/pci.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) commit 2f67798c1f9f35ba576ac0639b9b648b9b2033f6 Author: Michael Ellerman <mpe@ellerman.id.au> Date: Mon May 2 14:54:29 2016 +1000 selftests/powerpc: Fix subpage_prot test to return !0 on failure It's helpful for automated testing if the test returns error codes back to the calling program. While we're here fix all the usages of %p to remove the double 0x, ie. %p already includes 0x. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> tools/testing/selftests/powerpc/mm/subpage_prot.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 438517ec78fa4e9db9892e749ed50e2a21f5f17f Author: Chris Smart <chris@distroguy.com> Date: Mon May 2 13:51:38 2016 +1000 selftests/powerpc: Test cp_abort during context switch Test that performing a copy paste sequence in userspace on P9 does not result in a leak of the copy into the paste of another process. This is based on Anton Blanchard's context_switch benchmarking code. It sets up two processes tied to the same CPU, one which copies and one which pastes. The paste should never succeed and the test fails if it does. This is a test for commit, "8a64904 powerpc: Add support for userspace P9 copy paste." Patch created with much assistance from Michael Neuling <mikey@neuling.org> Signed-off-by: Chris Smart <chris@distroguy.com> Reviewed-by: Cyril Bur <cyrilbur@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> tools/testing/selftests/powerpc/Makefile | 1 + .../selftests/powerpc/context_switch/.gitignore | 1 + .../selftests/powerpc/context_switch/Makefile | 10 ++ .../selftests/powerpc/context_switch/cp_abort.c | 110 +++++++++++++++++++++ tools/testing/selftests/powerpc/utils.h | 7 ++ 5 files changed, 129 insertions(+) commit e44c1b15cf32e33cd4521f7278333d448eda170b Author: Chris Smart <chris@distroguy.com> Date: Mon May 2 16:00:58 2016 +1000 powerpc: Remove unnecessary CONFIG_SMP #ifdefs The code in machine_restart/power_off/halt() includes #ifdefs around calls to smp_send_stop(), however these are not required as include/linux/smp.h includes an empty version of this function for CONFIG_SMP=n builds. Signed-off-by: Chris Smart <chris@distroguy.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/setup-common.c | 6 ------ 1 file changed, 6 deletions(-) commit c415c9cb8ab2c852a56f5d592057fc14c585301d Author: Rashmica Gupta <rashmicy@gmail.com> Date: Tue Apr 12 15:33:58 2016 +1000 powerpc: Remove unused remnants from A2 cpu Support for the A2 cpu was removed in commit fb5a515704d7 ("powerpc: Remove platforms/wsp and associated pieces"), and the externs: __setup_cpu_a2 and __restore_cpu_a2 are still around and unused, so remove them. Signed-off-by: Rashmica Gupta <rashmicy@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/cputable.c | 2 -- 1 file changed, 2 deletions(-) commit 62ccf5bf1f4704986844440069df70b6509a9213 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Mon May 2 18:26:07 2016 +0530 powerpc/mm/slice: Remove slice_mm_new_context() The usage in mm mmu_context_nohash.c is bogus, because we set the context.id value to MMU_NO_CONTEXT 4 lines previously in the same function, meaning slice_mm_new_context() will always be true. The book3s 64 usage was removed in the previous commit. So remove it as unused. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/page_64.h | 3 --- arch/powerpc/mm/mmu_context_nohash.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) commit 2d566537dd2c69bd6898ef5d95ecccdfbab97eef Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Mon May 2 16:21:50 2016 +0530 powerpc/mm/subpage: Initialise user psize correctly As part of the radix support we switched Book3s64 to use a value of ~0 for MMU_NO_CONTEXT. That is because id 0 is special on radix. However that broke the logic in init_new_context(). The code there needs to differentiate between a newly allocated context and one inherited via fork. Previously it worked because a newly allocated context has an id of zero (because it was just memset() to zero), which used to match MMU_NO_CONTEXT, and therefore slice_mm_new_context() did the right thing. Instead check against a context.id value of zero instead of using slice_mm_new_context(). Without this patch we never call slice_set_user_psize(), and end up with a slice psize value of zero and we always end up using 4K HPTE. Fixes: 1a472c9dba6b ("powerpc/mm/radix: Add tlbflush routines") Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/mmu_context_book3s64.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) commit bb03efe2b7409d83a279ea1ef2317c26dbfb0c6c Author: Valentin Rothberg <valentinrothberg@gmail.com> Date: Tue May 3 08:59:27 2016 +0200 powerpc/mm/radix: Fix CONFIG_PPC_MMU_STD_64 typo It's CONFIG_PPC_STD_MMU_64 not ... CONFIG_PPC_MMU_STD_64. Fixes: 11ffc1cfa4c2 ("powerpc/mm/radix: Use STD_MMU_64 to properly isolate hash related code") Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/mce_power.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 69dfbaeb657bad13dddb3204603490206b859a7e Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:33 2016 +1000 powerpc/mm/radix: Document software bits for radix Add #defines for Power ISA 3.0 software defined bits. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/pgtable.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 17a3dd2f5fc75fc12d0a2ebf05327cf965bdf84b Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:32 2016 +1000 powerpc/mm/radix: Use firmware feature to enable Radix MMU We use the existing "ibm,pa-features" device-tree property to enable Radix MMU mode. This means we default to hash mode unless firmware tells us it's OK to start using Radix mode. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/prom.c | 1 + 1 file changed, 1 insertion(+) commit ab62476240d59a9d7d78ca5ff32499dd50db2069 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:31 2016 +1000 powerpc/mm/radix: Add THP support for 4K linux page size This adds THP support for 4K Linux page size config with radix. We still don't do THP with 4K Linux page size and hash page table. Hash page table needs a 16MB hugepage and we can't do THP with 16MM hugepage and 4K Linux page size. We add missing functions to 4K hash config to get it to build and hash__has_transparent_hugepage() makes sure we don't enable THP for 4K hash config. To catch wrong usage of THP related with 4K config, we add BUG() in those dummy functions we added to get it compile. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/hash-4k.h | 59 ++++++++++++++++++++++++ arch/powerpc/include/asm/book3s/64/pgtable-64k.h | 25 ---------- arch/powerpc/include/asm/book3s/64/pgtable.h | 22 +++++++++ arch/powerpc/platforms/Kconfig.cputype | 2 +- 4 files changed, 82 insertions(+), 26 deletions(-) commit bde3eb6222e49673d2ee9dfdc6ab6e7b6ff69e91 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:30 2016 +1000 powerpc/mm/radix: Add radix THP callbacks The deposited pgtable_t is a pte fragment hence we cannot use page->lru for linking then together. We use the first two 64 bits for pte fragment as list_head type to link all deposited fragments together. On withdraw we properly zero then out. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/pgtable-64k.h | 2 + arch/powerpc/include/asm/book3s/64/pgtable.h | 16 ++++ arch/powerpc/include/asm/book3s/64/radix.h | 22 +++++ arch/powerpc/mm/pgtable-book3s64.c | 2 +- arch/powerpc/mm/pgtable-radix.c | 117 +++++++++++++++++++++++ 5 files changed, 158 insertions(+), 1 deletion(-) commit 3df33f12be2f6fa88dff12564ab1d069482e3224 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:29 2016 +1000 powerpc/mm/thp: Abstraction for THP functions Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/hash-64k.h | 23 +++- arch/powerpc/include/asm/book3s/64/pgtable-64k.h | 42 +------ arch/powerpc/include/asm/book3s/64/pgtable.h | 83 +++++++++++--- arch/powerpc/mm/Makefile | 2 +- arch/powerpc/mm/pgtable-book3s64.c | 118 +++++++++++++++++++ arch/powerpc/mm/pgtable-hash64.c | 137 +++-------------------- 6 files changed, 226 insertions(+), 179 deletions(-) commit 6a1ea36260f69f1aea85bbf8afcd6a8c193485b9 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:28 2016 +1000 powerpc/mm: THP is only available on hash64 as of now Only code movement in this patch. No functionality change. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/pgtable.h | 24 +- arch/powerpc/mm/pgtable-hash64.c | 358 ++++++++++++++++++++++++++ arch/powerpc/mm/pgtable_64.c | 359 --------------------------- 3 files changed, 369 insertions(+), 372 deletions(-) commit c0a6c719d2a153abe5d8c3b42f0379a5bd752517 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:27 2016 +1000 powerpc/mm/radix: Add hugetlb support 4K page size We have hugepage at the pmd level with 4K radix config. Hence we don't need to use hugepd format with radix. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/hash-4k.h | 22 +----------- arch/powerpc/include/asm/book3s/64/pgtable-4k.h | 46 +++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 21 deletions(-) commit 43a5c684270ee9b5b13c91ec048831dd5b7e0cdc Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:26 2016 +1000 powerpc/mm/radix: Make sure swapper pgdir is properly aligned With 4K page size radix config our level 1 page table size is 64K and it should be naturally aligned. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/head_64.S | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) commit 484837601d4dd048d1f8d2cedd39934bb3ad6d59 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:25 2016 +1000 powerpc/mm: Add radix support for hugetlb Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/hugetlb-radix.h | 14 ++++ arch/powerpc/include/asm/hugetlb.h | 14 ++++ arch/powerpc/mm/Makefile | 1 + arch/powerpc/mm/hugetlbpage-radix.c | 87 ++++++++++++++++++++++ arch/powerpc/mm/hugetlbpage.c | 8 +- arch/powerpc/mm/tlb-radix.c | 9 +++ 6 files changed, 132 insertions(+), 1 deletion(-) commit 2f5f0dfd1e5f9840560e85ad26cb4a6f06c19e07 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:24 2016 +1000 powerpc/mm: Fix vma_mmu_pagesize() for radix Radix doesn't use the slice framework to find the page size. Hence use vma to find the page size. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/hugetlbpage.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 5ed7ecd08a0807d6d616c3d958402f9c723bb048 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:23 2016 +1000 powerpc/mm: pte_frag abstraction In this patch we make the number of pte fragments per level 4 page table page a variable. Radix level 4 table size is 256 bytes and hence we can have 256 fragments per level 4 page. We don't update the fragment count in this patch. We need to do performance measurements to find the right value for fragment count. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/hash-4k.h | 2 ++ arch/powerpc/include/asm/book3s/64/hash-64k.h | 4 ++-- arch/powerpc/include/asm/book3s/64/pgtable.h | 6 ++++++ arch/powerpc/mm/hash_utils_64.c | 3 +++ arch/powerpc/mm/pgtable-radix.c | 5 +++++ arch/powerpc/mm/pgtable_64.c | 4 ++++ 6 files changed, 22 insertions(+), 2 deletions(-) commit a3dece6d69b0ad21b64104dff508c67a1a1f14dd Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:22 2016 +1000 powerpc/radix: Update MMU cache With radix there is no MMU cache. Hence we don't need to do anything in update_mmu_cache(). Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/mem.c | 2 ++ 1 file changed, 2 insertions(+) commit d6a9996e84ac4beb7713e9485f4563e100a9b03e Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:21 2016 +1000 powerpc/mm: vmalloc abstraction in preparation for radix The vmalloc range differs between hash and radix config. Hence make VMALLOC_START and related constants a variable which will be runtime initialized depending on whether hash or radix mode is active. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> [mpe: Fix missing init of ioremap_bot in pgtable_64.c for ppc64e] Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/hash.h | 14 +++--- arch/powerpc/include/asm/book3s/64/pgtable.h | 15 ++++-- arch/powerpc/include/asm/book3s/64/radix.h | 68 ++++++++++++++++++++++++++++ arch/powerpc/kernel/pci_64.c | 3 +- arch/powerpc/mm/hash_utils_64.c | 8 ++++ arch/powerpc/mm/pgtable-radix.c | 7 +++ arch/powerpc/mm/pgtable_64.c | 15 +++++- arch/powerpc/mm/slb_low.S | 2 +- 8 files changed, 118 insertions(+), 14 deletions(-) commit 4dfb88ca9b66690d21030ccacc1cca73db90655e Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:20 2016 +1000 powerpc/mm: Update pte filter for radix Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/pgtable.c | 3 +++ 1 file changed, 3 insertions(+) commit a2f41eb99208adf4732529c4df1fd12b39f4c333 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:19 2016 +1000 powerpc/mm: Add radix pgalloc details Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/pgalloc.h | 34 ++++++++++++++++++++++++---- arch/powerpc/include/asm/book3s/64/pgtable.h | 10 ++++++-- arch/powerpc/mm/hash_utils_64.c | 7 ++++++ arch/powerpc/mm/pgtable-radix.c | 5 +++- arch/powerpc/mm/pgtable_64.c | 6 +++++ 5 files changed, 55 insertions(+), 7 deletions(-) commit 934828edfadc43be07e53429ce501741bedf4a5e Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:18 2016 +1000 powerpc/mm: Make 4K and 64K use pte_t for pgtable_t This patch switches 4K Linux page size config to use pte_t * type instead of struct page * for pgtable_t. This simplifies the code a lot and helps in consolidating both 64K and 4K page allocator routines. The changes should not have any impact, because we already store physical address in the upper level page table tree and that implies we already do struct page * to physical address conversion. One change to note here is we move the pgtable_page_dtor() call for nohash to pte_fragment_free_mm(). The nohash related change is due to the related changes in pgtable_64.c. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/pgalloc.h | 147 +++++++-------------------- arch/powerpc/include/asm/nohash/64/pgalloc.h | 38 +------ arch/powerpc/include/asm/page.h | 10 +- arch/powerpc/mm/pgtable_64.c | 2 +- 4 files changed, 52 insertions(+), 145 deletions(-) commit 74701d5947a6fb38ece37c1ff1e5a77c36ee7b9c Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:17 2016 +1000 powerpc/mm: Rename function to indicate we are allocating fragments Only code cleanup. No functionality change. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/pgalloc.h | 12 ++++++------ arch/powerpc/include/asm/nohash/64/pgalloc.h | 12 ++++++------ arch/powerpc/mm/pgtable_64.c | 21 ++++----------------- 3 files changed, 16 insertions(+), 29 deletions(-) commit bcbe7f777eb396f9bbf4cb1cab3b206f50881191 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:16 2016 +1000 powerpc/mm: Simplify the code dropping 4-level table #ifdef Simplify the code by dropping 4-level page table #ifdef. We are always 4-level now. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/pgalloc.h | 57 +++++++++------------------- 1 file changed, 18 insertions(+), 39 deletions(-) commit 27209206a60fa6ffc92e8d9886ae32abaad5b442 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:15 2016 +1000 powerpc/mm: Revert changes made to nohash pgalloc-64.h This reverts pgalloc related changes WRT implementing 4-level page table for 64K Linux page size and storing of physical address in higher level page tables since they are only applicable to book3s64 variant and we now have a separate copy for book3s64. This helps to keep these headers simpler. Cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/nohash/64/pgalloc.h | 42 +++++++--------------------- arch/powerpc/include/asm/nohash/64/pgtable.h | 3 -- 2 files changed, 10 insertions(+), 35 deletions(-) commit 75a9b8a6c2533064a8d5d090ada7bf9e4c4c84c1 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:14 2016 +1000 powerpc/mm: Copy pgalloc (part 2) This moves the nohash variant of pgalloc headers to nohash/ directory Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/32/pgalloc.h | 6 +- arch/powerpc/include/asm/book3s/64/pgalloc.h | 17 +- arch/powerpc/include/asm/book3s/pgalloc.h | 19 ++ arch/powerpc/include/asm/nohash/32/pgalloc.h | 109 +++++++++++ arch/powerpc/include/asm/nohash/64/pgalloc.h | 266 +++++++++++++++++++++++++++ arch/powerpc/include/asm/nohash/pgalloc.h | 23 +++ arch/powerpc/include/asm/pgalloc-32.h | 109 ----------- arch/powerpc/include/asm/pgalloc-64.h | 266 --------------------------- arch/powerpc/include/asm/pgalloc.h | 19 +- 9 files changed, 434 insertions(+), 400 deletions(-) commit 101ad5c65ef2631f402643c760574a6f0f7f64d0 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:13 2016 +1000 powerpc/mm: Make a copy of pgalloc.h for 32 and 64 book3s This patch start to make a book3s variant for pgalloc headers. We have multiple book3s specific changes such as: * 4 level page table * store physical address in higher level table * use pte_t * for pgtable_t Having a book3s64 specific variant helps to keep code simpler and remove lots of #ifdef around code. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/32/pgalloc.h | 109 +++++++++++ arch/powerpc/include/asm/book3s/64/pgalloc.h | 266 +++++++++++++++++++++++++++ 2 files changed, 375 insertions(+) commit b5dcc6096971b7c11b443b79ae8b69ccb01ec04e Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:12 2016 +1000 powerpc/mm/radix: Update PTCR on secondary CPUs Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/hash_utils_64.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) commit 7a0eedeedd5d192f64fd4cd46634e409cb7a513b Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:11 2016 +1000 powerpc/mm/radix: Pick the address layout for radix config Hash needs special get_unmapped_area() handling because of limitations around base page size, so we have to set HAVE_ARCH_UNMAPPED_AREA. With radix we don't have such restrictions, so we could use the generic code. But because we've set HAVE_ARCH_UNMAPPED_AREA (for hash), we have to re-implement the same logic as the generic code. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/mmap.c | 109 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) commit 177ba7c647f37bc3f31667192059ee794347d79d Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:10 2016 +1000 powerpc/mm/radix: Limit paca allocation in radix On return from RTAS we access the paca variables and we have 64 bit disabled. This requires us to limit paca in 32 bit range. Fix this by setting ppc64_rma_size to first_memblock_size/1G range. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/pgtable-radix.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) commit 764041e0f43cc7846f6d8eb246d65b53cc06c764 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:09 2016 +1000 powerpc/mm/radix: Add checks in slice code to catch radix usage Radix doesn't need slice support. Catch incorrect usage of slice code when radix is enabled. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/mm/slice.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit d8c476eeb697c9aac46b390e9cbd7af7032814f1 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:08 2016 +1000 powerpc/mm/radix: Isolate hash table function from pseries guest code Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/platforms/pseries/lpar.c | 14 +++++++++++--- arch/powerpc/platforms/pseries/lparcfg.c | 3 ++- 2 files changed, 13 insertions(+), 4 deletions(-) commit caca285e5ab4a7a19fede51688106ceed6fc45dd Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:07 2016 +1000 powerpc/mm/radix: Use STD_MMU_64 to properly isolate hash related code We also use MMU_FTR_RADIX to branch out from code path specific to hash. No functionality change. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/kernel/entry_64.S | 7 +++++-- arch/powerpc/kernel/exceptions-64s.S | 28 +++++++++++++++++++++++----- arch/powerpc/kernel/machine_kexec_64.c | 6 ++++-- arch/powerpc/kernel/mce_power.c | 10 ++++++++++ arch/powerpc/kernel/process.c | 15 +++++++++------ arch/powerpc/xmon/xmon.c | 2 +- 6 files changed, 52 insertions(+), 16 deletions(-) commit d30a2b47d4c2b75573d93f60655d48ba8e3ed2b3 Author: Linus Walleij <linus.walleij@linaro.org> Date: Tue Apr 19 11:23:22 2016 +0200 MIPS: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB This replaces: - "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB" as this can now be selected directly. - "select ARCH_WANT_OPTIONAL_GPIOLIB" with no dependency: GPIOLIB is now selectable by everyone, so we need not declare our intent to select it. When ordering the symbols the following rationale was used: if the selects were in alphabetical order, I moved select GPIOLIB to be in alphabetical order, but if the selects were not maintained in alphabetical order, I just replaced "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB". Cc: Michael Büsch <m@bues.ch> Cc: linux-mips@linux-mips.org Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> arch/mips/Kconfig | 32 +++++++++++++++----------------- arch/mips/alchemy/Kconfig | 2 +- arch/mips/pic32/Kconfig | 2 +- 3 files changed, 17 insertions(+), 19 deletions(-) commit a90295b4884f7467f4d5a4ffccc6facdf3ba9fe2 Author: Paul Gortmaker <paul.gortmaker@windriver.com> Date: Mon May 9 19:59:58 2016 -0400 gpio: zevio: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_ZEVIO drivers/gpio/Kconfig: bool "LSI ZEVIO SoC memory mapped GPIOs" ...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. 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. 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 <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Fabian Vogt <fabian@ritter-vogt.de> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpio-zevio.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) commit a8ed87c92adf1fd45142323e04f15b522117d575 Author: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Date: Fri Apr 29 23:26:06 2016 +1000 powerpc/mm/radix: Add MMU_FTR_RADIX We are going to add asm changes in the follow up patches. Add the feature bit now so that we can get it all build. mpe: When CONFIG_PPC_RADIX_MMU=n we omit MMU_FTR_RADIX from the MMU_FTRS_POSSIBLE mask. This allows the compiler to work out that those checks will always be false and so the code can be elided completely. Note we do *not* define MMU_FTR_RADIX to 0 in the RADIX_MMU=n case, because that doesn't work with the ASM_FTR patching. In particular an IF_SET section will result in a mask and value of zero, which is always true, meaning the section *won't* be patched, which is the opposite of what we want. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Acked-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/book3s/64/mmu.h | 3 ++- arch/powerpc/include/asm/mmu.h | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) commit 52ad90531aaebf101699974cd7fb7d7def729078 Author: Paul Gortmaker <paul.gortmaker@windriver.com> Date: Mon May 9 19:59:57 2016 -0400 gpio: timberdale: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_TIMBERDALE drivers/gpio/Kconfig: bool "Support for timberdale GPIO IP" ...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. 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 also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpio-timberdale.c | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) commit 3b52bb960ec66f3788697e42e72ec3fa0e7f8178 Author: Paul Gortmaker <paul.gortmaker@windriver.com> Date: Mon May 9 19:59:56 2016 -0400 gpio: stmpe: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_STMPE drivers/gpio/Kconfig: bool "STMPE GPIOs" ...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. 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. Curiously, this driver was using subsys_initcall since day one, so we don't have the "normal" module_init replacement in this change like we've done in other similar driver updates. 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 <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Rabin Vincent <rabin.vincent@stericsson.com> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpio-stmpe.c | 31 +++++-------------------------- 1 file changed, 5 insertions(+), 26 deletions(-) commit 6a5ead91d45d091f6d60b20d47e595a1b9e25d67 Author: Paul Gortmaker <paul.gortmaker@windriver.com> Date: Mon May 9 19:59:55 2016 -0400 gpio: sodaville: make it explicitly non-modular The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_SODAVILLE drivers/gpio/Kconfig: bool "Intel Sodaville GPIO support" ...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. 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_pci_driver() uses the same init level as the builtin_pci_driver() does, there is no init ordering change caused by this commit. We don't replace module.h with init.h since the file already has that. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Hans J. Koch <hjk@linutronix.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpio-sodaville.c | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) commit 773edeadf672546cd554e0797fc02a9e6edf01ae Author: Michael Ellerman <mpe@ellerman.id.au> Date: Wed May 11 15:30:47 2016 +1000 powerpc/mm: Add mask of possible MMU features Follow the example of the cpu feature code, and add a mask of possible MMU features, MMU_FTRS_POSSIBLE. This is used in mmu_has_feature(), which allows the possible mask to act as a shortcut for any features that are not possible, but still allows the feature bit itself to be defined. We will use this in the next commit to allow MMU_FTR_RADIX checks to be elided when MMU_FTR_RADIX is not possible. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> arch/powerpc/include/asm/mmu.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 9697643ff3edca036e8843235cd6e4d598a50e63 Author: Geert Uytterhoeven <geert+renesas@glider.be> Date: Wed May 4 10:21:53 2016 +0200 pinctrl: sh-pfc: Let gpio_chip.to_irq() return zero on error Currrently the gpio_chip.to_irq() callback returns -ENOSYS on error, which causes bad interactions with the serial_mctrl_gpio helpers. mctrl_gpio_init() returns -ENOSYS if GPIOLIB is not enabled, which is intended to be ignored by its callers. However, ignoring -ENOSYS when it was caused by a gpiod_to_irq() failure will lead to a crash later: Unable to handle kernel paging request at virtual address ffffffde ... PC is at mctrl_gpio_set+0x14/0x78 Fix this by returning zero instead, like gpiochip_to_irq() does. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/sh-pfc/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1d18a3f0f0809f6c71f1f6e9e268ee904ce0b588 Author: Laxman Dewangan <ldewangan@nvidia.com> Date: Tue May 3 00:17:32 2016 +0530 pinctrl: tegra: avoid parked_reg and parked_bank NVIDIA's Tegra210 support the park bit to make pinmux configuration enable/disable. If parked bit is 1 then configuration does not apply and if it is 0 then pinmux configuration applies. This is to support to avoid any glitch in pinmux configurations. The parked bit is part of mux register and mux bank and hence it is not required to have member for the parked_reg and parked bank very similar to other bit field of the same register. Remove the need of the parked register and parked bank and get whether parked function supported or not by parked_bit. This is to make the parked bit handling same as other fields of mux registers. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/tegra/pinctrl-tegra.c | 8 ++++---- drivers/pinctrl/tegra/pinctrl-tegra.h | 6 +----- drivers/pinctrl/tegra/pinctrl-tegra114.c | 4 ++-- drivers/pinctrl/tegra/pinctrl-tegra124.c | 4 ++-- drivers/pinctrl/tegra/pinctrl-tegra20.c | 4 ++-- drivers/pinctrl/tegra/pinctrl-tegra210.c | 4 +--- drivers/pinctrl/tegra/pinctrl-tegra30.c | 4 ++-- 7 files changed, 14 insertions(+), 20 deletions(-) commit 07f8ab255fcc0bce1fabc8fb35ace4f0f5d2ac67 Author: Gavin Shan <gwshan@linux.vnet.ibm.com> Date: Wed May 11 11:15:55 2016 +1000 KVM: PPC: Book3S HV: Fix build error in book3s_hv.c When CONFIG_KVM_XICS is enabled, CPU_UP_PREPARE and other macros for CPU states in linux/cpu.h are needed by arch/powerpc/kvm/book3s_hv.c. Otherwise, build error as below is seen: gwshan@gwshan:~/sandbox/l$ make arch/powerpc/kvm/book3s_hv.o : CC arch/powerpc/kvm/book3s_hv.o arch/powerpc/kvm/book3s_hv.c: In function ‘kvmppc_cpu_notify’: arch/powerpc/kvm/book3s_hv.c:3072:7: error: ‘CPU_UP_PREPARE’ \ undeclared (first use in this function) This fixes the issue introduced by commit <6f3bb80944> ("KVM: PPC: Book3S HV: kvmppc_host_rm_ops - handle offlining CPUs"). Fixes: 6f3bb8094414 Cc: stable@vger.kernel.org # v4.6 Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Balbir Singh <bsingharora@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org> arch/powerpc/kvm/book3s_hv.c | 1 + 1 file changed, 1 insertion(+) commit eb8b0560160d8363bc40ca05a75ef144cebaae72 Author: Paul Mackerras <paulus@ozlabs.org> Date: Thu May 5 16:17:10 2016 +1000 KVM: PPC: Fix emulated MMIO sign-extension When the guest does a sign-extending load instruction (such as lha or lwa) to an emulated MMIO location, it results in a call to kvmppc_handle_loads() in the host. That function sets the vcpu->arch.mmio_sign_extend flag and calls kvmppc_handle_load() to do the rest of the work. However, kvmppc_handle_load() sets the mmio_sign_extend flag to 0 unconditionally, so the sign extension never gets done. To fix this, we rename kvmppc_handle_load to __kvmppc_handle_load and add an explicit parameter to indicate whether sign extension is required. kvmppc_handle_load() and kvmppc_handle_loads() then become 1-line functions that just call __kvmppc_handle_load() with the extra parameter. Reported-by: Bin Lu <lblulb@linux.vnet.ibm.com> Signed-off-by: Paul Mackerras <paulus@ozlabs.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paul Mackerras <paulus@samba.org> arch/powerpc/kvm/powerpc.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) commit ade3ac660a1813344bcf4fe58b9ac5fbe7c0ed4b Author: Alexey Kardashevskiy <aik@ozlabs.ru> Date: Fri Apr 29 14:57:23 2016 +1000 KVM: PPC: Fix debug macros When XICS_DBG is enabled, gcc produces format errors. This fixes formats to match passed values types. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paul Mackerras <paulus@samba.org> arch/powerpc/kvm/book3s_xics.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 11dd6ac0254ed9a2b6994e22c903192edd0fa8fc Author: Laurent Vivier <lvivier@redhat.com> Date: Fri Apr 8 18:05:00 2016 +0200 KVM: PPC: Book3S PR: Manage single-step mode Until now, when we connect gdb to the QEMU gdb-server, the single-step mode is not managed. This patch adds this, only for kvm-pr: If KVM_GUESTDBG_SINGLESTEP is set, we enable single-step trace bit in the MSR (MSR_SE) just before the __kvmppc_vcpu_run(), and disable it just after. In kvmppc_handle_exit_pr, instead of routing the interrupt to the guest, we return to host, with KVM_EXIT_DEBUG reason. Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Paul Mackerras <paulus@samba.org> arch/powerpc/kvm/book3s_pr.c | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) commit c9c6837d39311b0cc14cdbe7c18e815ab44aefb1 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 23:30:01 2016 +0200 kbuild: move -Wunused-const-variable to W=1 warning level gcc-6 started warning by default about variables that are not used anywhere and that are marked 'const', generating many false positives in an allmodconfig build, e.g.: arch/arm/mach-davinci/board-da830-evm.c:282:20: warning: 'da830_evm_emif25_pins' defined but not used [-Wunused-const-variable=] arch/arm/plat-omap/dmtimer.c:958:34: warning: 'omap_timer_match' defined but not used [-Wunused-const-variable=] drivers/bluetooth/hci_bcm.c:625:39: warning: 'acpi_bcm_default_gpios' defined but not used [-Wunused-const-variable=] drivers/char/hw_random/omap-rng.c:92:18: warning: 'reg_map_omap4' defined but not used [-Wunused-const-variable=] drivers/devfreq/exynos/exynos5_bus.c:381:32: warning: 'exynos5_busfreq_int_pm' defined but not used [-Wunused-const-variable=] drivers/dma/mv_xor.c:1139:34: warning: 'mv_xor_dt_ids' defined but not used [-Wunused-const-variable=] This is similar to the existing -Wunused-but-set-variable warning that was added in an earlier release and that we disable by default now and only enable when W=1 is set, so it makes sense to do the same here. Once we have eliminated the majority of the warnings for both, we can put them back into the default list. We probably want this in backport kernels as well, to allow building them with gcc-6 without introducing extra warnings. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Olof Johansson <olof@lixom.net> Acked-by: Lee Jones <lee.jones@linaro.org> Cc: stable@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.com> Makefile | 5 +++-- scripts/Makefile.extrawarn | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) commit 165cccc8437704d9f41eae2946774bdf2966245f Author: Xinliang Liu <xinliang.liu@linaro.org> Date: Mon May 9 09:59:50 2016 +0800 drm/hisilicon: Fix DRM_INFO printed issue This patch fixed the bellow no DRM_INFO is printed issue: if (!delay_count) DRM_INFO("phylock and phystopstateclklane is not ready.\n"); There will some printed issues with above info, under certain circumstances: If ((BIT(0) | BIT(2)) & val) is never true, break will not happen and delay_count will be max u32 value (?), and no DRM_INFO is printed. Also if ((BIT(0) | BIT(2)) & val) is true at the last possible loop round, break happens, but now delay_count is already zero ( because of earlier delay_count-- ) and DRM_INFO is erroneously printed. Thanks to Juha Leppänen, he reports to me this issue. Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org> Reported-by: Juha Leppänen <juha_efku@dnainternet.net> drivers/gpu/drm/hisilicon/kirin/dw_drm_dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 12cb4c87aa587ff476ffc71120f2dc5d2e857256 Author: Xinliang Liu <xinliang.liu@linaro.org> Date: Sun May 8 17:48:55 2016 +0800 drm/hisilicon: Make kirin_drm_unbind sufficient Remove deprecated drm_put_dev. Clean up everything needed in unbind. Thanks to Daniel Vetter, this issue is reported by him. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reported-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Xinliang Liu <xinliang.liu@linaro.org> drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) commit b93c846273b9eda820f618a07d8871e20639e0b9 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Fri May 6 10:28:41 2016 +0200 drm/hisilicon: Use drm_connector_register_all Use drm_connector_register_all helper to register connectors. Cc: Xinliang Liu <xinliang.liu@linaro.org> Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 31 +------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) commit 61462c8a6b140fe2f93cb911684837e05950e680 Author: Kees Cook <keescook@chromium.org> Date: Tue May 10 10:55:49 2016 -0700 arm64: kernel: Fix incorrect brk randomization This fixes two issues with the arm64 brk randomziation. First, the STACK_RND_MASK was being used incorrectly. The original code was: unsigned long range_end = base + (STACK_RND_MASK << PAGE_SHIFT) + 1; STACK_RND_MASK is 0x7ff (32-bit) or 0x3ffff (64-bit), with 4K pages where PAGE_SHIFT is 12: #define STACK_RND_MASK (test_thread_flag(TIF_32BIT) ? \ 0x7ff >> (PAGE_SHIFT - 12) : \ 0x3ffff >> (PAGE_SHIFT - 12)) This means the resulting offset from base would be 0x7ff0001 or 0x3ffff0001, which is wrong since it creates an unaligned end address. It was likely intended to be: unsigned long range_end = base + ((STACK_RND_MASK + 1) << PAGE_SHIFT) Which would result in offsets of 0x800000 (32-bit) and 0x40000000 (64-bit). However, even this corrected 32-bit compat offset (0x00800000) is much smaller than native ARM's brk randomization value (0x02000000): unsigned long arch_randomize_brk(struct mm_struct *mm) { unsigned long range_end = mm->brk + 0x02000000; return randomize_range(mm->brk, range_end, 0) ? : mm->brk; } So, instead of basing arm64's brk randomization on mistaken STACK_RND_MASK calculations, just use specific corrected values for compat (0x2000000) and native arm64 (0x40000000). Reviewed-by: Jon Medhurst <tixy@linaro.org> Signed-off-by: Kees Cook <keescook@chromium.org> [will: use is_compat_task() as suggested by tixy] Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/kernel/process.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) commit 0097852c302aca943a8b76f7f85e133af6e1701a Merge: 9d9b7ee a1dcbd1 Author: Thomas Gleixner <tglx@linutronix.de> Date: Wed May 11 12:06:25 2016 +0200 Merge tag 'irqchip-for-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms into irq/core Pull irqchip updates for Linux 4.7 from Marc Zyngier - Layerscape SCFG MSI controller support - LPC32xx interrupt controller support - RPi irqchip support on arm64 - GICv2 cleanup - GICv2 and GICv3 bug fixes commit 1b0d5287dafc7651af1d55cf47209209f79a964b Author: Duc Dang <dhdang@apm.com> Date: Tue May 3 00:53:41 2016 -0700 gpio: dwapb: Add ACPI device ID for DWAPB GPIO controller on X-Gene platforms This patch enables DWAPB GPIO controller support on X-Gene platforms in ACPI boot mode. Signed-off-by: Duc Dang <dhdang@apm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/gpio/gpio-dwapb.c | 1 + 1 file changed, 1 insertion(+) commit b923c6c62981cec5e2d2187fd700c2fc4386fc45 Author: Mathieu OTHACEHE <m.othacehe@gmail.com> Date: Tue May 10 09:08:48 2016 +0200 USB: serial: ti_usb_3410_5052: add MOXA UPORT 11x0 support Add support for : - UPort 1110 : 1 port RS-232 USB to Serial Hub. - UPort 1130 : 1 port RS-422/485 USB to Serial Hub. - UPort 1130I : 1 port RS-422/485 USB to Serial Hub with Isolation. - UPort 1150 : 1 port RS-232/422/485 USB to Serial Hub. - UPort 1150I : 1 port RS-232/422/485 USB to Serial Hub with Isolation. These devices are based on TI 3410 chip. Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com> [johan: fix rs485-only check ] Signed-off-by: Johan Hovold <johan@kernel.org> drivers/usb/serial/ti_usb_3410_5052.c | 55 +++++++++++++++++++++++++++++++++-- drivers/usb/serial/ti_usb_3410_5052.h | 8 +++++ 2 files changed, 60 insertions(+), 3 deletions(-) commit f228b494e56d949be8d8ea09d4f973d1979201bf Author: Julien Grall <julien.grall@arm.com> Date: Tue May 10 15:40:31 2016 +0100 arm64: cpuinfo: Missing NULL terminator in compat_hwcap_str The loop that browses the array compat_hwcap_str will stop when a NULL is encountered, however NULL is missing at the end of array. This will lead to overrun until a NULL is found somewhere in the following memory. In reality, this works out because the compat_hwcap2_str array tends to follow immediately in memory, and that *is* terminated correctly. Furthermore, the unsigned int compat_elf_hwcap is checked before printing each capability, so we end up doing the right thing because the size of the two arrays is less than 32. Still, this is an obvious mistake and should be fixed. Note for backporting: commit 12d11817eaafa414 ("arm64: Move /proc/cpuinfo handling code") moved this code in v4.4. Prior to that commit, the same change should be made in arch/arm64/kernel/setup.c. Fixes: 44b82b7700d0 "arm64: Fix up /proc/cpuinfo" Cc: <stable@vger.kernel.org> # v3.19+ (but see note above prior to v4.4) Signed-off-by: Julien Grall <julien.grall@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/kernel/cpuinfo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b22ef2a0979f2b91cfeeabb086e4d665183a93a1 Author: Laxman Dewangan <ldewangan@nvidia.com> Date: Mon May 2 22:53:24 2016 +0530 pinctrl: tegra: Correctly check the supported configuration The pincontrol registers of Tegra chips has multiple filed per registers. There is two type of registers mux and drive. All configurations belongs to one of these registers. If any configurations are supported then <config>_bit is set to bit position of these registers otherwise -1 to not support it. The member is defined as s32 <config>_bit:6; So if config is not supported ifor given SoC then it is set to -1 in soc pinmmux table. In common driver code, to find out that given config is supported or not, it is checked as: s8 bit = <config>_bit; if (bit > 31) { /* Not supported config */ } But in this case, bit is s8 and hence for non supporting it is -1. Correct the check as: if (bit < 0) { /* Not supported config */ } Fixes: e4c02dced975cb ("pinctrl: tegra: use signed bitfields for optional fields") Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/tegra/pinctrl-tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a1dcbd11d09be1cb357b2f217c0eaa1461128da0 Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 13 13:28:43 2016 -0700 irqchip/bcm2836: Use a more generic memory barrier call dsb() requires an argument on arm64, so we needed to add "sy". Instead, take this opportunity to switch to the same smp_wmb() call that gic uses for its IPIs. This is a less strong barrier than we were doing before (dmb(ishst) compared to dsb(sy)), but it seems to be the correct one. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-bcm2836.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cb290d827eb0378447095093b4ea712482d31ae8 Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 13 13:28:42 2016 -0700 irqchip/bcm2836: Fix compiler warning on 64-bit build Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-bcm2836.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dc17be87647cd4c891e748a0753ad0606dc5775 Author: Eric Anholt <eric@anholt.net> Date: Wed Apr 13 13:28:41 2016 -0700 irqchip/bcm2836: Drop smp_set_ops on arm64 builds For arm64, the bootloader will instead be implementing the spin-table enable method. Signed-off-by: Eric Anholt <eric@anholt.net> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-bcm2836.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit d6490461a102094891d8a2712c51365f86ac1a40 Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:45 2016 +0100 irqchip/gic: Add helper functions for GIC setup and teardown Move the code that sets-up a GIC via device-tree into it's own function and add a generic function for GIC teardown that can be used for both device-tree and ACPI to unmap the GIC memory. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic.c | 61 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 42 insertions(+), 19 deletions(-) commit f673b9b5cb5453fa14032d99edd55f49ac3980cc Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:44 2016 +0100 irqchip/gic: Store GIC configuration parameters Store the GIC configuration parameters in the GIC chip data structure. This will allow us to simplify the code by reducing the number of parameters passed between functions. Update the __gic_init_bases() function so that we only need to pass a pointer to the GIC chip data structure and no longer need to pass the GIC index in order to look-up the chip data. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic.c | 114 ++++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 49 deletions(-) commit 6e5b5924d9a897062527b6fc9b06f31f7bfd5744 Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:43 2016 +0100 irqchip/gic: Pass GIC pointer to save/restore functions Instead of passing the GIC index to the save/restore functions pass a pointer to the GIC chip data. This will allow these save/restore functions to be re-used by a platform driver where the GIC chip data structure is allocated dynamically and so there is no applicable index for identifying the GIC. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic.c | 74 +++++++++++++++++++++++++---------------------- 1 file changed, 39 insertions(+), 35 deletions(-) commit dc9722cc57eba336038b2ade111436656c5a87d0 Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:42 2016 +0100 irqchip/gic: Return an error if GIC initialisation fails If the GIC initialisation fails, then currently we do not return an error or clean-up afterwards. Although for root controllers, this failure may be fatal anyway, for secondary controllers, it may not be fatal and so return an error on failure and clean-up. Update the functions gic_cpu_init() and gic_pm_init() to return an error instead of calling BUG() and perform any necessary clean-up. For non-banked GIC controllers, make sure that we free any memory allocated if we fail to initialise the IRQ domain. Please note that free_percpu() only frees memory if the pointer passed to it is not NULL and so it is unnecessary to check if both pointers are valid or not. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic.c | 99 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 73 insertions(+), 26 deletions(-) commit c2baa2f3f42fc6ea302bb666889c5843986a19a3 Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:41 2016 +0100 irqchip/gic: Remove static irq_chip definition for eoimode1 There are only 3 differences (not including the name) in the definitions of the gic_chip and gic_eoimode1_chip structures. Instead of statically defining the gic_eoimode1_chip structure, remove it and populate the eoimode1 functions dynamically for the appropriate GIC irqchips. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic.c | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) commit 26acfe7463dc7162e595a8f7bd7ef3e06111e25d Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:40 2016 +0100 irqchip/gic: Don't initialise chip if mapping IO space fails If we fail to map the address space for the GIC distributor or CPU interface, then don't attempt to initialise the chip, just WARN and return. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 992345a58e0cbcd63c26226e3e818b4583c4a34d Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:39 2016 +0100 irqchip/gic: WARN if setting the interrupt type for a PPI fails Setting the interrupt type for private peripheral interrupts (PPIs) may not be supported by a given GIC because it is IMPLEMENTATION DEFINED whether this is allowed. There is no way to know if setting the type is supported for a given GIC and so the value written is read back to verify it matches the desired configuration. If it does not match then an error is return. There are cases where the interrupt configuration read from firmware (such as a device-tree blob), has been incorrect and hence gic_configure_irq() has returned an error. This error has gone undetected because the error code returned was ignored but the interrupt still worked fine because the configuration for the interrupt could not be overwritten. Given that this has done undetected and that failing to set the configuration for a PPI may not be a catastrophic, don't return an error but WARN if we fail to configure a PPI. This will allows us to fix up any places in the kernel where we should be checking the return status and maintain backward compatibility with firmware images that may have incorrect PPI configurations. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic-common.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) commit ec1a454d6136b93e26902ead21025efc08047d05 Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:38 2016 +0100 irqchip/gic: Don't unnecessarily write the IRQ configuration If the interrupt configuration matches the current configuration, then don't bother writing the configuration again. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic-common.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit a2a8fa5563d8740efaa8e62f653a6a85569c858b Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:37 2016 +0100 irqchip: Mask the non-type/sense bits when translating an IRQ The firmware parameter that contains the IRQ sense bits may also contain other data. When return the IRQ type, bits outside of these sense bits should be masked. If these bits are not masked and irq_create_fwspec_mapping() is called to map an IRQ, then the comparison of the type returned from irq_domain_translate() will never match that returned by irq_get_trigger_type() (because this function masks the none sense bits) and so we will always call irq_set_irq_type() to program the type even if it was not really necessary. Currently, the downside to this is unnecessarily re-programmming the type but nevertheless this should be avoided. The Tegra LIC and TI Crossbar irqchips all have client instances (from reviewing the device-tree sources) where bits outside the IRQ sense bits are set, but do not mask these bits. Therefore, ensure these bits are masked for these irqchips. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-crossbar.c | 2 +- drivers/irqchip/irq-tegra.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9b5d585d148a19bcadae81fa17ddbe3e22efb9e9 Author: Jon Hunter <jonathanh@nvidia.com> Date: Tue May 10 16:14:35 2016 +0100 genirq: Ensure IRQ descriptor is valid when setting-up the IRQ In the function, setup_irq(), we don't check that the descriptor returned from irq_to_desc() is valid before we start using it. For example chip_bus_lock() called from setup_irq(), assumes that the descriptor pointer is valid and doesn't check before dereferencing it. In many other functions including setup/free_percpu_irq() we do check that the descriptor returned is not NULL and therefore add the same test to setup_irq() to ensure the descriptor returned is valid. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> kernel/irq/manage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c9b973061b03af62734f613f6abec46c0dd4a88 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Fri May 6 19:41:56 2016 +0100 irqchip/gic-v3: Configure all interrupts as non-secure Group-1 The GICv3 driver wrongly assumes that it runs on the non-secure side of a secure-enabled system, while it could be on a system with a single security state, or a GICv3 with GICD_CTLR.DS set. Either way, it is important to configure this properly, or interrupts will simply not be delivered on this HW. Cc: stable@vger.kernel.org Reported-by: Peter Maydell <peter.maydell@linaro.org> Tested-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic-v3.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) commit 74c967aaffeace8a85fc3d7be773fd165ebde3da Author: Ray Jui <ray.jui@broadcom.com> Date: Thu May 5 09:32:01 2016 -0700 irqchip/gic-v2m: Add workaround for Broadcom NS2 GICv2m erratum Alex Barba <alex.barba@broadcom.com> discovered Broadcom NS2 GICv2m implementation has an erratum where the MSI data needs to be the SPI number subtracted by an offset of 32, for the correct MSI interrupt to be triggered. Here we are adding the workaround based on readings from the MSI_IIDR register, which contains a value unique to Broadcom NS2 GICv2m Reported-by: Alex Barba <alex.barba@broadcom.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Ray Jui <ray.jui@broadcom.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic-v2m.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) commit 1228d53d3df7826eaa6fe2fa267ee41131f9825d Author: Christoph Hellwig <hch@lst.de> Date: Thu May 5 16:41:05 2016 +0200 irqchip/irq-alpine-msi: Don't use <asm-generic/msi.h> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-alpine-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 086eec2de00ef5c1ac12ddb5a537289fbdc22689 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Mon Apr 4 14:17:36 2016 +0300 irqchip/mbigen: Checking for IS_ERR() instead of NULL of_platform_device_create() returns NULL on error, it never returns error pointers. Fixes: ed2a1002d25c ('irqchip/mbigen: Handle multiple device nodes in a mbigen module') Acked-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-mbigen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 074f23b675f9f2a9c51c16ecefd06b4658d5e629 Author: Marc Zyngier <marc.zyngier@arm.com> Date: Wed May 4 10:22:27 2016 +0100 irqchip/gic-v3: Remove inexistant register definition The GICv3 include file defines GICR_ISACTIVER and GICR_ICACTIVER in the RD_base page. News flash, they do not exist (probably a copy/paste brain fart). Just drop them. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> include/linux/irqchip/arm-gic-v3.h | 2 -- 1 file changed, 2 deletions(-) commit 466b7d168881f477ec8ddcc42d4206618acccf18 Author: Shanker Donthineni <shankerd@codeaurora.org> Date: Wed Mar 9 22:10:49 2016 -0600 irqchip/gicv3-its: Don't allow devices whose ID is outside range We are not checking whether the requested device identifier fits into the device table memory or not. The function its_create_device() assumes that enough memory has been allocated for whole DevID space (reported by ITS_TYPER.Devbits) during the ITS probe() and continues to initialize ITS hardware. This assumption is not perfect, sometimes we reduce memory size either because of its size crossing MAX_ORDER-1 or BASERn max size limit. The MAPD command fails if 'Device ID' is outside of device table range. Add a simple validation check to avoid MAPD failures since we are not handling ITS command errors. This change also helps to return an error -ENOMEM instead of success to caller. Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic-v3-its.c | 42 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 38 insertions(+), 4 deletions(-) commit 8cb17b5ed0177d1b613aadd53c7e570b81625728 Author: Vladimir Zapolskiy <vz@mleia.com> Date: Mon Apr 25 04:00:38 2016 +0300 irqchip: Add LPC32xx interrupt controller driver The change adds improved support of NXP LPC32xx MIC, SIC1 and SIC2 interrupt controllers. This is a list of new features in comparison to the legacy driver: * irq types are taken from device tree settings, no more need to hardcode them, * old driver is based on irq_domain_add_legacy, which causes problems with handling MIC hardware interrupt 0 produced by SIC1, * there is one driver for MIC, SIC1 and SIC2, no more need to handle them separately, e.g. have two separate handlers for SIC1 and SIC2, * the driver does not have any dependencies on hardcoded register offsets, * the driver is much simpler for maintenance, * SPARSE_IRQS option is supported. Legacy LPC32xx interrupt controller driver was broken since commit 76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler"), which requires a private interrupt handler, otherwise any SIC1 generated interrupt (mapped to MIC hwirq 0) breaks the kernel with the message "unexpected IRQ trap at vector 00". The change disables compilation of a legacy driver found at arch/arm/mach-lpc32xx/irq.c, the file will be removed in a separate commit. Fixes: 76ba59f8366f ("genirq: Add irq_domain-aware core IRQ handler") Tested-by: Sylvain Lemieux <slemieux.tyco@gmail.com> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> arch/arm/Kconfig | 2 + arch/arm/mach-lpc32xx/phy3250.c | 1 - drivers/irqchip/Makefile | 1 + drivers/irqchip/irq-lpc32xx.c | 238 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 241 insertions(+), 1 deletion(-) commit f86c4fbd930ff6fecf3d8a1c313182bd0f49f496 Author: Will Deacon <will.deacon@arm.com> Date: Tue Apr 26 12:00:00 2016 +0100 irqchip/gic: Ensure ordering between read of INTACK and shared data When an IPI is generated by a CPU, the pattern looks roughly like: <write shared data> smp_wmb(); <write to GIC to signal SGI> On the receiving CPU we rely on the fact that, once we've taken the interrupt, then the freshly written shared data must be visible to us. Put another way, the CPU isn't going to speculate taking an interrupt. Unfortunately, this assumption turns out to be broken. Consider that CPUx wants to send an IPI to CPUy, which will cause CPUy to read some shared_data. Before CPUx has done anything, a random peripheral raises an IRQ to the GIC and the IRQ line on CPUy is raised. CPUy then takes the IRQ and starts executing the entry code, heading towards gic_handle_irq. Furthermore, let's assume that a bunch of the previous interrupts handled by CPUy were SGIs, so the branch predictor kicks in and speculates that irqnr will be <16 and we're likely to head into handle_IPI. The prefetcher then grabs a speculative copy of shared_data which contains a stale value. Meanwhile, CPUx gets round to updating shared_data and asking the GIC to send an SGI to CPUy. Internally, the GIC decides that the SGI is more important than the peripheral interrupt (which hasn't yet been ACKed) but doesn't need to do anything to CPUy, because the IRQ line is already raised. CPUy then reads the ACK register on the GIC, sees the SGI value which confirms the branch prediction and we end up with a stale shared_data value. This patch fixes the problem by adding an smp_rmb() to the IPI entry code in gic_handle_irq. As it turns out, the combination of a control dependency and an ISB instruction from the EOI in the GICv3 driver is enough to provide the ordering we need, so we add a comment there justifying the absence of an explicit smp_rmb(). Cc: stable@vger.kernel.org Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> drivers/irqchip/irq-gic-v3.c | 7 +++++++ drivers/irqchip/irq-gic.c | 8 ++++++++ 2 files changed, 15 insertions(+) commit 99aa036241ed4a08a71b627bb903b5d7c75d78c1 Author: Suzuki K Poulose <suzuki.poulose@arm.com> Date: Tue May 10 11:14:41 2016 +0100 arm64: secondary_start_kernel: Remove unnecessary barrier Remove the unnecessary smp_wmb(), which was added to make sure that the update_cpu_boot_status() completes before we mark the CPU online. But update_cpu_boot_status() already has dsb() (required for the failing CPUs) to ensure the correct behavior. Cc: Catalin Marinas <catalin.marinas@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Reported-by: Dennis Chen <dennis.chen@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> arch/arm64/kernel/smp.c | 2 -- 1 file changed, 2 deletions(-) commit 468c234f9ed759b059d7fe11a6cc4b903a594722 Author: Carlo Caione <carlo@endlessm.com> Date: Mon May 2 10:02:15 2016 +0200 pinctrl: amlogic: Add support for Amlogic Meson GXBB SoC This patch adds the basic platform file to support the pin controller found on the Amlogic Meson GXBB SoCs. Signed-off-by: Carlo Caione <carlo@endlessm.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Tested-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/meson/Makefile | 2 +- drivers/pinctrl/meson/pinctrl-meson-gxbb.c | 432 +++++++++++++++++++++++++++++ drivers/pinctrl/meson/pinctrl-meson.c | 8 + drivers/pinctrl/meson/pinctrl-meson.h | 2 + include/dt-bindings/gpio/meson-gxbb-gpio.h | 154 ++++++++++ 5 files changed, 597 insertions(+), 1 deletion(-) commit 3ba6767a56127d7b2f8f124129f94c0556c594d0 Author: David Wu <david.wu@rock-chips.com> Date: Wed May 11 11:39:28 2016 +0800 pinctrl: rockchip: fix pull setting error for rk3399 This patch fixes the pinctrl pull bias setting, since the pull up/down setting is the contrary for gpio0(just the gpio0a and gpio0b) and gpio2(just the gpio2c and gpio2d). From the TRM said, the gpio0a pull polarity setting: gpio0a_p GPIO0A PE/PS programmation section, every GPIO bit corresponding to 2bits[PS:PE] 2'b00: Z(Normal operation); 2'b11: weak 1(pull-up); 2'b01: weak 0(pull-down); 2'b10: Z(Normal operation); Then, the other gpios setting as the following: gpio1a_p (e.g.: gpio1, gpio2a, gpio2b, gpio3...) GPIO1A PU/PD programmation section, every GPIO bit corresponding to 2bits 2'b00: Z(Normal operation); 2'b01: weak 1(pull-up); 2'b10: weak 0(pull-down); 2'b11: Z(Normal operation); For example,(rk3399evb board) sdmmc_cd --->gpio0_a7 localhost / # io -r -4 0xff320040 ff320040: 00004d5f In general,the value should be 0x0000cd5f since the pin has been set in the dts. Signed-off-by: David Wu <david.wu@rock-chips.com> Signed-off-by: Caesar Wang <wxt@rock-chips.com> Cc: linux-gpio@vger.kernel.org Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/pinctrl-rockchip.c | 179 ++++++++++++++++++++++++++----------- 1 file changed, 127 insertions(+), 52 deletions(-) commit c53db5222b92d1df384a89ceba7808f8e4c535dd Author: Heiko Carstens <heiko.carstens@de.ibm.com> Date: Mon May 9 15:52:28 2016 +0200 s390/vmem: remove unused function parameter vmem_pte_alloc() has an unused function parameter. Let's remove it. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/mm/vmem.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit c34a69059d7876e0793eb410deedfb08ccb22b02 Author: Heiko Carstens <heiko.carstens@de.ibm.com> Date: Tue May 10 12:10:22 2016 +0200 s390/vmem: fix identity mapping The identity mapping is suboptimal for the last 2GB frame. The mapping will be established with a mix of 4KB and 1MB mappings instead of a single 2GB mapping. This happens because of a off-by-one bug introduced with commit 50be63450728 ("s390/mm: Convert bootmem to memblock"). Currently the identity mapping looks like this: 0x0000000080000000-0x0000000180000000 4G PUD RW 0x0000000180000000-0x00000001fff00000 2047M PMD RW 0x00000001fff00000-0x0000000200000000 1M PTE RW With the bug fixed it looks like this: 0x0000000080000000-0x0000000200000000 6G PUD RW Fixes: 50be63450728 ("s390/mm: Convert bootmem to memblock") Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/mm/vmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f3e15618d5b2c47a14236be66ed0d3a1324a049 Author: Arnd Bergmann <arnd@arndb.de> Date: Mon May 9 23:51:28 2016 +0200 drm/sti: include linux/seq_file.h where needed The sti drm driver has a lot of debugfs interface that cause build errors in some configurations when seq_file.h is not included implicitly: drm/sti/sti_mixer.c: In function 'mixer_dbg_ctl': drm/sti/sti_mixer.c:88:2: error: implicit declaration of function 'seq_puts' [-Werror=implicit-function-declaration] drm/sti/sti_mixer.c:91:4: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] drm/sti/sti_gdp.c: In function 'gdp_dbg_ctl': drm/sti/sti_gdp.c:146:2: error: implicit declaration of function 'seq_puts' [-Werror=implicit-function-declaration] drm/sti/sti_gdp.c:149:4: error: implicit declaration of function 'seq_printf' [-Werror=implicit-function-declaration] drm/sti/sti_gdp.c: In function 'gdp_dbg_show': drm/sti/sti_gdp.c:208:32: error: dereferencing pointer to incomplete type 'struct seq_file' This adds an explicit #include statement in all of the affected files. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462830733-1710590-2-git-send-email-arnd@arndb.de drivers/gpu/drm/sti/sti_cursor.c | 2 ++ drivers/gpu/drm/sti/sti_gdp.c | 1 + drivers/gpu/drm/sti/sti_hda.c | 1 + drivers/gpu/drm/sti/sti_hqvdp.c | 1 + drivers/gpu/drm/sti/sti_mixer.c | 1 + drivers/gpu/drm/sti/sti_tvout.c | 1 + drivers/gpu/drm/sti/sti_vid.c | 1 + 7 files changed, 8 insertions(+) commit 1ddbdbd6e996c7459d585062edcf2ca28a09f829 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Apr 26 19:30:00 2016 +0200 drm/tegra: Use lockless gem BO free callback No dev->struct_mutex anywhere to be seen. Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Terje Bergström <tbergstrom@nvidia.com> Cc: linux-tegra@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1461691808-12414-28-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/tegra/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cf88585b1d5ce49515aabb381812976e2840a967 Merge: 953abb3 676970e Author: David S. Miller <davem@davemloft.net> Date: Tue May 10 23:36:14 2016 -0400 Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge Antonio Quartulli says: ==================== Included changes: - remove useless skb size check in batadv_interface_rx - basic netns support introduced by Andrew Lunn: - prevent virtual interface from changing netns by setting NETIF_F_NETNS_LOCAL - create virtual interface within the netns of the first hard-interface - introduce detection of complex bridge loops and report event to the user (via udev) when the Bridge Loop Avoidance mechanism can't prevent them - minor reference counting bugfixes for the hard_iface object that couldn't make it via the net tree - use kref_get() instead of kref_get_unless_zero() to make reference counting bug more visible - use batadv_compare_eth() all over the code when possible instead of plain memcmp() - minor code cleanup and style adjustments ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit b324f6392eda4124f25017bd4633c167301ad9e3 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Wed May 4 09:13:41 2016 +0300 eata_pio: missing break statement This missing break statement bug predates git. It's a very minor thing, it means that we print a '?' instead of a 'z' in dmesg. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/eata_pio.c | 1 + 1 file changed, 1 insertion(+) commit ff615f065a48137e48985c78d8b17ce14b22fa90 Author: Petros Koutoupis <petros@petroskoutoupis.com> Date: Mon May 9 13:44:10 2016 -0500 hpsa: Fix type ZBC conditional checks The device ID obtained from the inquiry can only be of a single type. The original code places a check for TYPE_ZBC right after the check for TYPE_DISK. Logically, if the first if statement sees a device of a TYPE_DISK and moves on to the second statement checking if not TYPE_ZBC, it will always hit the continue. [mkp: Applied by hand] Signed-off-by: Petros Koutoupis <petros@petroskoutoupis.com> Acked-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/hpsa.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit d230823a1c4c3e97afd4c934b86b3975d5e20249 Author: Hannes Reinecke <hare@suse.de> Date: Mon May 9 09:14:29 2016 +0200 scsi_lib: Decode T10 vendor IDs Some arrays / HBAs will only present T10 vendor IDs, so we should be decoding them, too. [mkp: Fixed T10 spelling] Suggested-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Hannes Reinecke <hare@suse.com> Tested-by: Paul Mackerras <paulus@ozlabs.org> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_lib.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit fe8b9534a0a0356f8a76467e2c561194bdb53c84 Author: Hannes Reinecke <hare@suse.de> Date: Fri May 6 10:34:35 2016 +0200 scsi_dh_alua: do not fail for unknown VPD identification Not every device will return a useable VPD identification, but still might support ALUA. Rather than disable ALUA support we should be allowing the device identification to be empty and attach individual ALUA device handler to each devices. [mkp: Fixed typo reported by Bart] Reported-by: Paul Mackerras <paulus@ozlabs.org> Signed-off-by: Hannes Reinecke <hare@suse.com> Tested-by: Paul Mackerras <paulus@ozlabs.org> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/device_handler/scsi_dh_alua.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) commit 1b37bd606deef0a787bdbbab6ff51dbebdeb9d3d Author: Douglas Gilbert <dgilbert@interlog.com> Date: Fri May 6 00:40:29 2016 -0400 scsi_debug: use locally assigned naa For reported SAS addresses replace fake IEEE registered NAAs (5) with locally assigned NAAs (3). Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_debug.c | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) commit 09ba24c18c7e0c215c39b3d92332b64132dae170 Author: Douglas Gilbert <dgilbert@interlog.com> Date: Fri May 6 00:40:28 2016 -0400 scsi_debug: uuid for lu name Permit changing of a LU name from a (fake) IEEE registered NAA (5) to a locally assigned UUID. Using a UUID (RFC 4122) for a SCSI designation descriptor (e.g. a LU name) was added in spc5r08.pdf (a draft INCITS standard) on 25 January 2016. Add parameter uuid_ctl to use a separate UUID for each LU (storage device) name. Additional option for all LU names to have the same UUID (since their storage is shared). Previous action of using NAA identifier for LU name remains the default. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_debug.c | 61 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 51 insertions(+), 10 deletions(-) commit 760f3b0342df19c2cfe53fffcc5ff5e2311447a6 Author: Douglas Gilbert <dgilbert@interlog.com> Date: Fri May 6 00:40:27 2016 -0400 scsi_debug: vpd and mode page work Cleanup some mode and vpd pages. Stop reporting SBC (disk) pages when peripheral type is something else (e.g. tape). Update version descriptors. Expand LBPRZ flag handling. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_debug.c | 187 ++++++++++++++++++++++++++-------------------- 1 file changed, 108 insertions(+), 79 deletions(-) commit c483739430f107c14b3fa316e9cdd3d1e065864a Author: Douglas Gilbert <dgilbert@interlog.com> Date: Fri May 6 00:40:26 2016 -0400 scsi_debug: add multiple queue support Add submit_queue parameter (minimum and default: 1; maximum: nr_cpu_ids) that controls how many queues are built, each with their own lock and in_use bit vector. Add statistics parameter which is default off. Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/scsi_debug.c | 702 +++++++++++++++++++++++++++++----------------- 1 file changed, 446 insertions(+), 256 deletions(-) commit 0bc10b93f2d9c6089ce968681ef9febecdc9b8e0 Author: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> Date: Tue May 3 20:49:36 2016 +0530 cpufreq: powernv: del_timer_sync when global and local pstate are equal When global and local pstate are equal in a powernv_target_index() call, we don't queue a timer. But we may have timer already queued for future. This could cause the timer to fire one additional time for no use. Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/powernv-cpufreq.c | 2 ++ 1 file changed, 2 insertions(+) commit 1fd3ff2874f79c04354f3e80e583afbe6fa6eaa2 Author: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> Date: Tue May 3 20:49:35 2016 +0530 cpufreq: powernv: Move smp_call_function_any() out of irq safe block Fix a WARN_ON caused by smp_call_function_any() when irq is disabled, because of changes made in the patch ('cpufreq: powernv: Ramp-down global pstate slower than local-pstate') https://patchwork.ozlabs.org/patch/612058/ WARNING: CPU: 0 PID: 4 at kernel/smp.c:291 smp_call_function_single+0x170/0x180 Call Trace: [c0000007f648f9f0] [c0000007f648fa90] 0xc0000007f648fa90 (unreliable) [c0000007f648fa30] [c0000000001430e0] smp_call_function_any+0x170/0x1c0 [c0000007f648fa90] [c0000000007b4b00] powernv_cpufreq_target_index+0xe0/0x250 [c0000007f648fb00] [c0000000007ac9dc] __cpufreq_driver_target+0x20c/0x3d0 [c0000007f648fbc0] [c0000000007b1b4c] od_dbs_timer+0xcc/0x260 [c0000007f648fc10] [c0000000007b3024] dbs_work_handler+0x54/0xa0 [c0000007f648fc50] [c0000000000c49a8] process_one_work+0x1d8/0x590 [c0000007f648fce0] [c0000000000c4e08] worker_thread+0xa8/0x660 [c0000007f648fd80] [c0000000000cca88] kthread+0x108/0x130 [c0000007f648fe30] [c0000000000095e8] ret_from_kernel_thread+0x5c/0x74 - Calling smp_call_function_any() with interrupt disabled (through spin_lock_irqsave) could cause a deadlock, as smp_call_function_any() relies on the IPI to complete. This is detected in the smp_call_function_any() call and hence the WARN_ON. - As the spinlock (gpstates->lock) is only used to synchronize access of global_pstate_info between timer irq handler and target_index calls. And the timer irq handler just try_locks() hence it would not cause a deadlock. Hence could do without making spinlocks irq safe. - As the smp_call_function_any() is a blocking call and does not access global_pstates_info, it could reduce the critcal section by moving smp_call_function_any() after giving up the lock. Reported-by: Abdul Haleem <abdhalee@linux.vnet.linux.com> Signed-off-by: Akshay Adiga <akshay.adiga@linux.vnet.ibm.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/cpufreq/powernv-cpufreq.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit a3c89334f06bacf7e2f23203ad64cfd6e78dbbf4 Author: Aaron Lu <aaron.lu@intel.com> Date: Mon May 9 15:54:58 2016 +0800 Thermal / ACPI / video: add INT3406 thermal driver INT3406 ACPI device object resembles an ACPI video output device, but its _BCM is said to be deprecated and should not be used. So we will make use of the raw interface to do the actual cooling. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/thermal/Kconfig | 28 +-- drivers/thermal/int340x_thermal/Kconfig | 42 ++++ drivers/thermal/int340x_thermal/Makefile | 1 + drivers/thermal/int340x_thermal/int3406_thermal.c | 236 ++++++++++++++++++++++ 4 files changed, 282 insertions(+), 25 deletions(-) commit e5366a266a8cd4cd6b0fe66876462cca2e1c6a89 Author: Brian Norris <computersforpeace@gmail.com> Date: Fri May 6 08:37:41 2016 -0700 mtd: spi-nor: support GigaDevice gd25lq64c Also note the GigaDevice JEDEC ID. No write-protect support yet, since this flash uses a different status register layout. Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Acked-by: Marek Vasut <marex@denx.de> drivers/mtd/spi-nor/spi-nor.c | 1 + include/linux/mtd/spi-nor.h | 1 + 2 files changed, 2 insertions(+) commit e77d0c63f00137add5d7966d9bd9fd5115ce0841 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Tue May 10 16:41:13 2016 -0400 f2fs: switch to ->iterate_shared() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/f2fs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9910f5b199621aecfbdb0b63feb31ddd41fd63e2 Merge: 19d91c0 bb4b4e9 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 22:19:36 2016 +0200 Merge tag 'imx-dt64-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt64 Merge "The Freescale/NXP arm64 device tree updates for 4.7" from Shawn Guo: - New board support of LS1043a-QDS from Freescale/NXP - Add new compatible for LS1043A and LS2080A GPIO devices - Update device tree bindings and sources for LS2080A fsl-mc device - Update QSPI and DSPI support on LS1043A and LS2080A * tag 'imx-dt64-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: dts: ls2080a: fsl-mc dt node updates Documentation: fsl-mc: binding updates for MSIs, ranges, PHYs arm64: dts: ls1043a: add the DTS node for QSPI support Documentation: fsl-quadspi: Add fsl,ls1043a-qspi compatible string arm64: dts: ls2080a: Add compatible "fsl,ls2080a-gpio" for ls2080a gpio nodes arm64: dts: ls1043a: Add compatible "fsl,qoriq-gpio" for ls1043a gpio nodes arm64: dts: ls2080a: update the DTS for QSPI and DSPI support Documentation: fsl: dspi: Add fsl,ls2080a-dspi compatible string arm64: dts: ls1043a-rdb: add the DTS for DSPI support arm64: dts: add LS1043a-QDS board support Documentation: DT: Add entry for Freescale LS1043a-QDS board commit 19d91c04af478522d2382a3a8edaedef60af57f6 Merge: 8ed5898 962f514 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 22:19:00 2016 +0200 Merge tag 'v4.6-next-dts64' of https://github.com/mbgg/linux-mediatek into next/dt64 Merge "ARM: mediatek: dts64 updates for v4.7" from Matthias Brugger: - add thermal and auxadc device nodes to mt8173 - add thermal zone nodes to mt8173 * tag 'v4.6-next-dts64' of https://github.com/mbgg/linux-mediatek: arm64: dts: mt8173: Add thermal zone node. ARM64: dts: mt8173: Add thermal/auxadc device nodes commit 8ed589854a3e3daa030660e7688eb8348e03ffe1 Merge: 0378fe8 30f949b Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 22:18:14 2016 +0200 Merge tag 'tegra-for-4.7-gm20b' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt64 Merge "arm64: tegra: Enable GM20B GPU on Tegra210" from Thierry Reding: Complement the GM20B GPU device tree node on Tegra210 with missing properties to make it usable. * tag 'tegra-for-4.7-gm20b' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: arm64: tegra: Add IOMMU node to GM20B on Tegra210 arm64: tegra: Add reference clock to GM20B on Tegra210 dt-bindings: Add documentation for GM20B GPU dt-bindings: gk20a: Document iommus property dt-bindings: gk20a: Fix typo in compatible name commit 0378fe89d847131a95984ce3704795a64c0dc8f2 Merge: 3a005c1 ec6b925 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 22:16:51 2016 +0200 Merge tag 'tegra-for-4.7-gpio' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/dt64 Merge "dt-bindings: gpio: tegra: Add Tegra186 support" from Thierry Reding: Adds device tree bindings for the GPIO and AON controllers found on the Tegra186 SoC. * tag 'tegra-for-4.7-gpio' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: tegra: Add DT binding for Tegra186 GPIO controllers ARM: tegra: Fix naming in GPIO DT binding header commit 3a005c1d59057ef290f44b560c362faf4d164ced Merge: f1c09c3 19b67d5 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 22:14:52 2016 +0200 Merge tag 'mvebu-dt64-4.7-1' of git://git.infradead.org/linux-mvebu into next/dt64 Merge "mvebu dt64 for 4.7" from Gregory CLEMENT: - switch to label in the mvebu arm64 device tree - use new clock binding on Armada 7K/8K - improve SPI and I2C description on Armada 7K/8k - add CP110 block adding PCIe, SATA and USB3 - add XOR support on Armada 3700 - few more little fix * tag 'mvebu-dt64-4.7-1' of git://git.infradead.org/linux-mvebu: arm64: dts: marvell: add XOR node for Armada 3700 SoC arm64: dts: marvell: Use a SoC-specific compatible for xHCI on Armada37xx arm64: dts: marvell: Rename armada-37xx USB node arm64: dts: marvell: Clean up armada-3720-db arm64: dts: marvell: enable several CP interfaces on Armada 7040-DB arm64: dts: marvell: initial DT description of Armada 7K/8K CP110 master arm64: dts: marvell: use the proper I2C controller compatible string for 7K/8K arm64: dts: marvell: improve SPI flash description on Armada 7040-DB arm64: dts: marvell: use new clock binding on Armada AP806 arm64: dts: marvell: add UART aliases and define stdout-path arm64: dts: marvell: rename armada-ap806 XOR nodes arm64: dts: marvell: clean up armada-7040-db commit f1c09c3e9644fec5571cca1287730868d0809f97 Merge: 41caed5 51c454d Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 22:06:49 2016 +0200 Merge tag 'v4.7-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt64 Merge "Rockchip dts64 updates for v4.7 - part2" from Heiko Stübner: Adding the new rk3399 core devicetree support as well as a board dts for the evaluation board of this chip and similar to the arm32 side also move the rk3368 thermal data into the core soc dtsi, as there really is no need to keep it separate. * tag 'v4.7-rockchip-dts64-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: dt-bindings: document rockchip rk3399-evb board arm64: dts: rockchip: add dts file for RK3399 evaluation board arm64: dts: rockchip: add core dtsi file for RK3399 SoCs dt-bindings: rockchip-dw-mshc: add description for rk3399 clk: rockchip: export some necessary rk3399 clock ids clk: rockchip: rename rga clock-id on rk3399 clk: rockchip: add general gpu soft-reset on rk3399 arm64: dts: rockchip: move the rk3368 thermal data into rk3368.dtsi clk: rockchip: fix checkpatch errors in rk3399 dt-binding header clk: rockchip: add dt-binding header for rk3399 commit 953abb3823633385b1235add9c30c3e775dee0bc Author: Sowmini Varadhan <sowmini.varadhan@oracle.com> Date: Tue May 10 12:38:08 2016 -0400 skbuff: remove unused variable `doff' There are two instances of an unused variable, `doff' added by commit 6fa01ccd8830 ("skbuff: Add pskb_extract() helper function") in pskb_carve_inside_header() and pskb_carve_inside_nonlinear(). Remove these instances, they are not used. Reported by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/core/skbuff.c | 6 ------ 1 file changed, 6 deletions(-) commit 1ddb6b71b9b572edb2b9c09086ee3bbbc550d9cd Author: Tom Herbert <tom@herbertland.com> Date: Tue May 10 11:56:32 2016 +0200 ila: ipv6/ila: fix nlsize calculation for lwtunnel The handler 'ila_fill_encap_info' adds two attributes: ILA_ATTR_LOCATOR and ILA_ATTR_CSUM_MODE. nla_total_size_64bit() must be use for ILA_ATTR_LOCATOR. Also, do nla_put_u8 instead of nla_put_u64 for ILA_ATTR_CSUM_MODE. Fixes: f13a82d87b21 ("ipv6: use nla_put_u64_64bit()") Fixes: 90bfe662db13 ("ila: add checksum neutral ILA translations") Reported-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Acked-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ila/ila_lwt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 93edb8c7f94fb3d384790ac8a83c3fb9389f6ca5 Author: Pablo Neira <pablo@netfilter.org> Date: Tue May 10 21:33:38 2016 +0200 gtp: reload GTPv1 header after pskb_may_pull() The GTPv1 header flags indicate the presence of optional extensions after this header. Refresh the pointer to the GTPv1 header as skb->head might have be reallocated via pskb_may_pull(). Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/gtp.c | 2 ++ 1 file changed, 2 insertions(+) commit 1dee3f59a8d5e711797dc82628aaf94a64e99922 Author: Nicolas Dichtel <nicolas.dichtel@6wind.com> Date: Mon May 9 11:40:20 2016 +0200 block/drbd: align properly u64 in nl messages The attribute 0 is never used in drbd, so let's use it as pad attribute in netlink messages. This minimizes the patch. Note that this patch is only compile-tested. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/block/drbd/drbd_nl.c | 28 ++++++++++++++++------------ include/linux/genl_magic_struct.h | 7 ++++++- 2 files changed, 22 insertions(+), 13 deletions(-) commit af5e964f3045b66f1cd720b9c5abd37e47e613e2 Author: Luca Coelho <luciano.coelho@intel.com> Date: Tue Apr 19 12:03:45 2016 +0300 MAINTAINERS: add myself as co-maintainer of the iwlwifi driver I'm starting to take a more active role in the iwlwifi driver maintainership. Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Cc: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> MAINTAINERS | 1 + 1 file changed, 1 insertion(+) commit 5c8877593a44ae914327a7fe850645766635b9b9 Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Mon Mar 14 15:21:06 2016 +0200 iwlwifi: add default value to disable_11ac mod param description Small change to make it clear that the default value is false. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dfcfeef96cf56d2be344250ca472ca559b722112 Author: Sara Sharon <sara.sharon@intel.com> Date: Tue Apr 12 18:41:32 2016 +0300 iwlwifi: pcie: grab NIC access only once on RX init When initializing RX we grab NIC access for every read and write. This is redundant - we can just grab access once. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 97 ++++++++++++++++------------ 1 file changed, 57 insertions(+), 40 deletions(-) commit 1554ed20882798b1da3d9830b0d996a0bc1aaecd Author: Sara Sharon <sara.sharon@intel.com> Date: Sun Apr 17 15:08:59 2016 +0300 iwlwifi: pcie: use shadow registers for updating write pointer The RX queues have a shadow register for the write pointer that enables updates without grabbing NIC access. Use them instead of the periphery registers because accessing those is much more expensive. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-fh.h | 3 +++ drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) commit cf961e16620f88686e0662753bd92d8383f36862 Author: Liad Kaufman <liad.kaufman@intel.com> Date: Thu Aug 13 19:16:08 2015 +0300 iwlwifi: mvm: support dqa-mode agg on non-shared queue In non-shared queues, DQA requires re-configuring existing queues to become aggregated rather than allocating a new one. It also requires "un-aggregating" an existing queue when aggregations are turned off. Support this requirement for non-shared queues. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 5 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 33 ++++- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 9 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 148 ++++++++++++++++++---- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 15 ++- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 37 +++++- 6 files changed, 207 insertions(+), 40 deletions(-) commit 192185d68dcc9b4517001fcec645111946f84d40 Author: Johannes Berg <johannes.berg@intel.com> Date: Wed Apr 13 10:31:14 2016 +0200 iwlwifi: pcie: avoid msleep() with short timeout Since msleep is based on jiffies, it can sleep for a long time. Use usleep_range() instead to shorten the maximum time. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit b7a08b284dcf7fb3d7b99473a87fabad04b2c548 Author: Johannes Berg <johannes.berg@intel.com> Date: Wed Apr 13 10:24:59 2016 +0200 iwlwifi: pcie: extend device reset delay Newer hardware generations will take longer to be accessible again after reset, so we need to wait longer before continuing any flow that did a reset. Rather than make the wait time configurable, simply extend it for all. Since all of these code paths can sleep, use usleep_range() rather than mdelay(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) commit fbbd48595f2689619bab6957c6c2ee2895005b51 Author: Gregory Greenman <gregory.greenman@intel.com> Date: Tue Apr 12 15:16:24 2016 +0300 iwlwifi: turn on SGI support for VHT 160MHz Devices supporting VHT 160MHz width are supporting also Short GI. Turn on this capability in vht cap. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 77d76931343aae1d36bf5d39231db2464abd5aa0 Author: Johannes Berg <johannes.berg@intel.com> Date: Tue Apr 12 12:36:01 2016 +0200 iwlwifi: make configuration structs smaller Since we have a lot of configuration structs (almost 70) saving some memory in each one of them leads to an overall saving of ~2.6KiB of memory. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-1000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-2000.c | 2 - drivers/net/wireless/intel/iwlwifi/iwl-5000.c | 2 +- drivers/net/wireless/intel/iwlwifi/iwl-6000.c | 3 - drivers/net/wireless/intel/iwlwifi/iwl-7000.c | 1 - drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 1 - drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 1 - drivers/net/wireless/intel/iwlwifi/iwl-config.h | 118 ++++++++++++------------ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 5 +- 9 files changed, 65 insertions(+), 70 deletions(-) commit 39654cb3a6a2a04bb055e62e8ece16d611c2e517 Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Tue Apr 12 13:07:52 2016 +0300 iwlwifi: don't access a nonexistent register upon assert The commit below added code to dump the content of FIFOs that are present only on dual CPU products (8000 and up). This broke 7265D whose firmware does advertise IWL_UCODE_TLV_CAPA_EXTEND_SHARED_MEM_CFG but doesn't have 2 CPUs. The current code does check the length of the FIFO before dumping them (and the nonexistent FIFO has a 0 length), but we still accessed a register to set the FIFO number and that made the DMA unhappy. The impact was a much longer recovery upon firmware assert. Fixes: 5b086414293f ("iwlwifi: mvm: support dumping UMAC internal txfifos") Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit 75094dc8487935a0d95b78b7d21804805fc3a3be Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Sun Apr 10 08:48:46 2016 +0300 iwlwifi: remove IWLWIFI_DEBUG_EXPERIMENTAL_UCODE This Kconfig option allows to load a firmware for debugging with a different name. This mechanism has not been used for a few years now and replacing the firmware file works as well. Kill this Kconfig option and all the code that goes with it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/Kconfig | 6 ----- drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 35 +++++++--------------------- 2 files changed, 9 insertions(+), 32 deletions(-) commit 13303c0fb1481e40377d072a29570e005e7bd032 Author: Sara Sharon <sara.sharon@intel.com> Date: Sun Apr 10 15:51:54 2016 +0300 iwlwifi: mvm: use helpers to get iwl_mvm_sta Getting the mvm station out of station id requires dereferencing the station id to get ieee80211_sta, then checking for pointer validity and only then extract mvm station out. Given that there are helpers to do it - use them instead of duplicating the code whenever we need only mvm station. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 8 ++------ drivers/net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 9 +++------ drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 6 ++---- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 7 +------ drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 8 +++----- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 7 +++---- 6 files changed, 14 insertions(+), 31 deletions(-) commit ce1f27787d493bc28d2f523a3b4c9f72aa9cee7d Author: Sara Sharon <sara.sharon@intel.com> Date: Sun Apr 10 16:02:12 2016 +0300 iwlwifi: mvm: remove redundant alloc_ctx parameter iwl_phy_db_set_section() is get called only from atomic context, the alloc_ctx parameter is not needed. Remove it. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c | 6 +++--- drivers/net/wireless/intel/iwlwifi/iwl-phy-db.h | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) commit 0ec84d1d1e6db6e0b4c1eb9bd9cdd2da64451da6 Author: Sara Sharon <sara.sharon@intel.com> Date: Sun Apr 10 12:27:25 2016 +0300 iwlwifi: mvm: make phy_db size dynamic Driver is agnostic to the number of the phy_db entries and only serves the firmware as a pipe to move the data from init image to RT image. As the size of the arrays may change (as it does in 9000 device) allocate it dynamically. Firmware sends the largest index first so we can use this to know how much we should allocate. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-phy-db.c | 62 +++++++++++++++++++------ 1 file changed, 49 insertions(+), 13 deletions(-) commit dd02fbeb8fedecd8b2d55fdfde664eaa05afac6f Author: Sara Sharon <sara.sharon@intel.com> Date: Thu Apr 7 17:26:53 2016 +0300 iwlwifi: mvm: set correct vht capability Our device supports only 160 GHz and not 80+80. Fix VHT flag accordingly. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 74dd17648c849eb401b8f4401e72628d9e7c7bd0 Author: Sara Sharon <sara.sharon@intel.com> Date: Wed Mar 30 20:04:48 2016 +0300 iwlwifi: mvm: loosen nssn comparison to reorder buffer head Up till now, the reorder buffer uses standard spec based comparison when comparing the buffer status to NSSN. This indeed works for the regular case, since we shouldn't cross the 2048 boundary without getting a frame release notification. However, this is problematic due to packet filtering that may be performed by the FW while we are in d0i3. Theoretically we may filter over 2048 packets, and then the check of the NSSN will get incorrect. Change the comparison to always trust nssn unless it is 64 or less frames behind the head - which might happen due to a timeout. This new comparison is to be used only when comparing reorder buffer head with nssn, and not when comparing the packet SN to nssn or reorder buffer head. Put this in a separate commit as the logic is a bit tricky and stands for its own commit message. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) commit 7ef3dd264edbe8fdec163bf19dc9b3458e878cf4 Author: Haim Dreyfuss <haim.dreyfuss@intel.com> Date: Sun Apr 3 20:15:26 2016 +0300 iwlwifi: pcie: don't wake up the NIC when writing CSRs in MSIX mode CSR registers are always available even when the NIC is not awake, no need to wake up the NIC before accessing them. This has a huge impact when we re-enable an interrupt at the end of the ISR since waking up the NIC can take some time. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/pcie/rx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 0730ffb19e9af9b021927c266b6fbff0b5d93d45 Author: Haim Dreyfuss <haim.dreyfuss@intel.com> Date: Wed Apr 6 10:45:05 2016 +0300 iwlwifi: Fix firmware name maximum length definition Previous patch had changed firmware name convention for new generation product. The firmware name is now longer than the former convention. Adapt max firmware name length to the new convention. Fixes: e1ba684f762b ("iwlwifi: 8000: fix MODULE_FIRMWARE input") Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c8fa9bc08f60ac657751daba9fccf828a36cfed Author: Masahiro Yamada <yamada.masahiro@socionext.com> Date: Sat May 7 15:48:26 2016 +0900 kbuild: fix if_change and friends to consider argument order Currently, arg-check is implemented as follows: arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ $(filter-out $(cmd_$@), $(cmd_$(1))) ) This does not care about the order of arguments that appear in $(cmd_$(1)) and $(cmd_$@). So, if_changed and friends never rebuild the target if only the argument order is changed. This is a problem when the link order is changed. Apparently, obj-y += foo.o obj-y += bar.o and obj-y += bar.o obj-y += foo.o should be distinguished because the link order determines the probe order of drivers. So, built-in.o should be rebuilt when the order of objects is changed. This commit fixes arg-check to compare the old/current commands including the argument order. Of course, this change has a side effect; Kbuild will react to the change of compile option order. For example, "-DFOO -DBAR" and "-DBAR -DFOO" should give no difference to the build result, but false positive should be better than false negative. I am moving space_escape to the top of Kbuild.include just for a matter of preference. In practical terms, space_escape can be defined after arg-check because arg-check uses "=" flavor, not ":=". Having said that, collecting convenient variables in one place makes sense from the point of readability. Chaining "%%%SPACE%%%" to "_-_SPACE_-_" is also a matter of taste at this point. Actually, it can be arbitrary as long as it is an unlikely used string. The only problem I see in "%%%SPACE%%%" is that "%" is a special character in "$(patsubst ...)" context. This commit just uses "$(subst ...)" for arg-check, but I am fixing it now in case we might want to use it in $(patsubst ...) context in the future. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Michal Marek <mmarek@suse.com> scripts/Kbuild.include | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) commit 16c45822a89f3b53b300784d08e9665681a43a20 Author: Sara Sharon <sara.sharon@intel.com> Date: Mon Apr 4 19:30:05 2016 +0300 iwlwifi: mvm: don't allow negative reference count Currently code allows mvm reference to become negative and only warns in case mvm reference is released while reference counting is 0. However, we better prevent this from happening at all since iwl_mvm_unref() may race against iwl_mvm_unref_all_except() which is called on restart. As a result we might get the same reference unreferenced twice ending with a negative value: An example for an easily reproduced log: [ 2689.909166] iwl_mvm_ref Take mvm reference - type 8 [ 2690.732716] iwl_mvm_unref_all_except Cleanup: remove mvm ref type 8 (1) [ 2690.849708] iwl_mvm_unref Leave mvm reference - type 8 [ 2690.849721] WARNING: ... iwl_mvm_unref+0xb0/0xc0 [iwlmvm]() If there will be yet another another restart iwl_mvm_unref_all_except will run from 0 up to ref count, and since it is unsigned, we will throw the transport ref count completely out of balance: iwl_mvm_unref_all_except[I] -- Cleanup: remove mvm ref type 8 (255) iwl_trans_slv_unref[I] -- rpm counter: 0 iwl_trans_slv_unref[I] -- rpm counter: -1 iwl_trans_slv_unref[I] -- rpm counter: -2 ... iwl_trans_slv_unref[I] -- rpm counter: -253 iwl_trans_slv_unref[I] -- rpm counter: -254 As there is no valid scenario where we can get to a negative reference count - prevent it from happening. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit e87e2639f9ca9bc273e5d67d84cf6880d42d92af Author: Golan Ben-Ami <golan.ben.ami@intel.com> Date: Wed Apr 6 11:59:50 2016 +0300 iwlwifi: mvm: add more registers to dump upon error Add UREG, RXFC, RFH, WMAL and RL2P registers to the prph dump upon error. These regesiters could help to debug MSI-X and other issues. These register should be dumped only when multi-queue rx is supported so separate the prph ranges static array to two different arrays, and enable dumping different prph ranges according to run-time decision. Signed-off-by: Golan Ben-Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/fw-dbg.c | 53 ++++++++++++++++++++----- 1 file changed, 44 insertions(+), 9 deletions(-) commit 16e4dd8faa9e5de9dd956a18c0f19d911a97ef79 Author: Luca Coelho <luciano.coelho@intel.com> Date: Wed Mar 30 15:05:56 2016 +0300 iwlwifi: mvm: add a new mvm reference type for RX data When a data packet is received, we need to make sure that we stay awake until it can be processed and wait a while before trying to enter runtime_suspend os system_suspend again. To do so, add a new reference type for RX data and take the reference when sending the packet to mac80211. We only do this for data packets, all the other RX packets sent by the firmware (e.g. notifications) are not a reason to prevent suspend. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 15 +++++++++++++++ 3 files changed, 17 insertions(+) commit 43ec72b75a8851b48e561c29f49586cc747bdad8 Author: Johannes Berg <johannes.berg@intel.com> Date: Thu Mar 10 11:55:44 2016 +0100 iwlwifi: mvm: pass station to mac80211 RX where known When we've already looked up the transmitter station, we can just pass it to mac80211 using the new ieee80211_rx_napi(). This saves the overhead of looking it up in mac80211 again. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 11 ++++++++--- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) commit 4896d7642fd34251ba7119bcb8304d9a73e51bf8 Author: Gregory Greenman <gregory.greenman@intel.com> Date: Sun Apr 3 14:06:12 2016 +0300 iwlwifi: consider VHT 160MHz while parsing NVM Devices belonging to 9000 family can support VHT 160MHz channel width, so need to consider it when configuring VHT capabilities. However, NVM file doesn't have a single bit specifying that 160MHz is supported. This patch turns on 160MHz support in VHT capabilities in case there's at least one channel supporting 160MHz. Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.h | 1 + drivers/net/wireless/intel/iwlwifi/iwl-nvm-parse.c | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) commit 1afb0ae4217423f7864cba0684362de99782fa4e Author: Haim Dreyfuss <haim.dreyfuss@intel.com> Date: Sun Apr 3 19:55:59 2016 +0300 iwlwifi: allow combining different phy images with mac images Currently there is one to one function between device id to it's ucode. The new generation devices allows to combine different phy and mac images. Now we have two different ucode images with the same device id. Read RF ID to identify phy image and overwrite it if needed. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 29 ++++++++++++++++++++++--- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 3 +++ drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 15 +++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 2 ++ drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 10 +++++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 ++ 6 files changed, 58 insertions(+), 3 deletions(-) commit 71b1230ca97e60d26b4205ac553af6331724ca60 Author: Luca Coelho <luciano.coelho@intel.com> Date: Fri Mar 11 12:12:16 2016 +0200 iwlwifi: wake from runtime suspend before sending sync commands If a host command was queued while in runtime suspend, it would go out before the D0I3_END_CMD was sent. Sometimes it works, but sometimes it fails, and it is obviously the wrong thing to do. To fix this, have the opmode take a reference before sending a SYNC command and make the pcie trans wait for the runtime state to become active before actually queueing the command. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 8 +++++++- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 11 +++++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) commit fa820d696c0ac0bb3cf1b49a817899982d774d61 Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Sun Apr 3 10:15:59 2016 +0300 iwlwifi: mvm: allow a debug knob for Tx A-MSDU even if rate control forbids it There is a debugfs knob to configure the maximal length of the A-MSDU. If this value is not 0 (which is the default), allow Tx A-MSDU even if the rate control disallows it. While at it, add "unlikely" to the if that limits the length of the A-MSDU based on the debugfs hook. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) commit aea2a5f0d84745f34eb37bc5eada9ecced40fa88 Author: Haim Dreyfuss <haim.dreyfuss@intel.com> Date: Sun Apr 3 18:56:15 2016 +0300 iwlwifi: Rename 9560 to 9260 and add new PCI IDs for it Rename 9560 to 9260. Add new PCI ID for 9260 and change some entries from 5165 to 9260. Also order the 9000 series. Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-9000.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 2 +- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 21 +++++++++++---------- 3 files changed, 14 insertions(+), 13 deletions(-) commit e9eb5e338fb77fd6839f1efba9f2b6000a1c8166 Author: Sara Sharon <sara.sharon@intel.com> Date: Sun Apr 3 10:19:16 2016 +0300 iwlwifi: mvm: add a flag to disable checksum Add a constant to allow disabling checksum. This will enable easier debugging in early phases. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/constants.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) commit 80938abc79a0d14d747a4b3a0c93cb0aa70f238e Author: Johannes Berg <johannes.berg@intel.com> Date: Wed Mar 30 11:05:16 2016 +0200 iwlwifi: mvm: advertise RSS queue usage In order for mac80211 to use per-CPU statistics for RSS RX, the driver needs to advertise that it uses RSS. Do this when using more than a single queue. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 3 +++ 1 file changed, 3 insertions(+) commit c24c7f58d77a75343010d88fdf85ddebad2d7438 Author: Luca Coelho <luciano.coelho@intel.com> Date: Wed Mar 30 20:59:27 2016 +0300 iwlwifi: trans: don't call the trans-specific ref/unref directly It's cleaner to always call the iwl_trans_ref/unref() functions instead of sometimes calling the trans-specific ops directly. This also prepares for moving some of the code from the trans-specific ops to the common trans code. Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/pcie/internal.h | 3 --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 10 +++++----- 3 files changed, 7 insertions(+), 10 deletions(-) commit 2b1ba3ef921078ac3bd0375fdac9eea2c69ec144 Author: Liad Kaufman <liad.kaufman@intel.com> Date: Mon Sep 21 14:14:23 2015 +0200 iwlwifi: mvm: support queue removal in ADD_STA hcmd To indicate to the FW that a queue has been removed, an existing flag in the ADD_STA HCMD (that hasn't been in use) has been changed to indicate that a queue is being removed from a STA. Update this in the driver code. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit a338384bb31f01dc1306c7200ace61a55fa25947 Author: Sara Sharon <sara.sharon@intel.com> Date: Sun Feb 28 15:41:47 2016 +0200 iwlwifi: mvm: utilize the frame release infrastructure The firmware will send frame release notification in order to release "stuck" frames on a queue where no more frames arrive on. Upon receiving the message the driver shall indicate the frames up to the NSSN. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 4 ++-- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 33 +++++++++++++++++++++++++-- 3 files changed, 34 insertions(+), 5 deletions(-) commit 0690405fef290c3ae9bf466d603731b2ba478053 Author: Sara Sharon <sara.sharon@intel.com> Date: Sun Feb 28 20:28:17 2016 +0200 iwlwifi: mvm: add reorder timeout per frame Add a timer in order to release expired frames from the reorder buffer. This is needed since some APs do not retransmit frames to fill in the reorder holes and in TCP it results with a complete stall of traffic. This has a few side effects on the general design: The nssn may not reflect the the head of the reorder buffer. This situation is valid, and packets with SN lower than the reorder buffer head will be dropped. Another side effect is that since the reorder timer might expire we need to lock the reorder buffer. This however is fine since the locking is only inside a single reorder buffer between RX path and reorder timeout and there is no outside contention. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 12 ++++ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 81 ++++++++++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 23 +++++++- 3 files changed, 114 insertions(+), 2 deletions(-) commit b915c10174fb7df533b7928046129c8f626cca42 Author: Sara Sharon <sara.sharon@intel.com> Date: Wed Mar 23 16:32:02 2016 +0200 iwlwifi: mvm: add reorder buffer per queue Next hardware will direct packets to core based on the TCP/UDP streams. This logic can create holes in reorder buffer since packets that belong to other stream were directed to a different core. However, those are valid holes and the packets can be indicated in L3 order. The hardware will utilize a mechanism of informing the driver of the normalized ssn and the driver shall release all packets that SN is lower than the nssn. This enables managing the reorder across the queues without sharing any data between them. The reorder buffer is allocated and released directly in the RX path in order to avoid various races between control path and rx path. The code utilizes the internal messaging to notify rx queues of when to delete the reorder buffer. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 24 +++ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 181 +++++++++++++++++++++- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 69 ++++++++- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 9 ++ 5 files changed, 276 insertions(+), 9 deletions(-) commit 2dd493434db68f89c690a665e3ac3dad11b69134 Author: Johannes Berg <johannes.berg@intel.com> Date: Wed Mar 30 11:57:01 2016 +0200 iwlwifi: mvm: add firmware API name comment Add the firmware API name to the struct iwl_wowlan_gtk_status. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/fw-api-d3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 10b2b2019d810f6cc6cc1461615371014d0d11c8 Author: Sara Sharon <sara.sharon@intel.com> Date: Sun Mar 20 16:23:41 2016 +0200 iwlwifi: mvm: add infrastructure for tracking BA session in driver According to the spec when a BA session is started there is a timeout set for the session in the ADDBA request. If there is not activity on the TA/TID then the session expires and a DELBA is sent. In order to check for the timeout, data must be shared among the rx queues. Add a timer that runs as long as BA session is active for the station and stops aggregation session if needed. This patch also lays the infrastructure for the reordering buffer which will be enabled in the next patches. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> .../net/wireless/intel/iwlwifi/mvm/fw-api-sta.h | 6 +- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 7 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 25 ++++ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 35 ++++++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 130 +++++++++++++++++++-- drivers/net/wireless/intel/iwlwifi/mvm/sta.h | 4 +- 6 files changed, 194 insertions(+), 13 deletions(-) commit d0ff5d2297aa03f346c82d8c90528f00f90ea26d Author: Sara Sharon <sara.sharon@intel.com> Date: Wed Mar 23 16:31:43 2016 +0200 iwlwifi: mvm: change RX sync notification to be an attribute and not a type Currently the sync notification is a type of notification. However, it is better fitted as an attribute of a notification, since there might be another message in the payload (delba for instance) that should be sent while control path is waiting for all queues to process. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rx.h | 9 ++++--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 30 ++++++++++++++-------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 3 +++ drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 15 ++++++----- 4 files changed, 37 insertions(+), 20 deletions(-) commit 0636b938214c90c3a7d145ad86b64a061bb10c50 Author: Sara Sharon <sara.sharon@intel.com> Date: Thu Feb 18 14:21:12 2016 +0200 iwlwifi: mvm: implement driver RX queues sync command mac80211 will call the driver whenever there is a race between RSS queues and control path that requires a processing of all pending frames in RSS queues. Implement that by utilizing the internal notification mechanism: queue a message to all queues. When the message is received on a queue it decrements the atomic counter. This guarantees that all pending frames in the RX queue were processed since the message is in order inside the queue. Signed-off-by: Sara Sharon <sara.sharon@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/fw-api-rx.h | 4 ++ drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 43 ++++++++++++++++++++++ drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 2 + drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 7 ++++ 5 files changed, 58 insertions(+) commit fa64e5f6a35efd5e77d639125d973077ca506074 Author: Dirk Gouders <dirk@gouders.net> Date: Fri Apr 29 10:24:52 2016 +0200 kconfig/symbol.c: handle choice_values that depend on 'm' symbols If choices consist of choice_values of type tristate that depend on symbols set to 'm', those choice_values are not set to 'n' if the choice is changed from 'm' to 'y' (in which case only one active choice_value is allowed). Those values are also written to the config file causing modules to be built when they should not. The following config can be used to reproduce and examine the problem; with the frontend of your choice set "Choice 0" and "Choice 1" to 'm', then set "Tristate Choice" to 'y' and save the configuration: config modules boolean modules default y option modules config dependency tristate "Dependency" default m choice prompt "Tristate Choice" default choice0 config choice0 tristate "Choice 0" config choice1 tristate "Choice 1" depends on dependency endchoice This patch sets tristate choice_values' visibility that depend on symbols set to 'm' to 'n' if the corresponding choice is set to 'y'. This makes them disappear from the choice list and will also cause the choice_values' value set to 'n' in sym_calc_value() and as a result they are written as "not set" to the resulting .config file. Reported-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Dirk Gouders <dirk@gouders.net> Tested-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Tested-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Michal Marek <mmarek@suse.com> scripts/kconfig/symbol.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit dc6079d8ab24283f07b8180574dcf42c78ceeb7c Merge: 7a27de7 9365fbf Author: David S. Miller <davem@davemloft.net> Date: Tue May 10 15:06:21 2016 -0400 Merge branch 'phy_ksettings' Philippe Reynes says: ==================== net: phy: add phy_ethtool_{get|set}_link_ksettings Ethtool callbacks {get|set}_link_ksettings may be the same for many drivers. So we add two generics callbacks phy_ethtool_{get|set}_link_ksettings. To use those generics callbacks, the ethernet driver must use the pointer phydev contained in struct net_device, and not use a private structure to store this pointer. Changelog: v3: - rename function to phy_ethtool_{get|set}_link_ksettings - move code to net/phy/phy.c This feedback were provided by David Decotigny v2: - use generic function instead of macro - ethernet driver use the pointer phydev provided by struct net_device Those idea were provided by Ben Hutchings, and Florian Fainelli acknowledge them. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 9365fbf5781f2c7f182e8b5c78ff757d3ff9d722 Author: Philippe Reynes <tremyfr@gmail.com> Date: Tue May 10 00:19:43 2016 +0200 net: ethernet: fec: use phy_ethtool_{get|set}_link_ksettings There are two generics functions phy_ethtool_{get|set}_link_ksettings, so we can use them instead of defining the same code in the driver. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/fec_main.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) commit 45f5c327ce5ce9178147279b5d6b95eac216c84c Author: Philippe Reynes <tremyfr@gmail.com> Date: Tue May 10 00:19:42 2016 +0200 net: ethernet: fec: use phydev from struct net_device The private structure contain a pointer to phydev, but the structure net_device already contain such pointer. So we can remove the pointer phydev in the private structure, and update the driver to use the one contained in struct net_device. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/freescale/fec.h | 1 - drivers/net/ethernet/freescale/fec_main.c | 49 +++++++++++++------------------ 2 files changed, 21 insertions(+), 29 deletions(-) commit 9d9a77cee1ab53dc6419b1ab9da88c4e9342d26a Author: Philippe Reynes <tremyfr@gmail.com> Date: Tue May 10 00:19:41 2016 +0200 net: phy: add phy_ethtool_{get|set}_link_ksettings Ethtool callbacks {get|set}_link_ksettings are often the same, so we add two generics functions phy_ethtool_{get|set}_link_ksettings to avoid writing severals times the same function. Signed-off-by: Philippe Reynes <tremyfr@gmail.com> Acked-By: David Decotigny <decot@googlers.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/phy/phy.c | 24 ++++++++++++++++++++++++ include/linux/phy.h | 4 ++++ 2 files changed, 28 insertions(+) commit 29884eff1f0f7b03417eaaffa898f9d9d53b0203 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Tue May 10 14:27:44 2016 -0400 afs: switch to ->iterate_shared() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/afs/dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit e23e9aa75283ac093421ca71339ec4eb1afbe8be Author: Al Viro <viro@zeniv.linux.org.uk> Date: Tue May 10 14:24:57 2016 -0400 befs: switch to ->iterate_shared() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/befs/linuxvfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit abc189eadf6c12e60f95030e9c84083175526eaf Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Date: Tue May 10 16:11:08 2016 +0100 ASoC: da7213: Allow PLL disable/bypass when using 32KHz sysclk Current checking for PLL 32KHz mode fails in driver code when bypassing the PLL. This is due to an incorrect check of PLL source type when 32KHz clock is provided. Removal of this check resolves the issue. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/da7213.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 1e62c52ddc2d23a02ac2308cc1bb6ff18f0cf3cd Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Date: Tue May 10 16:11:07 2016 +0100 ASoC: da7213: Update PLL ranges to improve locking at frequency boundary This update changes the dividers used for ranges of input MCLK frequencies, to improve PLL locking for a corner case when at edge of MCLK frequency input divider range. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/da7213.c | 26 +++++++++++++------------- sound/soc/codecs/da7213.h | 28 ++++++++++++++-------------- 2 files changed, 27 insertions(+), 27 deletions(-) commit 7e28fd469624fc41ec326a31abbc63a7afdd10f5 Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Date: Tue May 10 16:11:06 2016 +0100 ASoC: da7213: Default PC counter to free-running when DAI disabled Currently PC counter is always synchronised to DAI which means that when the DAI is disabled, features such as ALC calibration cannot be executed successfully. This patch makes sure that when the DAI is disabled, PC counter is set to free-running. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/da7213.c | 13 +++++++++++++ sound/soc/codecs/da7213.h | 3 +++ 2 files changed, 16 insertions(+) commit d575b0b0f01a805508c5cf48b540f004e9b5de07 Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Date: Tue May 10 16:11:05 2016 +0100 ASoC: da7213: Add checking of SRM lock status before enabling DAI When the codec is DAI clk slave, and the SRM feature of the PLL is being used, the enabling of the DAI should occur only after the PLL has locked to the incoming WCLK. This update adds checking to the the DAI widget event, so it waits for SRM to lock. There is also a timeout if that lock doesn't occur within a given time. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/da7213.c | 23 +++++++++++++++++++++++ sound/soc/codecs/da7213.h | 4 ++++ 2 files changed, 27 insertions(+) commit a0d5caeaebfd00853efa0080afc850e10be7b39a Author: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Date: Tue May 10 16:11:04 2016 +0100 ASoC: da7213: Add DAI DAPM event to control DAI clocks Currently, when Codec is I2S master DAI clocks are continuously generated even if all audio streams have stopped. To improve efficiency, control of the DAI clocks for master mode have been moved to a DAPM widget event so they're only enabled as required. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/da7213.c | 35 ++++++++++++++++++++++++++++++++--- sound/soc/codecs/da7213.h | 2 -- 2 files changed, 32 insertions(+), 5 deletions(-) commit 22341d8f33084c575ce5b7ea63b07d7290b68e2d Author: Al Viro <viro@zeniv.linux.org.uk> Date: Tue May 10 14:24:06 2016 -0400 befs: constify stuff a bit Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> fs/befs/befs.h | 4 ++-- fs/befs/btree.c | 16 ++++++++-------- fs/befs/btree.h | 4 ++-- fs/befs/datastream.c | 26 ++++++++++++++------------ fs/befs/datastream.h | 11 ++++++----- fs/befs/linuxvfs.c | 4 ++-- 6 files changed, 34 insertions(+), 31 deletions(-) commit 7a27de7810aee8d839e4a70d86ab450af60f72e5 Merge: 459aa66 5bbd655 Author: David S. Miller <davem@davemloft.net> Date: Tue May 10 14:19:06 2016 -0400 Merge tag 'linux-can-next-for-4.7-20160509' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next Marc Kleine-Budde says: ==================== pull-request: can-next 2016-05-09 this is a pull request of 12 patches for net-next/master. Alexander Gerasiov and Nikita Edward Baruzdin each contribute a patch improving the sja1000 driver. Amitoj Kaur Chawla's patch converts the mcp251x driver to alloc_workqueue(). A patch by Oliver Hartkopp fixes the handling of CAN config options. Andreas Gröger improves the error handling in the janz-ican3 driver. The patch by Maximilian Schneider for the gs_usb improves probing of the USB driver. Finally there are 6 improvement patches by Marek Vasut for the ifi CAN driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 76016322ec5670052fdabb08c586d6b16bd5062f Author: Ramesh Babu <ramesh.babu@intel.com> Date: Tue May 10 22:02:06 2016 +0530 ASoC: Intel: Add Broxton-P machine driver This patch adds the Broxton-P machine driver for Intel Broxton-P reference boards. This machine uses the RT298 codec Signed-off-by: Ramesh Babu <ramesh.babu@intel.com> Signed-off-by: Senthilnathan Veppur <senthilnathanx.veppur@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/Kconfig | 15 ++ sound/soc/intel/boards/Makefile | 2 + sound/soc/intel/boards/bxt_rt298.c | 353 +++++++++++++++++++++++++++++++++++++ 3 files changed, 370 insertions(+) commit fcc494af3cfaefc9f8a51c3c7e7f208a0553b28f Author: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com> Date: Tue May 10 22:02:05 2016 +0530 ASoC: Intel: Skylake: Add more SSP DAIs The Broxton-P platform has 6 SSPs so we need to add ssp2 thru ssp5 to DAI list for the driver. Signed-off-by: Pardha Saradhi K <pardha.saradhi.kesapragada@intel.com> Signed-off-by: Ramesh Babu <ramesh.babu@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/intel/skylake/skl-pcm.c | 72 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) commit ee057d2ee73259f455cfbb7a4db808fc6b6405dd Author: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Date: Tue May 10 02:22:37 2016 +0000 ASoC: rsnd: don't use prohibited number to PDMACHCRn.SRS Current rsnd_dmapp_get_id() returns 0xFF as error code if system used strange connection. It will be used as PDMACHCRn.SRS, but 0xFF is prohibited number. In order not to use prohibited number, this patch indicates error message and returns 0x00 (same as SSI00) in error case. Special thanks to Dung-san. Reported-by: Nguyen Viet Dung <nv-dung@jinso.co.jp> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/sh/rcar/dma.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) commit ca0d8797397c5daa6260a6c67b845d79f65140f5 Author: John Keeping <john@metanate.com> Date: Mon May 9 12:24:37 2016 +0100 ASoC: es8328: Set symmetric rates Although the ES8328 does support different rates for capture and playback, only very limited combinations are supported (8kHz and 48kHz or 8.0182kHz and 44.1kHz) with most rates required to be symmetric. Instead of adding a lot of complexity for little gain, let's enforce symmetric rates. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/es8328.c | 1 + 1 file changed, 1 insertion(+) commit 45749c918129e409c44777f051dc0a5afb689459 Author: John Keeping <john@metanate.com> Date: Mon May 9 12:24:36 2016 +0100 ASoC: es8328: Support more sample rates Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/es8328.c | 135 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 100 insertions(+), 35 deletions(-) commit 779e86a31402c3f33f20bb02e99a5b75595bdf7f Author: John Keeping <john@metanate.com> Date: Mon May 9 12:24:35 2016 +0100 ASoC: es8328: Support more sample formats The values are the same for the DAC and ADC so remove the specific values and use values with shifts. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/es8328.c | 35 +++++++++++++++++++++++++++++------ sound/soc/codecs/es8328.h | 12 ++---------- 2 files changed, 31 insertions(+), 16 deletions(-) commit 8865c95e43257e6676bc0f6b042ecce17eff74fe Author: John Keeping <john@metanate.com> Date: Mon May 9 12:24:34 2016 +0100 ASoC: es8328: Move sample size setup to hw_params This is a refactor in preparation for supporting more sample sizes which has no functional change. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/es8328.c | 19 ++++++++++++++----- sound/soc/codecs/es8328.h | 4 ++++ 2 files changed, 18 insertions(+), 5 deletions(-) commit f2ed04a4317e5c8074d98a5c1da175596811a2d8 Author: John Keeping <john@metanate.com> Date: Mon May 9 12:24:32 2016 +0100 ASoC: es8328: Use single R/W for regmap The chip only supports single reads and writes. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/es8328.c | 1 + 1 file changed, 1 insertion(+) commit 2da1ab667a506cc6a7dea88b70e6df3d281458f8 Author: John Keeping <john@metanate.com> Date: Mon May 9 12:24:31 2016 +0100 ASoC: es8328: Fix mask for VMIDSEL This is always used along with ES8328_CONTROL1_ENREF so there is no change in the generated code as a result of this fix. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/es8328.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 57e41f3fb32a359753a3b2679c2502b2750bf6af Author: John Keeping <john@metanate.com> Date: Mon May 9 12:24:30 2016 +0100 ASoC: es8328: Fix ADC format setup The ADCCONTROL4 and DACCONTROL1 registers are similar but not identical, with the DACCONTROL1 having each field starting one bit higher than ADCCONTROL4. Instead of introducing a magic shift, add new constants for the values in ADCCONTROL4 and use a second variable to setup the ADC. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/es8328.c | 16 ++++++++++------ sound/soc/codecs/es8328.h | 15 +++++++++++++++ 2 files changed, 25 insertions(+), 6 deletions(-) commit 420c470d6b5c2924a3182edf5b002870ff770331 Author: John Keeping <john@metanate.com> Date: Mon May 9 12:24:29 2016 +0100 ASoC: es8328: Move clock setup to hw_params This ensures that the clock is setup after its frequency has been set; the existing code in set_dai_fmt may be called before the clock rate has been set resulting in an incorrect configuration. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org> sound/soc/codecs/es8328.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) commit 251a9605ab882998009002bf1f5176a049beba53 Author: Shengzhen Li <szli@marvell.com> Date: Tue Apr 26 07:25:45 2016 -0700 mwifiex: change sleep cookie poll count Sometimes current polling count is not sufficient. This patch increases it to 100. Signed-off-by: Shengzhen Li <szli@marvell.com> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> drivers/net/wireless/marvell/mwifiex/pcie.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit adc64ecf8dd941e24456de9b4a02a4152ff7df15 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:17 2016 +0300 ata: sata_dwc_460ex: add __iomem to register base pointer The pointer to the mmio register base is missing the __iomem annotation. Fix this. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 175553ed18491bf654a64f4e1c3f8d4137ae1a56 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:16 2016 +0300 ata: sata_dwc_460ex: get rid of incorrect cast The (void *__iomem) cast is wrong. Change the target type of the "base" pointer to void __iomem instead and drop the cast. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae95d951f7cd116f663b7326422c4c759ea25b25 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:15 2016 +0300 ata: sata_dwc_460ex: get rid of some pointless casts Casting a pointer to unsigned long only to immediately cast it back to a pointer makes no sense. Fix this. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) commit cd12ff0b5a8becd143df1f0a9dc97a4222e2cf6f Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:14 2016 +0300 ata: sata_dwc_460ex: remove empty libata callback The sata_dwc_qc_prep() does nothing. Use the default ata_noop_qc_prep instead. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 22 ---------------------- 1 file changed, 22 deletions(-) commit 4bb41be5eaa2788f5a5fa2047886ffeae7b0e21f Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:13 2016 +0300 ata: sata_dwc_460ex: correct HOSTDEV{P}_FROM_*() macros Here we refactor HOSTDEV{P}_FROM_*() macros to fit one line and fix the definition of HSDEV_FROM_HSDEVP() where wrong name of the parameter waas used. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) commit 2d20da00c324b9a4dd1c4ab9429a6376e7f4b735 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:12 2016 +0300 ata: sata_dwc_460ex: get rid of global data This moves all global data into the driver private struct, thus permitting multiple devices of this type to be used. The core_scr_read/write() functions are replaced with equivalent calls to the existing sata_dwc_scr_read/write(). Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 79 ++++++++++++++++---------------------------- 1 file changed, 29 insertions(+), 50 deletions(-) commit 0f48debdb90601ec37cdcb81f796ca120aae60f4 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:11 2016 +0300 ata: sata_dwc_460ex: add phy support This adds support for powering on an optional PHY when activating the device. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/Kconfig | 1 + drivers/ata/sata_dwc_460ex.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) commit 50b433753df69262ed1c098328f692e882a31001 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:10 2016 +0300 ata: sata_dwc_460ex: use "dmas" DT property to find dma channel Currently this driver only works with a DesignWare DMA engine which it registers manually using the second "reg" address range and interrupt number from the DT node. This patch makes the driver instead use the "dmas" property if present, otherwise optionally falling back on the old way so existing device trees can continue to work. With this change, there is no longer any reason to depend on the 460EX machine type so drop that from Kconfig. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/Kconfig | 11 ++- drivers/ata/sata_dwc_460ex.c | 198 ++++++++++++++++++++++++++++--------------- 2 files changed, 138 insertions(+), 71 deletions(-) commit 077028ecc99dc66acb3c89e33cc15c69d2edf8cb Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:09 2016 +0300 ata: sata_dwc_460ex: don't call ata_sff_qc_issue() on DMA commands ata_sff_qc_issue() can't handle DMA commands and thus we have to avoid it for them. Do call ata_bmdma_qc_issue() instead for this case. Note that the former one distinguishes PIO and DMA mode and behaves accordingly. Suggested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit ae4c3485fa861af51336e066e1ba42b92af03627 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:08 2016 +0300 ata: sata_dwc_460ex: skip dma setup for non-dma commands Calling dmaengine_prep_slave_sg() for non-dma ATA commands is unnecessary at best and could be harmful if the dma driver reacts badly to this. It also causes this driver to print a bogus error message in these cases. This patch changes sata_dwc_qc_issue() to only do the dma setup for dma commands and also reports an error to libata if if fails. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) commit e1c1bee34f077baf88f78b24d08c0ba1ba506abd Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:07 2016 +0300 ata: sata_dwc_460ex: select only core part of DMA driver There is no need to have a platform driver compiled since the DMA driver is used as a library. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 59a75cef9de055e79779600f983c45580b902e6d Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:06 2016 +0300 ata: sata_dwc_460ex: DMA is always a flow controller In the original code the DMA is always a flow controller. Set this accordingly in updated code. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 4ea8c205e5fd1f7cac8f634347f842e12d8af9b4 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:05 2016 +0300 ata: sata_dwc_460ex: burst size must be in items not bytes The burst size as defined by DMAengine API is in items of address width. Derive burst size from AHB_DMA_BRST_DFLT (64 bytes) by dividing it to DMA_SLAVE_BUSWIDTH_4_BYTES (4 bytes) that gives us 16 items. Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 6689dfac00ef3118f88d5b06e1f1d13899b79997 Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Date: Tue Apr 26 12:03:04 2016 +0300 ata: sata_dwc_460ex: set dma_boundary to 0x1fff The original code states: Make sure a LLI block is not created that will span 8K max FIS boundary. If the block spans such a FIS boundary, there is a chance that a DMA burst will cross that boundary -- this results in an error in the host controller. Since we have switched to generic DMAengine API we satisfy above by setting dma_boundary value to 0x1fff. Suggested-by: Mans Rullgard <mans@mansr.com> Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) commit a7e6de544c5c238a06935c96d27151432c94d2e6 Author: Christian Lamparter <chunkeey@googlemail.com> Date: Tue Apr 26 12:03:03 2016 +0300 ata: sata_dwc_460ex: fix crash on offline links without an attached drive This patch fixes Machine Check "Data Write PLB Error" which happens when libata-sff's ata_sff_dev_select is trying to write into the device_addr in order to select a drive. However, SATA has no master or slave devices like the old ATA Bus, therefore selecting a different drive is kind of pointless. Data Write PLB Error Oops: Machine check, sig: 7 [#1] PowerPC 44x Platform Modules linked in: CPU: 0 PID: 508 Comm: scsi_eh_0 Not tainted 4.6.0-rc3-next-20160412+ #10 [...] NIP [c027e820] ata_sff_dev_select+0x3c/0x44 LR [c027e810] ata_sff_dev_select+0x2c/0x44 Call Trace: [cec31cd0] [c027da00] ata_sff_postreset+0x40/0xb4 (unreliable) [cec31ce0] [c027a03c] ata_eh_reset+0x5cc/0x928 [cec31d60] [c027a840] ata_eh_recover+0x330/0x10bc [cec31df0] [c027bae0] ata_do_eh+0x4c/0xa4 [...] Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 7 +++++++ 1 file changed, 7 insertions(+) commit 55e610cdd28c0ad3dce0652030c0296d549673f3 Author: Mans Rullgard <mans@mansr.com> Date: Tue Apr 26 12:03:02 2016 +0300 ata: sata_dwc_460ex: remove incorrect locking This lock is already taken in ata_scsi_queuecmd() a few levels up the call stack so attempting to take it here is an error. Moreover, it is pointless in the first place since it only protects a single, atomic assignment. Enabling lock debugging gives the following output: ============================================= [ INFO: possible recursive locking detected ] 4.4.0-rc5+ #189 Not tainted --------------------------------------------- kworker/u2:3/37 is trying to acquire lock: (&(&host->lock)->rlock){-.-...}, at: [<90283294>] sata_dwc_exec_command_by_tag.constprop.14+0x44/0x8c but task is already holding lock: (&(&host->lock)->rlock){-.-...}, at: [<902761ac>] ata_scsi_queuecmd+0x2c/0x330 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&host->lock)->rlock); lock(&(&host->lock)->rlock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by kworker/u2:3/37: #0: ("events_unbound"){.+.+.+}, at: [<9003a0a4>] process_one_work+0x12c/0x430 #1: ((&entry->work)){+.+.+.}, at: [<9003a0a4>] process_one_work+0x12c/0x430 #2: (&bdev->bd_mutex){+.+.+.}, at: [<9011fd54>] __blkdev_get+0x50/0x380 #3: (&(&host->lock)->rlock){-.-...}, at: [<902761ac>] ata_scsi_queuecmd+0x2c/0x330 stack backtrace: CPU: 0 PID: 37 Comm: kworker/u2:3 Not tainted 4.4.0-rc5+ #189 Workqueue: events_unbound async_run_entry_fn Stack : 90b38e30 00000021 00000003 9b2a6040 00000000 9005f3f0 904fc8dc 00000025 906b96e4 00000000 90528648 9b3336c4 904fc8dc 9009bf18 00000002 00000004 00000000 00000000 9b3336c4 9b3336e4 904fc8dc 9003d074 00000000 90500000 9005e738 00000000 00000000 00000000 00000000 00000000 00000000 00000000 6e657665 755f7374 756f626e 0000646e 00000000 00000000 9b00ca00 9b025000 ... Call Trace: [<90009d6c>] show_stack+0x88/0xa4 [<90057744>] __lock_acquire+0x1ce8/0x2154 [<900583e4>] lock_acquire+0x64/0x8c [<9045ff10>] _raw_spin_lock_irqsave+0x54/0x78 [<90283294>] sata_dwc_exec_command_by_tag.constprop.14+0x44/0x8c [<90283484>] sata_dwc_qc_issue+0x1a8/0x24c [<9026b39c>] ata_qc_issue+0x1f0/0x410 [<90273c6c>] ata_scsi_translate+0xb4/0x200 [<90276234>] ata_scsi_queuecmd+0xb4/0x330 [<9025800c>] scsi_dispatch_cmd+0xd0/0x128 [<90259934>] scsi_request_fn+0x58c/0x638 [<901a3e50>] __blk_run_queue+0x40/0x5c [<901a83d4>] blk_queue_bio+0x27c/0x28c [<901a5914>] generic_make_request+0xf0/0x188 [<901a5a54>] submit_bio+0xa8/0x194 [<9011adcc>] submit_bh_wbc.isra.23+0x15c/0x17c [<9011c908>] block_read_full_page+0x3e4/0x428 [<9009e2e0>] do_read_cache_page+0xac/0x210 [<9009fd90>] read_cache_page+0x18/0x24 [<901bbd18>] read_dev_sector+0x38/0xb0 [<901bd174>] msdos_partition+0xb4/0x5c0 [<901bcb8c>] check_partition+0x140/0x274 [<901bba60>] rescan_partitions+0xa0/0x2b0 [<9011ff68>] __blkdev_get+0x264/0x380 [<901201ac>] blkdev_get+0x128/0x36c [<901b9378>] add_disk+0x3c0/0x4bc [<90268268>] sd_probe_async+0x100/0x224 [<90043a44>] async_run_entry_fn+0x50/0x124 [<9003a11c>] process_one_work+0x1a4/0x430 [<9003a4f4>] worker_thread+0x14c/0x4fc [<900408f4>] kthread+0xd0/0xe8 [<90004338>] ret_from_kernel_thread+0x14/0x1c Fixes: 62936009f35a ("[libata] Add 460EX on-chip SATA driver, sata_dwc_460ex") Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Tejun Heo <tj@kernel.org> drivers/ata/sata_dwc_460ex.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit 459aa660eb1d8ce67080da1983bb81d716aa5a69 Author: Pablo Neira <pablo@netfilter.org> Date: Mon May 9 00:55:48 2016 +0200 gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U) This is an initial implementation of a netdev driver for GTP datapath (GTP-U) v0 and v1, according to the GSM TS 09.60 and 3GPP TS 29.060 standards. This tunneling protocol is used to prevent subscribers from accessing mobile carrier core network infrastructure. This implementation requires a GGSN userspace daemon that implements the signaling protocol (GTP-C), such as OpenGGSN [1]. This userspace daemon updates the PDP context database that represents active subscriber sessions through a genetlink interface. For more context on this tunneling protocol, you can check the slides that were presented during the NetDev 1.1 [2]. Only IPv4 is supported at this time. [1] http://git.osmocom.org/openggsn/ [2] http://www.netdevconf.org/1.1/proceedings/slides/schultz-welte-osmocom-gtp.pdf Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/Kconfig | 17 + drivers/net/Makefile | 1 + drivers/net/gtp.c | 1364 ++++++++++++++++++++++++++++++++++++++++++ include/net/gtp.h | 34 ++ include/uapi/linux/Kbuild | 1 + include/uapi/linux/gtp.h | 33 + include/uapi/linux/if_link.h | 10 + include/uapi/linux/udp.h | 3 +- 8 files changed, 1462 insertions(+), 1 deletion(-) commit da4a95d23beea1c3d1d131480f681b0b276e207e Merge: 6d5853f e5d8b0a Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 17:46:15 2016 +0200 Merge tag 'mvebu-defconfig64-4.7-1' of git://git.infradead.org/linux-mvebu into next/arm64 Merge "mvebu defconfig for arm64 for 4.7" from Gregory CLEMENT: - update arm64 defconfig with options useful for Armada 7K/8K support * tag 'mvebu-defconfig64-4.7-1' of git://git.infradead.org/linux-mvebu: arm64: configs: add options useful for Armada 7K/8K support commit 962475ac2f9662fe69a9f86220ab31bbbf3911d2 Author: Azriel Samson <asamson@codeaurora.org> Date: Thu Mar 31 11:31:18 2016 -0600 builddeb: fix missing headers in linux-headers package The kernel headers package (linux-headers) doesn't include header files from other architectures required to build out-of-tree modules. For e.g. on ARM64, opcodes.h includes the same file from ARM which causes the following error: ./arch/arm64/include/asm/opcodes.h:1:43: fatal error: ../../arm/include/asm/opcodes.h: No such file or directory compilation terminated. Signed-off-by: Azriel Samson <asamson@codeaurora.org> Signed-off-by: Michal Marek <mmarek@suse.com> scripts/package/builddeb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 697bbc7b832048d3a679cd55caf2268a325efbe0 Author: Bjørn Mork <bjorn@mork.no> Date: Wed May 4 15:35:39 2016 +0200 builddeb: include objtool binary in headers package "objtool" is required for building external m dules if "Compile-time stack metadata validation" is enabled. Otherwise all builds based on the headers package fail with: make[1]: Entering directory '/usr/src/linux-headers-4.6.0-rc6' make[2]: *** No rule to make target 'tools/objtool/objtool', needed by 'foo.o'. Stop. Makefile:1598: recipe for target 'foo.ko' failed make[1]: *** [foo.ko] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.6.0-rc6' Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: Michal Marek <mmarek@suse.com> scripts/package/builddeb | 3 +++ 1 file changed, 3 insertions(+) commit e5ed17929bf4177c523465af187ab70c9a454caa Author: Mordechai Goodstein <mordechay.goodstein@intel.com> Date: Tue Mar 29 14:41:49 2016 +0300 iwlwifi: Edit the 8265 SDIO ID Add new 8265 series SDIO ID. Signed-off-by: Mordechai Goodstein <mordechay.goodstein@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/iwl-8000.c | 14 ++++++++++++++ drivers/net/wireless/intel/iwlwifi/iwl-config.h | 1 + 2 files changed, 15 insertions(+) commit 4c965139a3cdd7211b74ce27eccf9bb7485cd58a Author: Liad Kaufman <liad.kaufman@intel.com> Date: Sun Aug 9 19:26:56 2015 +0300 iwlwifi: mvm: support p2p device frames tx on dqa queue #2 Support sending P2P device frames should be sent from queue #2, as required in DQA mode. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 2 ++ drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 16 ++++++++++------ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 7 +++++++ drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 12 ++++++++---- 4 files changed, 27 insertions(+), 10 deletions(-) commit de24f638025a0bfef2ea81396382358df2c7c875 Author: Liad Kaufman <liad.kaufman@intel.com> Date: Tue Aug 4 15:19:18 2015 +0300 iwlwifi: mvm: allocate queue for probe response in dqa mode In DQA mode, allocate a dedicated queue (#9) for P2P GO/soft AP probe responses. Signed-off-by: Liad Kaufman <liad.kaufman@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> drivers/net/wireless/intel/iwlwifi/mvm/fw-api.h | 3 ++ drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 6 ++++ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 44 ++++++++++++++++++----- drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 26 +++++++++++--- 4 files changed, 66 insertions(+), 13 deletions(-) commit 032a3187194e050383d7c2df804b194b6fecc6f3 Author: Dirk Gouders <dirk@gouders.net> Date: Fri Apr 29 12:43:38 2016 +0200 kconfig-language: elaborate on the type of a choice The type of a choice can be specified explicitely or it will be set according to members of the choice group, see menu.c:menu_finalize(). Signed-off-by: Dirk Gouders <dirk@gouders.net> Signed-off-by: Michal Marek <mmarek@suse.com> Documentation/kbuild/kconfig-language.txt | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) commit 3e2ba95f43360f22b882965d153e9cf3087de986 Author: Dirk Gouders <dirk@gouders.net> Date: Fri Apr 29 11:02:08 2016 +0200 kconfig-language: fix comment on dependency-generated menu structures. In the given example, the comment becomes visible when it's dependency is set to 'n', but the text asserts the opposite. Signed-off-by: Dirk Gouders <dirk@gouders.net> Signed-off-by: Michal Marek <mmarek@suse.com> Documentation/kbuild/kconfig-language.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) commit a7c65b9729e4a5e9c0809784bc52466b0dbaafa7 Author: Nicolas Pitre <nicolas.pitre@linaro.org> Date: Thu Apr 28 17:33:38 2016 -0400 kbuild: fix adjust_autoksyms.sh for modules that need only one symbol When only one symbol was listed and therefore the line didn't contain any space to separate multiple symbols, that symbol got ignored. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Michal Marek <mmarek@suse.com> scripts/adjust_autoksyms.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f110e0fec89935879a76aebe1726dce3fcb6ab13 Author: Nicolas Pitre <nicolas.pitre@linaro.org> Date: Thu Apr 28 17:29:42 2016 -0400 kbuild: fix ksym_dep_filter when multiple EXPORT_SYMBOL() on the same line In kernel/cgroup.c there is: #define SUBSYS(_x) \ DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_enabled_key); \ DEFINE_STATIC_KEY_TRUE(_x ## _cgrp_subsys_on_dfl_key); \ EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_enabled_key); \ EXPORT_SYMBOL_GPL(_x ## _cgrp_subsys_on_dfl_key); The expansion of this macro causes multiple EXPORT_SYMBOL_GPL() instances to appear on the same preprocessor line output, confusing the sed script expecting only one of them per line. Unfortunately this can't be fixed nicely in the sed script as sed's regexp can't do non greedy matching. Fix this by turning any semicolon into a line break before filtering. Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Michal Marek <mmarek@suse.com> scripts/Kbuild.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit a4663911392efdc504ce97b192d46f2677a6fe35 Author: Paul Bolle <pebolle@tiscali.nl> Date: Wed Mar 16 21:27:27 2016 +0100 kconfig: add unexpected data itself to warning If the .config parser runs into unexpected data it emits warnings like: .config:6911:warning: unexpected data Add the unexpected data itself to this warning. That makes it easier to discover what is actually going wrong: .config:6911:warning: unexpected data: CONFOG_CHARGER_TPS65217=m Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Michal Marek <mmarek@suse.com> scripts/kconfig/confdata.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit e72e2dfe7c16ffbfbabf9cb24adc6d9f93a4fe37 Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Apr 25 17:35:31 2016 +0200 gcov: disable -Wmaybe-uninitialized warning When gcov profiling is enabled, we see a lot of spurious warnings about possibly uninitialized variables being used: arch/arm/mm/dma-mapping.c: In function 'arm_coherent_iommu_map_page': arch/arm/mm/dma-mapping.c:1085:16: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/clk/st/clk-flexgen.c: In function 'st_of_flexgen_setup': drivers/clk/st/clk-flexgen.c:323:9: warning: 'num_parents' may be used uninitialized in this function [-Wmaybe-uninitialized] kernel/cgroup.c: In function 'cgroup_mount': kernel/cgroup.c:2119:11: warning: 'root' may be used uninitialized in this function [-Wmaybe-uninitialized] All of these are false positives, so it seems better to just disable the warnings whenever GCOV is enabled. Most users don't enable GCOV, and based on a prior patch, it is now also disabled for 'allmodconfig' builds, so there should be no downsides of doing this. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Michal Marek <mmarek@suse.com> Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit c87bf431448b404a6ef5fbabd74c0e3e42157a7f Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Apr 25 17:35:30 2016 +0200 gcov: disable tree-loop-im to reduce stack usage Enabling CONFIG_GCOV_PROFILE_ALL produces us a lot of warnings like lib/lz4/lz4hc_compress.c: In function 'lz4_compresshcctx': lib/lz4/lz4hc_compress.c:514:1: warning: the frame size of 1504 bytes is larger than 1024 bytes [-Wframe-larger-than=] After some investigation, I found that this behavior started with gcc-4.9, and opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69702. A suggested workaround for it is to use the -fno-tree-loop-im flag that turns off one of the optimization stages in gcc, so the code runs a little slower but does not use excessive amounts of stack. We could make this conditional on the gcc version, but I could not find an easy way to do this in Kbuild and the benefit would be fairly small, given that most of the gcc version in production are affected now. I'm marking this for 'stable' backports because it addresses a bug with code generation in gcc that exists in all kernel versions with the affected gcc releases. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Cc: stable@vger.kernel.org Signed-off-by: Michal Marek <mmarek@suse.com> Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit cc622420798c4bcf093785d872525087a7798db9 Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Apr 25 17:35:29 2016 +0200 gcov: disable for COMPILE_TEST Enabling gcov is counterproductive to compile testing: it significantly increases the kernel image size, compile time, and it produces lots of false positive "may be used uninitialized" warnings as the result of missed optimizations. This is in line with how UBSAN_SANITIZE_ALL and PROFILE_ALL_BRANCHES work, both of which have similar problems. With an ARM allmodconfig kernel, I see the build time drop from 283 minutes CPU time to 225 minutes, and the vmlinux size drops from 43MB to 26MB. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com> Signed-off-by: Michal Marek <mmarek@suse.com> kernel/gcov/Kconfig | 1 + 1 file changed, 1 insertion(+) commit 815eb71e7149ecce40db9dd0ad09c4dd9d33c60f Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Apr 25 17:35:28 2016 +0200 Kbuild: disable 'maybe-uninitialized' warning for CONFIG_PROFILE_ALL_BRANCHES CONFIG_PROFILE_ALL_BRANCHES confuses gcc-5.x to the degree that it prints incorrect warnings about a lot of variables that it thinks can be used uninitialized, e.g.: i2c/busses/i2c-diolan-u2c.c: In function 'diolan_usb_xfer': i2c/busses/i2c-diolan-u2c.c:391:16: warning: 'byte' may be used uninitialized in this function iio/gyro/itg3200_core.c: In function 'itg3200_probe': iio/gyro/itg3200_core.c:213:6: warning: 'val' may be used uninitialized in this function leds/leds-lp55xx-common.c: In function 'lp55xx_update_bits': leds/leds-lp55xx-common.c:350:6: warning: 'tmp' may be used uninitialized in this function misc/bmp085.c: In function 'show_pressure': misc/bmp085.c:363:10: warning: 'pressure' may be used uninitialized in this function power/ds2782_battery.c: In function 'ds2786_get_capacity': power/ds2782_battery.c:214:17: warning: 'raw' may be used uninitialized in this function These are all false positives that either rob someone's time when trying to figure out whether they are real, or they get people to send wrong patches to shut up the warnings. Nobody normally wants to run a CONFIG_PROFILE_ALL_BRANCHES kernel in production, so disabling the whole class of warnings for this configuration has no serious downsides either. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Steven Rostedt <rostedtgoodmis.org> Signed-off-by: Michal Marek <mmarek@suse.com> Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) commit 877417e6ffb9578e8580abf76a71e15732473456 Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Apr 25 17:35:27 2016 +0200 Kbuild: change CC_OPTIMIZE_FOR_SIZE definition CC_OPTIMIZE_FOR_SIZE disables the often useful -Wmaybe-unused warning, because that causes a ridiculous amount of false positives when combined with -Os. This means a lot of warnings don't show up in testing by the developers that should see them with an 'allmodconfig' kernel that has CC_OPTIMIZE_FOR_SIZE enabled, but only later in randconfig builds that don't. This changes the Kconfig logic around CC_OPTIMIZE_FOR_SIZE to make it a 'choice' statement defaulting to CC_OPTIMIZE_FOR_PERFORMANCE that gets added for this purpose. The allmodconfig and allyesconfig kernels now default to -O2 with the maybe-unused warning enabled. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michal Marek <mmarek@suse.com> init/Kconfig | 13 +++++++++++++ 1 file changed, 13 insertions(+) commit 8d879be882ba5a8bd4c2bc39bd2c336392564e13 Author: Takashi Iwai <tiwai@suse.de> Date: Tue May 10 16:07:40 2016 +0200 ALSA: pcm: Bail out when chmap is already present When snd_pcm_add_chmap_ctls() is called to the PCM stream to which a chmap has been already assigned, it returns as an error due to the conflicting snd_ctl_add() result. However, this also clears the already assigned chmap_kctl field via pcm_chmap_ctl_private_free(), and becomes inconsistent in the later operation. This patch adds the check of the conflicting chmap kctl before actually trying to allocate / assign. The check failure is treated as a kernel warning, as the double call of snd_pcm_add_chmap_ctls() is basically a driver bug and having the stack trace would help developers to figure out the bad code path. Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/core/pcm_lib.c | 2 ++ 1 file changed, 2 insertions(+) commit 62f00e40b0718ebd8bd54fc7a9e89e873524d495 Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Mon May 9 23:15:56 2016 +0900 ALSA: firewire-lib: enable the same feature as CIP_SKIP_INIT_DBC_CHECK flag In former commit, drivers in ALSA firewire stack always starts IT context before IR context. If IR context starts after packets are transmitted by peer unit, packet discontinuity may be detected because the context starts in the middle of packet streaming. This situation is rare because IT context usually starts immediately. However, it's better to solve this issue. This is suppressed with CIP_SKIP_INIT_DBC_CHECK flag. This commit enables the same feature as CIP_SKIP_INIT_DBC_CHECK. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/amdtp-stream.c | 3 +-- sound/firewire/amdtp-stream.h | 7 ++----- sound/firewire/bebob/bebob_stream.c | 2 -- sound/firewire/digi00x/amdtp-dot.c | 2 +- sound/firewire/oxfw/oxfw-stream.c | 3 +-- 5 files changed, 5 insertions(+), 12 deletions(-) commit 390a1512e6ccda2ec32ea1395814f36cf4d30e48 Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Mon May 9 23:15:55 2016 +0900 ALSA: firewire-lib: code cleanup for outgoing packet handling In previous commit, this module has no need to reuse parameters of incoming packets for outgoing packets anymore. This commit arranges some needless codes for outgoing packet processing. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/amdtp-stream.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) commit d9a16fc926a950c9e481cb7e89c554593b8e29e2 Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Mon May 9 23:15:54 2016 +0900 ALSA: firewire-lib: code cleanup for incoming packet handling In previous commit, this module has no need to reuse parameters of incoming packets for outgoing packets anymore. This commit arranges some needless codes for incoming packet processing. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/amdtp-stream.c | 44 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 23 deletions(-) commit dec63cc8b65b04c0ebb5d82b6b399665d6d44dca Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Mon May 9 23:15:53 2016 +0900 ALSA: firewire-lib: handle IT/IR contexts in each software interrupt context In clause 6.3 of IEC 61883-6:2000, there's an explanation about processing of presentation timestamp. In the clause, we can see "If a function block receives a CIP, processes it and subsequently re-transmits it, then the SYT of the outgoing CIP shall be the sum of the incoming SYT and the processing delay." ALSA firewire stack has an implementation to partly satisfy this specification. Developers assumed the stack to perform as an Audio function block[1]. Following to the assumption, current implementation of ALSA firewire stack use one software interrupt context to handle both of in/out packets. In most case, this is processed in 1394 OHCI IR context independently of the opposite context. Thus, this implementation uses longer CPU time in the software interrupt context. This is not better for whole system. Against the assumption, I confirmed that each ASIC for IEC 61883-1/6 doesn't necessarily expect it to the stack. Thus, current implementation of ALSA firewire stack includes over-engineering. This commit purges the implementation. As a result, packets of one direction are handled in one software interrupt context and spends minimum CPU time. [1] [alsa-devel] [PATCH 0/8] [RFC] new driver for Echo Audio's Fireworks based devices http://mailman.alsa-project.org/pipermail/alsa-devel/2013-June/062660.html Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/amdtp-stream.c | 40 ++++------------------------------------ sound/firewire/amdtp-stream.h | 35 +++++++---------------------------- 2 files changed, 11 insertions(+), 64 deletions(-) commit 28e64f5176387bf5b9458d213650b90fa719be88 Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Mon May 9 23:15:52 2016 +0900 ALSA: firewire-tascam: drop reuse of incoming packet parameter for outgoing packet parameter In packet streaming protocol applied to TASCAM FireWire series, the value of SYT field in CIP header is always zero, therefore it has no meaning. There's no need to synchronize packets in both direction for the series. In current implementation of ALSA firewire stack, driver for the series uses incoming packet parameter for outgoing packet parameter to calculate the number of data blocks. This can be simplified because the task of corresponding driver is to transfer data blocks enough to sampling transfer frequency. This commit purges support of full duplex synchronization to prevent over-engineering implementation. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/tascam/tascam-stream.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) commit eb4a378fc99d876e98e01d67701c49343fae3e39 Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Mon May 9 23:15:51 2016 +0900 ALSA: fireworks: drop reuse of incoming packet parameter for ougoing packet parameter On Fireworks board module of Echo Audio, TSB43Cx43A (IceLynx Micro, iCEM) is used to process payload of isochronous packets. There's an public document of this chip[1]. This document is for firmware programmers to transfer/receive AMDTP with IEC60958 data format, however in clause 2.5, 2.6 and 2.7, we can see system design to utilize the sequence of value in SYT field of CIP header. In clause 2.3, we can see the specification of Audio Master Clock (MCLK) from iCEM. Well, this clock is actually not used for sampling clock. This can be confirmed when corresponding driver transfer random value as the sequence of SYT field. Even if in this case, the unit generates proper sound. Additionally, in unique command set for this board module, the format of CIP is changed; for IEC 61883-6 mode which we use, and for Windows Operating System. In the latter mode, the whole 32 bit field in second CIP header from Windows driver is used to represent counter of packets (NO-DATA code is still used for packets without data blocks). If the master clock was physically used by DSP on the board module, the Windows driver must have transferred correct sequence of SYT field. Furthermore, as long as seeing capacities of AudioFire2, AudioFire4, AudioFire8, AudioFirePre8 and AudioFire12, these models don't support SYT-Match clock source. Summary, we have no need to relate incoming/outgoing packets. This commit drops reusing SYT sequence of incoming packets for outgoing packets. [1] Using TSB43Cx43A: S/PDIF over 1394 (2003, Texus Instruments Incorporated) http://www.ti.com/analog/docs/litabsmultiplefilelist.tsp?literatureNumber=slla148&docCategoryId=1&familyId=361 Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/fireworks/fireworks.h | 1 - sound/firewire/fireworks/fireworks_stream.c | 84 ++++++----------------------- 2 files changed, 17 insertions(+), 68 deletions(-) commit c71283cb682c28085125bea35e4c6149b538f5db Author: Takashi Sakamoto <o-takashi@sakamocchi.jp> Date: Mon May 9 23:15:50 2016 +0900 ALSA: bebob: drop reuse of incoming packet parameter for outgoing packet parameter Windows driver for BeBoB-based models mostly wait for transmitted packets, then transfer packets to the models. This looks for the relationship between incoming packets and outgoing packets to synchronize the sequence of presentation timestamp. However, the sequence between packets of both direction has no relationship. Even if receiving NO-DATA packets, the drivers transfer packets with meaningful value in SYT field. Additionally, the order of starting packets is always the same, independently of the source of clock. The corresponding driver is expected as a generator of presentation timestamp and these models can select it as a source of sampling clock. This commit drops reusing SYT sequence from ALSA bebob driver. The driver always transfer packets with presentation timestamp generated by ALSA firewire stack, without re-using the sequence of value in SYT field in incoming packets to outgoing packets. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> sound/firewire/bebob/bebob.h | 1 - sound/firewire/bebob/bebob_stream.c | 99 ++++++++++--------------------------- 2 files changed, 26 insertions(+), 74 deletions(-) commit 452e84012595d681f254a3a0d733fb0b18ffaf42 Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Tue May 10 14:48:01 2016 +0900 perf tools: Remove xrealloc and ALLOC_GROW Remove unused xrealloc() and ALLOC_GROW() from libperf. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160510054801.6158.6204.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/Build | 1 - tools/perf/util/cache.h | 19 ------------------- tools/perf/util/util.h | 6 ------ tools/perf/util/wrapper.c | 29 ----------------------------- 4 files changed, 55 deletions(-) commit 682f4f035e0fcffce511fe77a02a0f19f0996d70 Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Tue May 10 14:47:53 2016 +0900 perf help: Do not use ALLOC_GROW in add_cmd_list Replace ALLOC_GROW with normal realloc code in add_cmd_list() so that it can handle errors directly. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160510054752.6158.30562.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/help-unknown-cmd.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) commit 11db4e29bb50442ecef2173f325b7be4e7790025 Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Tue May 10 14:47:44 2016 +0900 perf pmu: Make pmu_formats_string to check return value of strbuf Make pmu_formats_string() to check return value of strbuf APIs so that it can detect errors in it. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160510054744.6158.37810.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/pmu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) commit 642aadaa320bf9466fd12e3c0903977410bcb731 Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Tue May 10 14:47:35 2016 +0900 perf header: Make topology checkers to check return value of strbuf Make topology checkers to check the return value of strbuf APIs so that it can detect errors in it. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160510054735.6158.98650.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/header.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) commit 70a6898fdc11272249622f77b034f47f1e9adb35 Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Tue May 10 14:47:26 2016 +0900 perf tools: Make alias handler to check return value of strbuf Make alias handler and sq_quote_argv to check the return value of strbuf APIs. In sq_quote_argv() calls die(), but this fix handles strbuf failure as a special case and returns to caller, since the caller - handle_alias() also has to check the return value of other strbuf APIs and those checks can be merged to one if() statement. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160510054725.6158.84597.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/perf.c | 8 +++++--- tools/perf/util/quote.c | 36 ++++++++++++++++++++---------------- tools/perf/util/quote.h | 2 +- 3 files changed, 26 insertions(+), 20 deletions(-) commit b72ca4039099e953f1ea2dbd58c201b14feb6605 Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Tue May 10 14:47:17 2016 +0900 perf help: Make check_emacsclient_version to check strbuf APIs Make check_emacsclient_version() to check the return value of strbuf APIs so that it can handle errors in strbuf. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160510054716.6158.11755.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/builtin-help.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) commit 51193b76bfff5027cf96ba63effae808ad67cca7 Author: Robert Jarzmik <robert.jarzmik@free.fr> Date: Sat Apr 2 21:38:53 2016 +0200 kbuild: forbid kernel directory to contain spaces and colons When the kernel path contains a space or a colon somewhere in the path name, the modules_install target doesn't work anymore, as the path names are not enclosed in double quotes. It is also supposed that and O= build will suffer from the same weakness as modules_install. Instead of checking and improving kbuild to resist to directories including these characters, error out early to prevent any build if the kernel's main directory contains a space. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Michal Marek <mmarek@suse.com> Makefile | 4 ++++ 1 file changed, 4 insertions(+) commit bf4d5f25c90bf2eca8671f2fc4e3d15919cd7f9c Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Tue May 10 14:47:07 2016 +0900 perf probe: Check the return value of strbuf APIs Check the return value of strbuf APIs in perf-probe related code, so that it can handle errors in strbuf. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160510054707.6158.69861.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/dwarf-aux.c | 52 +++++++-------- tools/perf/util/probe-event.c | 143 +++++++++++++++++++++++++---------------- tools/perf/util/probe-finder.c | 30 +++++---- 3 files changed, 128 insertions(+), 97 deletions(-) commit 59fa0224cfea31dde596e29555de94c961b139f9 Author: Shaohua Li <shli@fb.com> Date: Mon May 9 17:22:15 2016 -0700 blk-throttle: don't parse cgroup path if trace isn't enabled if trace isn't enabled, parsing cgroup path just wastes cpu Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com> block/blk-throttle.c | 5 ++--- include/linux/blktrace_api.h | 9 +++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) commit 8d1547e08dda8848f01185b3fd6bb946b68de99f Author: Shaohua Li <shli@fb.com> Date: Mon May 9 17:22:14 2016 -0700 blktrace: add missed mask name BLK_TC_NOTIFY is missed in mask_maps, so we can't print out notify or set mask with 'notify' name. Signed-off-by: Shaohua Li <shli@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com> kernel/trace/blktrace.c | 1 + 1 file changed, 1 insertion(+) commit b7d7641e2a8640a2f6ac7cdadd6c56eb12728b70 Author: Shaohua Li <shli@fb.com> Date: Mon May 9 17:22:13 2016 -0700 blktrace: delete garbage for message trace commit f4a1d08ce65 introduces a regression. Originally for BLK_TN_MESSAGE, we add message in trace and return. The commit ignores the early return and add garbage info. Signed-off-by: Shaohua Li <shli@fb.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Jens Axboe <axboe@fb.com> kernel/trace/blktrace.c | 1 + 1 file changed, 1 insertion(+) commit 6ac0f61f47a24bad3fa99ee6a46c0cc5a245ee91 Merge: 4ac3342 60a3770 Author: Paolo Bonzini <pbonzini@redhat.com> Date: Tue May 10 16:37:38 2016 +0200 Merge tag 'kvm-s390-next-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD KVM: s390: features and fixes for 4.7 part2 - Use hardware provided information about facility bits that do not need any hypervisor activitiy - Add missing documentation for KVM_CAP_S390_RI - Some updates/fixes for handling cpu models and facilities commit 5cea57f30a12443c05e0c5273f35d2fcef00d30a Author: Masami Hiramatsu <mhiramat@kernel.org> Date: Tue May 10 14:46:58 2016 +0900 perf tools: Rewrite strbuf not to die() Rewrite strbuf implementation not to use die() nor xrealloc(). Instead of die(), now most of the API returns error code or 0 if succeeded. Suggested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20160510054658.6158.24080.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/strbuf.c | 93 ++++++++++++++++++++++++++++++++++-------------- tools/perf/util/strbuf.h | 25 +++++++------ 2 files changed, 82 insertions(+), 36 deletions(-) commit 72928f2476d08c79f132b4f44a17c9a011dd98e3 Author: Vincent Stehlé <vincent.stehle@intel.com> Date: Tue May 10 14:56:20 2016 +0200 Btrfs: fix fspath error deallocation Make sure to deallocate fspath with vfree() in case of error in init_ipath(). fspath is allocated with vmalloc() in init_data_container() since commit 425d17a290c0 ("Btrfs: use larger limit for translation of logical to inode"). Signed-off-by: Vincent Stehlé <vincent.stehle@intel.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/backref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 88f1847639d68d732f83adb7aae94e0d989f7e28 Merge: 28f3136 3f2129f Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 16:17:55 2016 +0200 Merge tag 'samsung-dt-devfreq-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into next/late Merge "ARM: dts: exynos: Devfreq for v4.7: from Krzysztof Kozłowski: Topic branch for Device Tree changes adding new generic devfreq driver, for v4.7: 1. Add bus nodes for Exynos3250, Exynos4x12, Exynos4210 and Exynos542x. 2. Split out common PPMU (Performance Monitoring Unit) nodes into separate DTSI. The PPMU provides performance data for devfreq. 3. Add NoCP (Network on Chip Probe) node for Exynos542x. On this SoC, like PPMU on older designs, provides performance data for devfreq. 4. Enable DFVS (Dynamic Voltage and Frequency Scaling) on boards: - Exynos3250 Rinato, - Exynos4412 Odroid-X/X2/U3 and Trats2, - Exynos5422 Odroid XU3/XU3-Lite/XU4. * tag 'samsung-dt-devfreq-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux: ARM: dts: exynos: Add support of Bus frequency using VDD_INT for exynos5422-odroidxu3 ARM: dts: exynos: Add bus nodes using VDD_INT for Exynos542x SoC ARM: dts: exynos: Add NoC Probe dt node for Exynos542x SoC ARM: dts: exynos: Add support of bus frequency for exynos4412-trats/odroidu3 ARM: dts: exynos: Expand the voltage range of buck1/3 regulator for exynos4412-odroidu3 ARM: dts: exynos: Add support of bus frequency using VDD_INT for exynos3250-rinato ARM: dts: exynos: Add exynos4412-ppmu-common dtsi to delete duplicate PPMU nodes ARM: dts: exynos: Add bus nodes using VDD_MIF for Exynos4210 ARM: dts: exynos: Add bus nodes using VDD_INT for Exynos4x12 ARM: dts: exynos: Add bus nodes using VDD_MIF for Exynos4x12 ARM: dts: exynos: Add bus nodes using VDD_INT for Exynos3250 ARM: dts: exynos: Add DMC bus frequency for exynos3250-rinato/monk ARM: dts: exynos: Add DMC bus node for Exynos3250 clk: samsung: exynos542x: Add the clock id for ACLK dt-bindings: clock: Add the clock id for ACLK clock of Exynos542x SoC commit 28f3136910b9733b9647e84430096f613dcec9e9 Merge: 0683e59 77f0862 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 16:15:20 2016 +0200 Merge tag 'imx-dt-clkdep-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/late Merge "The i.MX device tree updates with new clocks for 4.7" from Shawn Guo: - Add LCDIF and FlexCAN device support for i.MX7D - New support i.MX7D based Nitrogen7 board from Boundary Devices - Add display support for vf610-colibri board * tag 'imx-dt-clkdep-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: dts: vf610-colibri: enable display controller ARM: dts: vf610: add display nodes ARM: dts: imx: add Boundary Devices Nitrogen7 board ARM: dts: imx7d: add flexcan support ARM: dts: imx7d: add lcdif support clk: imx: vf610: fix whitespace in vf610-clock.h clk: imx: vf610: add TCON ipg clock clk: imx: vf610: fix DCU clock tree clk: imx: add ckil clock for i.MX7 clk: imx: vf610: add suspend/resume support clk: imx: vf610: add WKPU unit clk: imx: vf610: leave DDR clock on clk: imx: clk-gate2: allow custom gate configuration clk: imx6sx: Register SAI clocks as shared clocks commit ec42083b98bc7a85c736a8ae1b4c045901ed259e Author: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Date: Wed May 4 12:49:56 2016 +0200 ARM: dts: tango4: Import watchdog node The device driver was added in v4.5 by commit dca536c433a2 ("watchdog: add support for Sigma Designs SMP86xx/SMP87xx") Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm/boot/dts/tango4-common.dtsi | 6 ++++++ 1 file changed, 6 insertions(+) commit 862ccbfb9ce8ca1c2544815c88990ce1163eb2b2 Author: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Date: Wed May 4 12:48:56 2016 +0200 ARM: dts: tango4: Update cpus node for cpufreq This platform will use the new generic platdev driver. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm/boot/dts/tango4-smp8758.dtsi | 3 +++ 1 file changed, 3 insertions(+) commit dd65a6867454117ecaeb8944dc231a4737681782 Author: Andrzej Hajda <a.hajda@samsung.com> Date: Fri Apr 29 15:42:49 2016 +0200 drm/exynos/decon5433: fix trigger configuration It seems trigger cannot be configured too early, otherwise it does not work in case of panel. The patch fixes also trigger flag logic, previously HW-TRIGGER flag was cleared in case of panel - as a result panel used always software trigger. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) commit 17ef49bd23eadfb22ad4ddcdaf1f6a08691ec49e Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Tue May 3 15:47:25 2016 +0200 drm/exynos/dsi: use of_graph_get_endpoint_by_regs helper This allows to remove the local of_graph_get_port_by_reg(), of_graph_get_endpoint_by_reg(), and of_get_child_by_name_reg() functions. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_drm_dsi.c | 57 ++------------------------------- 1 file changed, 3 insertions(+), 54 deletions(-) commit fb38b1f60865567e74aeb540038fbaaa1144c432 Author: Philipp Zabel <p.zabel@pengutronix.de> Date: Tue May 3 15:47:24 2016 +0200 drm/exynos/dpi: use of_graph_get_endpoint_by_regs helper This allows to remove the local of_graph_get_port_by_reg(), of_graph_get_endpoint_by_reg(), of_get_child_by_name_reg(), and of_graph_get_remote_port_parent() functions. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_drm_dpi.c | 69 +-------------------------------- 1 file changed, 2 insertions(+), 67 deletions(-) commit 562d54567f56a6228f53c2affa215dcff0cb1e3c Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed Apr 27 13:38:41 2016 +0200 drm/exynos: Nuke dummy fb->dirty callback It's an optional hook. Might be needed for frontbuffer rendering on manual upload displays, but a simple TODO doesn't explain at all what needs to be done or why. Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_drm_fb.c | 11 ----------- 1 file changed, 11 deletions(-) commit 6aa5e85d7c1578cbe09881289403cba68c1e891d Author: Joonyoung Shim <jy0922.shim@samsung.com> Date: Fri Apr 22 16:34:07 2016 +0900 drm/exynos: use directly DMA mapping APIs on g2d There is no reason to be wapper functions to use DMA mapping APIs. Use directly DMA mapping APIs and remove the wapper functions. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_drm_g2d.c | 10 +++++----- drivers/gpu/drm/exynos/exynos_drm_gem.c | 22 ---------------------- drivers/gpu/drm/exynos/exynos_drm_gem.h | 10 ---------- 3 files changed, 5 insertions(+), 37 deletions(-) commit b85881ddf2aa70d4a3ab9f8451127007e9f82496 Author: Javier Martinez Canillas <javier@osg.samsung.com> Date: Thu Apr 21 14:51:38 2016 -0400 drm/exynos/hdmi: Don't print error on deferral due to regulators The regulators may not be available just because their driver's probe function was just not executed and so the regulators not registered. So, in this case the Exynos HDMI driver should not print logs since a -EPROBE_DEFER is not really an error and that will just pollute the kernel log and confuse users. This patch prevents the following misleading messages to be printed: [ 1.443638] [drm:hdmi_probe] *ERROR* failed to get regulators [ 1.449326] [drm:hdmi_probe] *ERROR* hdmi_resources_init failed Reported-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_hdmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 55b19fc75ff325c17d71236866a0cd17152a355c Author: Joonyoung Shim <jy0922.shim@samsung.com> Date: Fri Apr 22 16:30:48 2016 +0900 drm/exynos: fix imported dma-buf to be mapped The imported dma-buf should be mapped by sub-system exporting it. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_drm_gem.c | 3 +++ 1 file changed, 3 insertions(+) commit 5a0202f75803e9c366e5355de03a60d09c5d76d0 Author: Joonyoung Shim <jy0922.shim@samsung.com> Date: Fri Apr 22 16:30:47 2016 +0900 drm/exynos: support gem_prime_mmap This allows exported dma-bufs to be mapped using gem_prime_mmap. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_drm_drv.c | 1 + drivers/gpu/drm/exynos/exynos_drm_gem.c | 45 +++++++++++++++++++++++---------- drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 ++ 3 files changed, 35 insertions(+), 13 deletions(-) commit fa9971d62a8cfc085b07b3eda1f45c236acc7d70 Author: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Date: Thu May 5 18:23:38 2016 +0200 drm/exynos: fimd: harden fimd_calc_clkdiv() Don't use the vrefresh field of the DRM mode since this one is supposed to only be used for debug purpose. Instead use the clock field which should also provide much more precise information. Also sanitize the case in which the clock value should be zero. We then just default to the maximum clock divisor. Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_drm_fimd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit fc173ae6ddd0e7271447f1cb2d048b11cb6fd872 Author: Andrzej Hajda <a.hajda@samsung.com> Date: Wed May 4 15:23:11 2016 +0200 drm/exynos: fix cancel page flip code Driver code did not remove event from the list of pending events before destroy. As a result drm core later tried to inspect invalid memory location. The patch replaces removal code with call to core helper. The bug was detected using KASAN: [ 10.107249] ================================================================== [ 10.107518] BUG: KASAN: use-after-free in drm_release+0xe9c/0x1000 at addr ffffffc089154a18 [ 10.107784] Read of size 8 by task modetest/103 [ 10.107931] ============================================================================= [ 10.113191] BUG kmalloc-128 (Not tainted): kasan: bad access detected [ 10.119608] ----------------------------------------------------------------------------- [ 10.119608] [ 10.129243] Disabling lock debugging due to kernel taint [ 10.134551] INFO: Allocated in drm_mode_page_flip_ioctl+0x500/0xa98 age=4 cpu=0 pid=103 [ 10.142532] alloc_debug_processing+0x18c/0x198 [ 10.147043] ___slab_alloc.constprop.28+0x360/0x380 [ 10.151906] __slab_alloc.isra.25.constprop.27+0x54/0xa0 [ 10.157197] kmem_cache_alloc_trace+0x370/0x3b0 [ 10.161709] drm_mode_page_flip_ioctl+0x500/0xa98 [ 10.166400] drm_ioctl+0x4c4/0xb68 [ 10.169787] do_vfs_ioctl+0x16c/0xeb8 [ 10.173429] SyS_ioctl+0x8c/0xa0 [ 10.176642] el0_svc_naked+0x24/0x28 [ 10.180204] INFO: Freed in exynos_drm_crtc_cancel_page_flip+0xe0/0x160 age=0 cpu=0 pid=103 [ 10.188447] free_debug_processing+0x174/0x388 [ 10.192871] __slab_free+0x2e8/0x438 [ 10.196431] kfree+0x350/0x360 [ 10.199469] exynos_drm_crtc_cancel_page_flip+0xe0/0x160 [ 10.204762] exynos_drm_preclose+0x58/0xa0 [ 10.208844] drm_release+0x1f0/0x1000 [ 10.212491] __fput+0x1c4/0x5b8 [ 10.215613] ____fput+0xc/0x18 [ 10.218654] task_work_run+0x130/0x198 [ 10.222385] do_exit+0x700/0x2278 [ 10.225681] do_group_exit+0xe4/0x2c8 [ 10.229327] SyS_exit_group+0x1c/0x20 [ 10.232973] el0_svc_naked+0x24/0x28 [ 10.236532] INFO: Slab 0xffffffbdc2a45500 objects=32 used=10 fp=0xffffffc089154a00 flags=0x4080 [ 10.245210] INFO: Object 0xffffffc089154a00 @offset=2560 fp=0xffffffc089157600 [ 10.245210] ... [ 10.384532] CPU: 0 PID: 103 Comm: modetest Tainted: G B 4.5.0-rc3-00748-gd5e2881 #271 [ 10.398325] Call trace: [ 10.400764] [<ffffffc000091428>] dump_backtrace+0x0/0x328 [ 10.406141] [<ffffffc000091764>] show_stack+0x14/0x20 [ 10.411176] [<ffffffc00089c550>] dump_stack+0xb0/0xe8 [ 10.416210] [<ffffffc000395778>] print_trailer+0xf8/0x160 [ 10.421592] [<ffffffc00039b5cc>] object_err+0x3c/0x50 [ 10.426626] [<ffffffc00039d630>] kasan_report_error+0x248/0x550 [ 10.432527] [<ffffffc00039da50>] __asan_report_load8_noabort+0x40/0x48 [ 10.439039] [<ffffffc000b5b724>] drm_release+0xe9c/0x1000 [ 10.444419] [<ffffffc0003d340c>] __fput+0x1c4/0x5b8 [ 10.449280] [<ffffffc0003d3884>] ____fput+0xc/0x18 [ 10.454055] [<ffffffc000101aa8>] task_work_run+0x130/0x198 [ 10.459522] [<ffffffc0000bc058>] do_exit+0x700/0x2278 [ 10.464557] [<ffffffc0000bdcfc>] do_group_exit+0xe4/0x2c8 [ 10.469939] [<ffffffc0000bdefc>] SyS_exit_group+0x1c/0x20 [ 10.475320] [<ffffffc000087530>] el0_svc_naked+0x24/0x28 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_drm_crtc.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) commit 3f4c8e5c286fa1be4d033f79c73242d5111c69d6 Author: Andrzej Hajda <a.hajda@samsung.com> Date: Fri Apr 29 15:42:48 2016 +0200 drm/exynos/decon5433: do not use unnecessary software trigger Software trigger should not be used if hardware trigger is configured. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit b0bb3d0775224ef2ac6f0b68df353281a399d78e Author: Andrzej Hajda <a.hajda@samsung.com> Date: Fri Apr 29 15:42:47 2016 +0200 drm/exynos/decon5433: handle vblank in vblank interrupt vblank should be signaled to userspace after reading framebuffers not before, signaling it in TE interrupt looks wrong. TE triggers reading framebuffers so it is the worst moment. Tearing is not observable because hardware prevents it, but there are frequently skipped vblank events. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit 59b62d3c8bb8a5da351c5690f83b25c7e7252d94 Author: Andrzej Hajda <a.hajda@samsung.com> Date: Tue May 10 13:56:32 2016 +0900 drm/exynos/hdmi: expose HDMI-PHY clock as pipeline clock HDMI-PHY clock should be accessible from other components in the pipeline. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> drivers/gpu/drm/exynos/exynos_hdmi.c | 67 ++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 19 deletions(-) commit 692fbddccb9eefa1211c1135920e64cb9802bdd5 Author: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Date: Wed May 4 12:48:12 2016 +0200 ARM: dts: tango4: Update DT to match clk driver Commit fefe0535b74f ("clk: tango4: improve clkgen driver") added support for USB and SDIO clocks. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm/boot/dts/tango4-common.dtsi | 10 ++++++---- arch/arm/boot/dts/tango4-smp8758.dtsi | 2 +- arch/arm/boot/dts/tango4-vantage-1172.dts | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) commit a6e818898caeb5cb7bf478f74d58938ae1d520d3 Author: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Date: Wed May 4 12:47:02 2016 +0200 ARM: dts: tango4: Initial thermal support Define the CPU temperature sensor, and critical trip point. Commit 799d71da471c ("add temperature sensor support for tango SoC") added the device driver. Acked-by: Eduardo Valentin <edubezval@gmail.com> Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm/boot/dts/tango4-smp8758.dtsi | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) commit 0f02588434a448dc593d4fae35eda10fad1897c5 Merge: 18aab73 068655dc Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 16:10:28 2016 +0200 Merge tag 'sunxi-dt-for-4.7-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt Merge "Allwinner DT changes for 4.7, round 2" from Maxime Ripard: Mostly DT patches to enable the new DRM driver on the CHIP, preliminary support for the A10 and A20, and a support for a new variant of the Olimex A20-Olinuxino-Lime2 featuring an eMMC * tag 'sunxi-dt-for-4.7-2' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: ARM: sun7i: dt: Add pll3 and pll7 clocks ARM: dts: sunxi: Add a olinuxino-lime2-emmc ARM: sun4i: dt: Add pll3 and pll7 clocks ARM: sun5i: chip: Enable the TV Encoder ARM: sun5i: r8: Add display blocks to the DTSI ARM: sun5i: a13: Add display and TCON clocks commit 18aab73fba7abee4df472424d115d76b199877cb Merge: e3cef9b 0244062 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 16:08:21 2016 +0200 Merge tag 'aspeed-for-4.7-dts' of https://github.com/shenki/linux into next/dt Merge "aspeed devicetree for 4.7" from Joel Stanley: This device trees for a pair of Aspeed BMC SoCs and the boards that they sit in. * tag 'aspeed-for-4.7-dts' of https://github.com/shenki/linux: arm/dst: Add Aspeed ast2500 device tree arm/dts: Add Aspeed ast2400 device tree doc/devicetree: Add Aspeed and Tyan to vendor-prefixes commit e3cef9bbb5a2b3c7dd0e11fe2e6e38574e5061c0 Merge: 3a99f3d 00bf4f7 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 16:06:19 2016 +0200 Merge tag 'at91-dt3' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/dt Merge "Third batch of DT changes for 4.7" from Nicolas Ferre: - a fix for the VInCo platform: reset gpio specification for Ethernet - addition of True Random Number Generator (TRNG) for all sama5 platforms - trivial adjustment of TRNG register map size for at91sam9g45 family * tag 'at91-dt3' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: dts: at91: sama5d4: add trng node ARM: dts: at91: sama5d3: add trng node ARM: dts: at91: sama5d2: add trng node ARM: dts: at91: at91sam9g45 family: reduce the trng register map size ARM: dts: at91: VInCo: fix phy reset gpio flag commit 2e00fde5c6ed8535244332ebb55e881baa54ae46 Merge: 39f0ccd 3231e20 Author: Takashi Iwai <tiwai@suse.de> Date: Tue May 10 16:06:04 2016 +0200 Merge branch 'for-linus' into for-next commit 4ac334295e4f3b996e9feabe36e79e44bf77a06f Author: James Hogan <james.hogan@imgtec.com> Date: Fri Apr 22 10:38:49 2016 +0100 MIPS: KVM: Add missing disable FPU hazard barriers Add the necessary hazard barriers after disabling the FPU in kvm_lose_fpu(), just to be safe. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/mips/kvm/mips.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) commit 556f2a5231bf3ec4ce98d46434920e31787f79d6 Author: James Hogan <james.hogan@imgtec.com> Date: Fri Apr 22 10:38:48 2016 +0100 MIPS: KVM: Fix preemption warning reading FPU capability Reading the KVM_CAP_MIPS_FPU capability returns cpu_has_fpu, however this uses smp_processor_id() to read the current CPU capabilities (since some old MIPS systems could have FPUs present on only a subset of CPUs). We don't support any such systems, so work around the warning by using raw_cpu_has_fpu instead. We should probably instead claim not to support FPU at all if any one CPU is lacking an FPU, but this should do for now. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/mips/kvm/mips.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit f049729c05cc5338174d52e2bee6678131da5e08 Author: James Hogan <james.hogan@imgtec.com> Date: Fri Apr 22 10:38:47 2016 +0100 MIPS: KVM: Fix preemptable kvm_mips_get_*_asid() calls There are a couple of places in KVM fault handling code which implicitly use smp_processor_id() via kvm_mips_get_kernel_asid() and kvm_mips_get_user_asid() from preemptable context. This is unsafe as a preemption could cause the guest kernel ASID to be changed, resulting in a host TLB entry being written with the wrong ASID. Fix by disabling preemption around the kvm_mips_get_*_asid() call and the corresponding kvm_mips_host_tlb_write(). Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/mips/kvm/tlb.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) commit b45bacd2d048f405c7760e5cc9b60dd67708734f Author: James Hogan <james.hogan@imgtec.com> Date: Fri Apr 22 10:38:46 2016 +0100 MIPS: KVM: Fix timer IRQ race when writing CP0_Compare Writing CP0_Compare clears the timer interrupt pending bit (CP0_Cause.TI), but this wasn't being done atomically. If a timer interrupt raced with the write of the guest CP0_Compare, the timer interrupt could end up being pending even though the new CP0_Compare is nowhere near CP0_Count. We were already updating the hrtimer expiry with kvm_mips_update_hrtimer(), which used both kvm_mips_freeze_hrtimer() and kvm_mips_resume_hrtimer(). Close the race window by expanding out kvm_mips_update_hrtimer(), and clearing CP0_Cause.TI and setting CP0_Compare between the freeze and resume. Since the pending timer interrupt should not be cleared when CP0_Compare is written via the KVM user API, an ack argument is added to distinguish the source of the write. Fixes: e30492bbe95a ("MIPS: KVM: Rewrite count/compare timer emulation") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: <stable@vger.kernel.org> # 3.16.x- Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/mips/include/asm/kvm_host.h | 2 +- arch/mips/kvm/emulate.c | 61 ++++++++++++++++++---------------------- arch/mips/kvm/trap_emul.c | 2 +- 3 files changed, 29 insertions(+), 36 deletions(-) commit 4355c44f063d3de4f072d796604c7f4ba4085cc3 Author: James Hogan <james.hogan@imgtec.com> Date: Fri Apr 22 10:38:45 2016 +0100 MIPS: KVM: Fix timer IRQ race when freezing timer There's a particularly narrow and subtle race condition when the software emulated guest timer is frozen which can allow a guest timer interrupt to be missed. This happens due to the hrtimer expiry being inexact, so very occasionally the freeze time will be after the moment when the emulated CP0_Count transitions to the same value as CP0_Compare (so an IRQ should be generated), but before the moment when the hrtimer is due to expire (so no IRQ is generated). The IRQ won't be generated when the timer is resumed either, since the resume CP0_Count will already match CP0_Compare. With VZ guests in particular this is far more likely to happen, since the soft timer may be frozen frequently in order to restore the timer state to the hardware guest timer. This happens after 5-10 hours of guest soak testing, resulting in an overflow in guest kernel timekeeping calculations, hanging the guest. A more focussed test case to intentionally hit the race (with the help of a new hypcall to cause the timer state to migrated between hardware & software) hits the condition fairly reliably within around 30 seconds. Instead of relying purely on the inexact hrtimer expiry to determine whether an IRQ should be generated, read the guest CP0_Compare and directly check whether the freeze time is before or after it. Only if CP0_Count is on or after CP0_Compare do we check the hrtimer expiry to determine whether the last IRQ has already been generated (which will have pushed back the expiry by one timer period). Fixes: e30492bbe95a ("MIPS: KVM: Rewrite count/compare timer emulation") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Radim Krčmář" <rkrcmar@redhat.com> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: linux-mips@linux-mips.org Cc: kvm@vger.kernel.org Cc: <stable@vger.kernel.org> # 3.16.x- Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> arch/mips/kvm/emulate.c | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) commit 3a99f3d8d27b643e923cd55e435f8f879f017fef Merge: 21c9a64 7ba5dd5 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 15:46:55 2016 +0200 Merge tag 'ux500-armsoc-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/dt Merge "ux500 Devicetree updates for v4.7" from Linus Walleij: - Use generic include files - Make accelerometers open drain on the TVK board * tag 'ux500-armsoc-v4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: dts: ux500: configure the accelerometers open drain ARM: dts: ux500: use the GIC include header ARM: dts: ux500: use the GPIO DT header commit 21c9a6487387fc629955992ef62672bc0aae5daa Merge: 7430bc1 194521f Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 15:45:41 2016 +0200 Merge tag 'imx-dt-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/dt Merge "i.MX device tree updates for 4.7, take 2: from Shawn Guo: The i.MX device tree updates for 4.7, take 2: - Update display clock configuration for imx6q-b850v3 board - Use watchdog external reset for imx6q-ba16 board - Update operating points settings for i.MX6UL/SX/DL - New board support: imx6ul-pico-hobbit and imx6q-marsboard - Add SAI audio support for imx6ul-14x14-evk board - Enable USB OTG support for M53EVK board - A couple of fixes on DTC warnings * tag 'imx-dt-4.7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: mx5: dts: Enable USB OTG on M53EVK ARM: dts: imx6ul-14x14-evk: Add audio support ARM: dts: imx6qdl: Remove unneeded unit-addresses ARM: dts: imx6: apalis: parallel lcd display support on ixora ARM: dts: imx6sx-sdb: Add 198MHz operational point ARM: dts: imx28-m28: Remove unneeded partition nodes ARM: dts: imx6ul-pico-hobbit: Add initial support ARM: dts: imx6: Do not hardcode the CLKO clock ARM: dts: imx6: Add dts for Embest MarS Board ARM: dts: imx6: fix dtc warnings for ipu endpoints ARM: dts: imx6dl: Fix the VDD_ARM_CAP voltage for 396MHz operation ARM: dts: imx6sx: Add 198MHz operating point ARM: dts: imx6ul: Fix operating points ARM: dts: imx6q-ba16: use wdog external reset ARM: dts: imx: b450/b650v3: Move ldb_di clk assignment ARM: dts: imx6q-b850v3: Update display clock source ARM: dts: imx6q-b850v3: Remove ldb panel commit 7430bc1942f1f340a149abfbe007900ece743903 Merge: e8f72bf 610175b Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 15:44:27 2016 +0200 Merge tag 'v4.6-next-dts' of https://github.com/mbgg/linux-mediatek into next/dt Merge "ARM: mediatek: dts updates for v4.7" from Matthias Brugger: - add pinctrl node for mt2701 - add mt2701 pmic wrapper binding - add auxadc binding document * tag 'v4.6-next-dts' of https://github.com/mbgg/linux-mediatek: dt-bindings: MediaTek: Add binding document for the AUXADC dt-bindings: ARM: Mediatek: add MT2701/7623 string to the PMIC wrapper doc arm: dts: Add pinctrl/GPIO/EINT node for mt2701 commit e8f72bf9d45cfaaf550a85f177c7407ceae72645 Merge: 10bd9eb b52e345 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 15:43:20 2016 +0200 Merge tag 'sunxi-dt-for-4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into next/dt Merge "Allwinner DT additions for 4.7" from Maxime Ripard: The usual bunch of changes, mostly: * Addition of the SPDIF support * Addition of the pre-requisites for the display support * New boards: Difrence DIT4350, colorfly e708 q1, Dserve DSRV9703C, Polaroid MID2809PXE4, Orange Pi PC, Orange Pi 2 * tag 'sunxi-dt-for-4.7' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux: (38 commits) ARM: dts: sun7i: Enable S/PDIF on the Cubietruck ARM: sun5i: Add DRAM gates ARM: sun5i: Add TV encoder gate to the DTSI ARM: sun5i: dt: Add pll3 and pll7 clocks ARM: dts: sun8i: Add dts file for the Orange Pi One SBC ARM: sun7i: dt: Enable dram gate 5 (tve0 clock) for simplefb TV output ARM: sun4i: dt: Enable dram gate 5 (tve0 clock) for simplefb TV output ARM: dts: sun5i-a13-olinuxino-micro: enable USB DRC ARM: dts: sun8i: Base Orange Pi Plus dts on the Orange Pi 2 dts ARM: dts: sun8i: Orangepi plus gpio keys fixes and improvements ARM: dts: sun8i: Add dts for Orange Pi 2 SBC ARM: dts: sun8i: Add Orange Pi PC support ARM: dts: sun8i: Fix pio nodes Orangepi Plus dts ARM: dts: sun7i: Add SPDIF to the Itead Ibox ARM: dts: sun4i: Add SPDIF to the Mele A1000 ARM: dts: sun7i: Add the SPDIF block to the A20 ARM: dts: sun4i: Add the SPDIF block to the A10 ARM: dts: sun7i: Add the SPDIF clk to the A20 ARM: dts: sun4i: Add the SPDIF clk to the A10 ARM: dts: sun7i: Add SPDIF TX pin to the A20 ... commit 10bd9eb7dddb5046399cbfa6cf24a1f302fd7fce Merge: c5e51c9 c6d3b5d Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 15:39:18 2016 +0200 Merge tag 'davinci-for-v4.7/dt-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/dt Merge "DaVinci DT updates for v4.7 (part 2)" from Sekhar Nori: Second set of DT updates for DaVinci adding support for SPI0 and some low priority fixes for ethernet and interrupt controller. * tag 'davinci-for-v4.7/dt-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: dts: da850: There are 101 interrupts. ARM: dts: da850: disable mdio and eth0 in da850.dtsi ARM: davinci: da8xx-dt: Add spi0 lookup for clock matching ARM: dts: da850: add spi0 to device tree commit c5e51c98e3177339815e62006a288b3ec83f5067 Merge: 48ea582 f87305f Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 15:38:13 2016 +0200 Merge tag 'v4.7-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/dt Merge "Rockchip dts32 updates for v4.7 - part2" from Heiko Stübner: This adds the rk3288-miqi as new board, adapts the edp-phy settings to the binding-change that made it into 4.6, adds rk3288 i2c controller nodes and moves the rk3288 thermal data into the soc dtsi, as there really is no need to have that separate file. * tag 'v4.7-rockchip-dts32-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip: ARM: dts: rockchip: move the rk3288 thermal data into rk3288.dtsi ARM: dts: rockchip: add MiQi board from mqmaker dt-bindings: add vendor-prefix for mqmaker ARM: dts: rockchip: move rk3288 edp phy under the GRF ARM: dts: rockchip: make rk3288-grf a simple-mfd ARM: dts: rockchip: add i2c nodes for RK3228 SoCs commit 6d5853ffe655192d4b18d7092bb060d5e69d777c Merge: d7c38ff 1f664ab Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 14:53:01 2016 +0200 Merge tag 'mvebu-arm64-4.7-1' of git://git.infradead.org/linux-mvebu into next/arm64 Merge "mvebu arm64 for 4.7" from Gregory CLEMENT: - Mention the arm64 SoCs in the MAINTAINER file - Enable syscon drivers for Marvell Armada 7K/8K (replacing the clk one) * tag 'mvebu-arm64-4.7-1' of git://git.infradead.org/linux-mvebu: MAINTAINERS: update entry for Marvell ARM platform maintainers arm64: marvell: enable AP806 and CP110 syscon driver commit e5d8b0ad5ae4c70a7081865a3c6c83ae1afe3087 Author: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Date: Tue Apr 26 09:58:38 2016 +0200 arm64: configs: add options useful for Armada 7K/8K support This commit updates the ARM64 defconfig to include additional options useful to support the Armada 7K/8K platforms: - the SPI controller driver, spi-orion - the support for SPI flashes Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> arch/arm64/configs/defconfig | 4 ++++ 1 file changed, 4 insertions(+) commit d7c38ff1cd868cd61b96cf1ff8c2bd72445332c7 Author: Andre Przywara <andre.przywara@arm.com> Date: Thu May 5 10:44:18 2016 +0100 arm64: defconfig: Add Juno SATA controller The ARM Juno (r1 and r2) boards feature a SATA controller soldered on the board and connected to the PCI bus. Add the respective driver to defconfig to get hard disks supported out of the box on the Junos. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) commit cbeefdab99941648729c3839626c908b8f04fec7 Merge: e45a70b 3892132 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 14:32:09 2016 +0200 Merge tag 'imx-defconfig64-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/arm64 Merge "The arm64 defconfig update for Freescale/NXP support" from Shawn Guo: - Clean up defconfig with savedefconfig - Enable 48-bit virtual address support - Enable driver support for various Freescale/NXP devices * tag 'imx-defconfig64-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: arm64: defconfig: enable freescale/nxp config options arm64: defconfig: enable 48-bit virtual addresses arm64: defconfig: cleanup the defconfig commit b80dc598eb997bf8a7942fa0cedc1e02001825f7 Merge: 2cbb21d f0d5236 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 14:30:01 2016 +0200 Merge tag 'at91-defconfig2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/defconfig Merge "Second batch of defconfig" from Nicolas Ferre: - sama5_defconfig: update to support easy use of systemd userspace * tag 'at91-defconfig2' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91: ARM: at91/defconfig: sama5: add CONFIG_FHANDLE ARM: at91: sama5: Update defconfig ARM: multi_v7_defconfig: add the Atmel sama5d2-compatible ADC driver ARM: multi_v7_defconfig: add the Atmel Audio microphone interface PDMIC ARM: multi_v7_defconfig: add Atmel ISI (Image Sensor Interface) driver ARM: multi_v7_defconfig: add Atmel watchdog timers ARM: multi_v7_defconfig: add HLCDC drivers as modules ARM: at91/defconfig: add PDMIC driver to sama5_defconfig ARM: at91/defconfig: add HLCDC driver to sama5_defconfig ARM: at91/defconfig: add the HDMA controller to sama5_defconfig commit 2cbb21d749efb9ca1eef04f04d189d4961b33b79 Merge: 11d708f d0bc348 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 14:25:54 2016 +0200 Merge tag 'aspeed-for-4.7-defconfig' of https://github.com/shenki/linux into next/defconfig Merge "aspeed defconfig for 4.7" from Joel Stanley: This adds configurations used for testing Aspeed BMC SoCs, as well as adding the v5 part to the multi defconfig. * tag 'aspeed-for-4.7-defconfig' of https://github.com/shenki/linux: arm/configs: Add Aspeed defconfig arm/configs/multi_v5: Add Aspeed ast2400 commit 11d708f414a78b8e2903cbcff34bec69c73ba1b5 Merge: 48bc03e 35bee33 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 14:24:06 2016 +0200 Merge tag 'ux500-defconfig-armsoc2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson into next/defconfig Merge "Ux500 defconfig update for v4.7" from Linus Walleij: - Remove the unused MACH_UX500_DT option from the multi_v7 defconfig - Remove staging driver from u8500_defconfig - Update sensor support in u8500_defconfig * tag 'ux500-defconfig-armsoc2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson: ARM: u8500_defconfig: update sensor config ARM: u8500_defconfig: remove staging from defconfig ARM: multi_v7_defconfig: Remove unused Kconfig option MACH_UX500_DT commit 35bee33355db8347d5f84caef9d2ddde200b8ba6 Author: Linus Walleij <linus.walleij@linaro.org> Date: Mon May 2 10:38:04 2016 +0200 ARM: u8500_defconfig: update sensor config The Ux500 is using buffered IIO as the sensors support IRQs. The BH1780 ambient light sensor was added to IIO, so disable the old misc driver and activate the driver in IIO. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> arch/arm/configs/u8500_defconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 6cf8440c2b7bf7db3925dfe5419985f19046e5ca Author: Linus Walleij <linus.walleij@linaro.org> Date: Mon May 2 10:34:09 2016 +0200 ARM: u8500_defconfig: remove staging from defconfig Ux500 was enabling the staging drivers due to the RMI4 touchscreen driver, this is now properly upstream, so drop this and the dead symbol for the old RMI4 hack from the defconfig. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> arch/arm/configs/u8500_defconfig | 2 -- 1 file changed, 2 deletions(-) commit 3ef875479c93bcd7e8ec4ffd1c71ea59afc20643 Author: Lee Jones <lee.jones@linaro.org> Date: Thu Mar 31 09:45:24 2016 +0100 ARM: multi_v7_defconfig: Remove unused Kconfig option MACH_UX500_DT Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> arch/arm/configs/multi_v7_defconfig | 1 - 1 file changed, 1 deletion(-) commit 48bc03e5411eb0fd006e54ba62ca77a6dfe5c68d Merge: b6e3f6d 2ead04d Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 14:08:29 2016 +0200 Merge tag 'imx-defconfig-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into next/defconfig Merge "i.MX defconfig updates for 4.7" from Shawn Guo: - Update multi_v5_defconfig for i.MX21/27 and systemd support - Update imx_v6_v7_defconfig to support devices found on various i.MX6 board: FT5x06 and TSC2004 touch, I2C GPIO, MICREL PHY and M41T80 RTC * tag 'imx-defconfig-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux: ARM: imx_v6_v7_defconfig: add CONFIG_MICREL_PHY ARM: imx_v6_v7_defconfig: add CONFIG_I2C_GPIO ARM: multi_v5_defconfig: Enable recommended options for systemd ARM: multi_v5_defconfig: Enable support for MX21/MX27 ARM: imx_v6_v7_defconfig: add CONFIG_RTC_DRV_M41T80 ARM: imx_v6_v7_defconfig: add CONFIG_I2C_MUX_GPIO ARM: imx_v6_v7_defconfig: add FT5x06 and TSC2004 touch support commit b6e3f6d543777eec632b3639a32335e2d04768b3 Merge: cbf3bbe fe42f03 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 14:06:01 2016 +0200 Merge tag 'tegra-for-4.7-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux into next/defconfig Merge "ARM: tegra: Default configuration updates for v4.7-rc1" from Thierry Reding: Enable the XUSB pad controller and XUSB controller drivers on the Tegra and multi-v7 default configurations. * tag 'tegra-for-4.7-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux: ARM: multi_v7: Enable Tegra XUSB controller in defconfig ARM: tegra: Enable XUSB controller in defconfig commit cbf3bbeb2e0a5a996207d48c0546c7ae5fc5e8f4 Merge: a651b61 8b182f3 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 14:03:53 2016 +0200 Merge tag 'davinci-for-v4.7/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into next/defconfig Merge "DaVinci defconfig updates for v4.7" from Sekhar Nori: Some defconfig updates to support systemd based filesystems, SPI NOR and GPIO sysfs entries. * tag 'davinci-for-v4.7/defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci: ARM: davinci_all_defconfig: enable SPI and NOR as modules ARM: davinci_all_defconfig: support systemd ARM: davinci_all_defconfig: enable GPIO_SYSFS commit 5b64250b614a9d3dff380035be17811cd479d8e8 Author: Christian Lamparter <chunkeey@googlemail.com> Date: Sun May 8 15:08:22 2016 +0200 gpio: dt-bindings: add wd,mbl-gpio bindings This patch adds the device tree bindings for the Western Digital's MyBook Live memory-mapped GPIO controllers. The gpios will be supported by gpio-mmio code of the GPIO generic library. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> .../devicetree/bindings/gpio/wd,mbl-gpio.txt | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) commit 41caed560f800768f0f475ff2bec1e1b92674c0b Merge: d6a58a5 f5515f9 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 10 13:48:48 2016 +0200 Merge branch 'renesas/fixes-2' into next/dt64 This merges fixes from linux-4.6 into the next/dt64 tree to avoid a later merge conflict. * renesas/fixes-2: arm64: dts: r8a7795: Don't disable referenced optional scif clock ARM: shmobile: timer: Fix preset_lpj leading to too short delays Revert "ARM: dts: porter: Enable SCIF_CLK frequency and pins" ARM: dts: r8a7791: Don't disable referenced optional clocks commit 3beed93c16170eacbfaa189dd4c1dc71866d3d3a Author: Patrice Chotard <patrice.chotard@st.com> Date: Fri Apr 29 16:25:43 2016 +0200 pinctrl: stm32: Implement .pin_config_dbg_show() Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> drivers/pinctrl/stm32/pinctrl-stm32.c | 174 ++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) commit fd9c55315db9bc89c54bb644a0f8b1f9306010d4 Author: Linus Walleij <linus.walleij@linaro.org> Date: Tue Apr 19 15:26:26 2016 +0200 gpio: of: make it possible to name GPIO lines Make it possible to name the producer side of a GPIO line using a "gpio-line-names" property array, modeled on the "clock-output-names" property from the clock bindings. This naming is especially useful for: - Debugging: lines are named after function, not just opaque offset numbers. - Exploration: systems where some or all GPIO lines are available to end users, such as prototyping, one-off's "makerspace usecases" users are helped by the names of the GPIO lines when tinkering. This usecase has been surfacing recently. The gpio-line-names attribute is completely optional. Example output from lsgpio on a patched Snowball tree: GPIO chip: gpiochip6, "8000e180.gpio", 32 GPIO lines line 0: unnamed unused line 1: "AP_GPIO161" "extkb3" [kernel] line 2: "AP_GPIO162" "extkb4" [kernel] line 3: "ACCELEROMETER_INT1_RDY" unused [kernel] line 4: "ACCELEROMETER_INT2" unused line 5: "MAG_DRDY" unused [kernel] line 6: "GYRO_DRDY" unused [kernel] line 7: "RSTn_MLC" unused line 8: "RSTn_SLC" unused line 9: "GYRO_INT" unused line 10: "UART_WAKE" unused line 11: "GBF_RESET" unused line 12: unnamed unused Cc: Grant Likely <grant.likely@linaro.org> Cc: Amit Kucheria <amit.kucheria@linaro.org> Cc: David Mandala <david.mandala@linaro.org> Cc: Lee Campbell <leecam@google.com> Cc: devicetree@vger.kernel.org Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Documentation/devicetree/bindings/gpio/gpio.txt | 19 ++++++++++ drivers/gpio/gpiolib-of.c | 49 +++++++++++++++++++++++++ 2 files changed, 68 insertions(+) commit ca21872e43e82c2a5c2e056ee4aea40a921720b1 Author: Heiko Carstens <heiko.carstens@de.ibm.com> Date: Sat May 7 12:15:34 2016 +0200 s390: add missing include statements arch_mmap_rnd, cpu_have_feature, and arch_randomize_brk are all defined as globally visible variables. However the files they are defined in do not include the header files with the declaration. To avoid a possible mismatch add the missing include statements so we have proper type checking in place. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/kernel/process.c | 1 + arch/s390/kernel/processor.c | 1 + arch/s390/mm/mmap.c | 1 + 3 files changed, 3 insertions(+) commit 521b00cd7a6491fbec7d1ede5b6b33f106a6addc Author: Heiko Carstens <heiko.carstens@de.ibm.com> Date: Sat May 7 12:15:21 2016 +0200 s390: add missing declarations arch_dup_task_struct and the per cpu variable mt_cycles are globally visible, but do not have any header file with a declaration. Therefore add it so we have proper type checking in place. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/include/asm/thread_info.h | 1 + arch/s390/kernel/entry.h | 4 ++++ arch/s390/kernel/vtime.c | 2 ++ 3 files changed, 7 insertions(+) commit f70a34c57602f5791a63869db95f3b97276cd1d2 Author: Heiko Carstens <heiko.carstens@de.ibm.com> Date: Sat May 7 12:14:29 2016 +0200 s390: make couple of variables and functions static copy_oldmem_user() and ap_jumptable are private to the files they are being used in. Therefore make them static. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/kernel/crash_dump.c | 2 +- drivers/s390/crypto/ap_bus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4c07a399f98278f2a784cdf71053c85a4082f4db Author: Heiko Carstens <heiko.carstens@de.ibm.com> Date: Fri May 6 10:57:33 2016 +0200 s390/cache: remove superfluous locking With "s390/cpuinfo: simplify locking and skip offline cpus early" we prevent already that cpus will go away. The additional get_online_cpus() / put_online_cpus() within show_cacheinfo() is not needed anymore. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/kernel/cache.c | 2 -- 1 file changed, 2 deletions(-) commit 281eaa8cb67c27e56da1e7fd6b55c6cd3e8c4638 Author: Heiko Carstens <heiko.carstens@de.ibm.com> Date: Wed Apr 13 14:49:12 2016 +0200 s390/cpuinfo: simplify locking and skip offline cpus early Move the get_online_cpus() and put_online_cpus() to the start and stop operation of the seqfile ops. This way there is no need to lock cpu hotplug again and again for each single cpu. This way we can also skip offline cpus early if we simply use cpumask_next() within the next operation. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> arch/s390/kernel/processor.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit 0c756914920fc13061222d12fbbe85990df64928 Author: Martin Schwidefsky <schwidefsky@de.ibm.com> Date: Mon May 2 15:09:01 2016 +0200 s390/3270: hangup the 3270 tty after a disconnect The disconnect and later reconnect of a 3270 terminal does not do a tty hangup. The current session is resumed which is a security issue. Do a tty hangup after a unit check has been received. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> drivers/s390/char/tty3270.c | 38 +++++++++++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) commit 7e36eff1eece29eaa37501806ded0e0fb88e61ee Author: Martin Schwidefsky <schwidefsky@de.ibm.com> Date: Mon May 2 15:07:00 2016 +0200 s390/3270: handle reconnect of a tty with a different size If an existing 3270 terminal disconnects and reconnects with a different size, the 3270 driver still works with the old size. If the new dimensions are larger the output merely looks funny, if the new dimensions are smaller the terminal is unusable. To fix this restart the size detection after a unit check has been received. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> drivers/s390/char/raw3270.c | 32 +++++++++++++++++++++++++++++--- drivers/s390/char/tty3270.c | 25 ++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 4 deletions(-) commit ffe1b6c453ef49e6fcf31c23636333aa4e65aa47 Author: Wang Hongcheng <annie.wang@amd.com> Date: Mon Mar 14 10:29:09 2016 +0800 video: AMBA CLCD: Remove unncessary include in amba-clcd.c The header file asm/sizes.h is unnecessary. And it can also be compiled under X86 arch after the removal. Signed-off-by: Wang Hongcheng <annie.wang@amd.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/video/fbdev/amba-clcd.c | 2 -- 1 file changed, 2 deletions(-) commit 80403b232b7af033bb5a2043fc4d60f16e46519f Author: Julian Scheel <julian@jusst.de> Date: Thu Mar 24 22:14:23 2016 +0100 fbdev: ssd1307fb: Fix charge pump setting Make sure bit 4 is set for the charge pump setting. It is required according to SSD1306 App Note. Signed-off-by: Julian Scheel <julian@jusst.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/video/fbdev/ssd1307fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 676970e55b1033af7f0a03d4037b4d9b76327ded Author: Antonio Quartulli <a@unstable.cc> Date: Fri Mar 11 14:01:10 2016 +0100 batman-adv: use batadv_compare_eth when possible When comparing Ethernet address it is better to use the more generic batadv_compare_eth. The latter is also optimised for architectures having a fast unaligned access. Signed-off-by: Antonio Quartulli <a@unstable.cc> [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> net/batman-adv/network-coding.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) commit 9d1601ef4347b27dfa627d61ccfa9a724cc6e303 Author: Marek Lindner <mareklindner@neomailbox.ch> Date: Sun Mar 20 18:39:56 2016 +0800 batman-adv: replace ethertype variable with ETH_P_BATMAN for readability Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Reviewed-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/soft-interface.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 4b426b108ac82b27f5af40df7da05a2501fd2aca Author: Sven Eckelmann <sven@narfation.org> Date: Mon Feb 22 21:02:39 2016 +0100 batman-adv: Use bool as return type for boolean functions It is easier to understand that the returned value of a specific function doesn't have to be 0 when the functions was successful when the actual return type is bool. This is especially true when all surrounding functions with return type int use negative values to return the error code. Reported-by: Nicholas Krause <xerofoify@gmail.com> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bat_iv_ogm.c | 23 ++--- net/batman-adv/bitarray.c | 16 +-- net/batman-adv/bitarray.h | 15 +-- net/batman-adv/bridge_loop_avoidance.c | 175 +++++++++++++++++---------------- net/batman-adv/bridge_loop_avoidance.h | 43 ++++---- net/batman-adv/debugfs.c | 2 +- net/batman-adv/distributed-arp-table.c | 6 +- net/batman-adv/hard-interface.c | 15 ++- net/batman-adv/hash.h | 6 +- net/batman-adv/main.h | 2 +- net/batman-adv/network-coding.c | 12 +-- net/batman-adv/originator.c | 4 +- net/batman-adv/originator.h | 2 +- net/batman-adv/routing.c | 37 +++---- net/batman-adv/routing.h | 6 +- net/batman-adv/soft-interface.c | 6 +- net/batman-adv/soft-interface.h | 3 +- net/batman-adv/translation-table.c | 31 +++--- 18 files changed, 205 insertions(+), 199 deletions(-) commit f0b94ebccd2b924237ca7a101da3db70c3a8f0f2 Author: Sven Eckelmann <sven@narfation.org> Date: Sat Mar 5 19:05:24 2016 +0100 batman-adv: Use kref_get for _batadv_update_route _batadv_update_route requires that the caller already has a valid reference for neigh_node. It is therefore not possible that it has an reference counter of 0 and was still given to this function The kref_get function instead WARNs (with debug information) when the reference counter would still be 0. This makes a bug in batman-adv better visible because kref_get_unless_zero would have ignored this problem. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/routing.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 17a8691502c9d2d792cfea7253b17382279ffb3e Author: Sven Eckelmann <sven@narfation.org> Date: Mon Apr 11 13:06:40 2016 +0200 batman-adv: Use kref_get for hard_iface subfunctions The callers of the functions using batadv_hard_iface objects already make sure that they hold a valid reference. The subfunctions don't have to check whether the reference counter is > 0 because this was checked by the callers. The kref_get function instead WARNs (with debug information) when the reference counter would still be 0. This makes a bug in batman-adv better visible because kref_get_unless_zero would have ignored this problem. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bat_iv_ogm.c | 14 +++----------- net/batman-adv/hard-interface.c | 7 +++---- net/batman-adv/originator.c | 30 +++++++----------------------- 3 files changed, 13 insertions(+), 38 deletions(-) commit c3ba37a778ecab4f8ddb117a2ceff3e13184a7db Author: Sven Eckelmann <sven@narfation.org> Date: Sat Mar 5 16:09:23 2016 +0100 batman-adv: Use kref_get for batadv_gw_node_add batadv_gw_node_add requires that the caller already has a valid reference for orig_node. It is therefore not possible that it has an reference counter of 0 and was still given to this function The kref_get function instead WARNs (with debug information) when the reference counter would still be 0. This makes a bug in batman-adv better visible because kref_get_unless_zero would have ignored this problem. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/gateway_client.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) commit a08d497d6718d579e496a801115aecc1c4fbb770 Author: Sven Eckelmann <sven@narfation.org> Date: Sat Mar 5 16:09:22 2016 +0100 batman-adv: Use kref_get for batadv_gw_select batadv_gw_select requires that the caller already has a valid reference for new_gw_node. It is therefore not possible that it has an reference counter of 0 and was still given to this function The kref_get function instead WARNs (with debug information) when the reference counter would still be 0. This makes a bug in batman-adv better visible because kref_get_unless_zero would have ignored this problem. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/gateway_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 0de32ceee156787429035c974316f4e5098cf722 Author: Sven Eckelmann <sven@narfation.org> Date: Sat Mar 5 16:09:21 2016 +0100 batman-adv: Use kref_get for batadv_nc_get_nc_node batadv_nc_get_nc_node requires that the caller already has a valid reference for orig_neigh_node. It is therefore not possible that it has an reference counter of 0 and was still given to this function The kref_get function instead WARNs (with debug information) when the reference counter would still be 0. This makes a bug in batman-adv better visible because kref_get_unless_zero would have ignored this problem. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/network-coding.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) commit c9dad805e9f4fd3978f22c970bae49eaa00b46dd Author: Sven Eckelmann <sven@narfation.org> Date: Sat Mar 5 16:09:20 2016 +0100 batman-adv: Use kref_get for batadv_tvlv_container_get batadv_tvlv_container_get requires that tvlv.container_list_lock is held by the caller. It is therefore not possible that an item in tvlv.container_list has an reference counter of 0 and is still in the list The kref_get function instead WARNs (with debug information) when the reference counter would still be 0. This makes a bug in batman-adv better visible because kref_get_unless_zero would have ignored this problem. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit d7d6de9530db7e385a05e1ae6cde642a617e6c89 Author: Sven Eckelmann <sven@narfation.org> Date: Sat Mar 5 16:09:18 2016 +0100 batman-adv: Increase hard_iface refcnt for ptype The hard_iface is referenced in the packet_type for batman-adv. Increase the refcounter of the hard_interface for it to have an explicit reference for it in case this functionality gets refactorted and the currently used implicit reference for it will be removed. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/hard-interface.c | 2 ++ 1 file changed, 2 insertions(+) commit 4fe56e60ac1be4d103f64743d0a36fd31a70657c Author: Sven Eckelmann <sven@narfation.org> Date: Sat Mar 5 16:09:17 2016 +0100 batman-adv: Check hard_iface refcnt when receiving skb The receive function may start processing an incoming packet while the hard_iface is shut down in a different context. All called functions called with the batadv_hard_iface object belonging to the incoming interface would have to check whether the reference counter is still > 0. This is rather error-prone because this check can be forgotten easily. Instead check the reference counter when receiving the object to make sure that all called functions have a valid reference. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/main.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) commit 273534468f050744b32054f84a1e20ee6b5bd329 Author: Sven Eckelmann <sven@narfation.org> Date: Sat Mar 5 16:09:16 2016 +0100 batman-adv: Check hard_iface refcnt before calling function The batadv_hardif_list list is checked in many situations and the items in this list are given to specialized functions to modify the routing behavior. At the moment each of these called functions has to check itself whether the received batadv_hard_iface has a refcount > 0 before it can increase the reference counter and use it in other objects. This can easily lead to problems because it is not easily visible where all callers of a function got the batadv_hard_iface object from and whether they already hold a valid reference. Checking the reference counter directly before calling a subfunction with a pointer from the batadv_hardif_list avoids this problem. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bat_iv_ogm.c | 11 +++++++++++ net/batman-adv/bat_v_ogm.c | 14 +++++++++++++- net/batman-adv/originator.c | 5 +++++ net/batman-adv/send.c | 6 ++++++ 4 files changed, 35 insertions(+), 1 deletion(-) commit cd9c7bfbbae81bbe75de585ac57b1097e86cf109 Author: Simon Wunderlich <simon.wunderlich@open-mesh.com> Date: Sat Mar 12 10:49:33 2016 +0100 batman-adv: add detection for complex bridge loops There are network setups where the current bridge loop avoidance can't detect bridge loops. The minimal setup affected would consist of two LANs and two separate meshes, connected in a ring like that: A...(mesh1)...B | | (LAN1) (LAN2) | | C...(mesh2)...D Since both the meshes and backbones are separate, the bridge loop avoidance has not enough information to detect and avoid the loop in this case. Even if these scenarios can't be fixed easily, these kind of loops can be detected. This patch implements a periodic check (running every 60 seconds for now) which sends a broadcast frame with a random MAC address on each backbone VLAN. If a broadcast frame with the same MAC address is received shortly after on the mesh, we know that there must be a loop and report that incident as well as throw an uevent to let others handle that problem. Signed-off-by: Simon Wunderlich <simon.wunderlich@open-mesh.com> [sven@narfation.org: fix conflicts with current version] Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/bridge_loop_avoidance.c | 139 +++++++++++++++++++++++++++++++++ net/batman-adv/main.h | 4 + net/batman-adv/packet.h | 1 + net/batman-adv/sysfs.c | 6 +- net/batman-adv/types.h | 8 ++ 5 files changed, 156 insertions(+), 2 deletions(-) commit 2cd45a0671d9e37ab20e844fc4c84717a38b7f52 Author: Andrew Lunn <andrew@lunn.ch> Date: Thu Apr 21 12:57:27 2016 +0200 batman-adv: Create batman soft interfaces within correct netns. When creating a soft interface, create it in the same netns as the hard interface. Replace all references to init_net with the correct name space for the interface being manipulated. Suggested-by: Daniel Ehlers <danielehlers@mindeye.net> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Antonio Quartulli <a@unstable.cc> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/hard-interface.c | 10 +++++----- net/batman-adv/hard-interface.h | 3 ++- net/batman-adv/soft-interface.c | 7 +++++-- net/batman-adv/soft-interface.h | 3 ++- net/batman-adv/sysfs.c | 3 ++- net/batman-adv/translation-table.c | 4 ++-- 6 files changed, 18 insertions(+), 12 deletions(-) commit 0d21cdaa9bbf5efae95cfb6346d26ff6e61f8896 Author: Andrew Lunn <andrew@lunn.ch> Date: Tue Mar 1 22:19:05 2016 +0100 batman-adv: NETIF_F_NETNS_LOCAL feature to prevent netns moves The batX soft interface should not be moved between network name spaces. This is similar to bridges, bonds, tunnels, which are not allowed to move between network namespaces. Suggested-by: Daniel Ehlers <danielehlers@mindeye.net> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Acked-by: Antonio Quartulli <a@unstable.cc> Reviewed-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/soft-interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 7142fc107274a0ebfd31e995de61e71a1e84770f Author: Sven Eckelmann <sven@narfation.org> Date: Sun Feb 28 11:38:52 2016 +0100 batman-adv: Remove hdr_size skb size check in batadv_interface_rx The callers of batadv_interface_rx have to make sure that enough data can be pulled from the skb when they read the batman-adv header. The only two functions using it are either calling pskb_may_pull with hdr_size directly (batadv_recv_bcast_packet) or indirectly via batadv_check_unicast_packet (batadv_recv_unicast_packet). Reported-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/soft-interface.c | 4 ---- 1 file changed, 4 deletions(-) commit 6535db56d5453555b7a40230024225d9ec700585 Author: Sven Eckelmann <sven@narfation.org> Date: Sun Feb 28 11:38:51 2016 +0100 batman-adv: Remove unused parameter recv_if of batadv_interface_rx Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc> net/batman-adv/routing.c | 5 ++--- net/batman-adv/soft-interface.c | 5 ++--- net/batman-adv/soft-interface.h | 4 ++-- 3 files changed, 6 insertions(+), 8 deletions(-) commit e930c765ca5c6b039cd22ebfb4504ea7b5dab43d Author: Catalin Vasile <cata.vasile@nxp.com> Date: Fri May 6 16:18:53 2016 +0300 crypto: caam - fix caam_jr_alloc() ret code caam_jr_alloc() used to return NULL if a JR device could not be allocated for a session. In turn, every user of this function used IS_ERR() function to verify if anything went wrong, which does NOT look for NULL values. This made the kernel crash if the sanity check failed, because the driver continued to think it had allocated a valid JR dev instance to the session and at some point it tries to do a caam_jr_free() on a NULL JR dev pointer. This patch is a fix for this issue. Cc: <stable@vger.kernel.org> Signed-off-by: Catalin Vasile <cata.vasile@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/caam/jr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 5ca55738201c7ae1b556ad87bbb22c139ecc01dd Author: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com> Date: Thu May 5 11:09:27 2016 -0300 crypto: vmx - comply with ABIs that specify vrsave as reserved. It gives significant improvements ( ~+15%) on some modes. These code has been adopted from OpenSSL project in collaboration with the original author (Andy Polyakov <appro@openssl.org>). Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@linux.vnet.ibm.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> drivers/crypto/vmx/ppc-xlate.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) commit ad6a2d0f8d2991102e89a0b24a0a49fa7b0ec844 Author: Eric Engestrom <eric@engestrom.ch> Date: Mon Apr 25 01:24:21 2016 +0100 Documentation: fb: fix spelling mistakes Signed-off-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Documentation/fb/udlfb.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 524edf3877775c46e8b3ba56f9dd75d07914392c Author: Alexey Khoroshilov <khoroshilov@ispras.ru> Date: Tue May 3 05:22:27 2016 +0300 fbdev: fbmem: implement error handling in fbmem_init() fbmem_init() ignores all errors, while fbmem_exit() does not check if deallocating resources are valid. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/video/fbdev/core/fbmem.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) commit a525d0eab17d2ca39c3fbc03783eb2350b040d45 Merge: bae6692 5c08b0f Author: Luca Coelho <luciano.coelho@intel.com> Date: Tue May 10 11:56:24 2016 +0300 Merge tag 'iwlwifi-for-kalle-2016-05-04' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes * fix P2P rates (and possibly other issues) Signed-off-by: Luca Coelho <luciano.coelho@intel.com> commit 18b6562c243f3a4be91a7a240090ebefccf39761 Author: Simon Horman <horms+renesas@verge.net.au> Date: Mon Apr 4 10:48:04 2016 +0900 fbdev: sh_mipi_dsi: remove driver Remove the sh_mipi_dsi driver as it appears to be unused since c0bb9b302769 ("ARCH: ARM: shmobile: Remove ag5evm board support"). Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/video/Kconfig | 4 - drivers/video/fbdev/Kconfig | 1 - drivers/video/fbdev/Makefile | 1 - drivers/video/fbdev/sh_mipi_dsi.c | 587 -------------------------------------- include/video/sh_mipi_dsi.h | 59 ---- 5 files changed, 652 deletions(-) commit cc6df3a24587b3c9f191e34ffb67e269766e2ffc Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Date: Wed May 4 11:43:18 2016 +0200 video: fbdev: imxfb: add some error handling clk_prepare_enable can fail and if it does the controller must not be considered enabled. So check for errors, properly unwind and give the error code back to the caller. While touching the clock code also enable the clocks in the same direction and disable in reverse order. Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/video/fbdev/imxfb.c | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) commit 46ffe1097bc05d6ca8c5b293cbfe167d17447af1 Author: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Date: Wed May 4 11:43:16 2016 +0200 video: fbdev: imxfb: fix semantic of .get_power and .set_power .set_power gets passed an FB_BLANK_XXX value, not a bool. So 0 signals on; and >1 means off. The same applies for return values of .get_power. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> drivers/video/fbdev/imxfb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 0400ed0a083a6567d45df96fb813f4702ece7d1b Author: Dong Aisheng <aisheng.dong@nxp.com> Date: Thu Apr 21 00:51:31 2016 +0800 mmc: core: remove the invalid message in mmc_select_timing mmc_select_hs200() and mmc_select_hs() will keep the timing as before if switch fails. So it's meaningless to print the failed switched mode outside based on the current host timing. Furthermore, the original print is wrong, it should be: pr_warn("%s: switch to %s failed\n", mmc_hostname(card->host), mmc_card_hs(card) ? "high-speed" : (mmc_card_hs200(card) ? "hs200" : "")); Since we already have error message in mmc_select_hs200(), simply remove it outside. Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/core/mmc.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) commit e51534c806609c806d81bfb034f02737461f855c Author: Dong Aisheng <aisheng.dong@nxp.com> Date: Thu Apr 21 00:51:30 2016 +0800 mmc: core: fix using wrong io voltage if mmc_select_hs200 fails Currently MMC core will keep going if HS200/HS timing switch failed with -EBADMSG error by the assumption that the old timing is still valid. However, for mmc_select_hs200 case, the signal voltage may have already been switched. If the timing switch failed, we should fall back to the old voltage in case the card is continue run with legacy timing. If fall back signal voltage failed, we explicitly report an EIO error to force retry during the next power cycle. Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> drivers/mmc/core/mmc.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) commit 54a5e73f4d6e31d5628e08b4d575c71d71670e09 Author: Laurence Oberman <loberman@redhat.com> Date: Tue May 10 01:23:17 2016 -0700 tcm_qla2xxx Add SCSI command jammer/discard capability This patch introduces support for TCM_QLA2XXX_DEBUG and associated tcm_qla2xxx_tpg->tpg_attrib.jam_host checking used to test dropped packets to FC host environments. Tested by: Laurence Oberman <loberman@redhat.com> Signed-off-by: Laurence Oberman <loberman@redhat.com> Acked-by: Himanshu Madhani <himanshu.madhani@qlogic.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Documentation/scsi/tcm_qla2xxx.txt | 22 ++++++++++++++++++++++ drivers/scsi/qla2xxx/Kconfig | 9 +++++++++ drivers/scsi/qla2xxx/tcm_qla2xxx.c | 20 ++++++++++++++++++++ drivers/scsi/qla2xxx/tcm_qla2xxx.h | 1 + 4 files changed, 52 insertions(+) commit 2b16509c5f26d6c160bd89164cf18f18d713daf6 Author: Imran Haider <imran1008@gmail.com> Date: Sun May 8 11:17:54 2016 -0400 iscsi-target: graceful disconnect on invalid mapping to iovec Ensures the first page entry is within bounds. A failed check would terminate the iSCSI connection instead of causing a NULL-dereference. This violation seems to happen with certain iSCSI commands where the computed CDB length is zero but the expected transfer length is non-zero. The real problem is probably on the iSCSI initiator side since there is a discrepancy between the iSCSI header and the encapsulated CDB Opcode. Signed-off-by: Imran Haider <imran1008@gmail.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) commit cb7911694771faf16930b72a104d3cd41d500e2c Author: Colin Ian King <colin.king@canonical.com> Date: Fri May 6 00:16:17 2016 +0100 target: need_to_release is always false, remove redundant check and kfree The removal the #ifdef'd code on CONFIG_ARCH_HAS_SG_CHAIN in commit 02c4de53add1b79 ("target/rd: always chain S/G list") removed the setting of need_to_release to true, so we are now left with need_to_release always being false and hence the conditional kfree is never reached. Clean up the dead code by removing need_to_release and the conditional kfree. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/target_core_rd.c | 4 ---- 1 file changed, 4 deletions(-) commit d94331fab6d4d48280a5cea646352db90777966d Author: Christoph Hellwig <hch@lst.de> Date: Mon May 2 15:45:25 2016 +0200 target: remove sess_kref and ->shutdown_session Both of them are unused now that drivers handle any delayed session shutdown internally. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/target_core_tpg.c | 14 +++----------- drivers/target/target_core_transport.c | 23 ----------------------- include/target/target_core_base.h | 1 - include/target/target_core_fabric.h | 6 ------ 4 files changed, 3 insertions(+), 41 deletions(-) commit 44f33d0fb5a7181cc34529c211d7b5039d8a0a4b Author: Christoph Hellwig <hch@lst.de> Date: Mon May 2 15:45:24 2016 +0200 iscsi-target: remove usage of ->shutdown_session ->shutdown session only decideѕ if the target core calls ->close_session directly, or if the fabrics drivers calls it manually later through target_put_session, which at this point will always close the session as it has been removed from the lookup list and thus no new references will be acquired from the core. So instead remove ->shutdown and have the core call ->close_session directly, and replace all calls to target_put_session in the iSCSI target with direct calls to iscsit_close_session. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 10 +++++++--- drivers/target/iscsi/iscsi_target_configfs.c | 19 ++----------------- drivers/target/iscsi/iscsi_target_erl0.c | 2 +- drivers/target/iscsi/iscsi_target_login.c | 4 ++-- 4 files changed, 12 insertions(+), 23 deletions(-) commit e3dc0e316559de8c0139bc84d82244e0907c4f17 Author: Christoph Hellwig <hch@lst.de> Date: Mon May 2 15:45:23 2016 +0200 tcm_qla2xxx: introduce a private sess_kref This stops abusing the common sess_kref to overload it for private usage, which allows removing the shutdown_session method as well. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/scsi/qla2xxx/qla_target.c | 56 +++++++++++++++++++++----------------- drivers/scsi/qla2xxx/qla_target.h | 4 +-- drivers/scsi/qla2xxx/tcm_qla2xxx.c | 39 ++------------------------ 3 files changed, 35 insertions(+), 64 deletions(-) commit 36ec2ddc0d9309d52e14eb84c0807a78604460dc Author: Christoph Hellwig <hch@lst.de> Date: Mon May 2 15:45:22 2016 +0200 target: make close_session optional Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Documentation/target/tcm_mod_builder.py | 8 -------- drivers/target/loopback/tcm_loop.c | 6 ------ drivers/target/sbp/sbp_target.c | 6 ------ drivers/target/target_core_configfs.c | 4 ---- drivers/target/target_core_transport.c | 3 ++- drivers/usb/gadget/function/f_tcm.c | 5 ----- drivers/vhost/scsi.c | 6 ------ drivers/xen/xen-scsiback.c | 5 ----- 8 files changed, 2 insertions(+), 41 deletions(-) commit 22d11759a4e7018f8cd7914e4e706ca2c96d6c01 Author: Christoph Hellwig <hch@lst.de> Date: Mon May 2 15:45:21 2016 +0200 target: make ->shutdown_session optional Turns out the template and thus many drivers got the return value wrong: 0 means the fabrics driver needs to put a session reference, which no driver except for the iSCSI target drivers did. Fortunately none of these drivers supports explicit Node ACLs, so the bug was harmless. Even without that only qla2xxx and iscsi every did real work in shutdown_session, so get rid of the boilerplate code in all other drivers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> Documentation/target/tcm_mod_builder.py | 8 -------- drivers/infiniband/ulp/srpt/ib_srpt.c | 9 --------- drivers/target/loopback/tcm_loop.c | 6 ------ drivers/target/sbp/sbp_target.c | 6 ------ drivers/target/target_core_configfs.c | 4 ---- drivers/target/target_core_tpg.c | 5 ++++- drivers/target/tcm_fc/tcm_fc.h | 1 - drivers/target/tcm_fc/tfc_conf.c | 1 - drivers/target/tcm_fc/tfc_sess.c | 12 ------------ drivers/usb/gadget/function/f_tcm.c | 6 ------ drivers/vhost/scsi.c | 6 ------ drivers/xen/xen-scsiback.c | 6 ------ 12 files changed, 4 insertions(+), 66 deletions(-) commit fba81f8831b20272a97a990e5d47c332e9b1f65d Author: Christoph Hellwig <hch@lst.de> Date: Mon May 2 15:45:20 2016 +0200 target: remove acl_stop Ensure we can use list_empty on the sess_acl_list to remove the need for this flag. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/target_core_tpg.c | 13 +++++-------- drivers/target/target_core_transport.c | 4 ++-- include/target/target_core_base.h | 1 - 3 files changed, 7 insertions(+), 11 deletions(-) commit bc6e6bb470eda42f44bcac96c261cff1216577b3 Author: Christoph Hellwig <hch@lst.de> Date: Mon May 2 15:45:19 2016 +0200 target: consolidate and fix session shutdown Factor out a helper to shutdown sessions for a Node ACL, and make it properly restart the list walk after dropping the lock. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/target_core_tpg.c | 87 +++++++++++++++------------------------- 1 file changed, 33 insertions(+), 54 deletions(-) commit d2d3462f9f08da364c8fbd41e8e32229d610d49d Author: Kees Cook <keescook@chromium.org> Date: Mon May 9 13:22:09 2016 -0700 x86/KASLR: Clarify purpose of each get_random_long() KASLR will be calling get_random_long() twice, but the debug output won't distinguishing between them. This patch adds a report on when it is fetching the physical vs virtual address. With this, once the virtual offset is separate, the report changes from: KASLR using RDTSC... KASLR using RDTSC... into: Physical KASLR using RDTSC... Virtual KASLR using RDTSC... Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Young <dyoung@redhat.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: kernel-hardening@lists.openwall.com Cc: lasse.collin@tukaani.org Link: http://lkml.kernel.org/r/1462825332-10505-7-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/boot/compressed/kaslr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) commit 071a74930e60d1fa51207d71f00a35b4f9d4d179 Author: Baoquan He <bhe@redhat.com> Date: Mon May 9 13:22:08 2016 -0700 x86/KASLR: Add virtual address choosing function To support randomizing the kernel virtual address separately from the physical address, this patch adds find_random_virt_addr() to choose a slot anywhere between LOAD_PHYSICAL_ADDR and KERNEL_IMAGE_SIZE. Since this address is virtual, not physical, we can place the kernel anywhere in this region, as long as it is aligned and (in the case of kernel being larger than the slot size) placed with enough room to load the entire kernel image. For clarity and readability, find_random_addr() is renamed to find_random_phys_addr() and has "size" renamed to "image_size" to match find_random_virt_addr(). Signed-off-by: Baoquan He <bhe@redhat.com> [ Rewrote changelog, refactored slot calculation for readability. ] [ Renamed find_random_phys_addr() and size argument. ] Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Young <dyoung@redhat.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: kernel-hardening@lists.openwall.com Cc: lasse.collin@tukaani.org Link: http://lkml.kernel.org/r/1462825332-10505-6-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/boot/compressed/kaslr.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) commit 06486d6c97cebc2433a40a979f3849cd68184de9 Author: Kees Cook <keescook@chromium.org> Date: Mon May 9 13:22:07 2016 -0700 x86/KASLR: Return earliest overlap when avoiding regions In preparation for being able to detect where to split up contiguous memory regions that overlap with memory regions to avoid, we need to pass back what the earliest overlapping region was. This modifies the overlap checker to return that information. Based on a separate mem_min_overlap() implementation by Baoquan He. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Young <dyoung@redhat.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: kernel-hardening@lists.openwall.com Cc: lasse.collin@tukaani.org Link: http://lkml.kernel.org/r/1462825332-10505-5-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/boot/compressed/kaslr.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) commit c401cf1524153f9c2ede7ab8ece403513925770a Author: Baoquan He <bhe@redhat.com> Date: Mon May 9 13:22:06 2016 -0700 x86/KASLR: Add 'struct slot_area' to manage random_addr slots In order to support KASLR moving the kernel anywhere in physical memory (which could be up to 64TB), we need to handle counting the potential randomization locations in a more efficient manner. In the worst case with 64TB, there could be roughly 32 * 1024 * 1024 randomization slots if CONFIG_PHYSICAL_ALIGN is 0x1000000. Currently the starting address of candidate positions is stored into the slots[] array, one at a time. This method would cost too much memory and it's also very inefficient to get and save the slot information into the slot array one by one. This patch introduces 'struct slot_area' to manage each contiguous region of randomization slots. Each slot_area will contain the starting address and how many available slots are in this area. As with the original code, the slot_areas[] will avoid the mem_avoid[] regions. Since setup_data is a linked list, it could contain an unknown number of memory regions to be avoided, which could cause us to fragment the contiguous memory that the slot_area array is tracking. In normal operation this level of fragmentation will be extremely rare, but we choose a suitably large value (100) for the array. If setup_data forces the slot_area array to become highly fragmented and there are more slots available beyond the first 100 found, the rest will be ignored for KASLR selection. The function store_slot_info() is used to calculate the number of slots available in the passed-in memory region and stores it into slot_areas[] after adjusting for alignment and size requirements. Signed-off-by: Baoquan He <bhe@redhat.com> [ Rewrote changelog, squashed with new functions. ] Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Young <dyoung@redhat.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: kernel-hardening@lists.openwall.com Cc: lasse.collin@tukaani.org Link: http://lkml.kernel.org/r/1462825332-10505-4-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/boot/compressed/kaslr.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) commit cb18ef0da259db611fbf52806592fde5f469ae67 Author: Kees Cook <keescook@chromium.org> Date: Mon May 9 13:22:05 2016 -0700 x86/boot: Add missing file header comments There were some files with missing header comments. Since they are included from both compressed and regular kernels, make note of that. Also corrects a typo in the mem_avoid comments. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Young <dyoung@redhat.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: kernel-hardening@lists.openwall.com Cc: lasse.collin@tukaani.org Link: http://lkml.kernel.org/r/1462825332-10505-3-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/boot/compressed/kaslr.c | 2 +- arch/x86/boot/early_serial_console.c | 4 ++++ arch/x86/mm/ident_map.c | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) commit 434a6c9f90f7ab5ade619455df01ef5ebea533ee Author: Kees Cook <keescook@chromium.org> Date: Mon May 9 13:22:04 2016 -0700 x86/KASLR: Initialize mapping_info every time As it turns out, mapping_info DOES need to be initialized every time, because pgt_data address could be changed during kernel relocation. So it can not be build time assigned. Without this, page tables were not being corrected updated, which could cause reboots when a physical address beyond 2G was chosen. Signed-off-by: Kees Cook <keescook@chromium.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Andy Lutomirski <luto@kernel.org> Cc: Baoquan He <bhe@redhat.com> Cc: Borislav Petkov <bp@alien8.de> Cc: Borislav Petkov <bp@suse.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Dave Young <dyoung@redhat.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Vivek Goyal <vgoyal@redhat.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: kernel-hardening@lists.openwall.com Cc: lasse.collin@tukaani.org Link: http://lkml.kernel.org/r/1462825332-10505-2-git-send-email-keescook@chromium.org Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/boot/compressed/pagetable.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) commit 36a39ac967a548154a0fe44d71cb0063fa05010f Author: Borislav Petkov <bp@suse.de> Date: Sat May 7 11:59:40 2016 +0200 x86/boot: Comment what finalize_identity_maps() does So it is not really obvious that finalize_identity_maps() doesn't do any finalization but it *actually* writes CR3 with the ident PGD. Comment that at the call site. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Kees Cook <keescook@chromium.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: akpm@linux-foundation.org Cc: bhe@redhat.com Cc: dyoung@redhat.com Cc: jkosina@suse.cz Cc: linux-tip-commits@vger.kernel.org Cc: luto@kernel.org Cc: vgoyal@redhat.com Cc: yinghai@kernel.org Link: http://lkml.kernel.org/r/20160507100541.GA24613@pd.tnic Signed-off-by: Ingo Molnar <mingo@kernel.org> arch/x86/boot/compressed/kaslr.c | 2 ++ 1 file changed, 2 insertions(+) commit f0d523668cb122905a541cb6b86e3ae49260ae5e Author: Nicolas Ferre <nicolas.ferre@atmel.com> Date: Tue May 10 09:57:41 2016 +0200 ARM: at91/defconfig: sama5: add CONFIG_FHANDLE CONFIG_FHANDLE is listed as a mandatory kernel option for systemd. So explicitly enable it to allow easy use of systemd userspace. Reported-by: Marek Vasut <marex@denx.de> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> arch/arm/configs/sama5_defconfig | 1 + 1 file changed, 1 insertion(+) commit 523567168da04bae0f88802ddef49d00072c5d58 Author: David Sterba <dsterba@suse.com> Date: Wed Apr 27 03:07:39 2016 +0200 btrfs: make find_workspace warn if there are no workspaces Be verbose if there are no workspaces at all, ie. the module init time preallocation failed. Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/compression.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) commit e721e49dd1681d45d71919f0561f5e978a34153c Author: David Sterba <dsterba@suse.com> Date: Wed Apr 27 02:41:17 2016 +0200 btrfs: make find_workspace always succeed With just one preallocated workspace we can guarantee forward progress even if there's no memory available for new workspaces. The cost is more waiting but we also get rid of several error paths. On average, there will be several idle workspaces, so the waiting penalty won't be so bad. In the worst case, all cpus will compete for one workspace until there's some memory. Attempts to allocate a new one are done each time the waiters are woken up. Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/compression.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit f77dd0d6b2f0f2cf290cacbd48f5eee18586e52b Author: David Sterba <dsterba@suse.com> Date: Wed Apr 27 02:55:15 2016 +0200 btrfs: preallocate compression workspaces Preallocate one workspace for each compression type so we can guarantee forward progress in the worst case. A failure cannot be a hard error as we might not use compression at all on the filesystem. If we can't allocate the workspaces later when need them, it might actually deadlock, but in such situation the system has effectively not enough memory to operate properly. Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/compression.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) commit 6ac10a6ac2b11ada24580cc76dcd0c182061c576 Author: David Sterba <dsterba@suse.com> Date: Wed Apr 27 02:15:15 2016 +0200 btrfs: rename and document compression workspace members The names are confusing, pick more fitting names and add comments. Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/compression.c | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) commit e1860a7724828a341037b010b3f4ff58bad53f95 Author: David Sterba <dsterba@suse.com> Date: Mon May 9 14:11:38 2016 +0200 btrfs: GFP_NOFS does not GFP_HIGHMEM Masking HIGHMEM out of NOFS does not make sense. Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/delayed-inode.c | 2 +- fs/btrfs/disk-io.c | 2 +- fs/btrfs/extent_io.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) commit 05135f597adcb94dc34fa87b82e68eb55e00f0eb Author: David Sterba <dsterba@suse.com> Date: Mon May 9 11:32:39 2016 +0200 btrfs: switch to common message helpers in open_ctree, adjust messages Currently we lack the identification of the filesystem in most if not all mount messages, done via printk/pr_* functions. We can use the btrfs_* helpers in open_ctree, as the fs_info <-> sb link is established at the beginning of the function. The messages have been updated at the same time to be more consistent: * dropped sb->s_id, as it's not available via btrfs_* * added %d for return code where appropriate * wording changed * %Lx replaced by %llx Signed-off-by: David Sterba <dsterba@suse.com> fs/btrfs/disk-io.c | 102 ++++++++++++++++++++++++++--------------------------- 1 file changed, 50 insertions(+), 52 deletions(-) commit 194e958c5c3bf4fa0805b0653fe2d0428d3791ff Author: Johan Hovold <johan@kernel.org> Date: Sun May 8 20:08:03 2016 +0200 USB: serial: fix minor-number allocation Due to a missing upper bound, invalid minor numbers could be assigned to ports. Such devices would later fail to register, but let's catch this early as intended and avoid having devices with only a subset of their ports registered (potentially the empty set). Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/serial/usb-serial.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 028c49f5e02a257c94129cd815f7c8485f51d4ef Author: Johan Hovold <johan@kernel.org> Date: Sun May 8 20:08:02 2016 +0200 USB: serial: quatech2: fix use-after-free in probe error path The interface read URB is submitted in attach, but was only unlinked by the driver at disconnect. In case of a late probe error (e.g. due to failed minor allocation), disconnect is never called and we would end up with active URBs for an unbound interface. This in turn could lead to deallocated memory being dereferenced in the completion callback. Fixes: f7a33e608d9a ("USB: serial: add quatech2 usb to serial driver") Cc: stable <stable@vger.kernel.org> # v3.5: 40d04738491d Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/serial/quatech2.c | 1 + 1 file changed, 1 insertion(+) commit 9e45284984096314994777f27e1446dfbfd2f0d7 Author: Johan Hovold <johan@kernel.org> Date: Sun May 8 20:08:01 2016 +0200 USB: serial: mxuport: fix use-after-free in probe error path The interface read and event URBs are submitted in attach, but were never explicitly unlinked by the driver. Instead the URBs would have been killed by usb-serial core on disconnect. In case of a late probe error (e.g. due to failed minor allocation), disconnect is never called and we could end up with active URBs for an unbound interface. This in turn could lead to deallocated memory being dereferenced in the completion callbacks. Fixes: ee467a1f2066 ("USB: serial: add Moxa UPORT 12XX/14XX/16XX driver") Cc: stable <stable@vger.kernel.org> # v3.14 Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/serial/mxuport.c | 10 ++++++++++ 1 file changed, 10 insertions(+) commit 0cd782b0bea1917a522efaedf79429fd7f6621b9 Author: Johan Hovold <johan@kernel.org> Date: Sun May 8 20:08:00 2016 +0200 USB: serial: keyspan: fix debug and error messages The URB status is signed and should be printed using %d rather than %x. Also print endpoint addresses consistently using %x rather than %d, and merge a broken-up error message string. Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/serial/keyspan.c | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) commit 61924505ae0037527879446b36ac27c60210bc77 Author: Johan Hovold <johan@kernel.org> Date: Sun May 8 20:07:59 2016 +0200 USB: serial: keyspan: fix URB unlink A driver must not rely on the URB status field to try to determine if an URB is active. Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/serial/keyspan.c | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) commit 35be1a71d70775e7bd7e45fa6d2897342ff4c9d2 Author: Johan Hovold <johan@kernel.org> Date: Sun May 8 20:07:58 2016 +0200 USB: serial: keyspan: fix use-after-free in probe error path The interface instat and indat URBs were submitted in attach, but never unlinked in release before deallocating the corresponding transfer buffers. In the case of a late probe error (e.g. due to failed minor allocation), disconnect would not have been called before release, causing the buffers to be freed while the URBs are still in use. We'd also end up with active URBs for an unbound interface. Fixes: f9c99bb8b3a1 ("USB: usb-serial: replace shutdown with disconnect, release") Cc: stable <stable@vger.kernel.org> # v2.6.31 Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/serial/keyspan.c | 4 ++++ 1 file changed, 4 insertions(+) commit c8d62957d450cc1a22ce3242908709fe367ddc8e Author: Johan Hovold <johan@kernel.org> Date: Sun May 8 20:07:57 2016 +0200 USB: serial: io_edgeport: fix memory leaks in probe error path URBs and buffers allocated in attach for Epic devices would never be deallocated in case of a later probe error (e.g. failure to allocate minor numbers) as disconnect is then never called. Fix by moving deallocation to release and making sure that the URBs are first unlinked. Fixes: f9c99bb8b3a1 ("USB: usb-serial: replace shutdown with disconnect, release") Cc: stable <stable@vger.kernel.org> # v2.6.31 Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/serial/io_edgeport.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) commit c5c0c55598cefc826d6cfb0a417eeaee3631715c Author: Johan Hovold <johan@kernel.org> Date: Sun May 8 20:07:56 2016 +0200 USB: serial: io_edgeport: fix memory leaks in attach error path Private data, URBs and buffers allocated for Epic devices during attach were never released on errors (e.g. missing endpoints). Fixes: 6e8cf7751f9f ("USB: add EPIC support to the io_edgeport driver") Cc: stable <stable@vger.kernel.org> # v2.6.21 Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> drivers/usb/serial/io_edgeport.c | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) commit bae6692c24236d0203f88a444986d86437a858fa Merge: 46167a8 57fbcce Author: Luca Coelho <luciano.coelho@intel.com> Date: Tue May 10 10:30:56 2016 +0300 Merge tag 'mac80211-next-for-davem-2016-04-13' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next into master To synchronize with Kalle, here's just a big change that affects all drivers - removing the duplicated enum ieee80211_band and replacing it by enum nl80211_band. On top of that, just a small documentation update. commit 201f9b9751bd3f0fc546df87a69c436b162910f0 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Tue Apr 26 19:29:50 2016 +0200 drm/exynos: Use lockless gem BO free callback No dev->struct_mutex anywhere to be seen. Cc: Inki Dae <inki.dae@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Acked-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1461691808-12414-18-git-send-email-daniel.vetter@ffwll.ch drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit 44156affd1844bdfd90cc791cf5fdb6f9a04e238 Author: Greg Ungerer <gerg@linux-m68k.org> Date: Tue May 10 16:56:37 2016 +1000 m68k: change m68knommu maintainer email address Change my email address in the "UCLINUX (M68KNOMMU and COLDFIRE)" entry from gerg@uclinux.org to gerg@linux-m68k.org. I intend using that for m68k (and uclinux) specific work from now on. Signed-off-by: Greg Ungerer <gerg@linux-m68k.org> MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 75229eca569fb275de6d1a0e019df7d63b298762 Author: Noralf Trønnes <noralf@tronnes.org> Date: Thu May 5 15:24:32 2016 +0200 drm: Make drm_encoder_helper_funcs optional Make drm_encoder_helper_funcs and it's functions optional to avoid having dummy functions. Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462454674-2246-3-git-send-email-noralf@tronnes.org drivers/gpu/drm/drm_atomic_helper.c | 11 ++++++++-- drivers/gpu/drm/drm_crtc_helper.c | 41 +++++++++++++++++++++++++++++-------- 2 files changed, 42 insertions(+), 10 deletions(-) commit 9730ffcb8957e1ce9e7d903f7a5db09038a9db8d Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:20 2016 +0530 cxgbit: add files for cxgbit.ko cxgbit.h - This file contains data structure definitions for cxgbit.ko. cxgbit_lro.h - This file contains data structure definitions for LRO support. cxgbit_main.c - This file contains code for registering with iscsi target transport and cxgb4 driver. cxgbit_cm.c - This file contains code for connection management. cxgbit_target.c - This file contains code for processing iSCSI PDU. cxgbit_ddp.c - This file contains code for Direct Data Placement. (added check for NULL sg in cxgbit_set_one_ppod) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> (add Kconfig and Makefile v2: added dependency on INET) Reported-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/Kconfig | 2 + drivers/target/iscsi/Makefile | 1 + drivers/target/iscsi/cxgbit/Kconfig | 7 + drivers/target/iscsi/cxgbit/Makefile | 6 + drivers/target/iscsi/cxgbit/cxgbit.h | 353 +++++ drivers/target/iscsi/cxgbit/cxgbit_cm.c | 2086 +++++++++++++++++++++++++++ drivers/target/iscsi/cxgbit/cxgbit_ddp.c | 325 +++++ drivers/target/iscsi/cxgbit/cxgbit_lro.h | 72 + drivers/target/iscsi/cxgbit/cxgbit_main.c | 701 +++++++++ drivers/target/iscsi/cxgbit/cxgbit_target.c | 1561 ++++++++++++++++++++ 10 files changed, 5114 insertions(+) commit d2faaefb8d4c63fbc680512b04f9eb57667e2682 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:19 2016 +0530 iscsi-target: export symbols export symbols for ISCSI_HW_OFFLOAD transport drivers. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 25 ++++++++++------- drivers/target/iscsi/iscsi_target_datain_values.c | 1 + drivers/target/iscsi/iscsi_target_login.c | 3 ++- drivers/target/iscsi/iscsi_target_nego.c | 1 + drivers/target/iscsi/iscsi_target_parameters.c | 1 + drivers/target/iscsi/iscsi_target_util.c | 2 ++ include/target/iscsi/iscsi_transport.h | 33 +++++++++++++++++++++++ 7 files changed, 56 insertions(+), 10 deletions(-) commit b4869ee9525dd6ded57f1898b65035d5529acfa0 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:18 2016 +0530 iscsi-target: call complete on conn_logout_comp ISCSI_HW_OFFLOAD transport drivers waits on conn_logout_comp as ISCSI_TCP driver so call complete if transport type is ISCSI_HW_OFFLOAD. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) commit 1c50ff424e3d9a392ec2df797c3b6083ed70fca6 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:17 2016 +0530 iscsi-target: clear tx_thread_active clear tx_thread_active for ISCSI_HW_OFFLOAD transport in logout_post_handler functions. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 1c46960e3310adf6ac95078210fdb16987c3b31d Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:16 2016 +0530 iscsi-target: add new offload transport type Add new transport type ISCSI_HW_OFFLOAD, hw offload transport drivers will use this transport type. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target_configfs.c | 76 ++++++++++++++++++++++++++++ include/target/iscsi/iscsi_target_core.h | 1 + 2 files changed, 77 insertions(+) commit 864e504ae2bbdd7efcd6923075047a7a6b5ade02 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:15 2016 +0530 iscsi-target: use conn_transport->transport_type in text rsp Use conn_transport->transport_type instead of ISCSI_TCP to build text response. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit c0b7373be811307c5ff1de8c8547aae3597d24aa Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:14 2016 +0530 iscsi-target: move iscsit_thread_check_cpumask() Move iscsit_thread_check_cpumask() to header file so that ISCSI_HW_OFFLOAD and other transport drivers can call this function to ensure both tx and rx thread runs on same cpu. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 26 -------------------------- include/target/iscsi/iscsi_target_core.h | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 26 deletions(-) commit 8567270d8de6192eb2632b45421b1fde9bcda2f2 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:13 2016 +0530 iscsi-target: add void (*iscsit_get_r2t_ttt)() Add void (*iscsit_get_r2t_ttt)() to struct iscsit_transport, iscsi-target uses this callback to get r2t->targ_xfer_tag. cxgbit.ko needs this callback for Direct Data Placement of Data Out pdus, adapter uses ttt in Data Out pdus for placing data directly in to the host buffers. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 5 ++++- include/target/iscsi/iscsi_transport.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) commit 42bc3e57877f2357ccbbc3ad6e6c7d9be44579f9 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:12 2016 +0530 iscsi-target: add int (*iscsit_validate_params)() Add int (*iscsit_validate_params)() to struct iscsit_transport, iscsi-target uses this callback for validating conn operational parameters. cxgbit.ko needs this callback to check and update the value of MAXXMITDATASEGMENTLENGTH. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target_login.c | 10 ++++++++++ include/target/iscsi/iscsi_transport.h | 1 + 2 files changed, 11 insertions(+) commit e8205cca0abd126418c18030fb8c9ef272080d70 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:11 2016 +0530 iscsi-target: split iscsi_target_rx_thread() split iscsi_target_rx_thread() into two parts, 1. iscsi_target_rx_thread() is common to all transport drivers, it will call Rx function registered by transport driver. 2. iscsit_get_rx_pdu() is Rx function for ISCSI_TCP transport. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 59 +++++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 26 deletions(-) commit 187e84f7c2e4fa0028241c253c24658ef658e5d3 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:10 2016 +0530 iscsi-target: add void (*iscsit_get_rx_pdu)() Add void (*iscsit_get_rx_pdu)() to struct iscsit_transport, iscsi-target uses this callback to receive and process Rx iSCSI PDUs. cxgbit.ko needs this callback to reuse iscsi-target Rx thread. Signed-off-by: Varun Prakash <varun@chelsio.com> Acked-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/infiniband/ulp/isert/ib_isert.c | 10 ++++++++++ drivers/target/iscsi/iscsi_target.c | 10 ++-------- include/target/iscsi/iscsi_transport.h | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) commit 7ec811a8e9c3b8289a863d0dac717e08a5093403 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:09 2016 +0530 iscsi-target: add void (*iscsit_release_cmd)() Add void (*iscsit_release_cmd)() to struct iscsit_transport, iscsi-target uses this callback to release transport driver resources associated with an iSCSI cmd. cxgbit.ko needs this callback to release DDP resource and sg page in case of PASSTHROUGH_SG_TO_MEM_NOALLOC. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target_util.c | 3 +++ include/target/iscsi/iscsi_transport.h | 1 + 2 files changed, 4 insertions(+) commit 2854bb23cd5bef39fd845b7bdfac7799438bb920 Author: Varun Prakash <varun@chelsio.com> Date: Wed Apr 20 00:00:08 2016 +0530 iscsi-target: add int (*iscsit_xmit_pdu)() Add int (*iscsit_xmit_pdu)() to struct iscsit_transport, iscsi-target uses this callback to transmit an iSCSI PDU. cxgbit.ko needs this callback to avoid duplicating iscsit_immediate_queue() and iscsit_response_queue() code. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/iscsi/iscsi_target.c | 546 ++++++++++++--------------------- include/target/iscsi/iscsi_transport.h | 2 + 2 files changed, 197 insertions(+), 351 deletions(-) commit fdddf932269a75c3dd1c68d82b9a0fbc1821a2a8 Author: Lee Duncan <lduncan@suse.com> Date: Thu Apr 14 18:18:51 2016 -0700 target: use new "dbroot" target attribute This commit updates the target core ALUA and PR modules to use the new "dbroot" attribute instead of assuming the target database is in "/var/target". Signed-off-by: Lee Duncan <lduncan@suse.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/target_core_alua.c | 6 +++--- drivers/target/target_core_pr.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit a96e9783e05851d5f06da0ae7635aec55a228e3d Author: Lee Duncan <lduncan@suse.com> Date: Thu Apr 14 18:18:50 2016 -0700 target: make target db location configurable This commit adds the read-write attribute "dbroot", in the top-level CONFIGFS (core) target directory, normally /sys/kernel/config/target. This attribute defaults to "/var/target" but can be changed by writing a new pathname string to it. Changing this attribute is only allowed when no fabric drivers are loaded and the supplied value specifies an existing directory. Target modules that care about the target database root directory will be modified to use this attribute in a future commit. Signed-off-by: Lee Duncan <lduncan@suse.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org> drivers/target/target_core_configfs.c | 62 +++++++++++++++++++++++++++++++++++ drivers/target/target_core_internal.h | 6 ++++ 2 files changed, 68 insertions(+) commit 19ea5da07a1f315191212e094ec44fb1caec9580 Merge: 2e726dc a10e2bde Author: Dave Airlie <airlied@redhat.com> Date: Tue May 10 15:07:50 2016 +1000 Merge branch 'drm-etnaviv-next' of git://git.pengutronix.de:/git/lst/linux into drm-next not much new stuff this time. A (micro-)optimization to allow the hangcheck timer to be coalesced with other wakeups in the system and a fix to handle mmaping of prime imported and userptr buffers correctly. I don't think we have seen any actual issues going back to this yet, so I figured it's safer to get this in via drm-next rather than smashing it into fixes. * 'drm-etnaviv-next' of git://git.pengutronix.de:/git/lst/linux: drm/etnaviv: fix mmap operations for userptr and dma-buf objects drm/etnaviv: take etnaviv_gem_obj in etnaviv_gem_mmap_obj drm/etnaviv: use deferrable timer for hangcheck handler timer: add setup_deferrable_timer macro commit c047c3b1af6214b447e353527e394fa3f3e86397 Author: Arnd Bergmann <arnd@arndb.de> Date: Mon May 9 21:47:23 2016 +0200 netfilter: conntrack: remove uninitialized shadow variable A recent commit introduced an unconditional use of an uninitialized variable, as reported in this gcc warning: net/netfilter/nf_conntrack_core.c: In function '__nf_conntrack_confirm': net/netfilter/nf_conntrack_core.c:632:33: error: 'ctinfo' may be used uninitialized in this function [-Werror=maybe-uninitialized] bytes = atomic64_read(&counter[CTINFO2DIR(ctinfo)].bytes); ^ net/netfilter/nf_conntrack_core.c:628:26: note: 'ctinfo' was declared here enum ip_conntrack_info ctinfo; The problem is that a local variable shadows the function parameter. This removes the local variable, which looks like what Pablo originally intended. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 71d8c47fc653 ("netfilter: conntrack: introduce clash resolution on insertion race") Acked-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net> net/netfilter/nf_conntrack_core.c | 1 - 1 file changed, 1 deletion(-) commit 2e726dc4b4e2dd3ae3fe675f9d3af88a2d593ee1 Merge: bafb86f ac4b128 Author: Dave Airlie <airlied@redhat.com> Date: Tue May 10 15:01:47 2016 +1000 Merge tag 'mediatek-drm-2016-05-09' of git://git.pengutronix.de/git/pza/linux into drm-next MT8173 DRM support - device tree binding documentation for all MT8173 display subsystem components - basic mediatek-drm driver for MT8173 with two optional, currently fixed output paths: - DSI encoder support for DSI and (via bridge) eDP panels - DPI encoder support for output to HDMI bridge - necessary clock tree changes for the DPI->HDMI path - export mtk-smi functions used by mediatek-drm * tag 'mediatek-drm-2016-05-09' of git://git.pengutronix.de/git/pza/linux: clk: mediatek: remove hdmitx_dig_cts from TOP clocks clk: mediatek: Add hdmi_ref HDMI PHY PLL reference clock output clk: mediatek: make dpi0_sel propagate rate changes drm/mediatek: Add DPI sub driver drm/mediatek: Add DSI sub driver drm/mediatek: Add DRM Driver for Mediatek SoC MT8173. dt-bindings: drm/mediatek: Add Mediatek display subsystem dts binding memory: mtk-smi: export mtk_smi_larb_get/put commit 0e3c82df576aa8d99e5a867f2c8fac43686d10b7 Merge: bfca2eb b45bd1d Author: David S. Miller <davem@davemloft.net> Date: Tue May 10 00:39:28 2016 -0400 Merge branch 'ip6-tunnel-tx-fixes' Tom Herbert says: ==================== ip6: Transmit tunneling fixes Several fixes suggested by Alexander. Tested: Running netperf TCP_STREAM with gretap and keyid configured. Visually verified that MTU is correctly being set. Did not test HW offload (Alexander plese try) ==================== Tested-by: Alexander Duyck <aduyck@mirantis.com> Signed-off-by: David S. Miller <davem@davemloft.net> commit b45bd1d787969d3ae5662a56ed431cd13e3b8b92 Author: Tom Herbert <tom@herbertland.com> Date: Mon May 9 17:12:12 2016 -0700 ip6_gre: Use correct flags for reading TUNNEL_SEQ Fix two spots where o_flags in a tunnel are being compared to GRE_SEQ instead of TUNNEL_SEQ. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_gre.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) commit 4b4a0c91438c2471d7ab9504c0096ffc47d2389b Author: Tom Herbert <tom@herbertland.com> Date: Mon May 9 17:12:11 2016 -0700 ip6: Don't set transport header in IPv6 tunneling We only need to reset network header here. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_tunnel.c | 2 -- 1 file changed, 2 deletions(-) commit d27bff9ca294ac76548ee97db5d92f39e4752a01 Author: Tom Herbert <tom@herbertland.com> Date: Mon May 9 17:12:10 2016 -0700 ip6_gre: Set inner protocol correctly in __gre6_xmit Need to use adjusted protocol value for setting inner protocol. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_gre.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit f41fe3c2acc9e40304ac1dae0f243ef27fe85dee Author: Tom Herbert <tom@herbertland.com> Date: Mon May 9 17:12:09 2016 -0700 gre6: Fix flag translations GRE for IPv6 does not properly translate for GRE flags to tunnel flags and vice versa. This patch fixes that. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_gre.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) commit db2ec95d1ba419b766aae7b1d7c0271f3c9cd9f4 Author: Tom Herbert <tom@herbertland.com> Date: Mon May 9 17:12:08 2016 -0700 ip6_gre: Fix MTU setting In ip6gre_tnl_link_config set t->tun_len and t->hlen correctly for the configuration. For hard_header_len and mtu calculation include IPv6 header and encapsulation overhead. In ip6gre_tunnel_init_common set t->tun_len and t->hlen correctly for the configuration. Revert to setting hard_header_len instead of needed_headroom. Tested: ./ip link add name tun8 type ip6gretap remote \ 2401:db00:20:911a:face:0:27:0 local \ 2401:db00:20:911a:face:0:25:0 ttl 225 Gives MTU of 1434. That is equal to 1500 - 40 - 14 - 4 - 8. ./ip link add name tun8 type ip6gretap remote \ 2401:db00:20:911a:face:0:27:0 local \ 2401:db00:20:911a:face:0:25:0 ttl 225 okey 123 Gives MTU of 1430. That is equal to 1500 - 40 - 14 - 4 - 8 - 4. Signed-off-by: Tom Herbert <tom@herbertland.com> Signed-off-by: David S. Miller <davem@davemloft.net> net/ipv6/ip6_gre.c | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) commit bfca2eba2adaa9501656f503559a971de6927fa8 Author: Joachim Eastwood <manabian@gmail.com> Date: Sun May 8 13:47:23 2016 +0200 stmmac: dwmac-socfpga: make socfpga_dwmac_pm_ops static Fix the following sparse warning: drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:274:1: warning: symbol 'socfpga_dwmac_pm_ops' was not declared. Should it be static? Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 20e61335d8db0caf0c50236c1c9c2ea546f61f1a Merge: 27c0f73 1ff23be Author: David S. Miller <davem@davemloft.net> Date: Mon May 9 22:33:53 2016 -0400 Merge branch 'l3mdev-send-enslaved' David Ahern says: ==================== net: l3mdev: Allow send on enslaved interface First patch preps for the second. The second is required for several use cases such as ping on an interface and BFD that need to send packets on a specific interface, including ones enslaved to a VRF device. v2 - fixed brackets on both patches per comment from DaveM ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 1ff23beebdd315fe4d16070c08c065e89d7debb3 Author: David Ahern <dsa@cumulusnetworks.com> Date: Sat May 7 16:49:00 2016 -0700 net: l3mdev: Allow send on enslaved interface Allow udp and raw sockets to send by oif that is an enslaved interface versus the l3mdev/VRF device. For example, this allows BFD to use ifindex from IP_PKTINFO on a receive to send a response without the need to convert to the VRF index. It also allows ping and ping6 to work when specifying an enslaved interface (e.g., ping -I swp1 <ip>) which is a natural use case. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/vrf.c | 2 ++ net/ipv4/route.c | 4 ++++ net/l3mdev/l3mdev.c | 17 +++++++++++++---- 3 files changed, 19 insertions(+), 4 deletions(-) commit 4a65896f94fa82370041823837cd75aac1186b54 Author: David Ahern <dsa@cumulusnetworks.com> Date: Sat May 7 16:48:59 2016 -0700 net: l3mdev: Move get_saddr and rt6_dst Move l3mdev_rt6_dst_by_oif and l3mdev_get_saddr to l3mdev.c. Collapse l3mdev_get_rt6_dst into l3mdev_rt6_dst_by_oif since it is the only user and keep the l3mdev_get_rt6_dst name for consistency with other hooks. A follow-on patch adds more code to these functions making them long for inlined functions. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net> include/net/l3mdev.h | 56 +++------------------------------------------------- net/ipv6/route.c | 2 +- net/l3mdev/l3mdev.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+), 54 deletions(-) commit 4e51af9ee7afa0ecf4829e7a44f7055db7968e02 Author: Dan Carpenter <dan.carpenter@oracle.com> Date: Wed Apr 13 14:14:41 2016 +0300 bfa: fix bfa_fcb_itnim_alloc() error handling The caller assumes that "itnim" is NULL on error and non-NULL on success but really "itnim" is uninitialized on error. This function should just use normal error handling where it returns zero on success and negative on failure. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Anil Gurumurthy <anil.gurumurthy@qlogic.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> drivers/scsi/bfa/bfa_fcs.h | 4 ++-- drivers/scsi/bfa/bfa_fcs_fcpim.c | 5 +++-- drivers/scsi/bfa/bfad_im.c | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) commit 27c0f739a009971aaf43ee71d9b150a56ee57012 Author: Taku Izumi <izumi.taku@jp.fujitsu.com> Date: Tue May 10 10:28:49 2016 +0900 fjes: Fix unnecessary spinlock_irqsave commit-bd5a256 introduces a deadlock bug in fjes_change_mtu(). This spin_lock_irqsave() is obviously unnecessary. This patch eliminates unnecessary spin_lock_irqsave() in fjes_change_mtu() Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/fjes/fjes_main.c | 1 - 1 file changed, 1 deletion(-) commit 1de1d449c6cf701e09d2941d042b28328118ad1a Author: David S. Miller <davem@davemloft.net> Date: Mon May 9 22:05:13 2016 -0400 mlx5: Fix merge errors. I accidently let Arnd's VXLAN dependency changes slip into net-next, they are only appropriate for net. Also the flow steering structural changes to mlx5e_priv got scrambled during the merge resolution as well. Fix that all up. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 7 ------- drivers/net/ethernet/mellanox/mlx5/core/Makefile | 3 +-- drivers/net/ethernet/mellanox/mlx5/core/en.h | 5 ----- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 --- drivers/net/ethernet/mellanox/mlx5/core/vxlan.h | 8 +------- 5 files changed, 2 insertions(+), 24 deletions(-) commit d96caf8c33cad42b5eabcf1b686dd91581e306f4 Author: Clifton Barnes <clifton.a.barnes@gmail.com> Date: Mon May 9 17:00:22 2016 -0700 Input: rotary-encoder - fix bare use of 'unsigned' fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of 'unsigned'' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> drivers/input/misc/rotary_encoder.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) commit 45a0dac0451136fa7ae34a6fea53ef6a136287ce Author: Dan Williams <dan.j.williams@intel.com> Date: Thu Mar 31 15:41:18 2016 -0700 libnvdimm, dax: record the specified alignment of a dax-device instance We want to use the alignment as the allocation and mapping unit. Previously this information was only useful for establishing the data offset, but now it is important to remember the granularity for the later use. Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/nvdimm/pfn.h | 4 +++- drivers/nvdimm/pfn_devs.c | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) commit 52ac23b25eb26511f8dea2382534eeada2fa8244 Author: Dan Williams <dan.j.williams@intel.com> Date: Thu Mar 31 09:37:11 2016 -0700 libnvdimm, dax: reserve space to store labels for device-dax We may want to subdivide a device-dax range into multiple devices so that each can have separate permissions or naming. Reserve 128K of label space by default so we have the capability of making allocation decisions persistent. This reservation is not something we can add later since it would result in the default size of a device-dax range changing between kernel versions. Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/nvdimm/pfn_devs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) commit cd03412a51ac4cb3001a8cdfae4560c9602f3387 Author: Dan Williams <dan.j.williams@intel.com> Date: Fri Mar 11 10:15:36 2016 -0800 libnvdimm, dax: introduce device-dax infrastructure Device DAX is the device-centric analogue of Filesystem DAX (CONFIG_FS_DAX). It allows persistent memory ranges to be allocated and mapped without need of an intervening file system. This initial infrastructure arranges for a libnvdimm pfn-device to be represented as a different device-type so that it can be attached to a driver other than the pmem driver. Signed-off-by: Dan Williams <dan.j.williams@intel.com> drivers/nvdimm/Kconfig | 13 ++++++ drivers/nvdimm/Makefile | 1 + drivers/nvdimm/bus.c | 4 ++ drivers/nvdimm/claim.c | 2 + drivers/nvdimm/dax_devs.c | 99 +++++++++++++++++++++++++++++++++++++++ drivers/nvdimm/namespace_devs.c | 19 +++++++- drivers/nvdimm/nd-core.h | 1 + drivers/nvdimm/nd.h | 25 ++++++++++ drivers/nvdimm/pfn_devs.c | 100 +++++++++++++++++++++++++++------------- drivers/nvdimm/region.c | 2 + drivers/nvdimm/region_devs.c | 29 ++++++++++++ include/uapi/linux/ndctl.h | 2 + tools/testing/nvdimm/Kbuild | 1 + 13 files changed, 264 insertions(+), 34 deletions(-) commit 91e6f1ce8657795cec83a81090c20cbaa8337c68 Author: Steven Rostedt (Red Hat) <rostedt@goodmis.org> Date: Mon May 9 18:10:00 2016 -0400 ftracetest: Add instance created, delete, read and enable event test Add a new ftrace test that creates three threads. One that creates and removes an ftrace instance, one that reads the instance, and one that enables and disables events in the instance. This is a stress test for accessing and removing instances at the same time. Signed-off-by: Steven Rostedt <rostedt@goodmis.org> .../ftrace/test.d/instances/instance-event.tc | 143 +++++++++++++++++++++ 1 file changed, 143 insertions(+) commit b31d5103c33280738188c51e226224dff4401c7b Author: Michael Thalmeier <michael.thalmeier@hale.at> Date: Thu Apr 21 16:43:53 2016 +0200 NFC: pn533: handle interrupted commands in pn533_recv_frame When pn533_recv_frame is called from within abort_command context the current dev->cmd is not guaranteed to be set. Additionally on receiving an error status we can omit frame checking and simply schedule the workqueue. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> drivers/nfc/pn533/pn533.c | 8 ++++++++ 1 file changed, 8 insertions(+) commit c952f915ce8567120ffdf12998ad0c945fbc93ac Author: Michael Thalmeier <michael.thalmeier@hale.at> Date: Thu Apr 21 16:43:52 2016 +0200 NFC: pn533: reset poll modulation list before calling targets_found We need to reset the poll modulation list before calling nfc_targets_found because otherwise userspace could run before the modulation list is cleared and then get a "Cannot activate target while polling" error upon calling activate_target. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> drivers/nfc/pn533/pn533.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) commit 30f98489f54e027001cc9b27c59840975871de65 Author: Michael Thalmeier <michael.thalmeier@hale.at> Date: Thu Apr 21 16:43:51 2016 +0200 NFC: pn533: i2c: do not call pn533_recv_frame with aborted commands When a command gets aborted the pn533 core does not need any RX frames that may be received until a new frame is sent. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> drivers/nfc/pn533/i2c.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) commit b16931b13c67f06ca74cc8d02797de480dea348b Author: Michael Thalmeier <michael.thalmeier@hale.at> Date: Thu Apr 21 16:43:50 2016 +0200 NFC: pn533: fix order of initialization Correctly call nfc_set_parent_dev before nfc_register_device. Otherwise the driver will OOPS when being removed. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> drivers/nfc/pn533/i2c.c | 3 ++- drivers/nfc/pn533/pn533.c | 4 +++- drivers/nfc/pn533/pn533.h | 3 ++- drivers/nfc/pn533/usb.c | 3 +-- 4 files changed, 8 insertions(+), 5 deletions(-) commit 79f09fa79cefdd9df40c9c590cc8dda544ebff26 Author: Michael Thalmeier <michael.thalmeier@hale.at> Date: Thu Apr 21 16:43:49 2016 +0200 NFC: pn533: i2c: free irq on driver remove The requested irq needs to be freed when removing the driver, otherwise a following driver load fails to request the irq. Signed-off-by: Michael Thalmeier <michael.thalmeier@hale.at> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> drivers/nfc/pn533/i2c.c | 2 ++ 1 file changed, 2 insertions(+) commit 9c7b37cd63d0d910c531233209286f169993cbd9 Author: Chris Phlipot <cphlipot0@gmail.com> Date: Sat May 7 02:16:59 2016 -0700 perf symbols: Fix handling of zero-length symbols. This change introduces a fix to symbols__find, so that it is able to find symbols of length zero (where start == end). The current code has the following problem: - The current implementation of symbols__find is unable to find any symbols of length zero. - The db-export framework explicitly creates zero length symbols at locations where no symbol currently exists. The combination of the two above behaviors results in behavior similar to the example below. 1. addr_location is created for a sample, but symbol is unable to be resolved. 2. db export creates an "unknown" symbol of length zero at that address and inserts it into the dso. 3. A new sample comes in at the same address, but symbol__find is unable to find the zero length symbol, so it is still unresolved. 4. db export sees the symbol is unresolved, and allocated a duplicate symbol, even though it already did this in step 2. This behavior continues every time an address without symbol information is seen, which causes a very large number of these symbols to be allocated. The effect of this fix can be observed by looking at the contents of an exported database before/after the fix (generated with scripts/python/export-to-postgresql.py) Ex. BEFORE THE CHANGE: example_db=# select count(*) from symbols; count -------- 900213 (1 row) example_db=# select count(*) from symbols where symbols.name='unknown'; count -------- 897355 (1 row) example_db=# select count(*) from symbols where symbols.name!='unknown'; count ------- 2858 (1 row) AFTER THE CHANGE: example_db=# select count(*) from symbols; count ------- 25217 (1 row) example_db=# select count(*) from symbols where name='unknown'; count ------- 22359 (1 row) example_db=# select count(*) from symbols where name!='unknown'; count ------- 2858 (1 row) Signed-off-by: Chris Phlipot <cphlipot0@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1462612620-25008-1-git-send-email-cphlipot0@gmail.com [ Moved the test to later in the rb_tree tests, as this not the likely case ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/symbol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit aff093d4bbca91f543e24cde2135f393b8130f4b Author: Arnd Bergmann <arnd@arndb.de> Date: Tue Apr 26 06:15:38 2016 -0300 [media] exynos-gsc: avoid build warning without CONFIG_OF When building the exynos-gsc driver with CONFIG_OF disabled, we get a warning about an out-of-bounds access: drivers/media/platform/exynos-gsc/gsc-core.c: In function 'gsc_probe': drivers/media/platform/exynos-gsc/gsc-core.c:1078:34: error: array subscript is above array bounds [-Werror=array-bounds] This is harmless because the driver will never be used without CONFIG_OF, but it's better to avoid the warning anyway. Checking the return value of of_alias_get_id() for an error condition is probably a good idea anyway, and it makes sure the compiler can verify that we don't get into that situation. Fixes: 26a7ed9c1819 ("[media] exynos-gsc: remove an always false condition") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> drivers/media/platform/exynos-gsc/gsc-core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) commit 0185f850176201260e0f02c5bccca1defb8e0884 Author: Arnd Bergmann <arnd@arndb.de> Date: Mon Apr 25 10:17:21 2016 -0300 [media] samples: v4l: from Documentation to samples directory With the new autoksyms support, we can run into a situation where the v4l pci skeleton module is the only one using some exported symbols that get dropped because they are never referenced by the kernel otherwise, causing a build problem: ERROR: "vb2_dma_contig_memops" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined! ERROR: "vb2_dma_contig_init_ctx_attrs" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined! ERROR: "v4l2_match_dv_timings" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined! ERROR: "v4l2_find_dv_timings_cap" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined! ERROR: "v4l2_valid_dv_timings" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined! ERROR: "v4l2_enum_dv_timings_cap" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined! ERROR: "vb2_dma_contig_cleanup_ctx" [Documentation/video4linux/v4l2-pci-skeleton.ko] undefined! Specifically, we do look in the samples directory for users of symbols, but not the Documentation directory. This solves the build problem by moving the connector sample into the same directory as the other samples. Fixes: 23121ca2b56b ("kbuild: create/adjust generated/autoksyms.h") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Documentation/Makefile | 3 +- Documentation/video4linux/Makefile | 1 - Documentation/video4linux/v4l2-framework.txt | 2 +- Documentation/video4linux/v4l2-pci-skeleton.c | 922 -------------------------- samples/Makefile | 2 +- samples/v4l/Makefile | 1 + samples/v4l/v4l2-pci-skeleton.c | 922 ++++++++++++++++++++++++++ 7 files changed, 926 insertions(+), 927 deletions(-) commit 0a241ef4a27a00807fefdf913da104a4534c606a Author: Arnaldo Carvalho de Melo <acme@redhat.com> Date: Mon May 9 18:08:33 2016 -0300 perf evsel: Print state of perf_event_attr.write_backward Now we can see if it is set when using verbose mode in various tools, such as 'perf test': # perf test -vv back 45: Test backward reading from ring buffer : --- start --- <SNIP> ------------------------------------------------------------ perf_event_attr: type 2 size 112 config 0x98 { sample_period, sample_freq } 1 sample_type IP|TID|TIME|CPU|PERIOD|RAW disabled 1 mmap 1 comm 1 task 1 sample_id_all 1 exclude_guest 1 mmap2 1 comm_exec 1 write_backward 1 ------------------------------------------------------------ sys_perf_event_open: pid 20911 cpu -1 group_fd -1 flags 0x8 <SNIP> ---- end ---- Test backward reading from ring buffer: Ok # Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-kxv05kv9qwl5of7rzfeiiwbv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/evsel.c | 1 + 1 file changed, 1 insertion(+) commit ee74701ed8add8ad13e642e8618b51fd75add32d Author: Wang Nan <wangnan0@huawei.com> Date: Mon May 9 01:47:51 2016 +0000 perf tests: Add test to check backward ring buffer This test checks reading from backward ring buffer. Test result: # ~/perf test 'ring buffer' 45: Test backward reading from ring buffer : Ok The test case is a while loop which calls prctl(PR_SET_NAME) multiple times. Each prctl should issue 2 events: one PERF_RECORD_SAMPLE, one PERF_RECORD_COMM. The first round creates a relative large ring buffer (256 pages). It can afford all events. Read from it and check the count of each type of events. The second round creates a small ring buffer (1 page) and makes it overwritable. Check the correctness of the buffer. Signed-off-by: Wang Nan <wangnan0@huawei.com> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1462758471-89706-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/tests/Build | 1 + tools/perf/tests/backward-ring-buffer.c | 151 ++++++++++++++++++++++++++++++++ tools/perf/tests/builtin-test.c | 4 + tools/perf/tests/tests.h | 1 + 4 files changed, 157 insertions(+) commit 437014bdac9680e3b32c006635ac270b808ce476 Author: Paul Gortmaker <paul.gortmaker@windriver.com> Date: Mon May 9 14:40:27 2016 -0400 ACPI / GED: make evged.c explicitly non-modular The Makefile/Kconfig currently controlling compilation of this code is: Makefile:acpi-$(CONFIG_ACPI_REDUCED_HARDWARE_ONLY) += evged.o drivers/acpi/Kconfig:config ACPI_REDUCED_HARDWARE_ONLY drivers/acpi/Kconfig: bool "Hardware-reduced ACPI support only" if EXPERT ...meaning that it currently is not being built as a module by anyone. Lets remove the couple traces of modularity so that when reading the code 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. The file wasn't explicitly including the module.h file but it did already have init.h so, unlike similar changes, this one has no header changes at all. We also delete the MODULE_LICENSE tag since all that information is already contained at the top of the file in the comments. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> drivers/acpi/evged.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) commit f96fd0c86f081c27a0ba5efadfc13f612b4071d3 Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Sat May 7 02:24:48 2016 +0200 intel_pstate: Clean up intel_pstate_get() intel_pstate_get() contains a local variable that's initialized but never used and it can be written in fewer lines of code, so clean it up. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> drivers/cpufreq/intel_pstate.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) commit c2f90a465df75254fb41bf6e7975464929c21e26 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 3 17:16:22 2016 +0200 HSI: omap-ssi: move omap_ssi_port_update_fclk After the clk change support, the ssi omap ssi core driver now calls into the port driver to change fclk. This function was previously inside of an #ifdef, because it was only used when CONFIG_PM is enabled. Now it also gets used without power management support: drivers/hsi/built-in.o: In function `ssi_clk_event': omap_ssi_port.c:(.text+0x1bf8): undefined reference to `omap_ssi_port_update_fclk' This moves the function outside of the CONFIG_PM guard. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") Signed-off-by: Sebastian Reichel <sre@kernel.org> drivers/hsi/controllers/omap_ssi_port.c | 35 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 18 deletions(-) commit ac8e3ff3a07cb8bf7a5ce4627c39a50e71dcd394 Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 3 17:16:21 2016 +0200 HSI: omap-ssi: include pinctrl header files The driver now uses some pinctrl functions, but fails to build if PINCTRL is disabled because the respective header files are only included indirectly: drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event': drivers/hsi/controllers/omap_ssi_core.c:317:4: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration] drivers/hsi/controllers/omap_ssi_core.c:339:4: error: implicit declaration of function 'pinctrl_pm_select_default_state' [-Werror=implicit-function-declaration] drivers/hsi/controllers/omap_ssi_port.c: In function 'ssi_flush': drivers/hsi/controllers/omap_ssi_port.c:520:2: error: implicit declaration of function 'pinctrl_pm_select_idle_state' [-Werror=implicit-function-declaration] This includes the headers from the files that call the functions, which works even if pinctrl is turned off. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") Signed-off-by: Sebastian Reichel <sre@kernel.org> drivers/hsi/controllers/omap_ssi_core.c | 1 + drivers/hsi/controllers/omap_ssi_port.c | 1 + 2 files changed, 2 insertions(+) commit 53c703501e3c10283315f1c846d4ebea7d371c4d Author: Arnd Bergmann <arnd@arndb.de> Date: Tue May 3 17:16:20 2016 +0200 HSI: omap-ssi: add COMMON_CLK dependency Enabling the omap ssi driver without COMMON_CLK results in a build failure: drivers/hsi/controllers/omap_ssi_core.c: In function 'ssi_clk_event': drivers/hsi/controllers/omap_ssi_core.c:304:7: error: 'PRE_RATE_CHANGE' undeclared (first use in this function) This adds a Kconfig dependency to avoid the invalid configuration. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 4bcf7414528a ("HSI: omap-ssi: add clk change support") Signed-off-by: Sebastian Reichel <sre@kernel.org> drivers/hsi/controllers/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) commit 06485053244480f5f403d8f89b8617bd7d549113 Author: Catalin Marinas <catalin.marinas@arm.com> Date: Wed Apr 13 17:57:37 2016 +0100 kvm: arm64: Enable hardware updates of the Access Flag for Stage 2 page tables The ARMv8.1 architecture extensions introduce support for hardware updates of the access and dirty information in page table entries. With VTCR_EL2.HA enabled (bit 21), when the CPU accesses an IPA with the PTE_AF bit cleared in the stage 2 page table, instead of raising an Access Flag fault to EL2 the CPU sets the actual page table entry bit (10). To ensure that kernel modifications to the page table do not inadvertently revert a bit set by hardware updates, certain Stage 2 software pte/pmd operations must be performed atomically. The main user of the AF bit is the kvm_age_hva() mechanism. The kvm_age_hva_handler() function performs a "test and clear young" action on the pte/pmd. This needs to be atomic in respect of automatic hardware updates of the AF bit. Since the AF bit is in the same position for both Stage 1 and Stage 2, the patch reuses the existing ptep_test_and_clear_young() functionality if __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG is defined. Otherwise, the existing pte_young/pte_mkold mechanism is preserved. The kvm_set_s2pte_readonly() (and the corresponding pmd equivalent) have to perform atomic modifications in order to avoid a race with updates of the AF bit. The arm64 implementation has been re-written using exclusives. Currently, kvm_set_s2pte_writable() (and pmd equivalent) take a pointer argument and modify the pte/pmd in place. However, these functions are only used on local variables rather than actual page table entries, so it makes more sense to follow the pte_mkwrite() approach for stage 1 attributes. The change to kvm_s2pte_mkwrite() makes it clear that these functions do not modify the actual page table entries. The (pte|pmd)_mkyoung() uses on Stage 2 entries (setting the AF bit explicitly) do not need to be modified since hardware updates of the dirty status are not supported by KVM, so there is no possibility of losing such information. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org> arch/arm/include/asm/kvm_mmu.h | 10 +++++---- arch/arm/kvm/mmu.c | 46 +++++++++++++++++++++++++--------------- arch/arm64/include/asm/kvm_arm.h | 2 ++ arch/arm64/include/asm/kvm_mmu.h | 27 +++++++++++++++++------ arch/arm64/include/asm/pgtable.h | 13 ++++++++---- arch/arm64/kvm/hyp/s2-setup.c | 8 +++++++ 6 files changed, 74 insertions(+), 32 deletions(-) commit e24c7520ea9c3e5bb51592c2134aafbf75a3f88a Author: Wang Nan <wangnan0@huawei.com> Date: Mon May 9 01:47:50 2016 +0000 perf tools: Support reading from backward ring buffer perf_evlist__mmap_read_backward() is introduced for reading backward ring buffer. Since direction for reading such ring buffer is different from the direction kernel writing to it, and since user need to fetch most recent record from it, a perf_evlist__mmap_read_catchup() is introduced to move the reading pointer to the end of the buffer. Signed-off-by: Wang Nan <wangnan0@huawei.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1462758471-89706-2-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> tools/perf/util/evlist.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/perf/util/evlist.h | 4 ++++ 2 files changed, 54 insertions(+) commit e800072c18f0d7b89a80fa46dceb3d080c80e09c Merge: e8ed77d b507146 Author: David S. Miller <davem@davemloft.net> Date: Mon May 9 15:59:24 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net In netdevice.h we removed the structure in net-next that is being changes in 'net'. In macsec.c and rtnetlink.c we have overlaps between fixes in 'net' and the u64 attribute changes in 'net-next'. The mlx5 conflicts have to do with vxlan support dependencies. Signed-off-by: David S. Miller <davem@davemloft.net> commit e8ed77dfa90dd79c5343415a4bbbfdab9787b35a Merge: e26522c 0c5366b Author: David S. Miller <davem@davemloft.net> Date: Mon May 9 15:02:58 2016 -0400 Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next Pablo Neira Ayuso says: ==================== Netfilter updates for net-next The following large patchset contains Netfilter updates for your net-next tree. My initial intention was to send you this in two goes but when I looked back twice I already had this burden on top of me. Several updates for IPVS from Marco Angaroni: 1) Allow SIP connections originating from real-servers to be load balanced by the SIP persistence engine as is already implemented in the other direction. 2) Release connections immediately for One-packet-scheduling (OPS) in IPVS, instead of making it via timer and rcu callback. 3) Skip deleting conntracks for each one packet in OPS, and don't call nf_conntrack_alter_reply() since no reply is expected. 4) Enable drop on exhaustion for OPS + SIP persistence. Miscelaneous conntrack updates from Florian Westphal, including fix for hash resize: 5) Move conntrack generation counter out of conntrack pernet structure since this is only used by the init_ns to allow hash resizing. 6) Use get_random_once() from packet path to collect hash random seed instead of our compound. 7) Don't disable BH from ____nf_conntrack_find() for statistics, use NF_CT_STAT_INC_ATOMIC() instead. 8) Fix lookup race during conntrack hash resizing. 9) Introduce clash resolution on conntrack insertion for connectionless protocol. Then, Florian's netns rework to get rid of per-netns conntrack table, thus we use one single table for them all. There was consensus on this change during the NFWS 2015 and, on top of that, it has recently been pointed as a source of multiple problems from unpriviledged netns: 11) Use a single conntrack hashtable for all namespaces. Include netns in object comparisons and make it part of the hash calculation. Adapt early_drop() to consider netns. 12) Use single expectation and NAT hashtable for all namespaces. 13) Use a single slab cache for all namespaces for conntrack objects. 14) Skip full table scanning from nf_ct_iterate_cleanup() if the pernet conntrack counter tells us the table is empty (ie. equals zero). Fixes for nf_tables interval set element handling, support to set conntrack connlabels and allow set names up to 32 bytes. 15) Parse element flags from element deletion path and pass it up to the backend set implementation. 16) Allow adjacent intervals in the rbtree set type for dynamic interval updates. 17) Add support to set connlabel from nf_tables, from Florian Westphal. 18) Allow set names up to 32 bytes in nf_tables. Several x_tables fixes and updates: 19) Fix incorrect use of IS_ERR_VALUE() in x_tables, original patch from Andrzej Hajda. And finally, miscelaneous netfilter updates such as: 20) Disable automatic helper assignment by default. Note this proc knob was introduced by a9006892643a ("netfilter: nf_ct_helper: allow to disable automatic helper assignment") 4 years ago to start moving towards explicit conntrack helper configuration via iptables CT target. 21) Get rid of obsolete and inconsistent debugging instrumentation in x_tables. 22) Remove unnecessary check for null after ip6_route_output(). ==================== Signed-off-by: David S. Miller <davem@davemloft.net> commit 3f37a36b6282621d7c5a99b6911275f989766996 Author: Borislav Petkov <bp@suse.de> Date: Fri May 6 19:44:27 2016 +0200 EDAC, amd64_edac: Drop pci_register_driver() use - remove homegrown instances counting. - take F3 PCI device from amd_nb caching instead of F2 which was used with the PCI core. With those changes, the driver doesn't need to register a PCI driver and relies on the northbridges caching which we do anyway on AMD. Signed-off-by: Borislav Petkov <bp@suse.de> Cc: Yazen Ghannam <yazen.ghannam@amd.com> drivers/edac/amd64_edac.c | 125 ++++++++++++++++------------------------------ drivers/edac/amd64_edac.h | 2 +- 2 files changed, 44 insertions(+), 83 deletions(-) commit e26522cd0b63fdbf3b4e9a39d73a985cc9b4fe27 Merge: 908578e f81ec90 Author: David S. Miller <davem@davemloft.net> Date: Mon May 9 14:26:14 2016 -0400 Merge branch 'dsa-mv88e6xxx-monolithic' Vivien Didelot says: ==================== net: dsa: mv88e6xxx: turn into monolithic driver This patchset merges all mv88e6* drivers supported by the shared mv88e6xxx code into a single mv88e6xxx DSA switch driver. Some flags are added to describe the capabilities of a switch model, such as the presence of a PPU, EEPROM, some old or new registers, etc. First these flags are used to conditionally support the same set of functions in every driver, then specific driver files are removed in favor of the common mv88e6xxx driver. Only the merge of driver specific setup code assumes a few differences. If these differences such as frames priorities are really needed for some models, they can easily be brought back in a future patch. Some inconsistencies might show up, such as the need for MV88E6XXX_FLAG_PPU and MV88E6XXX_FLAG_PPU_ACTIVE flags. But this patchset does not aim to fix them yet. A future patch can do that if they end up being unwanted. The patchset has been tested on interconnected 88E6352 and 88E6185. Changes v1 -> v2: - add missing MV88E6XXX_FLAG_EEPROM flag checks - remove a few remaining _ prefixes - remove MV88E6XXX_FLAG_CORE_TAG_TYPE which is a specific default Changes RFC -> v1: - introduce flags in a separate patch - do not refactor anything yet - do not add new functions prefixed with _ - drop packet discarding and mentioned tested platforms - factorize family flags - update text for NET_DSA_MV88E6XXX Kconfig entry ==================== Reviewed-by: Andrew Lunn <andrew@lunn.ch> Tested-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net> commit f81ec90fe9cbf512f3c632130a37c6d353fa94ea Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:58 2016 -0400 net: dsa: mv88e6xxx: factorize the switch driver Now that all drivers support the same set of functions and the same setup code, drop every model-specific DSA switch driver and replace them with a common mv88e6xxx driver. This merges the info tables into one, removes the function exports, the model-specific files, and update the defconfigs. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> arch/arm/configs/multi_v5_defconfig | 5 +- arch/arm/configs/mvebu_v7_defconfig | 2 +- arch/arm/configs/orion5x_defconfig | 3 +- arch/tile/configs/tilegx_defconfig | 3 +- arch/tile/configs/tilepro_defconfig | 3 +- drivers/net/dsa/Kconfig | 40 +--- drivers/net/dsa/Makefile | 15 +- drivers/net/dsa/mv88e6123.c | 93 ---------- drivers/net/dsa/mv88e6131.c | 101 ---------- drivers/net/dsa/mv88e6171.c | 101 ---------- drivers/net/dsa/mv88e6352.c | 121 ------------ drivers/net/dsa/mv88e6xxx.c | 354 +++++++++++++++++++++++++++--------- drivers/net/dsa/mv88e6xxx.h | 91 +++------ 13 files changed, 302 insertions(+), 630 deletions(-) commit b9729e53ade9be2637b46ac98fd85c7eac1b77c8 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:57 2016 -0400 net: dsa: mv88e6131: use EDSA tag protocol 6131 is the only driver to set the tag protocol to DSA_TAG_PROTO_DSA. Since it works fine with DSA_TAG_PROTO_EDSA, change its value, like all other mv88e6xxx drivers. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/Kconfig | 2 +- drivers/net/dsa/mv88e6131.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit a1a6a4d1f76aab009e6e0b1003b9c7bca3991e9c Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:56 2016 -0400 net: dsa: mv88e6xxx: factorize switch setup Provide a shared mv88e6xxx_setup function to the drivers. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 16 +---------- drivers/net/dsa/mv88e6131.c | 16 +---------- drivers/net/dsa/mv88e6171.c | 16 +---------- drivers/net/dsa/mv88e6352.c | 16 +---------- drivers/net/dsa/mv88e6xxx.c | 69 ++++++++++++++++++++++----------------------- drivers/net/dsa/mv88e6xxx.h | 3 +- 6 files changed, 38 insertions(+), 98 deletions(-) commit 8698fd9595c3b90a76c878159328ac6ebd923963 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:55 2016 -0400 net: dsa: mv88e6131: drop frames priorities setup 6131 is the only driver which setups the priority of IGMP/MLD snoop frames and ARP frames to the highest setting. Drop such change until we figure out a common configuration for all switch models. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6131.c | 18 ------------------ 1 file changed, 18 deletions(-) commit 50484ff4d11c1eca0059f3b3d407ecec0f1b83b0 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:54 2016 -0400 net: dsa: mv88e6xxx: factorize GLOBAL_CONTROL_2 setup All switch models setup the GLOBAL_CONTROL_2 register with slightly differences. Since the cascade mode is valid even in a single chip setup, factorize such configuration. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 15 --------------- drivers/net/dsa/mv88e6131.c | 16 ---------------- drivers/net/dsa/mv88e6171.c | 15 --------------- drivers/net/dsa/mv88e6352.c | 14 -------------- drivers/net/dsa/mv88e6xxx.c | 7 +++++++ 5 files changed, 7 insertions(+), 60 deletions(-) commit b0745e87943b40734e6c341dcf47a6ec80ee4346 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:53 2016 -0400 net: dsa: mv88e6xxx: factorize GLOBAL_MONITOR_CONTROL setup All switch drivers configure the GLOBAL_MONITOR_CONTROL register with slightly changes. Assume the setup of the upstream port, and configure it as the port to which ingress and egress and ARP monitor frames are to be sent. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 14 -------------- drivers/net/dsa/mv88e6131.c | 13 ------------- drivers/net/dsa/mv88e6171.c | 15 --------------- drivers/net/dsa/mv88e6352.c | 14 -------------- drivers/net/dsa/mv88e6xxx.c | 12 ++++++++++++ 5 files changed, 12 insertions(+), 56 deletions(-) commit 709643aa626ec8f0bd678be79187beefffae32c7 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:52 2016 -0400 net: dsa: mv88e6131: drop VLAN Ethertype setup The 6131 switch models have a Core Tag Type register. Their setup code is setting it to 0x8100, which is the reset default. Drop this specific part which is correctly configured on reset anyway. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6131.c | 5 ----- 1 file changed, 5 deletions(-) commit 119477bd987cbaf29af10b9cb1b731547906787e Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:51 2016 -0400 net: dsa: mv88e6xxx: factorize GLOBAL_CONTROL setup All switch models configure the GLOBAL_CONTROL register with slightly differences. Discarding packets with excessive collisions (GLOBAL_CONTROL_DISCARD_EXCESS) is specific to 6352 and similar switches, and setting a maximum frame size (GLOBAL_CONTROL_MAX_FRAME_1632) is specific to 6185 and similar switches. As we are centralizing the chips setup, skip these settings and don't discard any frames yet, until we found out that such discarding by the hardware is necessary. Assume a common setup to enable the PHY Polling Unit if present, don't discard any packets, and mask all interrupt sources. Tested on 88E6352 and 88E6185. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 8 -------- drivers/net/dsa/mv88e6131.c | 11 ----------- drivers/net/dsa/mv88e6171.c | 9 --------- drivers/net/dsa/mv88e6352.c | 9 --------- drivers/net/dsa/mv88e6xxx.c | 13 +++++++++++++ 5 files changed, 13 insertions(+), 37 deletions(-) commit 08a012619a0349b8e02797bdfe57051fe7df3d3b Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:50 2016 -0400 net: dsa: mv88e6xxx: factorize global setup Every driver is calling mv88e6xxx_setup_global after mv88e6xxx_setup_common. Call the former in the latter. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 4 -- drivers/net/dsa/mv88e6131.c | 4 -- drivers/net/dsa/mv88e6171.c | 4 -- drivers/net/dsa/mv88e6352.c | 4 -- drivers/net/dsa/mv88e6xxx.c | 109 +++++++++++++++++++++++--------------------- drivers/net/dsa/mv88e6xxx.h | 1 - 6 files changed, 56 insertions(+), 70 deletions(-) commit 552238b59487eaac1477bdb7b0c4c652f29cbc86 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:49 2016 -0400 net: dsa: mv88e6xxx: factorize switch reset Add a MV88E6XXX_FLAG_PPU_ACTIVE flag to describe how to reset the switch, and merge the reset call to the common setup code. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 4 -- drivers/net/dsa/mv88e6131.c | 4 -- drivers/net/dsa/mv88e6171.c | 4 -- drivers/net/dsa/mv88e6352.c | 4 -- drivers/net/dsa/mv88e6xxx.c | 137 +++++++++++++++++++++++--------------------- drivers/net/dsa/mv88e6xxx.h | 6 +- 6 files changed, 76 insertions(+), 83 deletions(-) commit 2672f82548de2be29adcf5ef3c99fdaa1e5ace32 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:48 2016 -0400 net: dsa: mv88e6xxx: factorize ATU access Add a MV88E6XXX_FLAG_ATU flag to identify switch models with an Address Translation Unit. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 4 ++++ drivers/net/dsa/mv88e6xxx.c | 14 ++++++++++++++ drivers/net/dsa/mv88e6xxx.h | 24 ++++++++++++++++++------ 3 files changed, 36 insertions(+), 6 deletions(-) commit 54d77b5b6ac92c76ee7dd360d8b7b0dfabf9f5f0 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:47 2016 -0400 net: dsa: mv88e6xxx: factorize VTU access Add a MV88E6XXX_FLAG_VTU flag to indentify switch models with a VLAN Table Unit. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 5 +++++ drivers/net/dsa/mv88e6xxx.c | 16 ++++++++++++++++ drivers/net/dsa/mv88e6xxx.h | 24 ++++++++++++++++++------ 3 files changed, 39 insertions(+), 6 deletions(-) commit 936f234a9624dbce9f723cbb24f135c60f76c148 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:46 2016 -0400 net: dsa: mv88e6xxx: factorize bridge support Add MV88E6XXX_FLAG_PORTSTATE and MV88E6XXX_FLAG_VLANTABLE flags to identify switch models with required 802.1D operations. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 3 +++ drivers/net/dsa/mv88e6131.c | 1 + drivers/net/dsa/mv88e6xxx.c | 9 +++++++++ drivers/net/dsa/mv88e6xxx.h | 38 ++++++++++++++++++++++++++++++-------- 4 files changed, 43 insertions(+), 8 deletions(-) commit 2306251341bda39f1c3260bb96479db4dff2fe95 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:45 2016 -0400 net: dsa: mv88e6131: add registers access Only 6131 was not supporting the port registers access yet. Assume such support and use the unlock access routines in the meantime. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6131.c | 2 ++ drivers/net/dsa/mv88e6xxx.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) commit aadbdb8a0da6c38e8370fb7cd860f38b266c6037 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:44 2016 -0400 net: dsa: mv88e6xxx: factorize EEE access Add a MV88E6XXX_FLAG_EEE flag to describe switch models featuring Energy Efficient Ethernet. Use it to conditionally support such access in the common code. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 2 ++ drivers/net/dsa/mv88e6131.c | 2 ++ drivers/net/dsa/mv88e6171.c | 2 ++ drivers/net/dsa/mv88e6xxx.c | 6 ++++++ drivers/net/dsa/mv88e6xxx.h | 11 +++++++++-- 5 files changed, 21 insertions(+), 2 deletions(-) commit 1d13a06e00bdcde27d4d88e011841ff0924b3dde Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:43 2016 -0400 net: dsa: mv88e6xxx: factorize MAC address setting Some switch models have a dedicated register for Switch MAC/WoF/WoL. This register, when present, is used to indirectly set the switch MAC address, instead of a direct write to 3 global registers. Identify this feature and share a common mv88e6xxx_set_addr function. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 2 +- drivers/net/dsa/mv88e6131.c | 2 +- drivers/net/dsa/mv88e6171.c | 2 +- drivers/net/dsa/mv88e6352.c | 2 +- drivers/net/dsa/mv88e6xxx.c | 14 ++++++++++++-- drivers/net/dsa/mv88e6xxx.h | 17 ++++++++++++++--- 6 files changed, 30 insertions(+), 9 deletions(-) commit 6594f615792a52ccb66c07000ade917e8c8f62fd Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:42 2016 -0400 net: dsa: mv88e6xxx: factorize temperature access Add MV88E6XXX_FLAG_TEMP and MV88E6XXX_FLAG_TEMP_LIMIT flags to describe switch models featuring a temperature access. Use them to centralize the access to the temperature feature. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 3 +++ drivers/net/dsa/mv88e6131.c | 6 ++++++ drivers/net/dsa/mv88e6171.c | 3 +++ drivers/net/dsa/mv88e6xxx.c | 9 ++++++--- drivers/net/dsa/mv88e6xxx.h | 22 ++++++++++++++++++---- 5 files changed, 36 insertions(+), 7 deletions(-) commit d24645bebce2b13b3c5c49ff392cfb7f3efe0d76 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:41 2016 -0400 net: dsa: mv88e6xxx: factorize EEPROM access Add a MV88E6XXX_FLAG_EEPROM flag to describe switch models featuring an EEPROM and distribute the EEPROM access routines to all models. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 2 + drivers/net/dsa/mv88e6131.c | 2 + drivers/net/dsa/mv88e6171.c | 2 + drivers/net/dsa/mv88e6352.c | 207 +----------------------------------------- drivers/net/dsa/mv88e6xxx.c | 216 +++++++++++++++++++++++++++++++++++++++++++- drivers/net/dsa/mv88e6xxx.h | 18 +++- 6 files changed, 236 insertions(+), 211 deletions(-) commit 6d5834a1adefd6199bbd7c8b2ba3a131f38e161e Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:40 2016 -0400 net: dsa: mv88e6xxx: factorize PHY indirect access Some switch has dedicated SMI PHY Command and Data registers, used to indirectly access the PHYs, instead of direct access. Identify these switch models and make mv88e6xxx_phy_{read,write} generic enough to support every models. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6171.c | 4 ++-- drivers/net/dsa/mv88e6352.c | 4 ++-- drivers/net/dsa/mv88e6xxx.c | 37 ++++--------------------------------- drivers/net/dsa/mv88e6xxx.h | 22 +++++++++++++--------- 4 files changed, 21 insertions(+), 46 deletions(-) commit 8c9983a2249269f9b0f22bf070bf856ec1ff58d7 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:39 2016 -0400 net: dsa: mv88e6xxx: factorize PHY access with PPU Add a MV88E6XXX_FLAG_PPU flag to describe switch models with a PHY Polling Unit. This allows to merge PPU specific PHY access code in the share code. Make the mv88e6xxx_ppu_disable and mv88e6xxx_phy_{read,write}_ppu functions use unlocked register accesses in order to call them in mv88e6xxx_phy_{read,write} in a locked context. Since the PPU code is shared, also remove NET_DSA_MV88E6XXX_NEED_PPU. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/Kconfig | 5 ----- drivers/net/dsa/mv88e6131.c | 39 ++------------------------------------- drivers/net/dsa/mv88e6xxx.c | 40 +++++++++++++++++++++++++--------------- drivers/net/dsa/mv88e6xxx.h | 25 ++++++++++++++++--------- 4 files changed, 43 insertions(+), 66 deletions(-) commit b5058d7a308035233db18032edc17135cb17ae27 Author: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Date: Mon May 9 13:22:38 2016 -0400 net: dsa: mv88e6xxx: add flags to info Add a flags bitmap to the info structure in order to identify features supported or not by the different switch models. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net> drivers/net/dsa/mv88e6123.c | 3 +++ drivers/net/dsa/mv88e6131.c | 4 ++++ drivers/net/dsa/mv88e6171.c | 4 ++++ drivers/net/dsa/mv88e6352.c | 6 ++++++ drivers/net/dsa/mv88e6xxx.h | 21 +++++++++++++++++++++ 5 files changed, 38 insertions(+) commit 41842dc1f072d69ca40f36ce5032ccfd23488f51 Author: Helmut Schaa <helmut.schaa@googlemail.com> Date: Fri Apr 29 15:06:34 2016 +0200 ath9k: Fix symbol overlap window for half/quarter channels Since commit cd6cfd7311a385144a2f9c74f692ae2df3ae033f "ath9k: do not set half/quarter channel flags in AR_PHY_MODE" the condition "rfMode & (AR_PHY_MODE_QUARTER | AR_PHY_MODE_HALF)" would never evaluate to true. Fix this by using the available IS_CHAN_HALF_RATE and IS_CHAN_QUARTER_RATE marcros instead. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Cc: Felix Fietkau <nbd@openwrt.org> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) commit dd254f5a382cc7879db7a07ed266b12d38fe3ab6 Author: Al Viro <viro@zeniv.linux.org.uk> Date: Mon May 9 11:54:48 2016 -0400 fold checks into iterate_and_advance() they are open-coded in all users except iov_iter_advance(), and there they wouldn't be a bad idea either - as it is, iov_iter_advance(i, 0) ends up dereferencing potentially past the end of iovec array. It doesn't do anything with the value it reads, and very unlikely to trigger an oops on dereference, but it is not impossible. Reported-by: Jiri Slaby <jslaby@suse.cz> Reported-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> lib/iov_iter.c | 104 ++++++++++++++++++++------------------------------------- 1 file changed, 36 insertions(+), 68 deletions(-) commit ec788795dde419af4935c3c9d08d641707114eec Author: Alejandro Torrado <aletorrado@gmail.com> Date: Mon Apr 18 13:37:00 2016 -0300 [media] dib0700: add USB ID for another STK8096-PVR ref design based card USB_PID_DIBCOM_STK8096GP also comes with USB_VID_DIBCOM vendor ID. Signed-off-by: Alejandro Torrado <aletorrado@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> drivers/media/usb/dvb-usb/dib0700_devices.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) commit b0291715d31c891bcb5de936271881f58600f7c1 Author: Helmut Schaa <helmut.schaa@googlemail.com> Date: Thu Apr 28 16:45:06 2016 +0200 ath9k: Simplify ar9003_hw_tx99_set_txpower There's no need to keep the same for loop twice in the code. Move the txpower cap before the loop to reduce code complexity. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> drivers/net/wireless/ath/ath9k/ar9003_phy.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) commit e7ae328961ffcf78bb18d0ecdb1e5a50d1185336 Author: Helmut Schaa <helmut.schaa@googlemail.com> Date: Thu Apr 28 16:45:05 2016 +0200 ath9k: Move TX99 config option under ath9k debugging Since ATH9K_TX99 depends on ATH9K_DEBUGFS anyway move it there such that "make menuconfig" will indent TX99 support below ath9k debugging. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> drivers/net/wireless/ath/ath9k/Kconfig | 40 +++++++++++++++++----------------- 1 file changed, 20 insertions(+), 20 deletions(-) commit 8569f5915456f462c8a88b751fa6c14596bfa3fe Author: Helmut Schaa <helmut.schaa@googlemail.com> Date: Thu Apr 28 16:45:04 2016 +0200 ath9k: reuse ar9003_hw_tx_power_regwrite for tx99 setup The same functionality as ar9003_hw_tx_power_regwrite is hardcoded in ar9003_hw_tx99_set_txpower. Just reuse the existing ar9003_hw_tx_power_regwrite for TX99 setup too. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 2 +- drivers/net/wireless/ath/ath9k/ar9003_eeprom.h | 1 + drivers/net/wireless/ath/ath9k/ar9003_phy.c | 60 ++------------------------ 3 files changed, 5 insertions(+), 58 deletions(-) commit eca4ca84a965d7fcc3430439898d0728818edc56 Author: Javier Martinez Canillas <javier@osg.samsung.com> Date: Thu Apr 14 22:00:08 2016 -0300 [media] tvp5150: propagate I2C write error in .s_register callback The tvp5150_write() function can fail so don't return 0 unconditionally in tvp5150_s_register() but propagate what's returned by tvp5150_write(). Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> drivers/media/i2c/tvp5150.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) commit cacdd6a4a8d5115da2767769b44bd435455f6424 Author: Javier Martinez Canillas <javier@osg.samsung.com> Date: Thu Apr 14 22:00:07 2016 -0300 [media] tvp5150: return I2C write operation failure to callers The tvp5150_write() function calls i2c_smbus_write_byte_data() that can fail but does not propagate the error to the caller. Instead it just prints a debug, so callers can't know if the operation failed. So change the function to return the error code to the caller so it knows that the write failed and also print an error instead of just printing a debug information. While being there remove the inline keyword from tvp5150_write() to make it consistent with tvp5150_read() and also because it's called in a lot of places, so making inline is in fact counter productive since it makes the kernel image size to be much bigger (~16 KiB). Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> drivers/media/i2c/tvp5150.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) commit 6c0b43df74f900e7f31a49d1844f166df0f8afc6 Merge: e88ccab 8d7f2d8 a5c0e0b 3d1a244 a0d284d d546635 e85e8f6 Author: Joerg Roedel <jroedel@suse.de> Date: Mon May 9 19:39:17 2016 +0200 Merge branches 'arm/io-pgtable', 'arm/rockchip', 'arm/omap', 'x86/vt-d', 'ppc/pamu', 'core' and 'x86/amd' into next commit d546635731317a5f8923b1045d0f4403e8024a7d Author: Robin Murphy <robin.murphy@arm.com> Date: Mon May 9 17:20:09 2016 +0100 iommu/arm-smmu: Use per-domain page sizes. Now that we can accurately reflect the context format we choose for each domain, do that instead of imposing the global lowest-common-denominator restriction and potentially ending up with nothing. We currently have a strict 1:1 correspondence between domains and context banks, so we don't need to entertain the possibility of multiple formats _within_ a domain. Signed-off-by: Will Deacon <will.deacon@arm.com> [rm: split from original patch, added SMMUv3] Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de> drivers/iommu/arm-smmu-v3.c | 19 ++++++++++--------- drivers/iommu/arm-smmu.c | 27 +++++++++++++++------------ 2 files changed, 25 insertions(+), 21 deletions(-) commit 11a2a949d05e9d2d9823f0c45fa476743d9e462b Author: Olli Salonen <olli.salonen@iki.fi> Date: Mon Apr 4 12:12:52 2016 -0300 [media] em28xx: add support for Hauppauge WinTV-dualHD DVB tuner Hauppauge WinTV-dualHD is a USB 2.0 dual DVB-T/T2/C tuner with following components: USB bridge: Empia EM28274 (chip id is the same as EM28174) Demodulator: 2x Silicon Labs Si2168-B40 Tuner: 2x Silicon Labs Si2157-A30 This patch adds support only for the first tuner. The demodulator needs firmware, available for example here: http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/Si2168-B40/4.0.11/ The demodulators sit on the same I2C bus and their addresses are 0x64 and 0x67. The tuners are behind the demodulators and their addresses are 0x60 and 0x63. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Documentation/video4linux/CARDLIST.em28xx | 1 + drivers/media/usb/em28xx/em28xx-cards.c | 58 ++++++++++++++++++++++++++++ drivers/media/usb/em28xx/em28xx-dvb.c | 64 +++++++++++++++++++++++++++++++ drivers/media/usb/em28xx/em28xx-reg.h | 13 +++++++ drivers/media/usb/em28xx/em28xx.h | 2 + 5 files changed, 138 insertions(+) commit 628288d08a6162aa50e4dbd5918a9867b4c40e2f Author: Mauro Carvalho Chehab <mchehab@osg